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.886/1.886, allocations: 194.9 MB / 208.5 MB, free: 3.16 MB / 170.7 MB Notification: Performance of FrontEnd - loaded program: time 3.155e-05/3.169e-05, allocations: 7.156 kB / 255.4 MB, free: 3.168 MB / 202.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.07658/0.07663, allocations: 44.5 MB / 299.9 MB, free: 6.617 MB / 250.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.3317/0.4083, allocations: 75.69 MB / 375.5 MB, free: 22.55 MB / 314.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002193/0.4086, allocations: 69.56 kB / 375.6 MB, free: 22.55 MB / 314.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04352/0.4522, allocations: 9.286 MB / 384.9 MB, free: 21.64 MB / 314.7 MB Notification: Performance of FrontEnd: time 2.831e-06/0.4522, allocations: 0 / 384.9 MB, free: 21.64 MB / 314.7 MB Notification: Performance of Transformations before backend: time 2.87e-05/0.4523, allocations: 10.2 kB / 384.9 MB, free: 21.64 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.001514/0.4538, allocations: 0.5545 MB / 385.5 MB, free: 21.21 MB / 314.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.348e-05/0.4539, allocations: 9.531 kB / 385.5 MB, free: 21.21 MB / 314.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0006268/0.4545, allocations: 45.27 kB / 385.5 MB, free: 21.2 MB / 314.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000606/0.4552, allocations: 276.7 kB / 385.8 MB, free: 20.97 MB / 314.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001976/0.4554, allocations: 85.69 kB / 385.9 MB, free: 20.91 MB / 314.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001263/0.4555, allocations: 31.38 kB / 385.9 MB, free: 20.9 MB / 314.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001168/0.4567, allocations: 347.8 kB / 386.2 MB, free: 20.83 MB / 314.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.438e-05/0.4568, allocations: 6.219 kB / 386.3 MB, free: 20.82 MB / 314.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.061e-05/0.4569, allocations: 9.688 kB / 386.3 MB, free: 20.82 MB / 314.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.665e-05/0.4569, allocations: 10.02 kB / 386.3 MB, free: 20.82 MB / 314.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001338/0.4583, allocations: 375.7 kB / 386.6 MB, free: 20.82 MB / 314.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003351/0.4616, allocations: 1.164 MB / 387.8 MB, free: 20.26 MB / 314.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0008106/0.4625, allocations: 317 kB / 388.1 MB, free: 20.22 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003415/0.4629, allocations: 162.8 kB / 388.3 MB, free: 20.21 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 3.73e-05/0.4629, allocations: 3.906 kB / 388.3 MB, free: 20.21 MB / 314.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.576e-05/0.463, allocations: 37.91 kB / 388.3 MB, free: 20.17 MB / 314.7 MB Notification: Performance of pre-optimization done (n=43): time 3.544e-06/0.463, allocations: 4 kB / 388.3 MB, free: 20.17 MB / 314.7 MB Notification: Performance of matching and sorting (n=45): time 0.002921/0.4659, allocations: 1.31 MB / 389.6 MB, free: 19.63 MB / 314.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.96e-05/0.466, allocations: 91.91 kB / 389.7 MB, free: 19.53 MB / 314.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002467/0.4662, allocations: 186.3 kB / 389.9 MB, free: 19.44 MB / 314.7 MB Notification: Performance of collectPreVariables (initialization): time 4.789e-05/0.4663, allocations: 39.55 kB / 389.9 MB, free: 19.41 MB / 314.7 MB Notification: Performance of collectInitialEqns (initialization): time 7.303e-05/0.4664, allocations: 199.8 kB / 390.1 MB, free: 19.23 MB / 314.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001075/0.4665, allocations: 143.3 kB / 390.3 MB, free: 19.14 MB / 314.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.302e-05/0.4666, allocations: 11.28 kB / 390.3 MB, free: 19.14 MB / 314.7 MB Notification: Performance of setup shared object (initialization): time 6.166e-05/0.4666, allocations: 328.1 kB / 390.6 MB, free: 18.82 MB / 314.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003131/0.4669, allocations: 145 kB / 390.7 MB, free: 18.82 MB / 314.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003462/0.4673, allocations: 200.4 kB / 390.9 MB, free: 18.77 MB / 314.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003273/0.4677, allocations: 137.2 kB / 391.1 MB, free: 18.77 MB / 314.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.852e-06/0.4677, allocations: 0 / 391.1 MB, free: 18.77 MB / 314.7 MB Notification: Performance of matching and sorting (n=52) (initialization): time 0.001147/0.4688, allocations: 0.5054 MB / 391.6 MB, free: 18.69 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.956e-05/0.4689, allocations: 13.31 kB / 391.6 MB, free: 18.68 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.879e-06/0.4689, allocations: 0 / 391.6 MB, free: 18.68 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0009055/0.4698, allocations: 239 kB / 391.8 MB, free: 18.67 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003504/0.4702, allocations: 53.14 kB / 391.9 MB, free: 18.66 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.004241/0.4744, allocations: 2.646 MB / 394.5 MB, free: 17.24 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004147/0.4749, allocations: 29.75 kB / 394.6 MB, free: 17.24 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.996e-05/0.475, allocations: 22.44 kB / 394.6 MB, free: 17.23 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.0001423/0.4751, allocations: 128.1 kB / 394.7 MB, free: 17.12 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.804e-05/0.4752, allocations: 27.41 kB / 394.7 MB, free: 17.11 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.044e-05/0.4753, allocations: 39.83 kB / 394.8 MB, free: 17.11 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.403e-06/0.4754, allocations: 7.719 kB / 394.8 MB, free: 17.11 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.041e-06/0.4754, allocations: 0 / 394.8 MB, free: 17.11 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.459e-06/0.4754, allocations: 7 kB / 394.8 MB, free: 17.1 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002027/0.4774, allocations: 1.033 MB / 395.8 MB, free: 16.77 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.716e-06/0.4775, allocations: 0 / 395.8 MB, free: 16.77 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000356/0.4778, allocations: 49.05 kB / 395.9 MB, free: 16.76 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.0008343/0.4787, allocations: 226.1 kB / 396.1 MB, free: 16.74 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.976e-05/0.4788, allocations: 21.27 kB / 396.1 MB, free: 16.73 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.003834/0.4826, allocations: 2.574 MB / 398.7 MB, free: 15.33 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.829e-06/0.4826, allocations: 0 / 398.7 MB, free: 15.33 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001461/0.4841, allocations: 0.7433 MB / 399.4 MB, free: 15.16 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001934/0.4843, allocations: 137.2 kB / 399.6 MB, free: 15.05 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.568e-05/0.4844, allocations: 11.09 kB / 399.6 MB, free: 15.05 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003628/0.4848, allocations: 29.66 kB / 399.6 MB, free: 15.05 MB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001902/0.485, allocations: 72.56 kB / 399.7 MB, free: 15.05 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.172e-05/0.4851, allocations: 19.16 kB / 399.7 MB, free: 15.05 MB / 314.7 MB Notification: Performance of sorting global known variables: time 0.0001671/0.4853, allocations: 151.5 kB / 399.8 MB, free: 14.97 MB / 314.7 MB Notification: Performance of sort global known variables: time 7.69e-07/0.4853, allocations: 0 / 399.8 MB, free: 14.97 MB / 314.7 MB Notification: Performance of remove unused functions: time 0.0008219/0.4861, allocations: 139.7 kB / 400 MB, free: 14.96 MB / 314.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.0006532/0.4868, allocations: 144.4 kB / 400.1 MB, free: 30.86 MB / 330.7 MB Notification: Performance of simCode: created initialization part: time 0.001244/0.488, allocations: 0.5586 MB / 400.7 MB, free: 30.71 MB / 330.7 MB Notification: Performance of simCode: created event and clocks part: time 4.237e-06/0.4881, allocations: 0 / 400.7 MB, free: 30.71 MB / 330.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0007533/0.4888, allocations: 381.9 kB / 401 MB, free: 30.58 MB / 330.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003995/0.4892, allocations: 32.75 kB / 401.1 MB, free: 30.57 MB / 330.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001191/0.4905, allocations: 0.5527 MB / 401.6 MB, free: 30.31 MB / 330.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004742/0.491, allocations: 0.7907 MB / 402.4 MB, free: 29.6 MB / 330.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001707/0.4911, allocations: 34.39 kB / 402.4 MB, free: 29.59 MB / 330.7 MB Notification: Performance of SimCode: time 1.855e-06/0.4912, allocations: 0 / 402.4 MB, free: 29.59 MB / 330.7 MB Notification: Performance of Templates: time 0.008928/0.5001, allocations: 5.013 MB / 407.5 MB, free: 29.29 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