Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_8_Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.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.Loads.Examples.VariableImpedance,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance") translateModel(Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.00122/0.00122, allocations: 114.2 kB / 16.38 MB, free: 6.445 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.001557/0.001557, allocations: 190.5 kB / 17.31 MB, free: 5.789 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.369/1.369, allocations: 205.1 MB / 223.2 MB, free: 12.23 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.75/1.75, allocations: 292.3 MB / 0.5496 GB, free: 17.46 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.53e-05/2.553e-05, allocations: 2.281 kB / 0.6729 GB, free: 5.906 MB / 0.545 GB Notification: Performance of NFInst.instantiate(Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance): time 0.004979/0.005019, allocations: 3.778 MB / 0.6765 GB, free: 2.102 MB / 0.545 GB Notification: Performance of NFInst.instExpressions: time 0.002559/0.007594, allocations: 1.825 MB / 0.6783 GB, free: 272 kB / 0.545 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001624/0.00777, allocations: 27.81 kB / 0.6784 GB, free: 244 kB / 0.545 GB Notification: Performance of NFTyping.typeComponents: time 0.0008019/0.008579, allocations: 266.6 kB / 0.6786 GB, free: 15.98 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0005044/0.009092, allocations: 298.4 kB / 0.6789 GB, free: 15.68 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004591/0.009574, allocations: 247.5 kB / 0.6791 GB, free: 15.44 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.0006371/0.01022, allocations: 0.6595 MB / 0.6798 GB, free: 14.78 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0004186/0.01065, allocations: 246.5 kB / 0.68 GB, free: 14.54 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002926/0.01095, allocations: 235.1 kB / 0.6802 GB, free: 14.3 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002379/0.01121, allocations: 195 kB / 0.6804 GB, free: 14.11 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 3.512e-05/0.01125, allocations: 20 kB / 0.6804 GB, free: 14.09 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0003366/0.01159, allocations: 247.4 kB / 0.6807 GB, free: 13.85 MB / 0.5606 GB Notification: Performance of combineBinaries: time 0.0004847/0.01209, allocations: 0.6605 MB / 0.6813 GB, free: 13.18 MB / 0.5606 GB Notification: Performance of replaceArrayConstructors: time 0.0002781/0.01237, allocations: 441.7 kB / 0.6817 GB, free: 12.75 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 7.276e-05/0.01245, allocations: 67.75 kB / 0.6818 GB, free: 12.68 MB / 0.5606 GB Notification: Performance of FrontEnd: time 3.474e-05/0.0125, allocations: 19.92 kB / 0.6818 GB, free: 12.66 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: 85 (71) * Number of variables: 85 (67) Notification: Performance of Bindings: time 0.001478/0.01398, allocations: 1.727 MB / 0.6835 GB, free: 10.82 MB / 0.5606 GB Notification: Performance of FunctionAlias: time 6.716e-05/0.01405, allocations: 51.89 kB / 0.6836 GB, free: 10.77 MB / 0.5606 GB Notification: Performance of Early Inline: time 0.0008902/0.01495, allocations: 0.9443 MB / 0.6845 GB, free: 9.797 MB / 0.5606 GB Notification: Performance of simplify1: time 8.077e-05/0.01505, allocations: 83.88 kB / 0.6846 GB, free: 9.715 MB / 0.5606 GB Notification: Performance of Alias: time 0.001384/0.01644, allocations: 1.345 MB / 0.6859 GB, free: 8.137 MB / 0.5606 GB Notification: Performance of simplify2: time 5.76e-05/0.01651, allocations: 63.92 kB / 0.6859 GB, free: 8.074 MB / 0.5606 GB Notification: Performance of Events: time 0.00015/0.01667, allocations: 99.77 kB / 0.686 GB, free: 7.977 MB / 0.5606 GB Notification: Performance of Detect States: time 0.0002336/0.01691, allocations: 212.5 kB / 0.6862 GB, free: 7.754 MB / 0.5606 GB Notification: Performance of Partitioning: time 0.0002896/0.01721, allocations: 283.5 kB / 0.6865 GB, free: 7.449 MB / 0.5606 GB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency Z_R.X could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) Z_R.terminal.v = {{Z_R.R_internal, -Z_R.X} * Z_R.terminal.i, {Z_R.X, Z_R.R_internal} * Z_R.terminal.i} ($RES_SIM_11) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (35/53) ************************** (1) [ALGB] (2) Real[2] Z_L.terminal.v (2) [ALGB] (2) Real[2] Z_C.S = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.Z_C.PhaseSystem.phasePowers_vi(Z_C.v, -Z_C.i) (3) [ALGB] (1) protected Real Z_R.X (start = 1.0) (4) [DER-] (1) Real $DER.Z_L.theRef (5) [ALGB] (2) Real[2] Z_R.S = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.Z_R.PhaseSystem.phasePowers_vi(Z_R.v, -Z_R.i) (6) [ALGB] (1) protected Real Z_L.X (start = 1.0) (7) [ALGB] (2) Real[2] Z_L.S = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.Z_L.PhaseSystem.phasePowers_vi(Z_L.v, -Z_L.i) (8) [ALGB] (2) Real[2] Z_C.v = Z_C.terminal.v (start = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.Z_C.PhaseSystem.phaseVoltages(Z_C.V_nominal, 0.0)) (9) [ALGB] (1) protected Real Z_C.omega (10) [ALGB] (1) Real[1] V.terminal.theta (11) [ALGB] (2) flow Real[2] Z_R.terminal.i (start = {0.0 for $i1 in 1:2}) (12) [ALGB] (1) Real[1] Z_C.terminal.theta (13) [DER-] (1) Real $DER.Z_C.theRef (14) [ALGB] (1) Real[1] Z_L.terminal.theta (15) [ALGB] (2) Real[2] Z_C.i = Z_C.terminal.i (start = {0.0 for $i1 in 1:2}) (16) [ALGB] (1) Real V.phi = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.V.PhaseSystem.phase(V.terminal.v) - Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.V.PhaseSystem.phase(-V.terminal.i) (17) [ALGB] (2) Real[2] Z_R.v = Z_R.terminal.v (start = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.Z_R.PhaseSystem.phaseVoltages(Z_R.V_nominal, 0.0)) (18) [ALGB] (2) flow Real[2] Z_C.terminal.i (start = {0.0 for $i1 in 1:2}) (19) [ALGB] (1) protected Real Z_R.omega (20) [ALGB] (2) flow Real[2] V.terminal.i (start = {0.0 for $i1 in 1:2}) (21) [ALGB] (2) Real[2] V.S = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.V.PhaseSystem.phasePowers_vi(V.terminal.v, V.terminal.i) (22) [DISC] (1) Boolean $TEV_1 (23) [ALGB] (2) Real[2] Z_R.terminal.v (24) [ALGB] (2) Real[2] Z_L.v = Z_L.terminal.v (start = Buildings.Electrical.AC.OnePhase.Loads.Examples.VariableImpedance.Z_L.PhaseSystem.phaseVoltages(Z_L.V_nominal, 0.0)) (25) [DISC] (1) Boolean $TEV_0 (26) [ALGB] (2) flow Real[2] Z_L.terminal.i (start = {0.0 for $i1 in 1:2}) (27) [ALGB] (2) Real[2] Z_R.i = Z_R.terminal.i (start = {0.0 for $i1 in 1:2}) (28) [ALGB] (2) Real[2] Z_C.terminal.v (29) [ALGB] (1) protected Real Z_R.R_internal (30) [ALGB] (1) protected Real Z_C.X (start = 1.0) (31) [DER-] (1) Real $DER.Z_R.theRef (32) [ALGB] (2) Real[2] V.terminal.v (33) [ALGB] (2) Real[2] Z_L.i = Z_L.terminal.i (start = {0.0 for $i1 in 1:2}) (34) [ALGB] (1) Real[1] Z_R.terminal.theta (35) [ALGB] (1) protected Real Z_L.omega System Equations (39/53) ************************** (1) [ARRY] (2) Z_R.terminal.v = {{Z_R.R_internal, -Z_R.X} * Z_R.terminal.i, {Z_R.X, Z_R.R_internal} * Z_R.terminal.i} ($RES_SIM_11) (2) [SCAL] (1) Z_R.X = Z_R.omega * Z_R.L ($RES_SIM_12) (3) [SCAL] (1) Z_R.omega = $DER.Z_R.theRef ($RES_SIM_13) (4) [SCAL] (1) Z_R.theRef = Z_R.terminal.theta[1] ($RES_SIM_14) (5) [SCAL] (1) Z_C.terminal.i[1] + Z_R.terminal.i[1] + V.terminal.i[1] + Z_L.terminal.i[1] = 0.0 ($RES_SIM_50) (6) [SCAL] (1) V.terminal.v[2] = Z_L.terminal.v[2] ($RES_SIM_51) (7) [SCAL] (1) V.terminal.v[2] = Z_C.terminal.v[2] ($RES_SIM_52) (8) [SCAL] (1) V.terminal.v[2] = Z_R.terminal.v[2] ($RES_SIM_53) (9) [SCAL] (1) V.terminal.v[1] = Z_L.terminal.v[1] ($RES_SIM_54) (10) [ARRY] (2) Z_L.terminal.v = {{Z_L.R, -Z_L.X} * Z_L.terminal.i, {Z_L.X, Z_L.R} * Z_L.terminal.i} ($RES_SIM_39) (11) [SCAL] (1) V.terminal.v[1] = Z_C.terminal.v[1] ($RES_SIM_55) (12) [SCAL] (1) V.terminal.v[1] = Z_R.terminal.v[1] ($RES_SIM_56) (13) [SCAL] (1) V.terminal.theta[1] = Z_L.terminal.theta[1] ($RES_SIM_57) (14) [ARRY] (2) V.S = {V.terminal.v[1] * V.terminal.i[1] + V.terminal.v[2] * V.terminal.i[2], V.terminal.v[2] * V.terminal.i[1] - V.terminal.v[1] * V.terminal.i[2]} ($RES_BND_63) (15) [SCAL] (1) V.terminal.theta[1] = Z_C.terminal.theta[1] ($RES_SIM_58) (16) [SCAL] (1) V.phi = atan2(V.terminal.v[2], V.terminal.v[1]) - atan2((-V.terminal.i)[2], (-V.terminal.i)[1]) ($RES_BND_64) (17) [SCAL] (1) V.terminal.theta[1] = Z_R.terminal.theta[1] ($RES_SIM_59) (18) [ARRY] (2) Z_L.v = Z_L.terminal.v ($RES_BND_65) (19) [ARRY] (2) Z_L.i = Z_L.terminal.i ($RES_BND_66) (20) [ARRY] (2) Z_L.S = {Z_L.v[1] * (-Z_L.i)[1] + Z_L.v[2] * (-Z_L.i)[2], Z_L.v[2] * (-Z_L.i)[1] - Z_L.v[1] * (-Z_L.i)[2]} ($RES_BND_67) (21) [ARRY] (2) Z_C.v = Z_C.terminal.v ($RES_BND_68) (22) [ARRY] (2) Z_C.i = Z_C.terminal.i ($RES_BND_69) (23) [SCAL] (1) $TEV_0 = time < load.startTime ($RES_EVT_83) (24) [SCAL] (1) $TEV_1 = time < (load.startTime + load.duration) ($RES_EVT_84) (25) [SCAL] (1) Z_L.X = Z_L.omega * (0.0026525823848649226 - 0.0026525823848649226 * (1.0 - Z_R.R_internal)) ($RES_SIM_40) (26) [ARRY] (2) Z_C.terminal.v = {{Z_C.R, -Z_C.X} * Z_C.terminal.i, {Z_C.X, Z_C.R} * Z_C.terminal.i} ($RES_SIM_25) (27) [SCAL] (1) Z_L.omega = $DER.Z_L.theRef ($RES_SIM_41) (28) [SCAL] (1) Z_C.X = -1/((0.0026525823848649226 - 0.0026525823848649226 * (1.0 - Z_R.R_internal)) * Z_C.omega) ($RES_SIM_26) (29) [SCAL] (1) Z_C.omega = $DER.Z_C.theRef ($RES_SIM_27) (30) [SCAL] (1) Z_L.theRef = Z_L.terminal.theta[1] ($RES_SIM_42) (31) [SCAL] (1) Z_C.theRef = Z_C.terminal.theta[1] ($RES_SIM_28) (32) [ARRY] (2) V.terminal.v = {V.V * cos(V.phiSou), V.V * sin(V.phiSou)} ($RES_SIM_43) (33) [SCAL] (1) V.terminal.theta[1] = 6.283185307179586 * V.f * time ($RES_SIM_45) (34) [ARRY] (2) Z_C.S = {Z_C.v[1] * (-Z_C.i)[1] + Z_C.v[2] * (-Z_C.i)[2], Z_C.v[2] * (-Z_C.i)[1] - Z_C.v[1] * (-Z_C.i)[2]} ($RES_BND_70) (35) [SCAL] (1) Z_C.terminal.i[2] + Z_R.terminal.i[2] + V.terminal.i[2] + Z_L.terminal.i[2] = 0.0 ($RES_SIM_49) (36) [ARRY] (2) Z_R.v = Z_R.terminal.v ($RES_BND_71) (37) [ARRY] (2) Z_R.i = Z_R.terminal.i ($RES_BND_72) (38) [ARRY] (2) Z_R.S = {Z_R.v[1] * (-Z_R.i)[1] + Z_R.v[2] * (-Z_R.i)[2], Z_R.v[2] * (-Z_R.i)[1] - Z_R.v[1] * (-Z_R.i)[2]} ($RES_BND_73) (39) [SCAL] (1) -(1.0 - Z_R.R_internal) = load.offset + (if $TEV_0 then 0.0 else if $TEV_1 then (load.height * (time - load.startTime)) / load.duration else load.height) ($RES_SIM_0)