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.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3") Notification: Performance of loadModel(Modelica): time 1.596/1.596, allocations: 171.2 MB / 183.8 MB, free: 11.96 MB / 154.7 MB Notification: Performance of FrontEnd - loaded program: time 3.404e-05/3.41e-05, allocations: 0 / 225 MB, free: 2.719 MB / 186.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2105/0.2106, allocations: 38.77 MB / 263.8 MB, free: 9.875 MB / 218.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1088/0.3194, allocations: 70.38 MB / 334.1 MB, free: 3.391 MB / 282.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.00024/0.3197, allocations: 67.97 kB / 334.2 MB, free: 3.324 MB / 282.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04767/0.3674, allocations: 9.286 MB / 343.5 MB, free: 10.01 MB / 298.7 MB Notification: Performance of FrontEnd: time 3.444e-06/0.3675, allocations: 0 / 343.5 MB, free: 10.01 MB / 298.7 MB Notification: Performance of Transformations before backend: time 3.448e-05/0.3675, allocations: 4 kB / 343.5 MB, free: 10 MB / 298.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.002027/0.3696, allocations: 0.5567 MB / 344 MB, free: 9.402 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 7.047e-05/0.3697, allocations: 8.031 kB / 344.1 MB, free: 9.395 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0007598/0.3705, allocations: 51.59 kB / 344.1 MB, free: 9.344 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008758/0.3714, allocations: 282.4 kB / 344.4 MB, free: 9.027 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0002762/0.3717, allocations: 87.95 kB / 344.5 MB, free: 8.93 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001586/0.3719, allocations: 35.94 kB / 344.5 MB, free: 8.895 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001516/0.3734, allocations: 344.2 kB / 344.8 MB, free: 8.539 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.514e-05/0.3735, allocations: 0 / 344.8 MB, free: 8.539 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001049/0.3736, allocations: 16 kB / 344.9 MB, free: 8.523 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.083e-05/0.3736, allocations: 11.92 kB / 344.9 MB, free: 8.512 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001745/0.3754, allocations: 376.9 kB / 345.2 MB, free: 8.145 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004569/0.38, allocations: 1.163 MB / 346.4 MB, free: 6.91 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.00145/0.3815, allocations: 311 kB / 346.7 MB, free: 6.594 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0007547/0.3823, allocations: 160.8 kB / 346.9 MB, free: 6.434 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 6.946e-05/0.3824, allocations: 8.141 kB / 346.9 MB, free: 6.426 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 6.03e-05/0.3825, allocations: 34.56 kB / 346.9 MB, free: 6.383 MB / 298.7 MB Notification: Performance of pre-optimization done (n=43): time 6.491e-06/0.3825, allocations: 0 / 346.9 MB, free: 6.383 MB / 298.7 MB Notification: Performance of matching and sorting (n=45): time 0.006281/0.3888, allocations: 1.319 MB / 348.2 MB, free: 4.969 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001064/0.3889, allocations: 88.8 kB / 348.3 MB, free: 4.863 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0005491/0.3895, allocations: 193.5 kB / 348.5 MB, free: 4.668 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0001127/0.3897, allocations: 41.7 kB / 348.5 MB, free: 4.621 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002286/0.3899, allocations: 203 kB / 348.7 MB, free: 4.422 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0003017/0.3902, allocations: 141.9 kB / 348.9 MB, free: 4.281 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.303e-05/0.3903, allocations: 12 kB / 348.9 MB, free: 4.27 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 0.000274/0.3906, allocations: 331.4 kB / 349.2 MB, free: 3.938 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0007466/0.3914, allocations: 140.9 kB / 349.3 MB, free: 3.801 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0008736/0.3923, allocations: 209 kB / 349.5 MB, free: 3.574 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0007363/0.3931, allocations: 137.6 kB / 349.7 MB, free: 3.445 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.427e-06/0.3931, allocations: 0 / 349.7 MB, free: 3.445 MB / 298.7 MB Notification: Performance of matching and sorting (n=52) (initialization): time 0.002559/0.3957, allocations: 0.4966 MB / 350.2 MB, free: 2.938 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 4.334e-05/0.3957, allocations: 12.16 kB / 350.2 MB, free: 2.926 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.326e-05/0.3958, allocations: 0 / 350.2 MB, free: 2.926 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001745/0.3975, allocations: 228.7 kB / 350.4 MB, free: 2.699 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006219/0.3982, allocations: 55.95 kB / 350.5 MB, free: 2.645 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.009604/0.4078, allocations: 2.643 MB / 353.1 MB, free: 15.87 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0007274/0.4086, allocations: 32.05 kB / 353.1 MB, free: 15.84 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0001399/0.4088, allocations: 19.98 kB / 353.2 MB, free: 15.82 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.0003094/0.4091, allocations: 128.9 kB / 353.3 MB, free: 15.68 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002128/0.4093, allocations: 31.62 kB / 353.3 MB, free: 15.65 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0001828/0.4096, allocations: 42.77 kB / 353.4 MB, free: 15.61 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.856e-05/0.4096, allocations: 4 kB / 353.4 MB, free: 15.61 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.65e-06/0.4096, allocations: 4 kB / 353.4 MB, free: 15.6 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.132e-05/0.4097, allocations: 0 / 353.4 MB, free: 15.6 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.004463/0.4141, allocations: 1.019 MB / 354.4 MB, free: 14.52 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.255e-05/0.4142, allocations: 0 / 354.4 MB, free: 14.52 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0006438/0.4149, allocations: 55.89 kB / 354.4 MB, free: 14.46 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.001618/0.4165, allocations: 228.9 kB / 354.7 MB, free: 14.24 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 8.949e-05/0.4166, allocations: 15.92 kB / 354.7 MB, free: 14.22 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.009223/0.4259, allocations: 2.584 MB / 357.3 MB, free: 11.51 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.889e-06/0.4259, allocations: 0 / 357.3 MB, free: 11.51 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.003308/0.4293, allocations: 0.7401 MB / 358 MB, free: 10.75 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004618/0.4298, allocations: 152.8 kB / 358.2 MB, free: 10.59 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001599/0.43, allocations: 19.94 kB / 358.2 MB, free: 10.57 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0007155/0.4307, allocations: 23.98 kB / 358.2 MB, free: 10.54 MB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003836/0.4311, allocations: 67.86 kB / 358.3 MB, free: 10.48 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001085/0.4313, allocations: 16 kB / 358.3 MB, free: 10.46 MB / 314.7 MB Notification: Performance of sorting global known variables: time 0.0003956/0.4317, allocations: 151.2 kB / 358.4 MB, free: 10.31 MB / 314.7 MB Notification: Performance of sort global known variables: time 1.361e-06/0.4317, allocations: 0 / 358.4 MB, free: 10.31 MB / 314.7 MB Notification: Performance of remove unused functions: time 0.001707/0.4334, allocations: 144 kB / 358.6 MB, free: 10.17 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.0005467/0.434, allocations: 157.8 kB / 358.7 MB, free: 10.01 MB / 314.7 MB Notification: Performance of simCode: created initialization part: time 0.002593/0.4366, allocations: 0.5496 MB / 359.3 MB, free: 9.449 MB / 314.7 MB Notification: Performance of simCode: created event and clocks part: time 5.52e-06/0.4367, allocations: 4.25 kB / 359.3 MB, free: 9.445 MB / 314.7 MB Notification: Performance of simCode: created simulation system equations: time 0.001727/0.4384, allocations: 376.2 kB / 359.6 MB, free: 9.066 MB / 314.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0008155/0.4393, allocations: 23.98 kB / 359.7 MB, free: 9.043 MB / 314.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00187/0.4412, allocations: 0.5505 MB / 360.2 MB, free: 8.465 MB / 314.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000528/0.4417, allocations: 0.7842 MB / 361 MB, free: 7.656 MB / 314.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000187/0.4419, allocations: 35.41 kB / 361 MB, free: 7.625 MB / 314.7 MB Notification: Performance of SimCode: time 2.004e-06/0.442, allocations: 0 / 361 MB, free: 7.625 MB / 314.7 MB Notification: Performance of Templates: time 0.01062/0.4526, allocations: 5.018 MB / 366.1 MB, free: 2.605 MB / 314.7 MB "Error: Could not read variable gear.Backward in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Backward from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Forward in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Forward from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Free in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Free from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Stuck in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Stuck from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.Unknown in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.Unknown from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.der(w_a) in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.der(w_a) from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.eta_mf1_0 in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.eta_mf1_0 from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.eta_mf2_0 in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.eta_mf2_0 from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.phi_support in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.phi_support from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.tau_bf1_0 in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.tau_bf1_0 from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.tau_bf2_0 in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.tau_bf2_0 from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.tau_bf_a_0 in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.tau_bf_a_0 from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.unitAngularAcceleration in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.unitAngularAcceleration from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable gear.unitTorque in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable gear.unitTorque from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable torque1.phi_support in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable torque1.phi_support from file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat failed! Error: Could not read variable torque2.phi_support in file Modelica_3.2.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo3_res.mat. Warning: Get data of variable torque2.phi_support from file Modelica_3.2.1_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