Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_4.0.0_Modelica.Clocked.Examples.Systems.EngineThrottleControl.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 4.0.0+maint.om/package.mo", uses=false) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+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(Modelica.Clocked.Examples.Systems.EngineThrottleControl,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|engine.cylinderAirCharge.integrator.y|engine.inertia.phi|engine.inertia.w|engine.intakeManifold.P_m|engine.throttleBody.m_ai|engine.torque.tau|engine.angleSensor.phi|engine.speedSensor.w",fileNamePrefix="Modelica_4.0.0_Modelica.Clocked.Examples.Systems.EngineThrottleControl") translateModel(Modelica.Clocked.Examples.Systems.EngineThrottleControl,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|engine.cylinderAirCharge.integrator.y|engine.inertia.phi|engine.inertia.w|engine.intakeManifold.P_m|engine.throttleBody.m_ai|engine.torque.tau|engine.angleSensor.phi|engine.speedSensor.w",fileNamePrefix="Modelica_4.0.0_Modelica.Clocked.Examples.Systems.EngineThrottleControl") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001454/0.001454, allocations: 109.5 kB / 17.7 MB, free: 5.402 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.001352/0.001353, allocations: 188.7 kB / 18.64 MB, free: 4.473 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.215/1.215, allocations: 222.9 MB / 242.3 MB, free: 15.17 MB / 206.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.352e-05/2.367e-05, allocations: 6.219 kB / 302 MB, free: 5.223 MB / 238.1 MB Notification: Performance of NFInst.instantiate(Modelica.Clocked.Examples.Systems.EngineThrottleControl): time 0.004449/0.004489, allocations: 3.188 MB / 305.2 MB, free: 2.031 MB / 238.1 MB Notification: Performance of NFInst.instExpressions: time 0.001303/0.005816, allocations: 0.7522 MB / 306 MB, free: 1.281 MB / 238.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002102/0.006039, allocations: 11.94 kB / 306 MB, free: 1.27 MB / 238.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003052/0.006351, allocations: 75.19 kB / 306 MB, free: 1.195 MB / 238.1 MB Notification: Performance of NFTyping.typeBindings: time 0.000199/0.006559, allocations: 67.25 kB / 306.1 MB, free: 1.129 MB / 238.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0006067/0.007201, allocations: 294.7 kB / 306.4 MB, free: 0.8438 MB / 238.1 MB Notification: Performance of NFFlatten.flatten: time 0.0005946/0.007807, allocations: 0.6946 MB / 307.1 MB, free: 152 kB / 238.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004529/0.008269, allocations: 350.3 kB / 307.4 MB, free: 15.8 MB / 254.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002048/0.008482, allocations: 227.3 kB / 307.6 MB, free: 15.58 MB / 254.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003663/0.008861, allocations: 262.8 kB / 307.9 MB, free: 15.32 MB / 254.1 MB Notification: Performance of NFPackage.collectConstants: time 8.315e-05/0.008959, allocations: 68 kB / 308 MB, free: 15.25 MB / 254.1 MB Notification: Performance of NFFlatten.collectFunctions: time 7.086e-05/0.009037, allocations: 76 kB / 308 MB, free: 15.18 MB / 254.1 MB Notification: Performance of combineBinaries: time 0.0004662/0.009509, allocations: 0.807 MB / 308.9 MB, free: 14.36 MB / 254.1 MB Notification: Performance of replaceArrayConstructors: time 0.0002257/0.009742, allocations: 0.5001 MB / 309.4 MB, free: 13.86 MB / 254.1 MB Notification: Performance of NFVerifyModel.verify: time 8.878e-05/0.009837, allocations: 87.75 kB / 309.4 MB, free: 13.77 MB / 254.1 MB Notification: Performance of FrontEnd: time 8.201e-05/0.009926, allocations: 39.69 kB / 309.5 MB, free: 13.73 MB / 254.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 128 (127) * Number of variables: 128 (127) Notification: Performance of Bindings: time 0.002001/0.01193, allocations: 2.611 MB / 312.1 MB, free: 10.99 MB / 254.1 MB Notification: Performance of FunctionAlias: time 0.0002274/0.01217, allocations: 211.7 kB / 312.3 MB, free: 10.77 MB / 254.1 MB Notification: Performance of Early Inline: time 0.001261/0.01344, allocations: 1.538 MB / 313.8 MB, free: 9.199 MB / 254.1 MB Notification: Performance of simplify1: time 0.0001194/0.01357, allocations: 107.9 kB / 313.9 MB, free: 9.094 MB / 254.1 MB Notification: Performance of Alias: time 0.00291/0.01648, allocations: 3.068 MB / 317 MB, free: 5.676 MB / 254.1 MB [/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFCeval.mo:2011:9-2012:55:writable] Error: Internal error NFCeval.evalBuiltinCall: unimplemented case for previous Notification: Performance of simplify2: time 7.948e-05/0.01658, allocations: 63.92 kB / 317.1 MB, free: 5.613 MB / 254.1 MB Notification: Performance of Events: time 0.000308/0.01689, allocations: 246.8 kB / 317.3 MB, free: 5.375 MB / 254.1 MB Notification: Performance of Detect States: time 0.0003722/0.01728, allocations: 385.1 kB / 317.7 MB, free: 4.984 MB / 254.1 MB Notification: Performance of Partitioning: time 0.0004129/0.0177, allocations: 417.5 kB / 318.1 MB, free: 4.562 MB / 254.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency engine.inductionToPowerDelay.sample1.y could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) engine.inductionToPowerDelay.delay.u_buffer = if $FUN_8 then fill(engine.inductionToPowerDelay.sample1.y, 2) else {engine.inductionToPowerDelay.sample1.y, $FUN_9} ($RES_SIM_29) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (67/68) ************************** (1) [ALGB] (1) Real engine.torqueGeneration.N (2) [ALGB] (1) Real hold1.y (3) [ALGB] (1) Real engine.intakeManifold.m_ao_der (4) [DISC] (1) Boolean engine.crankshaftPositionEvent.rotationalClock.less.y (5) [ALGB] (1) Real engine.cylinderAirCharge.sample1.y (6) [DER-] (1) Real $DER.engine.throttleBody.m_ai (7) [ALGB] (1) Real engine.crankshaftPositionEvent.rotationalClock.abs2.y (8) [ALGB] (1) Real engine.inductionToPowerDelay.sample1.y (9) [ALGB] (1) Real derivative.y (10) [DISC] (1) Integer engine.crankshaftPositionEvent.direction (11) [ALGB] (1) Real engine.throttleBody.m_ai_der (12) [DER-] (1) Real $DER.engine.inertia.phi (13) [ALGB] (1) Real engine.inductionToPowerDelay.m_a (14) [ALGB] (1) flow Real engine.inertia.flange_b.tau (15) [ALGB] (2) protected Real[2] engine.inductionToPowerDelay.delay.u_buffer (start = {0.0 for $i1 in 1:2}) (16) [ALGB] (1) Real step1.y (17) [ALGB] (1) flow Real torque.flange.tau (18) [ALGB] (1) protected Real engine.throttleBody.pratio (19) [ALGB] (1) Real $FUN_9 (20) [DISC] (1) Boolean $FUN_8 (21) [ALGB] (1) Real engine.crankshaftPositionEvent.rotationalClock.update_offset.y (22) [ALGB] (1) Real $FUN_6 (23) [ALGB] (1) protected Real engine.throttleBody.tmp1 (24) [ALGB] (1) Real sample2.y (25) [ALGB] (1) Real $FUN_5 (26) [ALGB] (1) protected Real engine.throttleBody.tmp2 (27) [DISC] (1) Integer $FUN_3 (28) [ALGB] (1) Real $FUN_2 (29) [DISS] (1) protected Real speedControl.x_d (fixed = true, start = 8.973) (30) [ALGB] (1) Real engine.inductionToPowerDelay.delay.y (31) [DER-] (1) Real $DER.engine.cylinderAirCharge.add.u1 (32) [ALGB] (1) Clock sample2.clock (33) [ALGB] (1) Real engine.torqueGeneration.m_a (34) [ALGB] (1) Real engine.crankshaftPositionEvent.rotationalClock.abs1.u (35) [ALGB] (1) Real engine.crankshaftPositionEvent.rotationalClock.abs1.y (36) [DISC] (1) Boolean $SEV_16 (37) [DISC] (1) Boolean $SEV_15 (38) [DISC] (1) Boolean $SEV_14 (39) [DISC] (1) Boolean $SEV_13 (40) [DISC] (1) Boolean $SEV_12 (41) [DISC] (1) Boolean $SEV_11 (42) [DISC] (1) Boolean $SEV_10 (43) [DER-] (1) Real $DER.engine.intakeManifold.P_m (44) [DER-] (1) Real $DER.engine.inertia.w (45) [ALGB] (1) Real engine.cylinderAirCharge.hold1.y (46) [ALGB] (1) Real engine.inertia.a (47) [ALGB] (1) protected Real engine.throttleBody.f_Theta (48) [ALGB] (1) Real step2.y (49) [ALGB] (1) flow Real engine.flange_b.tau (50) [ALGB] (1) protected Real engine.throttleBody.gpratio (51) [DISC] (1) Boolean $SEV_9 (52) [DISC] (1) Boolean $SEV_8 (53) [DISC] (1) Boolean $SEV_7 (54) [DISC] (1) Boolean $SEV_6 (55) [ALGB] (1) Real engine.torque.tau (56) [DISC] (1) Boolean engine.crankshaftPositionEvent.direction_changed (start = false) (57) [DISC] (1) Boolean $SEV_5 (58) [DISC] (1) Boolean $SEV_4 (59) [DISC] (1) Boolean $SEV_3 (60) [DISC] (1) Boolean $TEV_1 (61) [DISC] (1) Boolean $TEV_0 (62) [ALGB] (1) protected Real engine.throttleBody.g_Pm (63) [ALGB] (1) Real engine.crankshaftPositionEvent.rotationalClock.angular_offset.y (64) [ALGB] (1) Real sample1.y (65) [ALGB] (1) Real engine.crankshaftPositionEvent.rotationalClock.update_direction.y (66) [ALGB] (1) Real engine.crankshaftPositionEvent.rotationalClock.direction_sign.y (67) [DISS] (1) Real speedControl.Theta (start = 8.9) System Equations (67/68) ************************** (1) [SCAL] (1) engine.throttleBody.m_ai_der = $DER.engine.throttleBody.m_ai ($RES_SIM_50) (2) [SCAL] (1) engine.inertia.J * engine.inertia.a = engine.torque.tau + engine.inertia.flange_b.tau ($RES_SIM_15) (3) [SCAL] (1) engine.throttleBody.g_Pm = $FUN_3 * engine.throttleBody.gpratio ($RES_SIM_51) (4) [SCAL] (1) engine.inertia.a = $DER.engine.inertia.w ($RES_SIM_16) (5) [SCAL] (1) engine.throttleBody.gpratio = if $SEV_15 then 2.0 * $FUN_2 else 1.0 ($RES_SIM_52) (6) [SCAL] (1) engine.inertia.w = $DER.engine.inertia.phi ($RES_SIM_17) (7) [SCAL] (1) engine.throttleBody.pratio = min(engine.throttleBody.tmp1, engine.throttleBody.tmp2) ($RES_SIM_53) (8) [SCAL] (1) engine.throttleBody.tmp2 = engine.throttleBody.P_0 / engine.intakeManifold.P_m ($RES_SIM_54) (9) [SCAL] (1) hold1.y = hold(speedControl.Theta) ($RES_$AUX_140) (10) [SCAL] (1) engine.throttleBody.tmp1 = engine.intakeManifold.P_m / engine.throttleBody.P_0 ($RES_SIM_55) (11) [SCAL] (1) engine.throttleBody.f_Theta = (2.821 + 0.10299 * hold1.y ^ 2.0) - (6.3e-4 * hold1.y ^ 3.0 + 0.05231 * hold1.y) ($RES_SIM_56) (12) [SCAL] (1) $DER.engine.throttleBody.m_ai = engine.throttleBody.f_Theta * engine.throttleBody.g_Pm ($RES_SIM_57) (13) [SCAL] (1) sample1.y = $SEV_16 ($RES_SIM_59) (14) [SCAL] (1) $FUN_2 = sqrt(engine.throttleBody.pratio - engine.throttleBody.pratio ^ 2.0) ($RES_$AUX_139) (15) [SCAL] (1) $FUN_3 = sign(engine.throttleBody.P_0 - engine.intakeManifold.P_m) ($RES_$AUX_138) (16) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.angular_offset.y = hold(engine.crankshaftPositionEvent.rotationalClock.update_offset.y) ($RES_$AUX_137) (17) [SCAL] (1) $DER.engine.cylinderAirCharge.add.u1 = engine.cylinderAirCharge.integrator.k * engine.intakeManifold.m_ao_der ($RES_SIM_22) (18) [SCAL] (1) $FUN_5 = floor(0.5 + engine.crankshaftPositionEvent.rotationalClock.direction_sign.y) ($RES_$AUX_136) (19) [SCAL] (1) $FUN_6 = ceil((-0.5) + engine.crankshaftPositionEvent.rotationalClock.direction_sign.y) ($RES_$AUX_135) (20) [WHEN] (1)when Clock() then (20) [----] speedControl.x_d := previous(speedControl.x_d) + interval() * speedControl.k_I * (previous(sample1.y) - previous(sample2.y)) (20) [----] end when; (21) [SCAL] (1) engine.torqueGeneration.m_a = hold(engine.inductionToPowerDelay.delay.y) ($RES_$AUX_134) (22) [WHEN] (1)when Clock() then (22) [----] speedControl.Theta := speedControl.k_p * (sample1.y - sample2.y) + speedControl.x_d (22) [----] end when; (23) [SCAL] (1) $FUN_8 = previous(false) ($RES_$AUX_133) (24) [SCAL] (1) engine.cylinderAirCharge.sample1.y = $SEV_4 ($RES_SIM_26) (25) [SCAL] (1) $FUN_9 = previous(engine.inductionToPowerDelay.delay.u_buffer[1]) ($RES_$AUX_132) (26) [SCAL] (1) engine.inductionToPowerDelay.m_a = engine.cylinderAirCharge.add.k1 * engine.cylinderAirCharge.add.u1 + engine.cylinderAirCharge.add.k2 * engine.cylinderAirCharge.hold1.y ($RES_SIM_27) (27) [SCAL] (1) torque.flange.tau + engine.flange_b.tau = 0.0 ($RES_SIM_63) (28) [SCAL] (1) engine.cylinderAirCharge.hold1.y = hold(engine.cylinderAirCharge.sample1.y) ($RES_$AUX_131) (29) [SCAL] (1) engine.inductionToPowerDelay.delay.y = shiftSample(engine.inductionToPowerDelay.delay.u_buffer[2], 1, 1) ($RES_SIM_28) (30) [ARRY] (2) engine.inductionToPowerDelay.delay.u_buffer = if $FUN_8 then fill(engine.inductionToPowerDelay.sample1.y, 2) else {engine.inductionToPowerDelay.sample1.y, $FUN_9} ($RES_SIM_29) (31) [SCAL] (1) $TEV_0 = time < step2.startTime ($RES_EVT_141) (32) [SCAL] (1) $TEV_1 = time < step1.startTime ($RES_EVT_142) (33) [SCAL] (1) $SEV_3 = sample(1, derivative.y, sample2.clock) ($RES_EVT_144) (34) [SCAL] (1) $SEV_4 = sample(4, engine.cylinderAirCharge.add.u1, sample2.clock) ($RES_EVT_145) (35) [SCAL] (1) $SEV_5 = sample(5, engine.inductionToPowerDelay.m_a, sample2.clock) ($RES_EVT_146) (36) [SCAL] (1) $SEV_6 = sample(6, engine.crankshaftPositionEvent.rotationalClock.abs1.u, sample2.clock) ($RES_EVT_147) (37) [SCAL] (1) $SEV_7 = engine.crankshaftPositionEvent.direction == previous(engine.crankshaftPositionEvent.direction) ($RES_EVT_148) (38) [SCAL] (1) $SEV_8 = engine.crankshaftPositionEvent.rotationalClock.direction_sign.y > 0.0 ($RES_EVT_149) (39) [SCAL] (1) engine.inductionToPowerDelay.sample1.y = $SEV_5 ($RES_SIM_32) (40) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.update_direction.y = $SEV_6 ($RES_SIM_34) (41) [-IF-] (1)if firstTick() then (41) [----] [SCAL] (1) engine.crankshaftPositionEvent.direction_changed = false ($RES_SIM_36) (41) [----] else (41) [----] [SCAL] (1) engine.crankshaftPositionEvent.direction_changed = not $SEV_7 ($RES_SIM_37) (41) [----] end if; (42) [SCAL] (1) engine.crankshaftPositionEvent.direction = if $SEV_8 then integer($FUN_5) else integer($FUN_6) ($RES_SIM_38) (43) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.direction_sign.y = if noEvent($SEV_9) then 1.0 else if noEvent($SEV_10) then -1.0 else 0.0 ($RES_SIM_39) (44) [SCAL] (1) $SEV_9 = engine.crankshaftPositionEvent.rotationalClock.update_direction.y > 0.0 ($RES_EVT_150) (45) [SCAL] (1) $SEV_10 = engine.crankshaftPositionEvent.rotationalClock.update_direction.y < 0.0 ($RES_EVT_151) (46) [SCAL] (1) $SEV_11 = engine.crankshaftPositionEvent.rotationalClock.abs1.u >= 0.0 ($RES_EVT_152) (47) [SCAL] (1) $SEV_12 = engine.crankshaftPositionEvent.threshold.k >= 0.0 ($RES_EVT_153) (48) [SCAL] (1) $SEV_13 = engine.crankshaftPositionEvent.rotationalClock.abs2.y < engine.crankshaftPositionEvent.rotationalClock.abs1.y ($RES_EVT_154) (49) [SCAL] (1) $SEV_14 = sample(7, engine.inertia.phi, sample2.clock) ($RES_EVT_155) (50) [SCAL] (1) $SEV_15 = engine.throttleBody.pratio >= 0.5 ($RES_EVT_156) (51) [SCAL] (1) $SEV_16 = sample(8, speedRef.y, Clock()) ($RES_EVT_157) (52) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.abs1.y = if noEvent($SEV_11) then engine.crankshaftPositionEvent.rotationalClock.abs1.u else -engine.crankshaftPositionEvent.rotationalClock.abs1.u ($RES_SIM_40) (53) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.abs2.y = if noEvent($SEV_12) then engine.crankshaftPositionEvent.threshold.k else -engine.crankshaftPositionEvent.threshold.k ($RES_SIM_41) (54) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.less.y = $SEV_13 ($RES_SIM_42) (55) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.abs1.u = engine.crankshaftPositionEvent.rotationalClock.sub.k1 * engine.inertia.phi + engine.crankshaftPositionEvent.rotationalClock.sub.k2 * engine.crankshaftPositionEvent.rotationalClock.angular_offset.y ($RES_SIM_43) (56) [SCAL] (1) engine.crankshaftPositionEvent.rotationalClock.update_offset.y = $SEV_14 ($RES_SIM_45) (57) [SCAL] (1) sample2.clock = Clock(engine.crankshaftPositionEvent.rotationalClock.less.y, 0.0) ($RES_SIM_46) (58) [SCAL] (1) engine.torque.tau = ((-181.3) + 2.55 * engine.torqueGeneration.sigma * engine.torqueGeneration.m_a + 4.8e-4 * engine.torqueGeneration.N * engine.torqueGeneration.sigma + 0.027 * engine.torqueGeneration.N + 0.26 * engine.torqueGeneration.sigma + 21.91 * engine.torqueGeneration.AFR + 379.36 * engine.torqueGeneration.m_a) - (0.05 * engine.torqueGeneration.sigma ^ 2.0 * engine.torqueGeneration.m_a + 1.07e-4 * engine.torqueGeneration.N ^ 2.0 + 0.0028 * engine.torqueGeneration.sigma ^ 2.0 + 0.85 * engine.torqueGeneration.AFR ^ 2.0) ($RES_SIM_47) (59) [SCAL] (1) engine.intakeManifold.m_ao_der = ((-0.366) + 0.08979 * engine.torqueGeneration.N * engine.intakeManifold.P_m + 1e-4 * engine.torqueGeneration.N ^ 2.0 * engine.intakeManifold.P_m) - 0.0337 * engine.torqueGeneration.N * engine.intakeManifold.P_m ^ 2.0 ($RES_SIM_48) (60) [SCAL] (1) engine.inertia.flange_b.tau - engine.flange_b.tau = 0.0 ($RES_SIM_84) (61) [SCAL] (1) $DER.engine.intakeManifold.P_m = engine.intakeManifold.RTVmRatio * (engine.throttleBody.m_ai_der - engine.intakeManifold.m_ao_der) ($RES_SIM_49) (62) [SCAL] (1) step2.y = step2.offset + (if $TEV_0 then 0.0 else step2.height) ($RES_SIM_9) (63) [SCAL] (1) -torque.flange.tau = add.k1 * step1.y + add.k2 * step2.y ($RES_SIM_8) (64) [SCAL] (1) derivative.y = $DER.engine.inertia.phi ($RES_SIM_3) (65) [SCAL] (1) sample2.y = $SEV_3 ($RES_SIM_2) (66) [SCAL] (1) step1.y = step1.offset + (if $TEV_1 then 0.0 else step1.height) ($RES_SIM_10) (67) [SCAL] (1) engine.torqueGeneration.N = $DER.engine.inertia.phi ($RES_SIM_14)