Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_Modelica.Mechanics.Rotational.Examples.SimpleGearShift.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.SimpleGearShift,tolerance=1e-06,outputFormat="mat",numberOfIntervals=1000,variableFilter="time|clutch.phi_rel|clutch.w_rel|engine.phi|engine.w|load.phi|load.w|brake.mode|brake.startBackward|brake.startForward|clutch.mode|clutch.startBackward|clutch.startForward",fileNamePrefix="Modelica_trunk_Modelica.Mechanics.Rotational.Examples.SimpleGearShift") translateModel(Modelica.Mechanics.Rotational.Examples.SimpleGearShift,tolerance=1e-06,outputFormat="mat",numberOfIntervals=1000,variableFilter="time|clutch.phi_rel|clutch.w_rel|engine.phi|engine.w|load.phi|load.w|brake.mode|brake.startBackward|brake.startForward|clutch.mode|clutch.startBackward|clutch.startForward",fileNamePrefix="Modelica_trunk_Modelica.Mechanics.Rotational.Examples.SimpleGearShift") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.001146/0.001151, allocations: 114.4 kB / 18.42 MB, free: 4.543 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001244/0.001244, allocations: 215.5 kB / 19.37 MB, free: 3.598 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.294/1.294, allocations: 227.4 MB / 247.5 MB, free: 10.33 MB / 206.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.069e-05/2.078e-05, allocations: 4.672 kB / 308.3 MB, free: 15.93 MB / 254.1 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.Rotational.Examples.SimpleGearShift): time 0.003686/0.00372, allocations: 2.958 MB / 311.3 MB, free: 12.97 MB / 254.1 MB Notification: Performance of NFInst.instExpressions: time 0.001472/0.005206, allocations: 1.043 MB / 312.3 MB, free: 11.93 MB / 254.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001176/0.005336, allocations: 11.94 kB / 312.3 MB, free: 11.91 MB / 254.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002515/0.005594, allocations: 71.31 kB / 312.4 MB, free: 11.84 MB / 254.1 MB Notification: Performance of NFTyping.typeBindings: time 0.000278/0.005892, allocations: 158.9 kB / 312.5 MB, free: 11.69 MB / 254.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002809/0.006182, allocations: 187.7 kB / 312.7 MB, free: 11.5 MB / 254.1 MB Notification: Performance of NFFlatten.flatten: time 0.0005349/0.006726, allocations: 0.6477 MB / 313.4 MB, free: 10.86 MB / 254.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001851/0.006919, allocations: 122.6 kB / 313.5 MB, free: 10.73 MB / 254.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002462/0.007181, allocations: 271.1 kB / 313.8 MB, free: 10.46 MB / 254.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000262/0.00745, allocations: 275 kB / 314 MB, free: 10.2 MB / 254.1 MB Notification: Performance of NFPackage.collectConstants: time 6.896e-05/0.007526, allocations: 48 kB / 314.1 MB, free: 10.15 MB / 254.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001618/0.007694, allocations: 103.9 kB / 314.2 MB, free: 10.05 MB / 254.1 MB Notification: Performance of combineBinaries: time 0.0004796/0.00818, allocations: 0.7346 MB / 314.9 MB, free: 9.301 MB / 254.1 MB Notification: Performance of replaceArrayConstructors: time 0.0002024/0.00839, allocations: 409.9 kB / 315.3 MB, free: 8.895 MB / 254.1 MB Notification: Performance of NFVerifyModel.verify: time 6.622e-05/0.008462, allocations: 67.75 kB / 315.4 MB, free: 8.828 MB / 254.1 MB Notification: Performance of FrontEnd: time 3.951e-05/0.008507, allocations: 23.88 kB / 315.4 MB, free: 8.805 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: 88 (86) * Number of variables: 88 (86) Notification: Performance of Bindings: time 0.001545/0.01006, allocations: 1.943 MB / 317.3 MB, free: 6.746 MB / 254.1 MB Notification: Performance of FunctionAlias: time 0.000186/0.01025, allocations: 181.9 kB / 317.5 MB, free: 6.574 MB / 254.1 MB Notification: Performance of Early Inline: time 0.0009923/0.01125, allocations: 1.206 MB / 318.7 MB, free: 5.34 MB / 254.1 MB Notification: Performance of simplify1: time 9.863e-05/0.01136, allocations: 107.8 kB / 318.8 MB, free: 5.234 MB / 254.1 MB Notification: Performance of Alias: time 0.001474/0.01284, allocations: 1.515 MB / 320.4 MB, free: 3.531 MB / 254.1 MB Notification: Performance of simplify2: time 8.8e-05/0.01293, allocations: 95.84 kB / 320.4 MB, free: 3.438 MB / 254.1 MB Notification: Performance of Events: time 0.000448/0.01339, allocations: 376.6 kB / 320.8 MB, free: 3.09 MB / 254.1 MB Notification: Performance of Detect States: time 0.0004217/0.01382, allocations: 481.1 kB / 321.3 MB, free: 2.609 MB / 254.1 MB Notification: Performance of Partitioning: time 0.000464/0.01429, allocations: 487.2 kB / 321.8 MB, free: 2.125 MB / 254.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency clutch.startForward could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) clutch.table_signs = if clutch.startForward then {1.0, 1.0} else if clutch.startBackward then {1.0, -1.0} else if $SEV_12 then {1.0, 1.0} else {-1.0, -1.0} ($RES_SIM_37) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (83/85) ************************** (1) [ALGB] (1) Real torqueStep.tau (2) [DER-] (1) output Real $DER.wEngine (3) [ALGB] (1) Real brake.tau0_max (4) [ALGB] (1) Real brake.flange_b.phi (5) [DISC] (1) Boolean clutch.startBackward (fixed = true, start = false) (6) [DISC] (1) Boolean clutch.free (7) [DISC] (1) Boolean clutch.locked (start = false) (8) [ALGB] (1) Real brake.lossPower (9) [ALGB] (1) Real clutch.sa (10) [ALGB] (1) flow Real idealPlanetary.sun.tau (11) [ALGB] (1) Real brake.sa (12) [DISC] (1) Integer $FUN_8 (13) [ALGB] (1) Real $FUN_7 (14) [ALGB] (1) Real $FUN_6 (15) [ALGB] (1) Real clutch.lossPower (16) [ALGB] (1) Real $FUN_5 (17) [DISC] (1) Integer $FUN_4 (18) [ALGB] (1) Real $FUN_3 (19) [DER-] (1) Real $DER.brake.w_relfric (20) [ALGB] (1) Real $FUN_2 (21) [ALGB] (1) Real $FUN_1 (22) [ALGB] (1) Real torqueStep.phi (23) [DER-] (1) Real $DER.engine.flange_b.phi (24) [ALGB] (1) Real quadraticSpeedDependentTorque.w (25) [ALGB] (1) Real feedback.y (26) [DISC] (1) Boolean brake.free (27) [ALGB] (1) flow Real idealPlanetary.ring.tau (28) [ALGB] (1) Real clutch.tau0_max (29) [ALGB] (2) protected Real[2] clutch.table_signs (30) [ALGB] (1) Real clutch.fn (31) [ALGB] (1) Real feedback.u2 (32) [DISC] (1) Boolean $SEV_19 (33) [ALGB] (1) flow Real clutch.flange_a.tau (34) [DISC] (1) Boolean $SEV_18 (35) [DISC] (1) Boolean $SEV_17 (36) [ALGB] (2) protected Real[2] brake.table_signs (37) [DISC] (1) Boolean $SEV_16 (38) [ALGB] (1) Real brake.fn (39) [DISC] (1) Boolean $SEV_15 (40) [DISC] (1) Boolean $SEV_14 (41) [DISC] (1) Boolean $SEV_13 (42) [DISC] (1) Boolean $SEV_12 (43) [DISC] (1) Boolean $SEV_11 (44) [DISC] (1) Boolean $SEV_10 (45) [ALGB] (1) Real load.a (46) [ALGB] (1) Real engine.a (47) [DER-] (1) Real $DER.load.phi (48) [ALGB] (1) Real brake.a_relfric (49) [ALGB] (1) Real clutch.mu (50) [DISC] (1) Boolean brake.startBackward (fixed = true, start = false) (51) [ALGB] (1) flow Real engine.flange_b.tau (52) [ALGB] (1) Real brake.mu (53) [DISC] (1) Integer brake.mode (fixed = true, start = 3, min = -1, max = 3) (54) [ALGB] (1) Real clutch.tau0 (55) [ALGB] (1) flow Real brake.flange_a.tau (56) [DISC] (1) Boolean brake.locked (start = false) (57) [DER-] (1) Real $DER.brake.phi (58) [DISC] (1) Boolean $SEV_9 (59) [ALGB] (1) Real clutch.a_relfric (60) [DISC] (1) Boolean $SEV_8 (61) [DISC] (1) Boolean $SEV_7 (62) [DER-] (1) Real $DER.load.w (63) [DISC] (1) Boolean $SEV_6 (64) [DISC] (1) Boolean $SEV_5 (65) [DISC] (1) Boolean $SEV_4 (66) [DISC] (1) Boolean $SEV_3 (67) [DISC] (1) Boolean $SEV_2 (68) [DISC] (1) Boolean $SEV_1 (69) [DISC] (1) Boolean clutch.startForward (fixed = true, start = false) (70) [DISC] (1) Boolean $SEV_0 (71) [DISC] (1) Boolean $TEV_2 (72) [DISC] (1) Boolean $TEV_1 (73) [DISC] (1) Boolean $TEV_0 (74) [ALGB] (1) output Real gearRatio = load.w / max(wEngine, 1e-6) (75) [ALGB] (1) flow Real idealPlanetary.carrier.tau (76) [DER-] (1) Real $DER.quadraticSpeedDependentTorque.phi (77) [ALGB] (1) Real brake.tau (78) [ALGB] (1) Real quadraticSpeedDependentTorque.tau (79) [ALGB] (1) Real brake.tau0 (80) [DISC] (1) Boolean brake.startForward (fixed = true, start = false) (81) [DISC] (1) Integer clutch.mode (fixed = true, start = 3, min = -1, max = 3) (82) [DER-] (1) Real $DER.clutch.w_rel (83) [DER-] (1) Real $DER.clutch.phi_rel System Equations (83/85) ************************** (1) [SCAL] (1) load.a = $DER.load.w ($RES_SIM_50) (2) [SCAL] (1) brake.tau0 = brake.cgeo * brake.mu0 * brake.fn ($RES_SIM_15) (3) [SCAL] (1) load.w = $DER.load.phi ($RES_SIM_51) (4) [SCAL] (1) brake.fn = brake.fn_max * feedback.y ($RES_SIM_16) (5) [SCAL] (1) brake.flange_a.tau - brake.tau = 0.0 ($RES_SIM_17) (6) [SCAL] (1) idealPlanetary.carrier.tau = -(1.0 + idealPlanetary.ratio) * idealPlanetary.sun.tau ($RES_SIM_54) (7) [SCAL] (1) idealPlanetary.ring.tau = idealPlanetary.ratio * idealPlanetary.sun.tau ($RES_SIM_55) (8) [SCAL] (1) (1.0 + idealPlanetary.ratio) * load.phi = engine.flange_b.phi + idealPlanetary.ratio * brake.flange_b.phi ($RES_SIM_56) (9) [SCAL] (1) engine.J * engine.a = torqueStep.tau + engine.flange_b.tau ($RES_SIM_57) (10) [SCAL] (1) engine.a = $DER.wEngine ($RES_SIM_58) (11) [SCAL] (1) wEngine = $DER.engine.flange_b.phi ($RES_SIM_59) (12) [SCAL] (1) $FUN_8 = sign(brake.w_relfric) ($RES_$AUX_86) (13) [SCAL] (1) $FUN_7 = Modelica.Blocks.Tables.Internal.getTable1DValue(brake.tableID, 1, brake.table_signs[1] * brake.w_relfric) ($RES_$AUX_87) (14) [SCAL] (1) $FUN_6 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(brake.tableID, 1, brake.table_signs[1] * brake.w_relfric) ($RES_$AUX_88) (15) [SCAL] (1) $FUN_5 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(brake.tableID, 1, brake.table_signs[1] * brake.w_relfric) ($RES_$AUX_89) (16) [SCAL] (1) brake.a_relfric = $DER.brake.w_relfric ($RES_SIM_20) (17) [SCAL] (1) brake.w_relfric = $DER.brake.phi ($RES_SIM_21) (18) [SCAL] (1) brake.phi = brake.flange_b.phi ($RES_SIM_23) (19) [SCAL] (1) clutch.a_relfric = $DER.clutch.w_rel ($RES_SIM_26) (20) [SCAL] (1) clutch.w_rel = $DER.clutch.phi_rel ($RES_SIM_27) (21) [SCAL] (1) $SEV_3 = $PRE.brake.mode == (-1) ($RES_EVT_100) (22) [SCAL] (1) torqueStep.phi = engine.flange_b.phi ($RES_SIM_63) (23) [SCAL] (1) clutch.phi_rel = brake.flange_b.phi - engine.flange_b.phi ($RES_SIM_28) (24) [SCAL] (1) $SEV_4 = not brake.free and not ((($PRE.brake.mode == 1 or brake.startForward) or $PRE.brake.mode == (-1)) or brake.startBackward) ($RES_EVT_101) (25) [SCAL] (1) torqueStep.tau = torqueStep.offsetTorque + (if $TEV_2 then 0.0 else torqueStep.stepTorque) ($RES_SIM_64) (26) [SCAL] (1) clutch.mode = if clutch.free then 2 else if $SEV_10 then 1 else if $SEV_11 then -1 else 0 ($RES_SIM_29) (27) [SCAL] (1) $SEV_5 = ($PRE.brake.mode == 0 and (brake.sa < (-brake.tau0_max) or $PRE.brake.startBackward and brake.sa < (-brake.tau0)) or $PRE.brake.mode == 1 and brake.w_relfric < (-brake.w_small)) or initial() and brake.w_relfric < 0.0 ($RES_EVT_102) (28) [SCAL] (1) $SEV_6 = ($PRE.brake.mode == 0 and (brake.sa > brake.tau0_max or $PRE.brake.startForward and brake.sa > brake.tau0) or $PRE.brake.mode == (-1) and brake.w_relfric > brake.w_small) or initial() and brake.w_relfric > 0.0 ($RES_EVT_103) (29) [SCAL] (1) $SEV_7 = brake.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_104) (30) [SCAL] (1) (brake.flange_a.tau + idealPlanetary.ring.tau) - clutch.flange_a.tau = 0.0 ($RES_SIM_67) (31) [SCAL] (1) $SEV_8 = brake.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_105) (32) [SCAL] (1) $SEV_9 = brake.fn <= 0.0 ($RES_EVT_106) (33) [SCAL] (1) $SEV_10 = (($PRE.clutch.mode == 1 or $PRE.clutch.mode == 2) or clutch.startForward) and clutch.w_rel > 0.0 ($RES_EVT_107) (34) [SCAL] (1) $SEV_11 = (($PRE.clutch.mode == (-1) or $PRE.clutch.mode == 2) or clutch.startBackward) and clutch.w_rel < 0.0 ($RES_EVT_108) (35) [SCAL] (1) $SEV_12 = $PRE.clutch.mode == 1 ($RES_EVT_109) (36) [SCAL] (1) $FUN_4 = sign(clutch.w_rel) ($RES_$AUX_90) (37) [SCAL] (1) $FUN_3 = Modelica.Blocks.Tables.Internal.getTable1DValue(clutch.tableID, 1, clutch.table_signs[1] * clutch.w_rel) ($RES_$AUX_91) (38) [SCAL] (1) $FUN_2 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(clutch.tableID, 1, clutch.table_signs[1] * clutch.w_rel) ($RES_$AUX_92) (39) [SCAL] (1) $FUN_1 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(clutch.tableID, 1, clutch.table_signs[1] * clutch.w_rel) ($RES_$AUX_93) (40) [SCAL] (1) clutch.a_relfric = if clutch.locked then 0.0 else if clutch.free then clutch.sa else if clutch.startForward then clutch.sa - clutch.tau0_max else if clutch.startBackward then clutch.sa + clutch.tau0_max else if $SEV_12 then clutch.sa - clutch.tau0_max else if $SEV_13 then clutch.sa + clutch.tau0_max else clutch.sa - $FUN_4 * clutch.tau0_max ($RES_SIM_30) (41) [SCAL] (1) clutch.locked = $SEV_14 ($RES_SIM_31) (42) [SCAL] (1) clutch.startBackward = $SEV_15 ($RES_SIM_32) (43) [SCAL] (1) clutch.startForward = $SEV_16 ($RES_SIM_33) (44) [SCAL] (1) clutch.lossPower = -clutch.flange_a.tau * clutch.w_rel ($RES_SIM_34) (45) [SCAL] (1) idealPlanetary.sun.tau + clutch.flange_a.tau + engine.flange_b.tau = 0.0 ($RES_SIM_70) (46) [SCAL] (1) -clutch.flange_a.tau = if clutch.locked then clutch.sa else if clutch.free then 0.0 else clutch.cgeo * clutch.mu * clutch.fn ($RES_SIM_35) (47) [SCAL] (1) clutch.mu = clutch.table_signs[2] * (if $SEV_17 then $FUN_1 else if $SEV_18 then $FUN_2 else $FUN_3) ($RES_SIM_36) (48) [SCAL] (1) $TEV_0 = time < ramp.startTime ($RES_EVT_94) (49) [ARRY] (2) clutch.table_signs = if clutch.startForward then {1.0, 1.0} else if clutch.startBackward then {1.0, -1.0} else if $SEV_12 then {1.0, 1.0} else {-1.0, -1.0} ($RES_SIM_37) (50) [SCAL] (1) $SEV_13 = $PRE.clutch.mode == (-1) ($RES_EVT_110) (51) [SCAL] (1) $TEV_1 = time < (ramp.startTime + ramp.duration) ($RES_EVT_95) (52) [SCAL] (1) clutch.tau0_max = clutch.peak * clutch.tau0 ($RES_SIM_38) (53) [SCAL] (1) $SEV_14 = not clutch.free and not ((($PRE.clutch.mode == 1 or clutch.startForward) or $PRE.clutch.mode == (-1)) or clutch.startBackward) ($RES_EVT_111) (54) [SCAL] (1) $TEV_2 = time < torqueStep.startTime ($RES_EVT_96) (55) [SCAL] (1) clutch.tau0 = clutch.cgeo * clutch.mu0 * clutch.fn ($RES_SIM_39) (56) [SCAL] (1) $SEV_15 = ($PRE.clutch.mode == 0 and (clutch.sa < (-clutch.tau0_max) or $PRE.clutch.startBackward and clutch.sa < (-clutch.tau0)) or $PRE.clutch.mode == 1 and clutch.w_rel < (-clutch.w_small)) or initial() and clutch.w_rel < 0.0 ($RES_EVT_112) (57) [SCAL] (1) $SEV_0 = (($PRE.brake.mode == 1 or $PRE.brake.mode == 2) or brake.startForward) and brake.w_relfric > 0.0 ($RES_EVT_97) (58) [SCAL] (1) $SEV_16 = ($PRE.clutch.mode == 0 and (clutch.sa > clutch.tau0_max or $PRE.clutch.startForward and clutch.sa > clutch.tau0) or $PRE.clutch.mode == (-1) and clutch.w_rel > clutch.w_small) or initial() and clutch.w_rel > 0.0 ($RES_EVT_113) (59) [SCAL] (1) $SEV_1 = (($PRE.brake.mode == (-1) or $PRE.brake.mode == 2) or brake.startBackward) and brake.w_relfric < 0.0 ($RES_EVT_98) (60) [SCAL] (1) $SEV_17 = clutch.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_114) (61) [SCAL] (1) $SEV_2 = $PRE.brake.mode == 1 ($RES_EVT_99) (62) [SCAL] (1) $SEV_18 = clutch.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_115) (63) [SCAL] (1) $SEV_19 = clutch.fn <= 0.0 ($RES_EVT_116) (64) [SCAL] (1) clutch.free = $SEV_19 ($RES_SIM_40) (65) [SCAL] (1) clutch.fn = clutch.fn_max * feedback.u2 ($RES_SIM_41) (66) [SCAL] (1) quadraticSpeedDependentTorque.phi = load.phi ($RES_SIM_45) (67) [SCAL] (1) quadraticSpeedDependentTorque.tau = quadraticSpeedDependentTorque.tau_nominal * (quadraticSpeedDependentTorque.w / quadraticSpeedDependentTorque.w_nominal) ^ 2.0 ($RES_SIM_46) (68) [SCAL] (1) quadraticSpeedDependentTorque.w = $DER.quadraticSpeedDependentTorque.phi ($RES_SIM_48) (69) [SCAL] (1) load.J * load.a = quadraticSpeedDependentTorque.tau - idealPlanetary.carrier.tau ($RES_SIM_49) (70) [SCAL] (1) brake.lossPower = brake.tau * brake.w_relfric ($RES_SIM_9) (71) [SCAL] (1) brake.startForward = $SEV_6 ($RES_SIM_8) (72) [SCAL] (1) brake.startBackward = $SEV_5 ($RES_SIM_7) (73) [SCAL] (1) brake.locked = $SEV_4 ($RES_SIM_6) (74) [SCAL] (1) brake.a_relfric = if brake.locked then 0.0 else if brake.free then brake.sa else if brake.startForward then brake.sa - brake.tau0_max else if brake.startBackward then brake.sa + brake.tau0_max else if $SEV_2 then brake.sa - brake.tau0_max else if $SEV_3 then brake.sa + brake.tau0_max else brake.sa - $FUN_8 * brake.tau0_max ($RES_SIM_5) (75) [SCAL] (1) brake.mode = if brake.free then 2 else if $SEV_0 then 1 else if $SEV_1 then -1 else 0 ($RES_SIM_4) (76) [SCAL] (1) feedback.y = const1.k - feedback.u2 ($RES_SIM_2) (77) [SCAL] (1) feedback.u2 = ramp.offset + (if $TEV_0 then 0.0 else if $TEV_1 then (ramp.height * (time - ramp.startTime)) / ramp.duration else ramp.height) ($RES_SIM_0) (78) [SCAL] (1) brake.tau = if brake.locked then brake.sa else if brake.free then 0.0 else brake.cgeo * brake.mu * brake.fn ($RES_SIM_10) (79) [SCAL] (1) brake.mu = brake.table_signs[2] * (if $SEV_7 then $FUN_5 else if $SEV_8 then $FUN_6 else $FUN_7) ($RES_SIM_11) (80) [ARRY] (2) brake.table_signs = if brake.startForward then {1.0, 1.0} else if brake.startBackward then {-1.0, -1.0} else if $SEV_2 then {1.0, 1.0} else {-1.0, -1.0} ($RES_SIM_12) (81) [SCAL] (1) brake.free = $SEV_9 ($RES_SIM_13) (82) [SCAL] (1) gearRatio = load.w / max(wEngine, 1e-6) ($RES_BND_85) (83) [SCAL] (1) brake.tau0_max = brake.peak * brake.tau0 ($RES_SIM_14)