Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_8_Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/package.mo", uses=false) Using package Buildings with version 8.1.4 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL") translateModel(Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001029/0.001034, allocations: 102.5 kB / 16.37 MB, free: 6.367 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.0009449/0.0009449, allocations: 191.3 kB / 17.3 MB, free: 5.914 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.387/1.387, allocations: 205.1 MB / 223.2 MB, free: 12.27 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/package.mo): time 1.778/1.778, allocations: 292.3 MB / 0.5496 GB, free: 17.56 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 3.032e-05/3.034e-05, allocations: 6.219 kB / 0.6728 GB, free: 5.898 MB / 0.545 GB Notification: Performance of NFInst.instantiate(Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL): time 0.006854/0.0069, allocations: 5.523 MB / 0.6782 GB, free: 356 kB / 0.545 GB Notification: Performance of NFInst.instExpressions: time 0.004036/0.01096, allocations: 2.674 MB / 0.6809 GB, free: 13.66 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002851/0.01126, allocations: 19.88 kB / 0.6809 GB, free: 13.64 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.00163/0.0129, allocations: 0.6798 MB / 0.6815 GB, free: 12.96 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0008054/0.01371, allocations: 413.7 kB / 0.6819 GB, free: 12.55 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0008641/0.01464, allocations: 407 kB / 0.6823 GB, free: 12.16 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.0009898/0.01563, allocations: 1.064 MB / 0.6834 GB, free: 11.09 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.000572/0.01621, allocations: 406.6 kB / 0.6837 GB, free: 10.69 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0004018/0.01662, allocations: 374.5 kB / 0.6841 GB, free: 10.32 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003425/0.01698, allocations: 318.5 kB / 0.6844 GB, free: 10.01 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 6.527e-05/0.01705, allocations: 40 kB / 0.6844 GB, free: 9.973 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0005783/0.01764, allocations: 319.3 kB / 0.6847 GB, free: 9.66 MB / 0.5606 GB Notification: Performance of combineBinaries: time 0.0007313/0.01838, allocations: 1.024 MB / 0.6857 GB, free: 8.625 MB / 0.5606 GB Notification: Performance of replaceArrayConstructors: time 0.0003971/0.01878, allocations: 0.6722 MB / 0.6864 GB, free: 7.945 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 0.0001108/0.0189, allocations: 103.7 kB / 0.6865 GB, free: 7.844 MB / 0.5606 GB Notification: Performance of FrontEnd: time 7.582e-05/0.01898, allocations: 19.88 kB / 0.6865 GB, free: 7.824 MB / 0.5606 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 140 (108) * Number of variables: 140 (104) Notification: Performance of Bindings: time 0.002248/0.02123, allocations: 2.628 MB / 0.6891 GB, free: 5.074 MB / 0.5606 GB Notification: Performance of FunctionAlias: time 0.00018/0.02142, allocations: 119.8 kB / 0.6892 GB, free: 4.957 MB / 0.5606 GB Notification: Performance of Early Inline: time 0.001432/0.02286, allocations: 1.467 MB / 0.6906 GB, free: 3.461 MB / 0.5606 GB Notification: Performance of simplify1: time 0.0001204/0.02299, allocations: 115.8 kB / 0.6907 GB, free: 3.348 MB / 0.5606 GB Notification: Performance of Alias: time 0.001798/0.0248, allocations: 1.697 MB / 0.6924 GB, free: 1.348 MB / 0.5606 GB Notification: Performance of simplify2: time 9.479e-05/0.0249, allocations: 99.86 kB / 0.6925 GB, free: 1.25 MB / 0.5606 GB Notification: Performance of Events: time 0.0001922/0.0251, allocations: 147.7 kB / 0.6926 GB, free: 1.105 MB / 0.5606 GB Notification: Performance of Detect States: time 0.0003839/0.02549, allocations: 385.6 kB / 0.693 GB, free: 0.7148 MB / 0.5606 GB Notification: Performance of Partitioning: time 0.0005102/0.02601, allocations: 0.495 MB / 0.6935 GB, free: 192 kB / 0.5606 GB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency load_sc_2.X could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) load_sc_2.terminal.v = {{load_sc_2.R, -load_sc_2.X} * load_sc_2.terminal.i, {load_sc_2.X, load_sc_2.R} * load_sc_2.terminal.i} ($RES_SIM_59) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (76/121) *************************** (1) [DER-] (1) Real $DER.load_sc_1.theRef (2) [ALGB] (2) Real[2] RL_3.terminal_p.v (3) [ALGB] (2) Real[2] E.terminal.v (4) [ALGB] (2) flow Real[2] R_1.terminal_p.i (start = {0.0 for $i1 in 1:2}) (5) [ALGB] (1) Real[1] L_1.terminal_p.theta (6) [ALGB] (2) flow Real[2] load_sc_1.terminal.i (start = {0.0 for $i1 in 1:2}) (7) [ALGB] (2) Real[2] load_sc_1.S = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.load_sc_1.PhaseSystem.phasePowers_vi(load_sc_1.v, -load_sc_1.i) (8) [ALGB] (2) Real[2] R_1.terminal_n.v (9) [ALGB] (1) protected Real load_sc_2.omega (10) [ALGB] (1) protected Real load_sc_1.X (start = 1.0) (11) [ALGB] (1) Real[1] RL_3.terminal_n.theta (12) [ALGB] (1) Real[1] R_1.terminal_p.theta (13) [ALGB] (1) Real[1] RL_2.terminal_p.theta (14) [ALGB] (2) protected Real[2] RL_2.i_p (start = RL_2.i_start, StateSelect = prefer) (15) [DER-] (1) Real $DER.load_sc_2.theRef (16) [ALGB] (2) flow Real[2] R_1.terminal_n.i (start = {0.0 for $i1 in 1:2}) (17) [ALGB] (2) Real[2] E.S = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.E.PhaseSystem.phasePowers_vi(E.terminal.v, E.terminal.i) (18) [ALGB] (2) Real[2] load_sc_3.S = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.load_sc_3.PhaseSystem.phasePowers_vi(load_sc_3.v, -load_sc_3.i) (19) [ALGB] (1) protected Real load_sc_1.omega (20) [ALGB] (2) Real[2] load_sc_1.i = load_sc_1.terminal.i (start = {0.0 for $i1 in 1:2}) (21) [ALGB] (1) protected Real load_sc_3.X (start = 1.0) (22) [ALGB] (2) flow Real[2] RL_2.terminal_n.i (start = {0.0 for $i1 in 1:2}) (23) [ALGB] (1) Real[1] E.terminal.theta (24) [ALGB] (1) Real[1] load_sc_2.terminal.theta (25) [DER-] (1) Real $DER.load_sc_3.theRef (26) [ALGB] (2) Real[2] load_sc_1.v = load_sc_1.terminal.v (start = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.load_sc_1.PhaseSystem.phaseVoltages(load_sc_1.V_nominal, 0.0)) (27) [DER-] (2) Real[2] $DER.RL_3.i_p (28) [ALGB] (4) Real[2, 2] $FUN_3 (29) [ALGB] (4) Real[2, 2] $FUN_2 (30) [ALGB] (4) Real[2, 2] $FUN_1 (31) [DER-] (1) Real $DER.L_1.theRef (32) [ALGB] (2) Real[2] load_sc_3.i = load_sc_3.terminal.i (start = {0.0 for $i1 in 1:2}) (33) [ALGB] (2) Real[2] RL_2.terminal_n.v (34) [ALGB] (1) Real[1] RL_3.terminal_p.theta (35) [ALGB] (1) Real[1] R_1.terminal_n.theta (36) [ALGB] (2) flow Real[2] RL_2.terminal_p.i (start = {0.0 for $i1 in 1:2}) (37) [ALGB] (1) Real RL_2.R_actual (38) [ALGB] (2) Real[2] load_sc_3.v = load_sc_3.terminal.v (start = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.load_sc_3.PhaseSystem.phaseVoltages(load_sc_3.V_nominal, 0.0)) (39) [DER-] (1) Real $DER.RL_2.theRef (40) [ALGB] (2) Real[2] load_sc_3.terminal.v (41) [ALGB] (2) Real[2] L_1.terminal_p.v (42) [ALGB] (2) Real[2] RL_2.terminal_p.v (43) [ALGB] (1) Real[1] load_sc_1.terminal.theta (44) [ALGB] (1) protected Real RL_3.omega (45) [ALGB] (1) protected Real L_1.omega (46) [ALGB] (1) Real RL_3.LossPower (47) [ALGB] (2) flow Real[2] load_sc_3.terminal.i (start = {0.0 for $i1 in 1:2}) (48) [ALGB] (1) Real R_1.R_actual (49) [ALGB] (2) Real[2] load_sc_2.S = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.load_sc_2.PhaseSystem.phasePowers_vi(load_sc_2.v, -load_sc_2.i) (50) [ALGB] (2) flow Real[2] L_1.terminal_p.i (start = {0.0 for $i1 in 1:2}) (51) [ALGB] (1) Real R_1.LossPower (52) [ALGB] (1) protected Real load_sc_2.X (start = 1.0) (53) [DER-] (1) Real $DER.RL_3.theRef (54) [ALGB] (2) Real[2] L_1.terminal_n.v (55) [ALGB] (1) protected Real RL_2.omega (56) [ALGB] (2) Real[2] load_sc_2.terminal.v (57) [DISC] (1) Boolean $SEV_3 (58) [ALGB] (2) flow Real[2] RL_3.terminal_n.i (start = {0.0 for $i1 in 1:2}) (59) [DISC] (1) Boolean $SEV_2 (60) [DISC] (1) Boolean $SEV_1 (61) [ALGB] (1) Real[1] L_1.terminal_n.theta (62) [ALGB] (2) flow Real[2] L_1.terminal_n.i (start = {0.0 for $i1 in 1:2}) (63) [ALGB] (2) Real[2] load_sc_2.i = load_sc_2.terminal.i (start = {0.0 for $i1 in 1:2}) (64) [ALGB] (2) flow Real[2] load_sc_2.terminal.i (start = {0.0 for $i1 in 1:2}) (65) [ALGB] (2) Real[2] RL_3.terminal_n.v (66) [ALGB] (1) Real[1] load_sc_3.terminal.theta (67) [ALGB] (1) Real[1] RL_2.terminal_n.theta (68) [ALGB] (2) Real[2] load_sc_2.v = load_sc_2.terminal.v (start = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.load_sc_2.PhaseSystem.phaseVoltages(load_sc_2.V_nominal, 0.0)) (69) [ALGB] (2) flow Real[2] RL_3.terminal_p.i (start = {0.0 for $i1 in 1:2}) (70) [ALGB] (2) flow Real[2] E.terminal.i (start = {0.0 for $i1 in 1:2}) (71) [ALGB] (2) Real[2] R_1.terminal_p.v (72) [ALGB] (2) Real[2] load_sc_1.terminal.v (73) [ALGB] (1) Real RL_3.R_actual (74) [ALGB] (1) protected Real load_sc_3.omega (75) [ALGB] (1) Real E.phi = Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.E.PhaseSystem.phase(E.terminal.v) - Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACLine_RL.E.PhaseSystem.phase(-E.terminal.i) (76) [ALGB] (1) Real RL_2.LossPower System Equations (80/121) *************************** (1) [SCAL] (1) load_sc_3.theRef = load_sc_3.terminal.theta[1] ($RES_SIM_15) (2) [SCAL] (1) RL_3.R_actual = (10.0 * (RL_3.M + ((-273.15) + RL_3.T))) / (RL_3.M + ((-273.15) + RL_3.T_ref)) ($RES_SIM_17) (3) [ARRY] (1) RL_3.terminal_p.theta = RL_3.terminal_n.theta ($RES_SIM_19) (4) [SCAL] (1) RL_2.terminal_n.i[1] + RL_3.terminal_n.i[1] + E.terminal.i[1] + R_1.terminal_n.i[1] = 0.0 ($RES_SIM_90) (5) [SCAL] (1) E.terminal.v[2] = R_1.terminal_n.v[2] ($RES_SIM_91) (6) [SCAL] (1) E.terminal.v[2] = RL_2.terminal_n.v[2] ($RES_SIM_92) (7) [SCAL] (1) E.terminal.v[2] = RL_3.terminal_n.v[2] ($RES_SIM_93) (8) [SCAL] (1) E.terminal.v[1] = R_1.terminal_n.v[1] ($RES_SIM_94) (9) [ARRY] (2) load_sc_2.terminal.v = {{load_sc_2.R, -load_sc_2.X} * load_sc_2.terminal.i, {load_sc_2.X, load_sc_2.R} * load_sc_2.terminal.i} ($RES_SIM_59) (10) [SCAL] (1) E.terminal.v[1] = RL_2.terminal_n.v[1] ($RES_SIM_95) (11) [SCAL] (1) E.terminal.v[1] = RL_3.terminal_n.v[1] ($RES_SIM_96) (12) [SCAL] (1) E.terminal.theta[1] = R_1.terminal_n.theta[1] ($RES_SIM_97) (13) [SCAL] (1) E.terminal.theta[1] = RL_2.terminal_n.theta[1] ($RES_SIM_98) (14) [SCAL] (1) E.terminal.theta[1] = RL_3.terminal_n.theta[1] ($RES_SIM_99) (15) [ARRY] (2) load_sc_1.v = load_sc_1.terminal.v ($RES_BND_110) (16) [ARRY] (2) load_sc_1.i = load_sc_1.terminal.i ($RES_BND_111) (17) [ARRY] (2) load_sc_1.S = {load_sc_1.v[1] * (-load_sc_1.i)[1] + load_sc_1.v[2] * (-load_sc_1.i)[2], load_sc_1.v[2] * (-load_sc_1.i)[1] - load_sc_1.v[1] * (-load_sc_1.i)[2]} ($RES_BND_112) (18) [FOR-] (2) ($RES_SIM_100) (18) [----] for $i1 in 1:2 loop (18) [----] [SCAL] (1) L_1.terminal_p.i[$i1] + load_sc_1.terminal.i[$i1] = 0.0 ($RES_SIM_101) (18) [----] end for; (19) [ARRY] (2) load_sc_2.v = load_sc_2.terminal.v ($RES_BND_113) (20) [ARRY] (2) load_sc_2.i = load_sc_2.terminal.i ($RES_BND_114) (21) [SCAL] (1) RL_3.LossPower = RL_3.R_actual * (RL_3.i_p[1] ^ 2.0 + RL_3.i_p[2] ^ 2.0) ($RES_SIM_20) (22) [ARRY] (2) L_1.terminal_p.v = load_sc_1.terminal.v ($RES_SIM_102) (23) [ARRY] (2) load_sc_2.S = {load_sc_2.v[1] * (-load_sc_2.i)[1] + load_sc_2.v[2] * (-load_sc_2.i)[2], load_sc_2.v[2] * (-load_sc_2.i)[1] - load_sc_2.v[1] * (-load_sc_2.i)[2]} ($RES_BND_115) (24) [ARRY] (2) 0.026525823848649224 * RL_3.omega * {-RL_3.i_p[2], RL_3.i_p[1]} + 0.026525823848649224 * $DER.RL_3.i_p + RL_3.i_p * $FUN_3 = RL_3.terminal_p.v - RL_3.terminal_n.v ($RES_SIM_21) (25) [ARRY] (1) L_1.terminal_p.theta = load_sc_1.terminal.theta ($RES_SIM_103) (26) [ARRY] (2) load_sc_3.v = load_sc_3.terminal.v ($RES_BND_116) (27) [ARRY] (2) RL_3.i_p = RL_3.terminal_p.i ($RES_SIM_22) (28) [FOR-] (2) ($RES_SIM_104) (28) [----] for $i1 in 1:2 loop (28) [----] [SCAL] (1) R_1.terminal_p.i[$i1] + L_1.terminal_n.i[$i1] = 0.0 ($RES_SIM_105) (28) [----] end for; (29) [ARRY] (2) load_sc_3.i = load_sc_3.terminal.i ($RES_BND_117) (30) [ARRY] (2) RL_3.terminal_p.i = -RL_3.terminal_n.i ($RES_SIM_23) (31) [ARRY] (2) load_sc_3.S = {load_sc_3.v[1] * (-load_sc_3.i)[1] + load_sc_3.v[2] * (-load_sc_3.i)[2], load_sc_3.v[2] * (-load_sc_3.i)[1] - load_sc_3.v[1] * (-load_sc_3.i)[2]} ($RES_BND_118) (32) [SCAL] (1) RL_3.omega = $DER.RL_3.theRef ($RES_SIM_24) (33) [ARRY] (2) R_1.terminal_p.v = L_1.terminal_n.v ($RES_SIM_106) (34) [SCAL] (1) load_sc_2.X = load_sc_2.omega * load_sc_2.L ($RES_SIM_60) (35) [SCAL] (1) RL_3.theRef = RL_3.terminal_p.theta[1] ($RES_SIM_25) (36) [ARRY] (1) R_1.terminal_p.theta = L_1.terminal_n.theta ($RES_SIM_107) (37) [SCAL] (1) load_sc_2.omega = $DER.load_sc_2.theRef ($RES_SIM_61) (38) [ARRY] (2) L_1.terminal_p.i = -L_1.terminal_n.i ($RES_SIM_26) (39) [SCAL] (1) load_sc_2.theRef = load_sc_2.terminal.theta[1] ($RES_SIM_62) (40) [ARRY] (1) L_1.terminal_p.theta = L_1.terminal_n.theta ($RES_SIM_27) (41) [ARRY] (2) 0.026525823848649224 * L_1.omega * {-L_1.terminal_p.i[2], L_1.terminal_p.i[1]} = L_1.terminal_p.v - L_1.terminal_n.v ($RES_SIM_28) (42) [SCAL] (1) L_1.omega = $DER.L_1.theRef ($RES_SIM_29) (43) [SCAL] (1) L_1.theRef = L_1.terminal_p.theta[1] ($RES_SIM_30) (44) [ARRY] (2) R_1.terminal_p.i = -R_1.terminal_n.i ($RES_SIM_32) (45) [SCAL] (1) R_1.R_actual = (10.0 * (R_1.M + ((-273.15) + R_1.T))) / (R_1.M + ((-273.15) + R_1.T_ref)) ($RES_SIM_33) (46) [ARRY] (1) R_1.terminal_p.theta = R_1.terminal_n.theta ($RES_SIM_35) (47) [SCAL] (1) R_1.LossPower = R_1.R_actual * (R_1.terminal_p.i[1] ^ 2.0 + R_1.terminal_p.i[2] ^ 2.0) ($RES_SIM_36) (48) [ARRY] (2) R_1.terminal_p.v - R_1.terminal_n.v = R_1.terminal_p.i * $FUN_2 ($RES_SIM_37) (49) [ARRY] (4) $FUN_1 = diagonal(fill(1.0, 2) .* RL_2.R_actual) ($RES_$AUX_121) (50) [ARRY] (2) load_sc_1.terminal.v = {{load_sc_1.R, -load_sc_1.X} * load_sc_1.terminal.i, {load_sc_1.X, load_sc_1.R} * load_sc_1.terminal.i} ($RES_SIM_74) (51) [SCAL] (1) RL_2.R_actual = (10.0 * (RL_2.M + ((-273.15) + RL_2.T))) / (RL_2.M + ((-273.15) + RL_2.T_ref)) ($RES_SIM_39) (52) [ARRY] (4) $FUN_2 = diagonal(fill(1.0, 2) .* R_1.R_actual) ($RES_$AUX_120) (53) [SCAL] (1) load_sc_1.X = load_sc_1.omega * load_sc_1.L ($RES_SIM_75) (54) [SCAL] (1) load_sc_1.omega = $DER.load_sc_1.theRef ($RES_SIM_76) (55) [SCAL] (1) load_sc_1.theRef = load_sc_1.terminal.theta[1] ($RES_SIM_77) (56) [ARRY] (2) E.terminal.v = {E.V * cos(E.phiSou), E.V * sin(E.phiSou)} ($RES_SIM_78) (57) [ARRY] (4) $FUN_3 = diagonal(fill(1.0, 2) .* RL_3.R_actual) ($RES_$AUX_119) (58) [ARRY] (1) RL_2.terminal_p.theta = RL_2.terminal_n.theta ($RES_SIM_41) (59) [SCAL] (1) RL_2.LossPower = RL_2.R_actual * (RL_2.i_p[1] ^ 2.0 + RL_2.i_p[2] ^ 2.0) ($RES_SIM_42) (60) [ARRY] (2) 0.026525823848649224 * RL_2.omega * {-RL_2.i_p[2], RL_2.i_p[1]} + RL_2.i_p * $FUN_1 = RL_2.terminal_p.v - RL_2.terminal_n.v ($RES_SIM_43) (61) [ARRY] (2) RL_2.i_p = RL_2.terminal_p.i ($RES_SIM_44) (62) [SCAL] (1) E.terminal.theta[1] = 6.283185307179586 * E.f * time ($RES_SIM_80) (63) [ARRY] (2) RL_2.terminal_p.i = -RL_2.terminal_n.i ($RES_SIM_45) (64) [FOR-] (2) ($RES_SIM_81) (64) [----] for $i1 in 1:2 loop (64) [----] [SCAL] (1) RL_3.terminal_p.i[$i1] + load_sc_3.terminal.i[$i1] = 0.0 ($RES_SIM_82) (64) [----] end for; (65) [SCAL] (1) RL_2.omega = $DER.RL_2.theRef ($RES_SIM_46) (66) [SCAL] (1) RL_2.theRef = RL_2.terminal_p.theta[1] ($RES_SIM_47) (67) [ARRY] (2) RL_3.terminal_p.v = load_sc_3.terminal.v ($RES_SIM_83) (68) [ARRY] (1) RL_3.terminal_p.theta = load_sc_3.terminal.theta ($RES_SIM_84) (69) [FOR-] (2) ($RES_SIM_85) (69) [----] for $i1 in 1:2 loop (69) [----] [SCAL] (1) RL_2.terminal_p.i[$i1] + load_sc_2.terminal.i[$i1] = 0.0 ($RES_SIM_86) (69) [----] end for; (70) [SCAL] (1) $SEV_1 = RL_3.R_actual >= 0.0 ($RES_EVT_123) (71) [SCAL] (1) $SEV_2 = R_1.R_actual >= 0.0 ($RES_EVT_124) (72) [ARRY] (2) RL_2.terminal_p.v = load_sc_2.terminal.v ($RES_SIM_87) (73) [SCAL] (1) $SEV_3 = RL_2.R_actual >= 0.0 ($RES_EVT_125) (74) [ARRY] (1) RL_2.terminal_p.theta = load_sc_2.terminal.theta ($RES_SIM_88) (75) [SCAL] (1) RL_2.terminal_n.i[2] + RL_3.terminal_n.i[2] + E.terminal.i[2] + R_1.terminal_n.i[2] = 0.0 ($RES_SIM_89) (76) [ARRY] (2) load_sc_3.terminal.v = {{load_sc_3.R, -load_sc_3.X} * load_sc_3.terminal.i, {load_sc_3.X, load_sc_3.R} * load_sc_3.terminal.i} ($RES_SIM_12) (77) [SCAL] (1) load_sc_3.X = load_sc_3.omega * load_sc_3.L ($RES_SIM_13) (78) [ARRY] (2) E.S = {E.terminal.v[1] * E.terminal.i[1] + E.terminal.v[2] * E.terminal.i[2], E.terminal.v[2] * E.terminal.i[1] - E.terminal.v[1] * E.terminal.i[2]} ($RES_BND_108) (79) [SCAL] (1) load_sc_3.omega = $DER.load_sc_3.theRef ($RES_SIM_14) (80) [SCAL] (1) E.phi = atan2(E.terminal.v[2], E.terminal.v[1]) - atan2((-E.terminal.i)[2], (-E.terminal.i)[1]) ($RES_BND_109)