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.889/1.889, allocations: 195 MB / 203.2 MB, free: 6.758 MB / 170.7 MB Notification: Performance of FrontEnd - loaded program: time 1.859e-05/1.868e-05, allocations: 4.203 kB / 249.6 MB, free: 5.559 MB / 202.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.07495/0.07499, allocations: 44.5 MB / 294.1 MB, free: 11.17 MB / 250.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.3256/0.4006, allocations: 75.02 MB / 369.1 MB, free: 11.07 MB / 298.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002022/0.4009, allocations: 72.03 kB / 369.2 MB, free: 11.07 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.03599/0.4369, allocations: 9.228 MB / 378.4 MB, free: 26.2 MB / 314.7 MB Notification: Performance of FrontEnd: time 2.098e-06/0.4369, allocations: 0 / 378.4 MB, free: 26.2 MB / 314.7 MB Notification: Performance of Transformations before backend: time 2.321e-05/0.437, allocations: 3.906 kB / 378.4 MB, free: 26.2 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.0008887/0.4379, allocations: 0.5596 MB / 379 MB, free: 25.77 MB / 314.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.599e-05/0.4379, allocations: 7.781 kB / 379 MB, free: 25.77 MB / 314.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0003701/0.4383, allocations: 50.5 kB / 379.1 MB, free: 25.75 MB / 314.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003581/0.4387, allocations: 282.2 kB / 379.3 MB, free: 25.52 MB / 314.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001168/0.4388, allocations: 74.19 kB / 379.4 MB, free: 25.46 MB / 314.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.821e-05/0.4389, allocations: 15.47 kB / 379.4 MB, free: 25.46 MB / 314.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0007349/0.4396, allocations: 362.5 kB / 379.8 MB, free: 25.42 MB / 314.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000589/0.4402, allocations: 312.6 kB / 380.1 MB, free: 25.3 MB / 314.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.161e-05/0.4403, allocations: 3.906 kB / 380.1 MB, free: 25.3 MB / 314.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.248e-05/0.4403, allocations: 4 kB / 380.1 MB, free: 25.29 MB / 314.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.919e-06/0.4404, allocations: 7.75 kB / 380.1 MB, free: 25.29 MB / 314.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002018/0.4424, allocations: 1.103 MB / 381.2 MB, free: 24.62 MB / 314.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0005221/0.4429, allocations: 304.3 kB / 381.5 MB, free: 24.56 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.000276/0.4432, allocations: 147.9 kB / 381.6 MB, free: 24.55 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 3.331e-05/0.4433, allocations: 3.875 kB / 381.6 MB, free: 24.55 MB / 314.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.191e-05/0.4433, allocations: 42.22 kB / 381.7 MB, free: 24.51 MB / 314.7 MB Notification: Performance of pre-optimization done (n=43): time 3.511e-06/0.4433, allocations: 0 / 381.7 MB, free: 24.51 MB / 314.7 MB Notification: Performance of matching and sorting (n=45): time 0.002916/0.4463, allocations: 1.244 MB / 382.9 MB, free: 23.87 MB / 314.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.653e-05/0.4463, allocations: 88.75 kB / 383 MB, free: 23.77 MB / 314.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002366/0.4466, allocations: 178.4 kB / 383.2 MB, free: 23.66 MB / 314.7 MB Notification: Performance of collectPreVariables (initialization): time 7.625e-05/0.4467, allocations: 25.7 kB / 383.2 MB, free: 23.63 MB / 314.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.000125/0.4468, allocations: 201.1 kB / 383.4 MB, free: 23.46 MB / 314.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001029/0.447, allocations: 135.6 kB / 383.5 MB, free: 23.36 MB / 314.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.031e-05/0.447, allocations: 3.984 kB / 383.5 MB, free: 23.35 MB / 314.7 MB Notification: Performance of setup shared object (initialization): time 0.0001673/0.4472, allocations: 330 kB / 383.9 MB, free: 23.03 MB / 314.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002983/0.4475, allocations: 135.7 kB / 384 MB, free: 23.03 MB / 314.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003335/0.4478, allocations: 196.7 kB / 384.2 MB, free: 22.96 MB / 314.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004203/0.4483, allocations: 133.6 kB / 384.3 MB, free: 22.94 MB / 314.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.018e-06/0.4483, allocations: 7.906 kB / 384.3 MB, free: 22.94 MB / 314.7 MB Notification: Performance of matching and sorting (n=52) (initialization): time 0.001512/0.4498, allocations: 473.3 kB / 384.8 MB, free: 22.84 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.971e-05/0.4499, allocations: 8.844 kB / 384.8 MB, free: 22.84 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.631e-06/0.4499, allocations: 0 / 384.8 MB, free: 22.84 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0008855/0.4508, allocations: 234.9 kB / 385 MB, free: 22.79 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000513/0.4513, allocations: 58.03 kB / 385.1 MB, free: 22.77 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.00451/0.4558, allocations: 2.564 MB / 387.6 MB, free: 21.23 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003621/0.4562, allocations: 23.53 kB / 387.7 MB, free: 21.22 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.485e-05/0.4563, allocations: 18.84 kB / 387.7 MB, free: 21.22 MB / 314.7 MB Warning: Iteration variables with default zero start attribute in torn nonlinear equation system: gear.flange_a.tau:VARIABLE(flow=true unit = "N.m" ) "Cut torque in the flange" type: Real gear.sa:VARIABLE(unit = "1" ) "Path parameter for acceleration and torque loss" type: Real 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.0002234/0.4566, allocations: 120.6 kB / 387.8 MB, free: 21.1 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.922e-05/0.4567, allocations: 23.34 kB / 387.8 MB, free: 21.09 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.519e-05/0.4568, allocations: 36.14 kB / 387.9 MB, free: 21.07 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.016e-06/0.4568, allocations: 7.719 kB / 387.9 MB, free: 21.07 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.396e-06/0.4568, allocations: 0 / 387.9 MB, free: 21.07 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.379e-06/0.4568, allocations: 7.922 kB / 387.9 MB, free: 21.07 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002049/0.4589, allocations: 0.954 MB / 388.8 MB, free: 20.64 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.105e-06/0.4589, allocations: 3.938 kB / 388.8 MB, free: 20.63 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003386/0.4593, allocations: 54.33 kB / 388.9 MB, free: 20.62 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.0008144/0.4601, allocations: 216.9 kB / 389.1 MB, free: 20.57 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.638e-05/0.4602, allocations: 11.17 kB / 389.1 MB, free: 20.56 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.0041/0.4643, allocations: 2.508 MB / 391.6 MB, free: 19.04 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.993e-06/0.4643, allocations: 0 / 391.6 MB, free: 19.04 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00145/0.4658, allocations: 0.6924 MB / 392.3 MB, free: 18.84 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002184/0.466, allocations: 142.8 kB / 392.5 MB, free: 18.72 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.931e-05/0.4661, allocations: 7.891 kB / 392.5 MB, free: 18.71 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003504/0.4665, allocations: 23.73 kB / 392.5 MB, free: 18.7 MB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000182/0.4667, allocations: 66.52 kB / 392.5 MB, free: 18.67 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.927e-05/0.4667, allocations: 19.02 kB / 392.6 MB, free: 18.66 MB / 314.7 MB Notification: Performance of sorting global known variables: time 0.0001731/0.4669, allocations: 149.2 kB / 392.7 MB, free: 18.58 MB / 314.7 MB Notification: Performance of sort global known variables: time 9.17e-07/0.4669, allocations: 0 / 392.7 MB, free: 18.58 MB / 314.7 MB Notification: Performance of remove unused functions: time 0.0007881/0.4677, allocations: 124.7 kB / 392.8 MB, free: 18.57 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.0002696/0.468, allocations: 141.5 kB / 393 MB, free: 18.46 MB / 314.7 MB Notification: Performance of simCode: created initialization part: time 0.001068/0.4691, allocations: 0.5398 MB / 393.5 MB, free: 18.27 MB / 314.7 MB Notification: Performance of simCode: created event and clocks part: time 4.305e-06/0.4691, allocations: 3.938 kB / 393.5 MB, free: 18.27 MB / 314.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0006653/0.4698, allocations: 377.8 kB / 393.9 MB, free: 18.11 MB / 314.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003544/0.4702, allocations: 14.91 kB / 393.9 MB, free: 18.11 MB / 314.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001106/0.4713, allocations: 0.5265 MB / 394.4 MB, free: 17.8 MB / 314.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004908/0.4718, allocations: 0.7854 MB / 395.2 MB, free: 17.06 MB / 314.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001599/0.472, allocations: 34.88 kB / 395.2 MB, free: 17.05 MB / 314.7 MB Notification: Performance of SimCode: time 1.884e-06/0.472, allocations: 3.938 kB / 395.2 MB, free: 17.04 MB / 314.7 MB Notification: Performance of Templates: time 0.008544/0.4806, allocations: 5.031 MB / 400.3 MB, free: 14.52 MB / 314.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.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! " 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.stateSelect,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.stateSelect,Inertia2.w,gear.a_a,der(gear.phi_a),gear.eta_mf1,gear.eta_mf1_0,gear.eta_mf2,gear.eta_mf2_0,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.phi_support,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_bf1_0,gear.tau_bf2,gear.tau_bf2_0,gear.tau_bf_a,gear.tau_bf_a_0,gear.tau_eta,gear.tau_etaPos,gear.tau_eta_m,gear.tau_eta_p,gear.useHeatPort,gear.useSupport,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.phi_support,torque1.tau,torque1.useSupport,torque2.flange.phi,torque2.flange.tau,torque2.phi_support,torque2.tau,torque2.useSupport