Running command: translateModel(Modelica.Mechanics.Rotational.Examples.LossyGearDemo2,tolerance=1e-06,outputFormat="mat",numberOfIntervals=1000,variableFilter="time|Inertia2.phi|Inertia2.w|bearingFriction.mode|bearingFriction.startBackward|bearingFriction.startForward|gear.mode",fileNamePrefix="Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2") Notification: Performance of loadModel(Modelica): time 2.134/2.134, allocations: 195 MB / 203.2 MB, free: 13.8 MB / 170.7 MB Notification: Performance of FrontEnd - loaded program: time 2.096e-05/2.123e-05, allocations: 4 kB / 249.6 MB, free: 15.29 MB / 218.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2505/0.2505, allocations: 44.49 MB / 294.1 MB, free: 14.32 MB / 250.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1216/0.3722, allocations: 77.01 MB / 371.1 MB, free: 4.973 MB / 314.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002499/0.3725, allocations: 71.95 kB / 371.2 MB, free: 4.902 MB / 314.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04965/0.4221, allocations: 11.46 MB / 382.6 MB, free: 9.422 MB / 330.7 MB Notification: Performance of FrontEnd: time 1.973e-06/0.4222, allocations: 0 / 382.6 MB, free: 9.422 MB / 330.7 MB Notification: Performance of Transformations before backend: time 3.14e-05/0.4222, allocations: 12 kB / 382.7 MB, free: 9.41 MB / 330.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 98 * Number of variables: 98 Notification: Performance of Generate backend data structure: time 0.001595/0.4239, allocations: 0.7011 MB / 383.4 MB, free: 8.664 MB / 330.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.479e-05/0.4239, allocations: 12.03 kB / 383.4 MB, free: 8.652 MB / 330.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.000431/0.4244, allocations: 59.42 kB / 383.4 MB, free: 8.594 MB / 330.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006505/0.425, allocations: 333.3 kB / 383.7 MB, free: 8.227 MB / 330.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001606/0.4252, allocations: 84.17 kB / 383.8 MB, free: 8.133 MB / 330.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001123/0.4253, allocations: 24 kB / 383.9 MB, free: 8.109 MB / 330.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.001296/0.4266, allocations: 0.5207 MB / 384.4 MB, free: 7.59 MB / 330.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001127/0.4278, allocations: 461.2 kB / 384.8 MB, free: 7.125 MB / 330.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.294e-05/0.4278, allocations: 7.906 kB / 384.8 MB, free: 7.117 MB / 330.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 6.511e-05/0.4279, allocations: 4 kB / 384.8 MB, free: 7.113 MB / 330.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.641e-05/0.4279, allocations: 8 kB / 384.8 MB, free: 7.105 MB / 330.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002825/0.4308, allocations: 1.074 MB / 385.9 MB, free: 5.984 MB / 330.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001038/0.4318, allocations: 452.3 kB / 386.4 MB, free: 5.523 MB / 330.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.00061/0.4325, allocations: 262.5 kB / 386.6 MB, free: 5.262 MB / 330.7 MB Notification: Performance of preOpt evalFunc (simulation): time 6.162e-05/0.4326, allocations: 4.562 kB / 386.6 MB, free: 5.258 MB / 330.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.976e-05/0.4326, allocations: 39.41 kB / 386.7 MB, free: 5.211 MB / 330.7 MB Notification: Performance of pre-optimization done (n=63): time 7.203e-06/0.4326, allocations: 0 / 386.7 MB, free: 5.211 MB / 330.7 MB Notification: Performance of matching and sorting (n=71): time 0.005664/0.4383, allocations: 1.871 MB / 388.5 MB, free: 3.254 MB / 330.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.111e-05/0.4384, allocations: 89.89 kB / 388.6 MB, free: 3.148 MB / 330.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000356/0.4388, allocations: 220.4 kB / 388.8 MB, free: 2.926 MB / 330.7 MB Notification: Performance of collectPreVariables (initialization): time 8.2e-05/0.4389, allocations: 29.7 kB / 388.9 MB, free: 2.891 MB / 330.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001652/0.4391, allocations: 216 kB / 389.1 MB, free: 2.676 MB / 330.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002823/0.4394, allocations: 224.7 kB / 389.3 MB, free: 2.453 MB / 330.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 5.424e-05/0.4394, allocations: 3.938 kB / 389.3 MB, free: 2.449 MB / 330.7 MB Notification: Performance of setup shared object (initialization): time 0.0001876/0.4396, allocations: 342.8 kB / 389.6 MB, free: 2.105 MB / 330.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005609/0.4402, allocations: 221.5 kB / 389.8 MB, free: 1.887 MB / 330.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006379/0.4408, allocations: 290.4 kB / 390.1 MB, free: 1.598 MB / 330.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0007349/0.4416, allocations: 208.5 kB / 390.3 MB, free: 1.395 MB / 330.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.829e-06/0.4416, allocations: 0 / 390.3 MB, free: 1.395 MB / 330.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.002223/0.4438, allocations: 0.7436 MB / 391.1 MB, free: 0.6406 MB / 330.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.197e-05/0.4439, allocations: 10.09 kB / 391.1 MB, free: 0.6328 MB / 330.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.908e-05/0.4439, allocations: 0 / 391.1 MB, free: 0.6328 MB / 330.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001457/0.4454, allocations: 422.7 kB / 391.5 MB, free: 224 kB / 330.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005009/0.4459, allocations: 87.88 kB / 391.6 MB, free: 136 kB / 330.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001963/0.4479, allocations: 1.06 MB / 392.6 MB, free: 15.04 MB / 346.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000664/0.4486, allocations: 68.03 kB / 392.7 MB, free: 14.98 MB / 346.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.000115/0.4487, allocations: 27.98 kB / 392.7 MB, free: 14.95 MB / 346.7 MB Warning: Iteration variables with default zero start attribute in torn nonlinear equation system: bearingFriction.sa:VARIABLE(unit = "1" ) "Path parameter of friction characteristic tau = f(a_relfric)" 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: 3 * Number of states: 0 () * Number of discrete variables: 15 (bearingFriction.free,gear.tau_aPos,gear.startForward,gear.startBackward,gear.locked,$PRE.gear.mode,gear.mode,$PRE.bearingFriction.startForward,bearingFriction.startForward,$PRE.bearingFriction.startBackward,bearingFriction.startBackward,bearingFriction.locked,$PRE.bearingFriction.mode,bearingFriction.mode,gear.ideal) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (46): * Single equations (assignments): 44 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 1 * 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 32} Notification: Performance of prepare postOptimizeDAE: time 0.0003014/0.449, allocations: 131.5 kB / 392.9 MB, free: 14.82 MB / 346.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001749/0.4492, allocations: 43.48 kB / 392.9 MB, free: 14.77 MB / 346.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.002245/0.4515, allocations: 0.7628 MB / 393.7 MB, free: 14 MB / 346.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.392e-05/0.4515, allocations: 8 kB / 393.7 MB, free: 13.99 MB / 346.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.677e-06/0.4515, allocations: 0 / 393.7 MB, free: 13.99 MB / 346.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.212e-05/0.4516, allocations: 3.984 kB / 393.7 MB, free: 13.98 MB / 346.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.004165/0.4557, allocations: 1.549 MB / 395.2 MB, free: 12.38 MB / 346.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.17e-06/0.4558, allocations: 0 / 395.2 MB, free: 12.38 MB / 346.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005458/0.4563, allocations: 79.88 kB / 395.3 MB, free: 12.3 MB / 346.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.001341/0.4577, allocations: 400.5 kB / 395.7 MB, free: 11.91 MB / 346.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 7.997e-05/0.4578, allocations: 11.98 kB / 395.7 MB, free: 11.89 MB / 346.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001871/0.4597, allocations: 1.021 MB / 396.7 MB, free: 10.85 MB / 346.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.116e-05/0.4597, allocations: 7.938 kB / 396.7 MB, free: 10.84 MB / 346.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.003049/0.4628, allocations: 1.147 MB / 397.9 MB, free: 9.648 MB / 346.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0003901/0.4632, allocations: 184.5 kB / 398.1 MB, free: 9.449 MB / 346.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001176/0.4633, allocations: 4 kB / 398.1 MB, free: 9.445 MB / 346.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005888/0.4639, allocations: 64.06 kB / 398.1 MB, free: 9.383 MB / 346.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002931/0.4643, allocations: 108.3 kB / 398.2 MB, free: 9.277 MB / 346.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 8.772e-05/0.4644, allocations: 23.98 kB / 398.3 MB, free: 9.254 MB / 346.7 MB Notification: Performance of sorting global known variables: time 0.000278/0.4646, allocations: 184.4 kB / 398.4 MB, free: 9.074 MB / 346.7 MB Notification: Performance of sort global known variables: time 8.3e-07/0.4647, allocations: 0 / 398.4 MB, free: 9.074 MB / 346.7 MB Notification: Performance of remove unused functions: time 0.0007137/0.4654, allocations: 128 kB / 398.6 MB, free: 8.949 MB / 346.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * Number of states: 2 (Inertia2.phi,Inertia2.w) * Number of discrete variables: 9 (gear.tau_aPos,gear.startForward,gear.startBackward,gear.locked,gear.mode,bearingFriction.startForward,bearingFriction.startBackward,bearingFriction.locked,bearingFriction.mode) * Number of discrete states: 4 (bearingFriction.mode,bearingFriction.startBackward,bearingFriction.startForward,gear.mode) * Top-level inputs: 0 Notification: Strong component statistics for simulation (40): * Single equations (assignments): 39 * 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 29} Notification: Performance of Backend phase and start with SimCode phase: time 0.000333/0.4657, allocations: 147.1 kB / 398.7 MB, free: 8.797 MB / 346.7 MB Notification: Performance of simCode: created initialization part: time 0.001586/0.4673, allocations: 0.5975 MB / 399.3 MB, free: 8.195 MB / 346.7 MB Notification: Performance of simCode: created event and clocks part: time 3.466e-06/0.4674, allocations: 0 / 399.3 MB, free: 8.195 MB / 346.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0009008/0.4683, allocations: 333.9 kB / 399.6 MB, free: 7.871 MB / 346.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004908/0.4688, allocations: 29.38 kB / 399.7 MB, free: 7.844 MB / 346.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003003/0.4718, allocations: 0.9741 MB / 400.6 MB, free: 6.832 MB / 346.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006063/0.4724, allocations: 0.8293 MB / 401.5 MB, free: 5.973 MB / 346.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002594/0.4727, allocations: 47.39 kB / 401.5 MB, free: 5.926 MB / 346.7 MB Notification: Performance of SimCode: time 1.808e-06/0.4727, allocations: 0 / 401.5 MB, free: 5.926 MB / 346.7 MB Notification: Performance of Templates: time 0.01395/0.4867, allocations: 6.884 MB / 408.4 MB, free: 15.05 MB / 362.7 MB "Error: Could not read variable bearingFriction.Backward in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable bearingFriction.Backward from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable bearingFriction.Forward in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable bearingFriction.Forward from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable bearingFriction.Free in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable bearingFriction.Free from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable bearingFriction.Stuck in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable bearingFriction.Stuck from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable bearingFriction.Unknown in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable bearingFriction.Unknown from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.Backward in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.Backward from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.Forward in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.Forward from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.Free in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.Free from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.Stuck in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.Stuck from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.Unknown in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.Unknown from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.flange_b.der(phi) in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.flange_b.der(phi) from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.unitAngularAcceleration in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.unitAngularAcceleration from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! Error: Could not read variable gear.unitTorque in file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat. Warning: Get data of variable gear.unitTorque from file Modelica_3.2.2_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.mat failed! " Variables in the reference:time,Inertia2.phi,Inertia2.w,bearingFriction.mode,bearingFriction.startBackward,bearingFriction.startForward,gear.mode Variables in the result:DriveSine.amplitude,DriveSine.freqHz,DriveSine.offset,DriveSine.phase,DriveSine.startTime,DriveSine.y,Inertia1.J,Inertia1.a,der(Inertia1.phi),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,PowerLoss,bearingFriction.a,bearingFriction.a_relfric,der(bearingFriction.phi),der(bearingFriction.w),bearingFriction.flange_a.phi,bearingFriction.flange_a.tau,bearingFriction.flange_b.phi,bearingFriction.flange_b.tau,bearingFriction.free,bearingFriction.locked,bearingFriction.lossPower,bearingFriction.mode,bearingFriction.peak,bearingFriction.phi,bearingFriction.phi_support,bearingFriction.sa,bearingFriction.startBackward,bearingFriction.startForward,bearingFriction.support.phi,bearingFriction.support.tau,bearingFriction.tau,bearingFriction.tau0,bearingFriction.tau0_max,bearingFriction.tau_pos[1,1],bearingFriction.tau_pos[1,2],bearingFriction.tau_pos[2,1],bearingFriction.tau_pos[2,2],bearingFriction.useHeatPort,bearingFriction.useSupport,bearingFriction.w,bearingFriction.w_relfric,bearingFriction.w_small,fixed.flange.phi,fixed.flange.tau,fixed.phi0,gear.a_a,der(gear.der(phi_b)),der(gear.phi_a),der(gear.phi_b),der(gear.w_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.support.phi,gear.support.tau,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,load.duration,load.height,load.offset,load.startTime,load.y,time,torque1.flange.phi,torque1.flange.tau,torque1.phi_support,torque1.support.phi,torque1.support.tau,torque1.tau,torque1.useSupport,torque2.flange.phi,torque2.flange.tau,torque2.phi_support,torque2.support.phi,torque2.support.tau,torque2.tau,torque2.useSupport