Running command: translateModel(Modelica.Mechanics.Rotational.Examples.LossyGearDemo3,tolerance=1e-06,outputFormat="mat",numberOfIntervals=2000,variableFilter="time|Inertia2.phi|Inertia2.w|gear.mode",fileNamePrefix="Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3") Notification: Performance of loadModel(Modelica): time 1.822/1.822, allocations: 194.9 MB / 208.4 MB, free: 3.254 MB / 170.7 MB Notification: Performance of FrontEnd - loaded program: time 2.736e-05/2.762e-05, allocations: 2.406 kB / 255.3 MB, free: 3.199 MB / 202.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.07718/0.07723, allocations: 44.5 MB / 299.8 MB, free: 6.645 MB / 250.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.3334/0.4107, allocations: 75.69 MB / 375.5 MB, free: 22.41 MB / 314.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002182/0.4109, allocations: 71.89 kB / 375.6 MB, free: 22.41 MB / 314.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.03768/0.4486, allocations: 9.28 MB / 384.9 MB, free: 21.48 MB / 314.7 MB Notification: Performance of FrontEnd: time 1.968e-06/0.4487, allocations: 0 / 384.9 MB, free: 21.48 MB / 314.7 MB Notification: Performance of Transformations before backend: time 2.119e-05/0.4487, allocations: 5.125 kB / 384.9 MB, free: 21.48 MB / 314.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 67 * Number of variables: 67 Notification: Performance of Generate backend data structure: time 0.0009741/0.4497, allocations: 0.5603 MB / 385.4 MB, free: 21.05 MB / 314.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.206e-05/0.4497, allocations: 9.969 kB / 385.4 MB, free: 21.05 MB / 314.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0003693/0.4501, allocations: 49.14 kB / 385.5 MB, free: 21.04 MB / 314.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003848/0.4505, allocations: 271.5 kB / 385.8 MB, free: 20.82 MB / 314.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001272/0.4507, allocations: 86.08 kB / 385.8 MB, free: 20.75 MB / 314.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 7.217e-05/0.4508, allocations: 28.59 kB / 385.9 MB, free: 20.75 MB / 314.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000685/0.4515, allocations: 355.9 kB / 386.2 MB, free: 20.67 MB / 314.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.294e-05/0.4515, allocations: 9.375 kB / 386.2 MB, free: 20.67 MB / 314.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.775e-05/0.4516, allocations: 8.844 kB / 386.2 MB, free: 20.67 MB / 314.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.103e-05/0.4516, allocations: 7.688 kB / 386.2 MB, free: 20.67 MB / 314.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008094/0.4524, allocations: 375 kB / 386.6 MB, free: 20.67 MB / 314.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002207/0.4546, allocations: 1.165 MB / 387.8 MB, free: 20.11 MB / 314.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0006749/0.4553, allocations: 318.6 kB / 388.1 MB, free: 20.07 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003388/0.4557, allocations: 161.4 kB / 388.2 MB, free: 20.06 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 3.96e-05/0.4557, allocations: 9.016 kB / 388.3 MB, free: 20.05 MB / 314.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.274e-05/0.4558, allocations: 38.89 kB / 388.3 MB, free: 20.02 MB / 314.7 MB Notification: Performance of pre-optimization done (n=43): time 3.89e-06/0.4558, allocations: 1.625 kB / 388.3 MB, free: 20.02 MB / 314.7 MB Notification: Performance of matching and sorting (n=45): time 0.002759/0.4586, allocations: 1.315 MB / 389.6 MB, free: 19.48 MB / 314.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.268e-05/0.4586, allocations: 84.77 kB / 389.7 MB, free: 19.38 MB / 314.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002316/0.4589, allocations: 189.7 kB / 389.9 MB, free: 19.28 MB / 314.7 MB Notification: Performance of collectPreVariables (initialization): time 4.513e-05/0.4589, allocations: 40.12 kB / 389.9 MB, free: 19.25 MB / 314.7 MB Notification: Performance of collectInitialEqns (initialization): time 7.208e-05/0.459, allocations: 196.7 kB / 390.1 MB, free: 19.07 MB / 314.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001039/0.4591, allocations: 143.8 kB / 390.2 MB, free: 18.98 MB / 314.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.283e-05/0.4592, allocations: 11.28 kB / 390.3 MB, free: 18.98 MB / 314.7 MB Notification: Performance of setup shared object (initialization): time 5.996e-05/0.4593, allocations: 328.9 kB / 390.6 MB, free: 18.67 MB / 314.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003392/0.4596, allocations: 142.8 kB / 390.7 MB, free: 18.67 MB / 314.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003891/0.46, allocations: 211 kB / 390.9 MB, free: 18.61 MB / 314.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003148/0.4603, allocations: 138.3 kB / 391.1 MB, free: 18.6 MB / 314.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.609e-06/0.4604, allocations: 0 / 391.1 MB, free: 18.6 MB / 314.7 MB Notification: Performance of matching and sorting (n=52) (initialization): time 0.001119/0.4615, allocations: 0.5119 MB / 391.6 MB, free: 18.52 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.877e-05/0.4615, allocations: 3.906 kB / 391.6 MB, free: 18.52 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.044e-06/0.4616, allocations: 3.906 kB / 391.6 MB, free: 18.52 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0008916/0.4625, allocations: 230.9 kB / 391.8 MB, free: 18.51 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003101/0.4628, allocations: 56.42 kB / 391.9 MB, free: 18.5 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.004255/0.4671, allocations: 2.644 MB / 394.5 MB, free: 17.08 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004148/0.4675, allocations: 30.31 kB / 394.5 MB, free: 17.08 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.863e-05/0.4676, allocations: 18.95 kB / 394.6 MB, free: 17.08 MB / 314.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 5 * Number of states: 0 () * Number of discrete variables: 7 (gear.tau_aPos,gear.startForward,gear.startBackward,gear.locked,$PRE.gear.mode,gear.mode,gear.ideal) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (27): * Single equations (assignments): 26 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {2 24} Notification: Performance of prepare postOptimizeDAE: time 0.0001436/0.4678, allocations: 123.8 kB / 394.7 MB, free: 16.97 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.839e-05/0.4679, allocations: 31.25 kB / 394.7 MB, free: 16.96 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 8.843e-05/0.468, allocations: 44.83 kB / 394.7 MB, free: 16.95 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.689e-06/0.468, allocations: 3.906 kB / 394.8 MB, free: 16.95 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.135e-06/0.468, allocations: 0 / 394.8 MB, free: 16.95 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.927e-06/0.468, allocations: 3.953 kB / 394.8 MB, free: 16.95 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001888/0.4699, allocations: 1.029 MB / 395.8 MB, free: 16.62 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.148e-06/0.47, allocations: 0 / 395.8 MB, free: 16.62 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003188/0.4703, allocations: 49.34 kB / 395.8 MB, free: 16.61 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.0007901/0.4711, allocations: 231.4 kB / 396.1 MB, free: 16.59 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 5.158e-05/0.4712, allocations: 13.66 kB / 396.1 MB, free: 16.59 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.004001/0.4752, allocations: 2.58 MB / 398.7 MB, free: 15.18 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.671e-06/0.4752, allocations: 0 / 398.7 MB, free: 15.18 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001386/0.4766, allocations: 0.7457 MB / 399.4 MB, free: 15 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001905/0.4768, allocations: 136.9 kB / 399.5 MB, free: 14.9 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.332e-05/0.4769, allocations: 14.45 kB / 399.5 MB, free: 14.9 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003794/0.4773, allocations: 22.67 kB / 399.6 MB, free: 14.9 MB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001876/0.4775, allocations: 70.25 kB / 399.6 MB, free: 14.9 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.95e-05/0.4776, allocations: 18.83 kB / 399.7 MB, free: 14.9 MB / 314.7 MB Notification: Performance of sorting global known variables: time 0.0004954/0.4781, allocations: 152 kB / 399.8 MB, free: 30.82 MB / 330.7 MB Notification: Performance of sort global known variables: time 8.38e-07/0.4781, allocations: 0 / 399.8 MB, free: 30.82 MB / 330.7 MB Notification: Performance of remove unused functions: time 0.0008201/0.479, allocations: 139.4 kB / 399.9 MB, free: 30.82 MB / 330.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 2 (Inertia2.phi,Inertia2.w) * Number of discrete variables: 5 (gear.tau_aPos,gear.startForward,gear.startBackward,gear.locked,gear.mode) * Number of discrete states: 1 (gear.mode) * Top-level inputs: 0 Notification: Strong component statistics for simulation (21): * Single equations (assignments): 20 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {2 23} Notification: Performance of Backend phase and start with SimCode phase: time 0.0002856/0.4793, allocations: 152.9 kB / 400.1 MB, free: 30.71 MB / 330.7 MB Notification: Performance of simCode: created initialization part: time 0.001214/0.4805, allocations: 0.567 MB / 400.7 MB, free: 30.55 MB / 330.7 MB Notification: Performance of simCode: created event and clocks part: time 3.637e-06/0.4805, allocations: 0 / 400.7 MB, free: 30.55 MB / 330.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0007461/0.4813, allocations: 399 kB / 401 MB, free: 30.41 MB / 330.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003778/0.4817, allocations: 31.08 kB / 401.1 MB, free: 30.4 MB / 330.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001214/0.4829, allocations: 0.5665 MB / 401.6 MB, free: 30.12 MB / 330.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004683/0.4834, allocations: 0.7839 MB / 402.4 MB, free: 29.42 MB / 330.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001727/0.4836, allocations: 36.33 kB / 402.5 MB, free: 29.41 MB / 330.7 MB Notification: Performance of SimCode: time 1.659e-06/0.4836, allocations: 0 / 402.5 MB, free: 29.41 MB / 330.7 MB Notification: Performance of Templates: time 0.008796/0.4924, allocations: 5.032 MB / 407.5 MB, free: 29.11 MB / 330.7 MB "Error: Could not read variable gear.Backward in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Backward from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Forward in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Forward from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Free in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Free from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Stuck in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Stuck from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Unknown in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Unknown from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.der(w_a) in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.der(w_a) from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.eta_mf1_0 in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.eta_mf1_0 from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.eta_mf2_0 in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.eta_mf2_0 from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.phi_support in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.phi_support from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.tau_bf1_0 in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.tau_bf1_0 from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.tau_bf2_0 in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.tau_bf2_0 from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.tau_bf_a_0 in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.tau_bf_a_0 from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.unitAngularAcceleration in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.unitAngularAcceleration from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.unitTorque in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.unitTorque from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable torque1.phi_support in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable torque1.phi_support from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable torque2.phi_support in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable torque2.phi_support from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! " Variables in the reference:time,Inertia2.phi,Inertia2.w,gear.mode Variables in the result:Inertia1.J,Inertia1.a,der(Inertia1.w),Inertia1.flange_a.phi,Inertia1.flange_a.tau,Inertia1.flange_b.phi,Inertia1.flange_b.tau,Inertia1.phi,Inertia1.w,Inertia2.J,Inertia2.a,der(Inertia2.phi),der(Inertia2.w),Inertia2.flange_a.phi,Inertia2.flange_a.tau,Inertia2.flange_b.phi,Inertia2.flange_b.tau,Inertia2.phi,Inertia2.w,gear.a_a,der(gear.phi_a),gear.eta_mf1,gear.eta_mf2,gear.flange_a.phi,gear.flange_a.tau,gear.flange_b.phi,gear.flange_b.tau,gear.ideal,gear.interpolation_result[1,1],gear.interpolation_result[1,2],gear.interpolation_result[1,3],gear.interpolation_result[1,4],gear.locked,gear.lossPower,gear.lossTable[1,1],gear.lossTable[1,2],gear.lossTable[1,3],gear.lossTable[1,4],gear.lossTable[1,5],gear.mode,gear.phi_a,gear.phi_b,gear.quadrant1,gear.quadrant1_p,gear.quadrant2,gear.quadrant2_p,gear.quadrant3,gear.quadrant3_m,gear.quadrant4,gear.quadrant4_m,gear.ratio,gear.sa,gear.startBackward,gear.startForward,gear.tauLoss,gear.tauLossMax,gear.tauLossMax_p,gear.tauLossMin,gear.tauLossMin_m,gear.tau_aPos,gear.tau_bf1,gear.tau_bf2,gear.tau_bf_a,gear.tau_eta,gear.tau_etaPos,gear.tau_eta_m,gear.tau_eta_p,gear.w_a,step.height,step.offset,step.startTime,step.y,step1.height,step1.offset,step1.startTime,step1.y,time,torque1.flange.phi,torque1.flange.tau,torque1.tau,torque2.flange.phi,torque2.flange.tau,torque2.tau