Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_8_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 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.OnePhase.Sensors.Examples.GeneralizedSensor,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_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_8_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.001234/0.001234, allocations: 110.8 kB / 16.38 MB, free: 6.48 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.001223/0.001223, allocations: 190.5 kB / 17.31 MB, free: 5.797 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.382/1.382, allocations: 205.1 MB / 223.2 MB, free: 12.29 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.675/1.675, allocations: 292.3 MB / 0.5496 GB, free: 17.43 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.461e-05/2.462e-05, allocations: 5.797 kB / 0.6729 GB, free: 5.898 MB / 0.545 GB Notification: Performance of NFInst.instantiate(Buildings.Electrical.AC.OnePhase.Sensors.Examples.GeneralizedSensor): time 0.004317/0.004356, allocations: 3.073 MB / 0.6759 GB, free: 2.805 MB / 0.545 GB Notification: Performance of NFInst.instExpressions: time 0.00254/0.006912, allocations: 1.726 MB / 0.6776 GB, free: 1.066 MB / 0.545 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001038/0.007026, allocations: 4 kB / 0.6776 GB, free: 1.062 MB / 0.545 GB Notification: Performance of NFTyping.typeComponents: time 0.0009062/0.007939, allocations: 334.7 kB / 0.6779 GB, free: 0.7344 MB / 0.545 GB Notification: Performance of NFTyping.typeBindings: time 0.000396/0.008343, allocations: 211.1 kB / 0.6781 GB, free: 0.5273 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.000387/0.008753, allocations: 187.5 kB / 0.6783 GB, free: 352 kB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.0003721/0.009136, allocations: 351.1 kB / 0.6786 GB, free: 16 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0003228/0.009467, allocations: 185.8 kB / 0.6788 GB, free: 15.82 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0001516/0.009626, allocations: 127.5 kB / 0.6789 GB, free: 15.69 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002253/0.009861, allocations: 123.6 kB / 0.679 GB, free: 15.57 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 2.62e-05/0.009895, allocations: 19.94 kB / 0.679 GB, free: 15.55 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0002698/0.01017, allocations: 207.5 kB / 0.6792 GB, free: 15.35 MB / 0.5606 GB Notification: Performance of combineBinaries: time 0.0002594/0.01044, allocations: 344.6 kB / 0.6796 GB, free: 15.01 MB / 0.5606 GB Notification: Performance of replaceArrayConstructors: time 0.0001326/0.01058, allocations: 221.1 kB / 0.6798 GB, free: 14.79 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 4.019e-05/0.01062, allocations: 35.88 kB / 0.6798 GB, free: 14.75 MB / 0.5606 GB Notification: Performance of FrontEnd: time 2.188e-05/0.01065, allocations: 8 kB / 0.6798 GB, free: 14.75 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: 59 (41) * Number of variables: 59 (40) Notification: Performance of Bindings: time 0.0009475/0.0116, allocations: 1.015 MB / 0.6808 GB, free: 13.62 MB / 0.5606 GB Notification: Performance of FunctionAlias: time 0.0001004/0.01171, allocations: 74.36 kB / 0.6809 GB, free: 13.55 MB / 0.5606 GB Notification: Performance of Early Inline: time 0.0007615/0.01248, allocations: 0.8193 MB / 0.6817 GB, free: 12.71 MB / 0.5606 GB Notification: Performance of simplify1: time 7.152e-05/0.01256, allocations: 59.91 kB / 0.6817 GB, free: 12.65 MB / 0.5606 GB Notification: Performance of Alias: time 0.0006699/0.01324, allocations: 0.596 MB / 0.6823 GB, free: 11.96 MB / 0.5606 GB Notification: Performance of simplify2: time 5.662e-05/0.0133, allocations: 55.92 kB / 0.6824 GB, free: 11.91 MB / 0.5606 GB Notification: Performance of Events: time 0.0001012/0.01341, allocations: 79.78 kB / 0.6824 GB, free: 11.83 MB / 0.5606 GB Notification: Performance of Detect States: time 0.0002124/0.01363, allocations: 190.3 kB / 0.6826 GB, free: 11.62 MB / 0.5606 GB Notification: Performance of Partitioning: time 0.0002637/0.0139, allocations: 267.3 kB / 0.6829 GB, free: 11.34 MB / 0.5606 GB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency loa.Y[1] could not be devided 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)