Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_8_Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad.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.Examples.GridDCLoad,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad") translateModel(Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001299/0.0013, allocations: 103.8 kB / 16.38 MB, free: 6.496 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.001339/0.001339, allocations: 192.7 kB / 17.31 MB, free: 5.809 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.414/1.414, 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.694/1.694, allocations: 292.3 MB / 0.5496 GB, free: 17.53 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.821e-05/2.823e-05, allocations: 5.938 kB / 0.6729 GB, free: 5.891 MB / 0.545 GB Notification: Performance of NFInst.instantiate(Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad): time 0.004778/0.004822, allocations: 3.069 MB / 0.6759 GB, free: 2.801 MB / 0.545 GB Notification: Performance of NFInst.instExpressions: time 0.002932/0.007767, allocations: 1.934 MB / 0.6777 GB, free: 0.8555 MB / 0.545 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001237/0.007903, allocations: 4 kB / 0.6778 GB, free: 0.8516 MB / 0.545 GB Notification: Performance of NFTyping.typeComponents: time 0.0008525/0.008761, allocations: 282.9 kB / 0.678 GB, free: 0.5742 MB / 0.545 GB Notification: Performance of NFTyping.typeBindings: time 0.0004/0.009188, allocations: 195.1 kB / 0.6782 GB, free: 392 kB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0005355/0.009733, allocations: 239.3 kB / 0.6784 GB, free: 152 kB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.000408/0.01015, allocations: 366.8 kB / 0.6788 GB, free: 15.79 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.000287/0.01044, allocations: 144 kB / 0.6789 GB, free: 15.65 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0001657/0.01062, allocations: 127.5 kB / 0.679 GB, free: 15.53 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002224/0.01085, allocations: 127.5 kB / 0.6792 GB, free: 15.4 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 2.93e-05/0.01089, allocations: 16 kB / 0.6792 GB, free: 15.39 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0004249/0.01132, allocations: 347.3 kB / 0.6795 GB, free: 15.05 MB / 0.5606 GB Notification: Performance of combineBinaries: time 0.0002709/0.0116, allocations: 356.3 kB / 0.6799 GB, free: 14.7 MB / 0.5606 GB Notification: Performance of replaceArrayConstructors: time 0.0001437/0.01175, allocations: 226.5 kB / 0.6801 GB, free: 14.47 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 5.528e-05/0.01181, allocations: 35.88 kB / 0.6801 GB, free: 14.44 MB / 0.5606 GB Notification: Performance of FrontEnd: time 3.007e-05/0.01185, allocations: 11.88 kB / 0.6801 GB, free: 14.43 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: 55 (41) * Number of variables: 55 (39) Notification: Performance of Bindings: time 0.00103/0.01288, allocations: 1.037 MB / 0.6811 GB, free: 13.28 MB / 0.5606 GB Notification: Performance of FunctionAlias: time 0.0001057/0.01299, allocations: 70.33 kB / 0.6812 GB, free: 13.21 MB / 0.5606 GB Notification: Performance of Early Inline: time 0.0007953/0.0138, allocations: 0.7959 MB / 0.682 GB, free: 12.39 MB / 0.5606 GB Notification: Performance of simplify1: time 5.558e-05/0.01387, allocations: 59.92 kB / 0.682 GB, free: 12.33 MB / 0.5606 GB Notification: Performance of Alias: time 0.0007881/0.01467, allocations: 0.6967 MB / 0.6827 GB, free: 11.51 MB / 0.5606 GB Notification: Performance of simplify2: time 6.253e-05/0.01474, allocations: 55.88 kB / 0.6828 GB, free: 11.46 MB / 0.5606 GB Notification: Performance of Events: time 0.0001119/0.01486, allocations: 78.11 kB / 0.6828 GB, free: 11.38 MB / 0.5606 GB Notification: Performance of Detect States: time 0.0001854/0.01505, allocations: 165.2 kB / 0.683 GB, free: 11.21 MB / 0.5606 GB Notification: Performance of Partitioning: time 0.0002785/0.01533, allocations: 260.8 kB / 0.6832 GB, free: 10.92 MB / 0.5606 GB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency idealACDCConverter1.PLoss could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) idealACDCConverter1.P_n + idealACDCConverter1.P_p = {idealACDCConverter1.PLoss, 0.0} ($RES_SIM_18) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (29/45) ************************** (1) [ALGB] (2) flow Real[2] idealACDCConverter1.terminal_p.i (start = {0.0 for $i1 in 1:2}, StateSelect = prefer) (2) [ALGB] (2) Real[2] grid.sou.terminal.v (3) [ALGB] (2) protected Real[2] idealACDCConverter1.P_p = Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad.idealACDCConverter1.PhaseSystem_p.phasePowers_vi(idealACDCConverter1.terminal_p.v, idealACDCConverter1.terminal_p.i) (4) [ALGB] (1) Real idealACDCConverter1.v_p (5) [ALGB] (2) flow Real[2] idealACDCConverter1.terminal_n.i (start = {0.0 for $i1 in 1:2}, StateSelect = prefer) (6) [ALGB] (2) protected Real[2] idealACDCConverter1.P_n = Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad.idealACDCConverter1.PhaseSystem_n.phasePowers_vi(idealACDCConverter1.terminal_n.v, idealACDCConverter1.terminal_n.i) (start = {0.0 for $i1 in 1:2}) (7) [ALGB] (1) Real idealACDCConverter1.v_n (8) [ALGB] (1) Real idealACDCConverter1.PLoss (9) [ALGB] (2) Real[2] resistor.v = resistor.terminal.v (start = {6.0, -6.0}) (10) [ALGB] (1) Real idealACDCConverter1.i_p (11) [ALGB] (2) Real[2] resistor.terminal.v (12) [ALGB] (1) Real idealACDCConverter1.i_n (13) [ALGB] (1) Real grid.P.apparent (14) [ALGB] (2) Real[2] resistor.S = Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad.resistor.PhaseSystem.phasePowers_vi(resistor.v, -resistor.i) (15) [ALGB] (2) flow Real[2] grid.terminal.i (start = {0.0 for $i1 in 1:2}) (16) [ALGB] (2) flow Real[2] grid.sou.terminal.i (start = {0.0 for $i1 in 1:2}) (17) [ALGB] (2) Real[2] idealACDCConverter1.terminal_p.v (18) [ALGB] (2) Real[2] grid.sou.S = Buildings.Electrical.AC.OnePhase.Examples.GridDCLoad.grid.sou.PhaseSystem.phasePowers_vi(grid.sou.terminal.v, grid.sou.terminal.i) (19) [ALGB] (1) protected Real idealACDCConverter1.i_dc (20) [ALGB] (1) Real $FUN_2 (21) [ALGB] (1) Real grid.P.real (22) [ALGB] (2) Real[2] resistor.i = resistor.terminal.i (start = {0.0 for $i1 in 1:2}) (23) [ALGB] (2) Real[2] idealACDCConverter1.terminal_n.v (24) [ALGB] (1) Real grid.P.cosPhi (25) [ALGB] (2) flow Real[2] resistor.terminal.i (start = {0.0 for $i1 in 1:2}) (26) [ALGB] (1) Real resistor.LossPower (27) [ALGB] (1) Real resistor.R_actual (28) [ALGB] (2) Real[2] grid.terminal.v (29) [ALGB] (1) Real grid.P.phi System Equations (31/45) ************************** (1) [SCAL] (1) idealACDCConverter1.v_n = idealACDCConverter1.terminal_n.v / ((idealACDCConverter1.terminal_n.v * idealACDCConverter1.terminal_n.v * (idealACDCConverter1.terminal_n.v * idealACDCConverter1.terminal_n.v) + 1.0000000000000002e-10) ^ 0.25 * idealACDCConverter1.terminal_n.v) ($RES_SIM_11) (2) [SCAL] (1) idealACDCConverter1.v_p = idealACDCConverter1.terminal_p.v[1] - idealACDCConverter1.terminal_p.v[2] ($RES_SIM_12) (3) [SCAL] (1) idealACDCConverter1.i_n = idealACDCConverter1.terminal_n.i / ((idealACDCConverter1.terminal_n.i * idealACDCConverter1.terminal_n.i * (idealACDCConverter1.terminal_n.i * idealACDCConverter1.terminal_n.i) + 1.0000000000000002e-10) ^ 0.25 * idealACDCConverter1.terminal_n.i) ($RES_SIM_13) (4) [SCAL] (1) idealACDCConverter1.i_p = 0.5 * (idealACDCConverter1.terminal_p.i[1] - idealACDCConverter1.terminal_p.i[2]) ($RES_SIM_14) (5) [ARRY] (2) idealACDCConverter1.terminal_p.v = resistor.terminal.v ($RES_SIM_30) (6) [FOR-] (2) ($RES_SIM_31) (6) [----] for $i1 in 1:2 loop (6) [----] [SCAL] (1) grid.terminal.i[$i1] + idealACDCConverter1.terminal_n.i[$i1] = 0.0 ($RES_SIM_32) (6) [----] end for; (7) [SCAL] (1) 0.0 = idealACDCConverter1.terminal_p.v[2] ($RES_SIM_16) (8) [ARRY] (2) grid.terminal.v = idealACDCConverter1.terminal_n.v ($RES_SIM_33) (9) [ARRY] (2) idealACDCConverter1.P_n + idealACDCConverter1.P_p = {idealACDCConverter1.PLoss, 0.0} ($RES_SIM_18) (10) [SCAL] (1) grid.P.phi = atan2(grid.sou.terminal.v[2], grid.sou.terminal.v[1]) - atan2((-grid.sou.terminal.i)[2], (-grid.sou.terminal.i)[1]) ($RES_BND_40) (11) [SCAL] (1) idealACDCConverter1.PLoss = (1.0 - idealACDCConverter1.eta) * $FUN_2 ($RES_SIM_19) (12) [ARRY] (2) idealACDCConverter1.P_p = idealACDCConverter1.terminal_p.v * idealACDCConverter1.terminal_p.i ($RES_BND_41) (13) [FOR-] (2) ($RES_SIM_35) (13) [----] for $i1 in 1:2 loop (13) [----] [SCAL] (1) grid.sou.terminal.i[$i1] - grid.terminal.i[$i1] = 0.0 ($RES_SIM_36) (13) [----] end for; (14) [ARRY] (2) idealACDCConverter1.P_n = {idealACDCConverter1.terminal_n.v[1] * idealACDCConverter1.terminal_n.i[1] + idealACDCConverter1.terminal_n.v[2] * idealACDCConverter1.terminal_n.i[2], idealACDCConverter1.terminal_n.v[2] * idealACDCConverter1.terminal_n.i[1] - idealACDCConverter1.terminal_n.v[1] * idealACDCConverter1.terminal_n.i[2]} ($RES_BND_42) (15) [ARRY] (2) resistor.v = resistor.terminal.v ($RES_BND_43) (16) [ARRY] (2) grid.sou.terminal.v = grid.terminal.v ($RES_SIM_37) (17) [ARRY] (2) resistor.i = resistor.terminal.i ($RES_BND_44) (18) [ARRY] (2) resistor.S = -resistor.v * resistor.i ($RES_BND_45) (19) [SCAL] (1) 0.0 = sum(resistor.i) ($RES_$AUX_46) (20) [SCAL] (1) -idealACDCConverter1.i_dc = sum(idealACDCConverter1.terminal_p.i) ($RES_$AUX_47) (21) [SCAL] (1) idealACDCConverter1.v_p = idealACDCConverter1.v_n * idealACDCConverter1.conversionFactor ($RES_SIM_20) (22) [SCAL] (1) $FUN_2 = Buildings.Utilities.Math.Functions.spliceFunction(idealACDCConverter1.P_p[1], idealACDCConverter1.P_n[1], idealACDCConverter1.i_p, 0.1) ($RES_$AUX_48) (23) [SCAL] (1) grid.P.cosPhi = cos(grid.P.phi) ($RES_$AUX_49) (24) [SCAL] (1) grid.P.apparent = (grid.sou.S[1] ^ 2.0 + grid.sou.S[2] ^ 2.0) / ((grid.sou.S[2] ^ 2.0 + grid.sou.S[1] ^ 2.0) * (grid.sou.S[2] ^ 2.0 + grid.sou.S[1] ^ 2.0) + 1e-4) ^ 0.25 ($RES_SIM_23) (25) [SCAL] (1) grid.P.real = -grid.sou.S[1] ($RES_SIM_24) (26) [ARRY] (2) grid.sou.terminal.v = {grid.sou.V * cos(grid.sou.phiSou), grid.sou.V * sin(grid.sou.phiSou)} ($RES_SIM_25) (27) [FOR-] (2) ($RES_SIM_28) (27) [----] for $i1 in 1:2 loop (27) [----] [SCAL] (1) idealACDCConverter1.terminal_p.i[$i1] + resistor.terminal.i[$i1] = 0.0 ($RES_SIM_29) (27) [----] end for; (28) [ARRY] (2) grid.sou.S = {grid.sou.terminal.v[1] * grid.sou.terminal.i[1] + grid.sou.terminal.v[2] * grid.sou.terminal.i[2], grid.sou.terminal.v[2] * grid.sou.terminal.i[1] - grid.sou.terminal.v[1] * grid.sou.terminal.i[2]} ($RES_BND_39) (29) [SCAL] (1) resistor.R_actual = resistor.R * (1.0 + resistor.alpha * (resistor.T - resistor.T_ref)) ($RES_SIM_9) (30) [SCAL] (1) resistor.v[1] - resistor.v[2] = resistor.R_actual * (0.5 * (resistor.i[1] - resistor.i[2])) ($RES_SIM_8) (31) [SCAL] (1) resistor.LossPower = resistor.v * resistor.i ($RES_SIM_7)