Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_trunk_Modelica.Mechanics.Rotational.Examples.LossyGearDemo1.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Running command: translateModel(Modelica.Mechanics.Rotational.Examples.LossyGearDemo1,tolerance=1e-06,outputFormat="mat",numberOfIntervals=1000,variableFilter="time|Inertia2.phi|Inertia2.w|gear.mode",fileNamePrefix="Modelica_trunk_Modelica.Mechanics.Rotational.Examples.LossyGearDemo1") translateModel(Modelica.Mechanics.Rotational.Examples.LossyGearDemo1,tolerance=1e-06,outputFormat="mat",numberOfIntervals=1000,variableFilter="time|Inertia2.phi|Inertia2.w|gear.mode",fileNamePrefix="Modelica_trunk_Modelica.Mechanics.Rotational.Examples.LossyGearDemo1") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.001247/0.001252, allocations: 110.7 kB / 18.47 MB, free: 4.625 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.00131/0.00131, allocations: 211.9 kB / 19.42 MB, free: 3.68 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.305/1.305, allocations: 227.4 MB / 247.6 MB, free: 10.35 MB / 206.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.24e-05/2.24e-05, allocations: 2.281 kB / 359.3 MB, free: 12.97 MB / 302.1 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.Rotational.Examples.LossyGearDemo1): time 0.00395/0.003981, allocations: 2.537 MB / 361.8 MB, free: 10.41 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.001948/0.005941, allocations: 1.139 MB / 363 MB, free: 9.266 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002296/0.006182, allocations: 4 kB / 363 MB, free: 9.262 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.000324/0.006513, allocations: 71.42 kB / 363.1 MB, free: 9.191 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0005581/0.007105, allocations: 174.2 kB / 363.2 MB, free: 9.02 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0004409/0.007556, allocations: 183.6 kB / 363.4 MB, free: 8.84 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.0005924/0.008158, allocations: 0.5141 MB / 363.9 MB, free: 8.324 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000183/0.008349, allocations: 90.36 kB / 364 MB, free: 8.238 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0004077/0.008766, allocations: 219.3 kB / 364.2 MB, free: 8.023 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003805/0.009157, allocations: 243.2 kB / 364.5 MB, free: 7.785 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 8.473e-05/0.00925, allocations: 36 kB / 364.5 MB, free: 7.75 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002621/0.009518, allocations: 139.9 kB / 364.6 MB, free: 7.613 MB / 302.1 MB Notification: Performance of combineBinaries: time 0.0004944/0.01002, allocations: 0.6152 MB / 365.2 MB, free: 6.992 MB / 302.1 MB Notification: Performance of replaceArrayConstructors: time 0.0002084/0.01024, allocations: 327.2 kB / 365.6 MB, free: 6.668 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001143/0.01036, allocations: 55.81 kB / 365.6 MB, free: 6.613 MB / 302.1 MB Notification: Performance of FrontEnd: time 5.015e-05/0.01041, allocations: 11.94 kB / 365.6 MB, free: 6.602 MB / 302.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 76 (69) * Number of variables: 76 (73) Notification: Performance of Bindings: time 0.001674/0.01209, allocations: 1.649 MB / 367.3 MB, free: 4.844 MB / 302.1 MB Notification: Performance of FunctionAlias: time 0.0001402/0.01224, allocations: 79.3 kB / 367.4 MB, free: 4.77 MB / 302.1 MB Notification: Performance of Early Inline: time 0.001137/0.01338, allocations: 1.129 MB / 368.5 MB, free: 3.609 MB / 302.1 MB Notification: Performance of simplify1: time 8.621e-05/0.01348, allocations: 79.91 kB / 368.6 MB, free: 3.531 MB / 302.1 MB Notification: Performance of Alias: time 0.001488/0.01497, allocations: 1.253 MB / 369.8 MB, free: 2.172 MB / 302.1 MB Notification: Performance of simplify2: time 9.462e-05/0.01508, allocations: 67.91 kB / 369.9 MB, free: 2.105 MB / 302.1 MB Notification: Performance of Events: time 0.0003649/0.01545, allocations: 224 kB / 370.1 MB, free: 1.887 MB / 302.1 MB Notification: Performance of Detect States: time 0.0005337/0.01599, allocations: 359.2 kB / 370.4 MB, free: 1.52 MB / 302.1 MB Notification: Performance of Partitioning: time 0.0004226/0.01642, allocations: 361.7 kB / 370.8 MB, free: 1.152 MB / 302.1 MB Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [-IF-] (8)if gear.ideal then [----] [SCAL] (1) gear.tau_bf2 = 0.0 ($RES_SIM_49) [----] [SCAL] (1) gear.tau_bf1 = 0.0 ($RES_SIM_50) [----] [SCAL] (1) gear.eta_mf2 = 1.0 ($RES_SIM_51) [----] [SCAL] (1) gear.eta_mf1 = 1.0 ($RES_SIM_52) [----] [ARRY] (4) gear.interpolation_result = {{1.0, 1.0, 0.0, 0.0}} ($RES_SIM_53) [----] else [----] [SCAL] (1) gear.tau_bf2 = noEvent(abs(gear.interpolation_result[1, 4])) ($RES_SIM_54) [----] [SCAL] (1) gear.tau_bf1 = noEvent(abs(gear.interpolation_result[1, 3])) ($RES_SIM_55) [----] [SCAL] (1) gear.eta_mf2 = gear.interpolation_result[1, 2] ($RES_SIM_56) [----] [SCAL] (1) gear.eta_mf1 = gear.interpolation_result[1, 1] ($RES_SIM_57) [----] [FOR-] (4) ($RES_SIM_58) [----] [----] for i in 1:4 loop [----] [----] [SCAL] (1) gear.interpolation_result[1, i] = if $SEV_10[i] then Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(gear.tableID, i, noEvent(abs(gear.w_a))) else if $SEV_11[i] then Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(gear.tableID, i, noEvent(abs(gear.w_a))) else Modelica.Blocks.Tables.Internal.getTable1DValue(gear.tableID, i, noEvent(abs(gear.w_a))) ($RES_SIM_59) [----] [----] end for; [----] end if; Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (60/69) ************************** (1) [DISC] (1) Boolean $SEV_5 (2) [ALGB] (1) Real gear.a_a (3) [DISC] (1) Boolean $SEV_4 (4) [DISC] (1) Boolean $SEV_3 (5) [DISC] (1) Boolean $SEV_2 (6) [DISC] (1) Boolean gear.tau_aPos (start = true) (7) [DISC] (1) Boolean $SEV_1 (8) [ALGB] (1) Real gear.tauLossMin_m (9) [DISC] (1) Boolean $SEV_0 (10) [DER-] (1) Real $DER.Inertia2.phi (11) [ALGB] (1) Real gear.tau_bf_a (12) [DISC] (1) Boolean gear.startForward (start = false) (13) [ALGB] (1) Real gear.sa (14) [ALGB] (1) Real gear.quadrant1_p (15) [ALGB] (1) Real Inertia1.a (16) [DISC] (1) Boolean gear.startBackward (start = false) (17) [ALGB] (1) flow Real torque2.support.tau = -(-torque2.support.tau) (18) [ALGB] (4) Real[1, 4] gear.interpolation_result (19) [ALGB] (1) Real gear.eta_mf1 (20) [ALGB] (1) Real gear.eta_mf2 (21) [ALGB] (1) Real gear.quadrant2_p (22) [ALGB] (1) Real gear.tauLoss (23) [ALGB] (1) Real gear.tauLossMax (24) [ALGB] (1) Real PowerLoss = der(Inertia1.flange_b.phi) * (-(gear.tau_bf_a_0 - gear.tau_eta_m)) + der(Inertia2.phi) * gear.flange_b.tau (25) [DISC] (4) Boolean[4] $SEV_11[i] (26) [ALGB] (1) Real Inertia2.a (27) [ALGB] (1) flow Real torque1.support.tau = -(-torque1.support.tau) (28) [ALGB] (1) Real gear.quadrant4 (29) [ALGB] (1) Real gear.quadrant3 (30) [ALGB] (1) Real gear.quadrant2 (31) [ALGB] (1) Real gear.quadrant1 (32) [DISC] (4) Boolean[4] $SEV_10[i] (33) [ALGB] (1) Real gear.lossPower (34) [DISC] (1) Integer gear.mode (fixed = true, start = 2, min = -1, max = 3) (35) [ALGB] (1) Real gear.tauLossMin (36) [ALGB] (1) Real gear.tauLossMax_p (37) [ALGB] (1) flow Real gear.support.tau = -(gear.flange_b.tau + (-(gear.tau_bf_a_0 - gear.tau_eta_m))) (38) [ALGB] (1) Real gear.quadrant3_m (39) [DER-] (1) Real $DER.Inertia1.flange_b.phi (40) [ALGB] (1) Real gear.tau_eta (41) [ALGB] (1) Real gear.tau_eta_m (42) [ALGB] (1) flow Real fixed.flange.tau (43) [ALGB] (1) Real gear.tau_bf1 (44) [ALGB] (1) Real gear.tau_bf2 (45) [DISC] (1) Boolean $TEV_2 (46) [DISC] (1) Boolean $TEV_1 (47) [ALGB] (1) Real gear.quadrant4_m (48) [DISC] (1) Boolean $TEV_0 (49) [DISC] (1) Boolean gear.locked (start = false) (50) [DER-] (1) Real $DER.Inertia2.w (51) [DER-] (1) Real $DER.gear.w_a (52) [DISC] (1) Boolean gear.ideal (53) [ALGB] (1) Real gear.phi_b (54) [DISC] (1) Boolean $SEV_9 (55) [DISC] (1) Boolean $SEV_8 (56) [ALGB] (1) flow Real gear.flange_b.tau (57) [DISC] (1) Boolean $SEV_7 (58) [DER-] (1) Real $DER.Inertia1.w (59) [DISC] (1) Boolean $SEV_6 (60) [DER-] (1) Real $DER.gear.phi_a System Equations (56/69) ************************** (1) [SCAL] (1) Inertia1.J * Inertia1.a = torque1.support.tau + (gear.tau_bf_a_0 - gear.tau_eta_m) ($RES_SIM_10) (2) [SCAL] (1) Inertia1.a = $DER.Inertia1.w ($RES_SIM_11) (3) [SCAL] (1) Inertia1.w = $DER.Inertia1.flange_b.phi ($RES_SIM_12) (4) [SCAL] (1) $SEV_0 = ($PRE.gear.mode == 1 or gear.startForward) and gear.w_a > 0.0 ($RES_EVT_90) (5) [SCAL] (1) $SEV_1 = ($PRE.gear.mode == (-1) or gear.startBackward) and gear.w_a < 0.0 ($RES_EVT_91) (6) [SCAL] (1) $SEV_2 = gear.startForward or $PRE.gear.mode == 1 ($RES_EVT_92) (7) [SCAL] (1) gear.quadrant1 = gear.tau_bf1 - (1.0 - gear.eta_mf1) * (gear.tau_bf_a_0 - gear.tau_eta_m) ($RES_SIM_30) (8) [SCAL] (1) gear.lossPower = gear.tauLoss * gear.w_a ($RES_SIM_15) (9) [SCAL] (1) $SEV_3 = (((gear.ideal or $PRE.gear.mode == 1) or gear.startForward) or $PRE.gear.mode == (-1)) or gear.startBackward ($RES_EVT_93) (10) [SCAL] (1) gear.tauLossMin_m = if noEvent($SEV_7) then gear.quadrant4_m else gear.quadrant3_m ($RES_SIM_31) (11) [SCAL] (1) gear.mode = if gear.ideal then 2 else if $SEV_0 then 1 else if $SEV_1 then -1 else 0 ($RES_SIM_16) (12) [SCAL] (1) $SEV_4 = $PRE.gear.mode == 0 and gear.sa < gear.tauLossMin_m or initial() and gear.w_a < 0.0 ($RES_EVT_94) (13) [SCAL] (1) gear.quadrant3_m = -(gear.tau_bf1_0 + (1.0 - gear.eta_mf1_0) * (gear.tau_bf_a_0 - gear.tau_eta_m)) ($RES_SIM_32) (14) [SCAL] (1) gear.a_a = if gear.locked then 0.0 else gear.sa - gear.tauLoss ($RES_SIM_17) (15) [SCAL] (1) $SEV_5 = $PRE.gear.mode == 0 and gear.sa > gear.tauLossMax_p or initial() and gear.w_a > 0.0 ($RES_EVT_95) (16) [SCAL] (1) gear.quadrant4_m = -(gear.tau_bf2_0 + (1.0 - 1/gear.eta_mf2_0) * (gear.tau_bf_a_0 - gear.tau_eta_m)) ($RES_SIM_33) (17) [SCAL] (1) gear.tauLoss = if gear.ideal then 0.0 else if gear.locked then gear.sa else if $SEV_2 then gear.tauLossMax else gear.tauLossMin ($RES_SIM_18) (18) [SCAL] (1) $SEV_6 = gear.tau_eta >= 0.0 ($RES_EVT_96) (19) [SCAL] (1) gear.tauLossMax_p = if noEvent($SEV_8) then gear.quadrant1_p else gear.quadrant2_p ($RES_SIM_34) (20) [SCAL] (1) gear.locked = not $SEV_3 ($RES_SIM_19) (21) [SCAL] (1) $SEV_7 = gear.tau_eta_m > 0.0 ($RES_EVT_97) (22) [SCAL] (1) gear.quadrant2_p = gear.tau_bf2_0 - (1.0 - 1/gear.eta_mf2_0) * (gear.tau_bf_a_0 - gear.tau_eta_m) ($RES_SIM_35) (23) [SCAL] (1) $SEV_8 = -(gear.tau_bf_a_0 + (gear.tau_bf_a_0 - gear.tau_eta_m)) > 0.0 ($RES_EVT_98) (24) [SCAL] (1) gear.quadrant1_p = gear.tau_bf1_0 - (1.0 - gear.eta_mf1_0) * (gear.tau_bf_a_0 - gear.tau_eta_m) ($RES_SIM_36) (25) [SCAL] (1) $SEV_9 = abs((-1.0) + gear.eta_mf1) <= 2.220446049250313e-16 and abs((-1.0) + gear.eta_mf2) <= 2.220446049250313e-16 ($RES_EVT_99) (26) [SCAL] (1) gear.a_a = $DER.gear.w_a ($RES_SIM_39) (27) [FOR-] (4) ($RES_EVT_100) (27) [----] for i in 1:4 loop (27) [----] [SCAL] (1) $SEV_10[i] = gear.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_101) (27) [----] end for; (28) [FOR-] (4) ($RES_EVT_102) (28) [----] for i in 1:4 loop (28) [----] [SCAL] (1) $SEV_11[i] = gear.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_103) (28) [----] end for; (29) [SCAL] (1) gear.startBackward = $SEV_4 ($RES_SIM_20) (30) [SCAL] (1) gear.startForward = $SEV_5 ($RES_SIM_21) (31) [SCAL] (1) gear.tauLossMin = if gear.tau_aPos then gear.quadrant4 else gear.quadrant3 ($RES_SIM_22) (32) [SCAL] (1) gear.tauLossMax = if gear.tau_aPos then gear.quadrant1 else gear.quadrant2 ($RES_SIM_23) (33) [SCAL] (1) $TEV_0 = time < load.startTime ($RES_EVT_87) (34) [SCAL] (1) gear.w_a = $DER.gear.phi_a ($RES_SIM_40) (35) [SCAL] (1) gear.tau_aPos = $SEV_6 ($RES_SIM_25) (36) [SCAL] (1) $TEV_1 = time < (load.startTime + load.duration) ($RES_EVT_88) (37) [SCAL] (1) 0.0 = gear.flange_b.tau + gear.ratio * (-(gear.tauLoss + (gear.tau_bf_a_0 - gear.tau_eta_m))) ($RES_SIM_41) (38) [SCAL] (1) gear.tau_eta = if gear.ideal then -(gear.tau_bf_a_0 - gear.tau_eta_m) else if gear.locked then -(gear.tau_bf_a_0 - gear.tau_eta_m) else if $SEV_2 then -(gear.tau_bf_a + (gear.tau_bf_a_0 - gear.tau_eta_m)) else gear.tau_bf_a - (gear.tau_bf_a_0 - gear.tau_eta_m) ($RES_SIM_26) (39) [SCAL] (1) gear.ideal = Modelica.Math.Matrices.isEqual(gear.lossTable, {{0.0, 1.0, 1.0, 0.0, 0.0}}, 2.220446049250313e-16) ($RES_$AUX_83) (40) [SCAL] (1) $TEV_2 = time < DriveSine.startTime ($RES_EVT_89) (41) [SCAL] (1) gear.quadrant3 = -(gear.tau_bf1 + (1.0 - gear.eta_mf1) * (gear.tau_bf_a_0 - gear.tau_eta_m)) ($RES_SIM_27) (42) [SCAL] (1) gear.phi_a = gear.ratio * gear.phi_b ($RES_SIM_42) (43) [SCAL] (1) gear.quadrant4 = -(gear.tau_bf2 + (1.0 - 1/gear.eta_mf2) * (gear.tau_bf_a_0 - gear.tau_eta_m)) ($RES_SIM_28) (44) [SCAL] (1) gear.phi_b = Inertia2.phi - fixed.phi0 ($RES_SIM_43) (45) [SCAL] (1) gear.quadrant2 = gear.tau_bf2 - (1.0 - 1/gear.eta_mf2) * (gear.tau_bf_a_0 - gear.tau_eta_m) ($RES_SIM_29) (46) [SCAL] (1) gear.phi_a = Inertia1.flange_b.phi - fixed.phi0 ($RES_SIM_44) (47) [-IF-] (1)if $SEV_9 then (47) [----] [SCAL] (1) gear.tau_bf_a = gear.tau_bf1 / 2.0 ($RES_SIM_46) (47) [----] else (47) [----] [SCAL] (1) gear.tau_bf_a = (gear.tau_bf1 - gear.tau_bf2) / (gear.eta_mf1 - 1.0 / gear.eta_mf2) ($RES_SIM_47) (47) [----] end if; (48) [SCAL] (1) torque1.support.tau + torque2.support.tau + fixed.flange.tau + gear.support.tau = 0.0 ($RES_SIM_63) (49) [-IF-] (8)if gear.ideal then (49) [----] [SCAL] (1) gear.tau_bf2 = 0.0 ($RES_SIM_49) (49) [----] [SCAL] (1) gear.tau_bf1 = 0.0 ($RES_SIM_50) (49) [----] [SCAL] (1) gear.eta_mf2 = 1.0 ($RES_SIM_51) (49) [----] [SCAL] (1) gear.eta_mf1 = 1.0 ($RES_SIM_52) (49) [----] [ARRY] (4) gear.interpolation_result = {{1.0, 1.0, 0.0, 0.0}} ($RES_SIM_53) (49) [----] else (49) [----] [SCAL] (1) gear.tau_bf2 = noEvent(abs(gear.interpolation_result[1, 4])) ($RES_SIM_54) (49) [----] [SCAL] (1) gear.tau_bf1 = noEvent(abs(gear.interpolation_result[1, 3])) ($RES_SIM_55) (49) [----] [SCAL] (1) gear.eta_mf2 = gear.interpolation_result[1, 2] ($RES_SIM_56) (49) [----] [SCAL] (1) gear.eta_mf1 = gear.interpolation_result[1, 1] ($RES_SIM_57) (49) [----] [FOR-] (4) ($RES_SIM_58) (49) [----] [----] for i in 1:4 loop (49) [----] [----] [SCAL] (1) gear.interpolation_result[1, i] = if $SEV_10[i] then Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(gear.tableID, i, noEvent(abs(gear.w_a))) else if $SEV_11[i] then Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(gear.tableID, i, noEvent(abs(gear.w_a))) else Modelica.Blocks.Tables.Internal.getTable1DValue(gear.tableID, i, noEvent(abs(gear.w_a))) ($RES_SIM_59) (49) [----] [----] end for; (49) [----] end if; (50) [SCAL] (1) Inertia2.w = $DER.Inertia2.phi ($RES_SIM_7) (51) [SCAL] (1) Inertia2.a = $DER.Inertia2.w ($RES_SIM_6) (52) [SCAL] (1) Inertia2.J * Inertia2.a = torque2.support.tau - gear.flange_b.tau ($RES_SIM_5) (53) [SCAL] (1) PowerLoss = $DER.Inertia2.phi * gear.flange_b.tau - $DER.Inertia1.flange_b.phi * (gear.tau_bf_a_0 - gear.tau_eta_m) ($RES_BND_76) (54) [SCAL] (1) torque1.support.tau = DriveSine.offset + (if $TEV_2 then 0.0 else DriveSine.amplitude * sin(DriveSine.phase + 6.283185307179586 * (time - DriveSine.startTime) * DriveSine.f)) ($RES_SIM_2) (55) [SCAL] (1) torque2.support.tau = 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_1) (56) [SCAL] (1) gear.support.tau = -(gear.flange_b.tau - (gear.tau_bf_a_0 - gear.tau_eta_m)) ($RES_BND_78)