Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_maint.7.0.x_Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor.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 7.0.3-maint.7.0.x/package.mo", uses=false) Using package Buildings with version 7.0.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 7.0.3-maint.7.0.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.OnePhase.Sensors.Examples.GeneralizedSensor,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_maint.7.0.x_Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor") translateModel(Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_maint.7.0.x_Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001244/0.001244, allocations: 104.1 kB / 16.42 MB, free: 6.523 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.001174/0.001175, allocations: 185.9 kB / 17.36 MB, free: 5.746 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.273/1.273, allocations: 205.1 MB / 223.2 MB, free: 12.26 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 7.0.3-maint.7.0.x/package.mo): time 1.267/1.267, allocations: 251.7 MB / 0.51 GB, free: 432 kB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.18e-05/2.181e-05, allocations: 6.078 kB / 0.7264 GB, free: 4.785 MB / 0.5606 GB Notification: Performance of NFInst.instantiate(Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor): time 0.00411/0.004139, allocations: 3.081 MB / 0.7294 GB, free: 1.688 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.002458/0.00661, allocations: 1.726 MB / 0.7311 GB, free: 15.95 MB / 0.5762 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001049/0.006727, allocations: 4 kB / 0.7311 GB, free: 15.95 MB / 0.5762 GB Notification: Performance of NFTyping.typeComponents: time 0.0009172/0.00765, allocations: 330.7 kB / 0.7314 GB, free: 15.62 MB / 0.5762 GB Notification: Performance of NFTyping.typeBindings: time 0.0004041/0.008064, allocations: 215.1 kB / 0.7316 GB, free: 15.41 MB / 0.5762 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004179/0.008492, allocations: 183.5 kB / 0.7318 GB, free: 15.23 MB / 0.5762 GB Notification: Performance of NFFlatten.flatten: time 0.0003841/0.008885, allocations: 358.9 kB / 0.7321 GB, free: 14.88 MB / 0.5762 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0003179/0.009211, allocations: 177.9 kB / 0.7323 GB, free: 14.7 MB / 0.5762 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0001716/0.009391, allocations: 131.5 kB / 0.7324 GB, free: 14.57 MB / 0.5762 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002363/0.009638, allocations: 131.5 kB / 0.7325 GB, free: 14.45 MB / 0.5762 GB Notification: Performance of NFPackage.collectConstants: time 2.828e-05/0.009674, allocations: 19.98 kB / 0.7325 GB, free: 14.43 MB / 0.5762 GB Notification: Performance of NFFlatten.collectFunctions: time 0.000292/0.009971, allocations: 203.6 kB / 0.7327 GB, free: 14.23 MB / 0.5762 GB Notification: Performance of combineBinaries: time 0.00027/0.01025, allocations: 348.5 kB / 0.7331 GB, free: 13.88 MB / 0.5762 GB Notification: Performance of replaceArrayConstructors: time 0.0001397/0.0104, allocations: 220.5 kB / 0.7333 GB, free: 13.67 MB / 0.5762 GB Notification: Performance of NFVerifyModel.verify: time 4.085e-05/0.01044, allocations: 31.88 kB / 0.7333 GB, free: 13.64 MB / 0.5762 GB Notification: Performance of FrontEnd: time 2.402e-05/0.01047, allocations: 7.984 kB / 0.7333 GB, free: 13.63 MB / 0.5762 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 59 (41) * Number of variables: 59 (40) Notification: Performance of Bindings: time 0.000994/0.01147, allocations: 1.019 MB / 0.7343 GB, free: 12.5 MB / 0.5762 GB Notification: Performance of FunctionAlias: time 0.0001094/0.01159, allocations: 78.36 kB / 0.7344 GB, free: 12.43 MB / 0.5762 GB Notification: Performance of Early Inline: time 0.0007807/0.01238, allocations: 0.8037 MB / 0.7352 GB, free: 11.59 MB / 0.5762 GB Notification: Performance of simplify1: time 6.388e-05/0.01245, allocations: 63.91 kB / 0.7352 GB, free: 11.53 MB / 0.5762 GB Notification: Performance of Alias: time 0.0006777/0.01313, allocations: 0.6038 MB / 0.7358 GB, free: 10.84 MB / 0.5762 GB Notification: Performance of simplify2: time 6.665e-05/0.01321, allocations: 55.92 kB / 0.7359 GB, free: 10.78 MB / 0.5762 GB Notification: Performance of Events: time 0.0001011/0.01332, allocations: 75.89 kB / 0.7359 GB, free: 10.71 MB / 0.5762 GB Notification: Performance of Detect States: time 0.0002444/0.01357, allocations: 198.3 kB / 0.7361 GB, free: 10.5 MB / 0.5762 GB Notification: Performance of Partitioning: time 0.0002692/0.01385, allocations: 267.3 kB / 0.7364 GB, free: 10.21 MB / 0.5762 GB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency loa.Y[1] could not be divided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) loa.omega * {-loa.q[2], loa.q[1]} + $DER.loa.q + loa.Y[1] * loa.v = loa.i ($RES_SIM_17) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (34/56) ************************** (1) [ALGB] (4) Real[2, 2] $FUN_1 (2) [ALGB] (2) Real[2] loa.i = loa.terminal.i (start = {0.0 for $i1 in 1:2}) (3) [ALGB] (2) Real[2] sou.S = Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor.sou.PhaseSystem.phasePowers_vi(sou.terminal.v, sou.terminal.i) (4) [ALGB] (2) Real[2] loa.terminal.v (5) [DISC] (1) Boolean $SEV_0 (6) [ALGB] (2) Real[2] sen.terminal_n.v (7) [DER-] (2) Real[2] $DER.loa.q (8) [ALGB] (1) Real res.LossPower (9) [ALGB] (1) Real[1] res.terminal_p.theta (10) [ALGB] (1) Real[1] loa.terminal.theta (11) [DER-] (1) Real $DER.loa.theRef (12) [ALGB] (2) Real[2] res.terminal_n.v (13) [ALGB] (1) Real sen.V = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(sen.terminal_n.v) (14) [ALGB] (1) Real[1] res.terminal_n.theta (15) [ALGB] (2) protected Real[2] loa.Y (16) [ALGB] (2) Real[2] sen.S = Buildings.Electrical.PhaseSystems.OnePhase.phasePowers_vi(sen.terminal_n.v, sen.terminal_n.i) (17) [ALGB] (1) Real sou.phi = Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor.sou.PhaseSystem.phase(sou.terminal.v) - Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor.sou.PhaseSystem.phase(-sou.terminal.i) (18) [ALGB] (1) Real[1] sou.terminal.theta (19) [ALGB] (2) Real[2] loa.S = Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor.loa.PhaseSystem.phasePowers_vi(loa.v, -loa.i) (20) [ALGB] (2) flow Real[2] res.terminal_n.i (start = {0.0 for $i1 in 1:2}) (21) [ALGB] (1) Real sen.I = Buildings.Electrical.PhaseSystems.OnePhase.systemCurrent(sen.terminal_n.i) (22) [ALGB] (2) Real[2] res.terminal_p.v (23) [ALGB] (2) flow Real[2] sen.terminal_p.i (start = {0.0 for $i1 in 1:2}) (24) [ALGB] (2) flow Real[2] sou.terminal.i (start = {0.0 for $i1 in 1:2}) (25) [ALGB] (1) Real res.R_actual (26) [ALGB] (1) Real[1] sen.terminal_p.theta (27) [ALGB] (2) flow Real[2] res.terminal_p.i (start = {0.0 for $i1 in 1:2}) (28) [ALGB] (2) Real[2] sen.terminal_p.v (29) [ALGB] (2) Real[2] sou.terminal.v (30) [ALGB] (2) Real[2] loa.v = loa.terminal.v (start = {120.0, 0.0}) (31) [ALGB] (1) Real[1] sen.terminal_n.theta (32) [ALGB] (2) flow Real[2] loa.terminal.i (start = {0.0 for $i1 in 1:2}) (33) [ALGB] (2) flow Real[2] sen.terminal_n.i (start = {0.0 for $i1 in 1:2}) (34) [ALGB] (1) protected Real loa.omega System Equations (35/56) ************************** (1) [SCAL] (1) sou.terminal.theta[1] = 6.283185307179586 * sou.f * time ($RES_SIM_10) (2) [ARRY] (1) sou.terminal.theta = res.terminal_n.theta ($RES_SIM_30) (3) [FOR-] (2) ($RES_SIM_31) (3) [----] for $i1 in 1:2 loop (3) [----] [SCAL] (1) sen.terminal_p.i[$i1] + loa.terminal.i[$i1] = 0.0 ($RES_SIM_32) (3) [----] end for; (4) [ARRY] (2) loa.omega * {-loa.q[2], loa.q[1]} + $DER.loa.q + loa.Y[1] * loa.v = loa.i ($RES_SIM_17) (5) [ARRY] (2) sen.terminal_p.v = loa.terminal.v ($RES_SIM_33) (6) [ARRY] (2) loa.q = (loa.Y[2] * {loa.v[1], loa.v[2]}) / loa.omega ($RES_SIM_18) (7) [ARRY] (1) sen.terminal_p.theta = loa.terminal.theta ($RES_SIM_34) (8) [SCAL] (1) loa.Y[2] = -6.944444444444444e-5 * ((1.0 - loa.pf ^ 2.0) / ((1.0 - loa.pf ^ 2.0) * (1.0 - loa.pf ^ 2.0) + 1e-6) ^ 0.25) * (loa.P_nominal / loa.pf) ($RES_SIM_19) (9) [SCAL] (1) sen.I = sen.terminal_n.i / ((sen.terminal_n.i * sen.terminal_n.i * (sen.terminal_n.i * sen.terminal_n.i) + 1.0000000000000002e-10) ^ 0.25 * sen.terminal_n.i) ($RES_BND_40) (10) [FOR-] (2) ($RES_SIM_35) (10) [----] for $i1 in 1:2 loop (10) [----] [SCAL] (1) -(sen.terminal_n.i[$i1] + sen.terminal_p.i[$i1]) = 0.0 ($RES_SIM_36) (10) [----] end for; (11) [ARRY] (2) sen.S = {sen.terminal_n.v[1] * sen.terminal_n.i[1] + sen.terminal_n.v[2] * sen.terminal_n.i[2], sen.terminal_n.v[2] * sen.terminal_n.i[1] - sen.terminal_n.v[1] * sen.terminal_n.i[2]} ($RES_BND_41) (12) [ARRY] (2) loa.v = loa.terminal.v ($RES_BND_42) (13) [ARRY] (2) loa.i = loa.terminal.i ($RES_BND_43) (14) [ARRY] (2) sen.terminal_n.v = sen.terminal_p.v ($RES_SIM_37) (15) [ARRY] (2) loa.S = {loa.v[1] * (-loa.i)[1] + loa.v[2] * (-loa.i)[2], loa.v[2] * (-loa.i)[1] - loa.v[1] * (-loa.i)[2]} ($RES_BND_44) (16) [ARRY] (1) sen.terminal_n.theta = sen.terminal_p.theta ($RES_SIM_38) (17) [ARRY] (2) sou.S = {sou.terminal.v[1] * sou.terminal.i[1] + sou.terminal.v[2] * sou.terminal.i[2], sou.terminal.v[2] * sou.terminal.i[1] - sou.terminal.v[1] * sou.terminal.i[2]} ($RES_BND_46) (18) [SCAL] (1) sou.phi = atan2(sou.terminal.v[2], sou.terminal.v[1]) - atan2((-sou.terminal.i)[2], (-sou.terminal.i)[1]) ($RES_BND_47) (19) [SCAL] (1) loa.Y[1] = -6.944444444444444e-5 * loa.pf * (loa.P_nominal / loa.pf) ($RES_SIM_20) (20) [SCAL] (1) loa.omega = $DER.loa.theRef ($RES_SIM_21) (21) [SCAL] (1) loa.theRef = loa.terminal.theta[1] ($RES_SIM_22) (22) [FOR-] (2) ($RES_SIM_23) (22) [----] for $i1 in 1:2 loop (22) [----] [SCAL] (1) res.terminal_p.i[$i1] + sen.terminal_n.i[$i1] = 0.0 ($RES_SIM_24) (22) [----] end for; (23) [ARRY] (2) res.terminal_p.v = sen.terminal_n.v ($RES_SIM_25) (24) [ARRY] (1) res.terminal_p.theta = sen.terminal_n.theta ($RES_SIM_26) (25) [FOR-] (2) ($RES_SIM_27) (25) [----] for $i1 in 1:2 loop (25) [----] [SCAL] (1) sou.terminal.i[$i1] + res.terminal_n.i[$i1] = 0.0 ($RES_SIM_28) (25) [----] end for; (26) [ARRY] (2) sou.terminal.v = res.terminal_n.v ($RES_SIM_29) (27) [SCAL] (1) sen.V = sen.terminal_n.v / ((sen.terminal_n.v * sen.terminal_n.v * (sen.terminal_n.v * sen.terminal_n.v) + 1.0000000000000002e-10) ^ 0.25 * sen.terminal_n.v) ($RES_BND_39) (28) [ARRY] (2) sou.terminal.v = {sou.V * cos(sou.phiSou), sou.V * sin(sou.phiSou)} ($RES_SIM_8) (29) [ARRY] (2) res.terminal_p.v - res.terminal_n.v = res.terminal_p.i * $FUN_1 ($RES_SIM_7) (30) [SCAL] (1) res.LossPower = res.R_actual * (res.terminal_p.i[1] ^ 2.0 + res.terminal_p.i[2] ^ 2.0) ($RES_SIM_6) (31) [ARRY] (1) res.terminal_p.theta = res.terminal_n.theta ($RES_SIM_5) (32) [SCAL] (1) res.R_actual = ((res.M + ((-273.15) + res.T)) * res.R) / (res.M + ((-273.15) + res.T_ref)) ($RES_SIM_3) (33) [ARRY] (2) res.terminal_p.i = -res.terminal_n.i ($RES_SIM_2) (34) [SCAL] (1) $SEV_0 = res.R_actual >= 0.0 ($RES_EVT_51) (35) [ARRY] (4) $FUN_1 = diagonal(fill(1.0, 2) .* res.R_actual) ($RES_$AUX_50)