Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr PowerSystems_PowerSystems.Examples.AC3ph.Drives.ASMcharacteristic.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/PowerSystems 1.0.1/package.mo", uses=false) Using package PowerSystems with version 1.0.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSystems 1.0.1/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(PowerSystems.Examples.AC3ph.Drives.ASMcharacteristic,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="PowerSystems_PowerSystems.Examples.AC3ph.Drives.ASMcharacteristic") translateModel(PowerSystems.Examples.AC3ph.Drives.ASMcharacteristic,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="PowerSystems_PowerSystems.Examples.AC3ph.Drives.ASMcharacteristic") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001079/0.001079, allocations: 106.2 kB / 17.69 MB, free: 5.52 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.001084/0.001084, allocations: 192.1 kB / 18.63 MB, free: 4.59 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.604/1.604, allocations: 205.1 MB / 224.5 MB, free: 12.29 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSystems 1.0.1/package.mo): time 0.1701/0.1701, allocations: 37.99 MB / 309.8 MB, free: 5.973 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.822e-05/2.837e-05, allocations: 2.281 kB / 376.7 MB, free: 2.977 MB / 318.1 MB Notification: Performance of NFInst.instantiate(PowerSystems.Examples.AC3ph.Drives.ASMcharacteristic): time 0.2075/0.2076, allocations: 5.216 MB / 381.9 MB, free: 59.61 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.005393/0.213, allocations: 4.007 MB / 386 MB, free: 58.02 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003397/0.2134, allocations: 16.56 kB / 386 MB, free: 58.02 MB / 318.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Math/package.mo:1895:3-1973:18:writable] Warning: Pure function 'Modelica.Math.Matrices.eigenValues' contains a call to impure function 'Modelica.Math.Matrices.LAPACK.dgeev_eigenValues'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Math/package.mo:2829:3-2870:10:writable] Warning: Pure function 'Modelica.Math.Matrices.inv' contains a call to impure function 'Modelica.Math.Matrices.LAPACK.dgetrf'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Math/package.mo:1125:3-1182:12:writable] Warning: Pure function 'Modelica.Math.Matrices.solve' contains a call to impure function 'Modelica.Math.Matrices.LAPACK.dgesv_vec'. Notification: Performance of NFTyping.typeComponents: time 0.01029/0.2237, allocations: 4.787 MB / 390.8 MB, free: 57.68 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001144/0.2248, allocations: 324.8 kB / 391.1 MB, free: 57.59 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0006402/0.2255, allocations: 211.5 kB / 391.3 MB, free: 57.57 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.002315/0.2278, allocations: 1.675 MB / 393 MB, free: 57 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000649/0.2285, allocations: 468.4 kB / 393.4 MB, free: 56.78 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0005031/0.229, allocations: 358.5 kB / 393.8 MB, free: 56.62 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003807/0.2294, allocations: 328.1 kB / 394.1 MB, free: 56.47 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 7.243e-05/0.2295, allocations: 44.75 kB / 394.1 MB, free: 56.47 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.003665/0.2331, allocations: 2.086 MB / 396.2 MB, free: 55.29 MB / 318.1 MB Notification: Performance of combineBinaries: time 0.0006468/0.2338, allocations: 0.8801 MB / 397.1 MB, free: 54.68 MB / 318.1 MB Notification: Performance of replaceArrayConstructors: time 0.0003625/0.2342, allocations: 0.6049 MB / 397.7 MB, free: 54.25 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001455/0.2343, allocations: 83.09 kB / 397.8 MB, free: 54.21 MB / 318.1 MB Notification: Performance of FrontEnd: time 0.0001131/0.2344, allocations: 16.56 kB / 397.8 MB, free: 54.2 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 121 (86) * Number of variables: 121 (85) Notification: Performance of Bindings: time 0.002104/0.2366, allocations: 2.797 MB / 400.6 MB, free: 51.88 MB / 318.1 MB Notification: Performance of FunctionAlias: time 0.0001664/0.2367, allocations: 164.5 kB / 400.8 MB, free: 51.72 MB / 318.1 MB Notification: Performance of Early Inline: time 0.0008239/0.2376, allocations: 1.208 MB / 402 MB, free: 50.5 MB / 318.1 MB Notification: Performance of simplify1: time 7.289e-05/0.2376, allocations: 84.56 kB / 402 MB, free: 50.42 MB / 318.1 MB Notification: Performance of Alias: time 0.001347/0.239, allocations: 1.58 MB / 403.6 MB, free: 48.72 MB / 318.1 MB Notification: Performance of simplify2: time 4.809e-05/0.2391, allocations: 55.91 kB / 403.7 MB, free: 48.67 MB / 318.1 MB Notification: Performance of Events: time 5.453e-05/0.2391, allocations: 73.33 kB / 403.7 MB, free: 48.6 MB / 318.1 MB Notification: Performance of Detect States: time 0.0002761/0.2394, allocations: 304.9 kB / 404 MB, free: 48.29 MB / 318.1 MB Notification: Performance of Partitioning: time 0.0002983/0.2397, allocations: 373.9 kB / 404.4 MB, free: 47.91 MB / 318.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency $FUN_4 could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) asm.motor.heat.ports.Q_flow = -{asm.motor.c.R_s * asm.motor.i * asm.motor.i, $FUN_4 * asm.motor.i_rd * asm.motor.i_rd + $FUN_4 * asm.motor.i_rq * asm.motor.i_rq} ($RES_SIM_12) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (55/91) ************************** (1) [ALGB] (1) Real[1, 1] $FUN_4 (2) [ALGB] (3) Real[3] asm.motor.v (start = {400.0, 0.0, 0.0}, nominal = {1000.0 for $i1 in 1:3}) (3) [ALGB] (3) Real[3] asm.term.v (nominal = {1000.0 for $i1 in 1:3}) (4) [ALGB] (1) protected Real voltage.phi (5) [ALGB] (2) protected Real[2] asm.motor.psi_s (6) [ALGB] (4) Real[2, 2] $FUN_3 (7) [ALGB] (3) Real[3] asm.motor.top.i_cond = asm.motor.i (nominal = {1.0 for $i1 in 1:3}) (8) [ALGB] (1) flow Real grd.term.i (9) [ALGB] (1) Real $FUN_2 (10) [DER-] (1) Real $DER.asm.rotor.w (11) [ALGB] (3) Real[3] asm.motor.top.i_term (nominal = {1.0 for $i1 in 1:3}) (12) [ALGB] (1) Real $FUN_1 (13) [ALGB] (1) Real system.thetaRel = system.thetaRef - system.thetaRef (14) [ALGB] (1) Real asm.motor.slip (15) [ALGB] (1) protected Real[1] asm.motor.v_rd = {0.0 for $i1 in 1:1} (nominal = {1000.0 for $i1 in 1:1}) (16) [ALGB] (1) protected Real[1] asm.motor.psi_rd (17) [ALGB] (3) flow Real[3] asm.term.i (nominal = {1.0 for $i1 in 1:3}) (18) [ALGB] (1) Real asm.motor.tau_el (19) [ALGB] (1) Real asm.rotor.friction.phi (20) [DER-] (1) Real $DER.speed.flange.phi (21) [ALGB] (2) flow Real[2] asm.heat.ports.Q_flow (22) [ALGB] (3) flow Real[3] voltage.term.i (nominal = {1.0 for $i1 in 1:3}) (23) [ALGB] (3) flow Real[3] asm.motor.term.i (nominal = {1.0 for $i1 in 1:3}) (24) [ALGB] (2) flow Real[2] asm.motor.heat.ports.Q_flow (25) [ALGB] (1) protected Real[1] asm.motor.psi_rq (26) [ALGB] (1) Real[1] asm.motor.top.v_n = asm.motor.v_n (start = {0.0 for $i1 in 1:1}, nominal = {1000.0 for $i1 in 1:1}) (27) [DER-] (1) Real $DER.asm.motor.phi_el (28) [DER-] (1) Real $DER.speed.phi_dot (29) [DER-] (2) Real[2] $DER.asm.motor.term.theta (30) [ALGB] (1) Real speedSignal.y (31) [ALGB] (2) Real[2] voltage.term.theta (32) [ALGB] (3) Real[3] voltage.term.v (nominal = {1000.0 for $i1 in 1:3}) (33) [ALGB] (3) Real[3] asm.motor.term.v (nominal = {1000.0 for $i1 in 1:3}) (34) [ALGB] (2) protected Real[2] asm.motor.omega (35) [ALGB] (1) protected Real voltage.alpha (36) [ALGB] (1) Real[1] asm.motor.top.i_n (start = {0.0 for $i1 in 1:1}, nominal = {1.0 for $i1 in 1:1}) (37) [ALGB] (1) flow Real asm.rotor.rotor.tau (38) [ALGB] (1) protected Real[1] asm.motor.i_rq (start = asm.motor.i_rq_start, nominal = {1.0 for $i1 in 1:1}) (39) [ALGB] (2) flow Real[2] bdCond.heat.ports.Q_flow (40) [ALGB] (3) Real[3] asm.motor.top.v_cond = asm.motor.v (nominal = {1000.0 for $i1 in 1:3}) (41) [ALGB] (3) Real[3] asm.motor.top.v_term (nominal = {1000.0 for $i1 in 1:3}) (42) [ALGB] (2) Real[2] asm.term.theta (43) [ALGB] (1) Real[1] asm.motor.i_n = asm.motor.top.i_n (nominal = {1.0 for $i1 in 1:1}) (44) [ALGB] (3) Real[3] asm.motor.i (start = asm.motor.i_start, nominal = {1.0 for $i1 in 1:3}) (45) [ALGB] (1) protected Real[1] asm.motor.i_rd (start = asm.motor.i_rd_start, nominal = {1.0 for $i1 in 1:1}) (46) [ALGB] (2) protected Real[2] voltage.vPhasor_internal (47) [ALGB] (1) flow Real asm.rotor.flange_b.tau (48) [ALGB] (1) Real[1] asm.motor.v_n (nominal = {1000.0 for $i1 in 1:1}) (49) [ALGB] (1) protected Real voltage.V (nominal = 1000.0) (50) [ALGB] (1) Real asm.motor.w_el (51) [ALGB] (1) protected Real[1] asm.motor.v_rq = {0.0 for $i1 in 1:1} (nominal = {1000.0 for $i1 in 1:1}) (52) [ALGB] (1) Real asm.rotor.a (53) [ALGB] (1) Real $FUN_6 (54) [ALGB] (1) Real system.thetaRef = system.thetaRef (55) [ALGB] (1) Real $FUN_5 System Equations (56/91) ************************** (1) [SCAL] (1) asm.motor.pp * asm.rotor.friction.phi = asm.motor.phi_el ($RES_SIM_10) (2) [ARRY] (2) asm.motor.omega = $DER.asm.motor.term.theta ($RES_SIM_11) (3) [ARRY] (2) asm.motor.heat.ports.Q_flow = -{asm.motor.c.R_s * asm.motor.i * asm.motor.i, $FUN_4 * asm.motor.i_rd * asm.motor.i_rd + $FUN_4 * asm.motor.i_rq * asm.motor.i_rq} ($RES_SIM_12) (4) [SCAL] (1) asm.motor.tau_el = asm.motor.i[1:2] * {-asm.motor.psi_s[2], asm.motor.psi_s[1]} ($RES_SIM_13) (5) [SCAL] (1) asm.motor.slip = (-1.0) + asm.motor.w_el / $FUN_5 ($RES_SIM_14) (6) [SCAL] (1) asm.rotor.w = $DER.speed.flange.phi ($RES_SIM_30) (7) [ARRY] (1) asm.motor.v_n = asm.motor.c.R_n * asm.motor.i_n ($RES_SIM_15) (8) [ARRY] (1) (asm.motor.omega[2] - asm.motor.w_el) * asm.motor.psi_rd + $FUN_4 * asm.motor.i_rq = asm.motor.v_rq ($RES_SIM_16) (9) [SCAL] (1) asm.rotor.J * asm.rotor.a = asm.rotor.flange_b.tau + asm.rotor.rotor.tau ($RES_SIM_32) (10) [ARRY] (1) $FUN_4 * asm.motor.i_rd - (asm.motor.omega[2] - asm.motor.w_el) * asm.motor.psi_rq = asm.motor.v_rd ($RES_SIM_17) (11) [SCAL] (1) asm.motor.c.R_s * asm.motor.i[3] = asm.motor.v[3] ($RES_SIM_18) (12) [SCAL] (1) asm.rotor.friction.phi = speed.flange.phi ($RES_SIM_34) (13) [ARRY] (2) asm.motor.omega[2] * {-asm.motor.psi_s[2], asm.motor.psi_s[1]} + asm.motor.c.R_s * asm.motor.i[1:2] = asm.motor.v[1:2] ($RES_SIM_19) (14) [SCAL] (1) $FUN_6 = tanh(speedSignal.coef * (time - speedSignal.t_change)) ($RES_$AUX_92) (15) [SCAL] (1) 1.7320508075688772 * voltage.term.i[3] - grd.term.i = 0.0 ($RES_SIM_36) (16) [SCAL] (1) $FUN_5 = sum(asm.motor.omega) ($RES_$AUX_93) (17) [ARRY] (2) voltage.term.theta = {system.thetaRel, system.thetaRef} ($RES_SIM_37) (18) [ARRY] (1) $FUN_4 = diagonal(asm.motor.R_r) ($RES_$AUX_94) (19) [ARRY] (4) $FUN_3 = diagonal(asm.motor.c.L_s[1:2]) ($RES_$AUX_95) (20) [SCAL] (1) $FUN_2 = sin(voltage.phi) ($RES_$AUX_96) (21) [SCAL] (1) $FUN_1 = cos(voltage.phi) ($RES_$AUX_97) (22) [FOR-] (3) ($RES_SIM_75) (22) [----] for $i1 in 1:3 loop (22) [----] [SCAL] (1) asm.motor.term.i[$i1] - asm.term.i[$i1] = 0.0 ($RES_SIM_76) (22) [----] end for; (23) [ARRY] (3) asm.term.v = asm.motor.term.v ($RES_SIM_77) (24) [SCAL] (1) system.thetaRel = system.thetaRef - system.thetaRef ($RES_BND_83) (25) [ARRY] (2) asm.term.theta = asm.motor.term.theta ($RES_SIM_78) (26) [ARRY] (3) asm.motor.top.v_cond = asm.motor.v ($RES_BND_85) (27) [ARRY] (3) asm.motor.top.i_cond = asm.motor.i ($RES_BND_86) (28) [ARRY] (1) asm.motor.top.v_n = asm.motor.v_n ($RES_BND_87) (29) [ARRY] (1) asm.motor.i_n = asm.motor.top.i_n ($RES_BND_89) (30) [ARRY] (1) asm.motor.psi_rq = asm.motor.L_m .* asm.motor.i[2] + asm.motor.L_r * asm.motor.i_rq ($RES_SIM_20) (31) [ARRY] (1) asm.motor.psi_rd = asm.motor.L_m .* asm.motor.i[1] + asm.motor.L_r * asm.motor.i_rd ($RES_SIM_21) (32) [ARRY] (2) asm.motor.psi_s = $FUN_3 * asm.motor.i[1:2] + {asm.motor.L_m * asm.motor.i_rd, asm.motor.L_m * asm.motor.i_rq} ($RES_SIM_22) (33) [SCAL] (1) asm.motor.top.i_n[1] = 1.7320508075688772 * asm.motor.top.i_term[3] ($RES_SIM_23) (34) [ARRY] (3) asm.motor.top.i_term = asm.motor.top.i_cond ($RES_SIM_24) (35) [ARRY] (3) voltage.term.v = {$FUN_1 * voltage.V, $FUN_2 * voltage.V, 0.0} ($RES_SIM_40) (36) [ARRY] (3) asm.motor.top.v_cond = asm.motor.top.v_term - {0.0, 0.0, 1.7320508075688772 * asm.motor.top.v_n[1]} ($RES_SIM_25) (37) [SCAL] (1) voltage.phi = voltage.term.theta[1] + voltage.alpha ($RES_SIM_41) (38) [SCAL] (1) voltage.alpha = voltage.vPhasor_internal[2] ($RES_SIM_42) (39) [SCAL] (1) voltage.V = voltage.vPhasor_internal[1] * voltage.V_base ($RES_SIM_43) (40) [SCAL] (1) asm.rotor.a = $DER.asm.rotor.w ($RES_SIM_29) (41) [ARRY] (2) voltage.vPhasor_internal = {voltage.v0, voltage.alpha0} ($RES_SIM_44) (42) [FOR-] (3) ($RES_SIM_63) (42) [----] for $i1 in 1:3 loop (42) [----] [SCAL] (1) voltage.term.i[$i1] + asm.term.i[$i1] = 0.0 ($RES_SIM_64) (42) [----] end for; (43) [SCAL] (1) system.thetaRef = 314.1592653589793 * time ($RES_SIM_48) (44) [SCAL] (1) -asm.rotor.rotor.tau = -asm.motor.pp * asm.motor.tau_el ($RES_SIM_9) (45) [FOR-] (2) ($RES_SIM_80) (45) [----] for $i1 in 1:2 loop (45) [----] [SCAL] (1) asm.motor.heat.ports[$i1].Q_flow - asm.heat.ports[$i1].Q_flow = 0.0 ($RES_SIM_81) (45) [----] end for; (46) [ARRY] (3) voltage.term.v = asm.term.v ($RES_SIM_65) (47) [SCAL] (1) asm.motor.w_el = $DER.asm.motor.phi_el ($RES_SIM_8) (48) [ARRY] (2) voltage.term.theta = asm.term.theta ($RES_SIM_66) (49) [ARRY] (3) asm.motor.term.v = asm.motor.top.v_term ($RES_SIM_7) (50) [FOR-] (2) ($RES_SIM_67) (50) [----] for $i1 in 1:2 loop (50) [----] [SCAL] (1) asm.heat.ports[$i1].Q_flow + bdCond.heat.ports[$i1].Q_flow = 0.0 ($RES_SIM_68) (50) [----] end for; (51) [ARRY] (3) asm.motor.term.i = asm.motor.top.i_term ($RES_SIM_6) (52) [SCAL] (1) $DER.speed.flange.phi = speed.phi_dot ($RES_SIM_4) (53) [SCAL] (1) asm.motor.v_rd[1] = 0.0 ($RES_BND_90) (54) [SCAL] (1) $DER.speed.phi_dot = (speedSignal.y - speed.phi_dot) / speed.tcst ($RES_SIM_3) (55) [SCAL] (1) asm.motor.v_rq[1] = 0.0 ($RES_BND_91) (56) [SCAL] (1) speedSignal.y = 0.5 * (speedSignal.s_start + speedSignal.s_end + (speedSignal.s_end - speedSignal.s_start) * $FUN_6) ($RES_SIM_2)