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.235/2.235, allocations: 194.9 MB / 211.2 MB, free: 8.344 MB / 170.7 MB Notification: Performance of FrontEnd - loaded program: time 2.641e-05/2.679e-05, allocations: 4 kB / 258.8 MB, free: 8.707 MB / 218.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3231/0.3231, allocations: 44.5 MB / 303.3 MB, free: 12.74 MB / 250.7 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.Rotational.Examples.LossyGearDemo2): time 0.003739/0.3269, allocations: 2.131 MB / 305.4 MB, free: 11.02 MB / 250.7 MB Notification: Performance of NFInst.instExpressions: time 0.002751/0.3297, allocations: 1.004 MB / 306.4 MB, free: 10.21 MB / 250.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003529/0.3301, allocations: 10.5 kB / 306.4 MB, free: 10.21 MB / 250.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0002032/0.3303, allocations: 49.59 kB / 306.5 MB, free: 10.18 MB / 250.7 MB Notification: Performance of NFTyping.typeBindings: time 0.0007629/0.3311, allocations: 164.8 kB / 306.6 MB, free: 10.04 MB / 250.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0006399/0.3318, allocations: 184.2 kB / 306.8 MB, free: 9.898 MB / 250.7 MB Notification: Performance of NFFlatten.flatten: time 0.0007032/0.3325, allocations: 302.8 kB / 307.1 MB, free: 9.676 MB / 250.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002099/0.3327, allocations: 61.19 kB / 307.2 MB, free: 9.641 MB / 250.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0005636/0.3333, allocations: 228.7 kB / 307.4 MB, free: 9.52 MB / 250.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000556/0.3339, allocations: 280 kB / 307.7 MB, free: 9.305 MB / 250.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003651/0.3343, allocations: 91.88 kB / 307.8 MB, free: 9.215 MB / 250.7 MB Notification: Performance of NFPackage.collectConstants: time 0.0001362/0.3344, allocations: 32 kB / 307.8 MB, free: 9.184 MB / 250.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0002031/0.3346, allocations: 119.6 kB / 307.9 MB, free: 9.066 MB / 250.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001512/0.3348, allocations: 36 kB / 307.9 MB, free: 9.031 MB / 250.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0007819/0.3356, allocations: 456.7 kB / 308.4 MB, free: 8.586 MB / 250.7 MB Notification: Performance of FrontEnd - DAE generated: time 3.868e-06/0.3356, allocations: 0 / 308.4 MB, free: 8.586 MB / 250.7 MB Notification: Performance of FrontEnd: time 2.675e-06/0.3356, allocations: 0 / 308.4 MB, free: 8.586 MB / 250.7 MB Notification: Performance of Transformations before backend: time 1.384e-05/0.3356, allocations: 4 kB / 308.4 MB, free: 8.582 MB / 250.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.002223/0.3379, allocations: 0.6944 MB / 309.1 MB, free: 7.836 MB / 250.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.94e-05/0.338, allocations: 8.031 kB / 309.1 MB, free: 7.828 MB / 250.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005845/0.3385, allocations: 63.42 kB / 309.2 MB, free: 7.766 MB / 250.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008066/0.3394, allocations: 345.4 kB / 309.5 MB, free: 7.387 MB / 250.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001901/0.3396, allocations: 100.4 kB / 309.6 MB, free: 7.277 MB / 250.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001385/0.3397, allocations: 43.91 kB / 309.6 MB, free: 7.234 MB / 250.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001786/0.3415, allocations: 0.5682 MB / 310.2 MB, free: 6.656 MB / 250.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.931e-05/0.3416, allocations: 0 / 310.2 MB, free: 6.656 MB / 250.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.884e-05/0.3417, allocations: 16 kB / 310.2 MB, free: 6.641 MB / 250.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.655e-05/0.3417, allocations: 8 kB / 310.2 MB, free: 6.633 MB / 250.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002378/0.3441, allocations: 0.6519 MB / 310.9 MB, free: 5.977 MB / 250.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004459/0.3486, allocations: 1.322 MB / 312.2 MB, free: 4.598 MB / 250.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.002155/0.3508, allocations: 0.5484 MB / 312.8 MB, free: 4.039 MB / 250.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001121/0.351, allocations: 12.55 kB / 312.8 MB, free: 4.027 MB / 250.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.164e-05/0.351, allocations: 43.25 kB / 312.8 MB, free: 3.977 MB / 250.7 MB Notification: Performance of pre-optimization done (n=61): time 3.596e-06/0.3511, allocations: 0 / 312.8 MB, free: 3.977 MB / 250.7 MB Notification: Performance of matching and sorting (n=69): time 0.01287/0.3639, allocations: 2.943 MB / 315.7 MB, free: 0.9102 MB / 250.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.35e-05/0.3641, allocations: 89.61 kB / 315.8 MB, free: 0.8047 MB / 250.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006135/0.3647, allocations: 298.2 kB / 316.1 MB, free: 0.5078 MB / 250.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0001445/0.3648, allocations: 45.7 kB / 316.2 MB, free: 468 kB / 250.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001629/0.365, allocations: 216 kB / 316.4 MB, free: 248 kB / 250.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0003229/0.3654, allocations: 224.8 kB / 316.6 MB, free: 20 kB / 250.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.135e-05/0.3654, allocations: 15.98 kB / 316.6 MB, free: 4 kB / 250.7 MB Notification: Performance of setup shared object (initialization): time 0.0001927/0.3656, allocations: 338.8 kB / 316.9 MB, free: 15.66 MB / 266.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001163/0.3668, allocations: 293.1 kB / 317.2 MB, free: 15.38 MB / 266.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001158/0.368, allocations: 358.5 kB / 317.6 MB, free: 15.02 MB / 266.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0009987/0.369, allocations: 263.1 kB / 317.8 MB, free: 14.76 MB / 266.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.336e-06/0.369, allocations: 0 / 317.8 MB, free: 14.76 MB / 266.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.003181/0.3722, allocations: 0.9046 MB / 318.7 MB, free: 13.84 MB / 266.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.746e-05/0.3723, allocations: 7.969 kB / 318.8 MB, free: 13.83 MB / 266.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.999e-06/0.3723, allocations: 4 kB / 318.8 MB, free: 13.83 MB / 266.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001852/0.3742, allocations: 473.9 kB / 319.2 MB, free: 13.36 MB / 266.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0007737/0.375, allocations: 83.88 kB / 319.3 MB, free: 13.28 MB / 266.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.002271/0.3773, allocations: 1.079 MB / 320.4 MB, free: 12.18 MB / 266.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0009868/0.3783, allocations: 80.09 kB / 320.5 MB, free: 12.1 MB / 266.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 9.79e-05/0.3784, allocations: 31.97 kB / 320.5 MB, free: 12.07 MB / 266.7 MB 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): 45 * 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 32} Notification: Performance of prepare postOptimizeDAE: time 0.0003757/0.3788, allocations: 177.7 kB / 320.7 MB, free: 11.88 MB / 266.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001453/0.379, allocations: 39.53 kB / 320.7 MB, free: 11.84 MB / 266.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0002057/0.3792, allocations: 67.77 kB / 320.8 MB, free: 11.77 MB / 266.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.491e-05/0.3792, allocations: 11.95 kB / 320.8 MB, free: 11.76 MB / 266.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.636e-06/0.3792, allocations: 0 / 320.8 MB, free: 11.76 MB / 266.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.007e-05/0.3793, allocations: 7.984 kB / 320.8 MB, free: 11.75 MB / 266.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00556/0.3848, allocations: 1.781 MB / 322.6 MB, free: 9.898 MB / 266.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.825e-06/0.3849, allocations: 0 / 322.6 MB, free: 9.898 MB / 266.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0007563/0.3857, allocations: 79.88 kB / 322.6 MB, free: 9.82 MB / 266.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.00165/0.3873, allocations: 444.5 kB / 323.1 MB, free: 9.383 MB / 266.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 9.506e-05/0.3874, allocations: 19.98 kB / 323.1 MB, free: 9.363 MB / 266.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.002078/0.3895, allocations: 1.036 MB / 324.1 MB, free: 8.301 MB / 266.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.528e-06/0.3896, allocations: 0 / 324.1 MB, free: 8.301 MB / 266.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.004777/0.3944, allocations: 1.334 MB / 325.5 MB, free: 6.941 MB / 266.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004575/0.3949, allocations: 176.5 kB / 325.6 MB, free: 6.75 MB / 266.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001754/0.3951, allocations: 20 kB / 325.7 MB, free: 6.73 MB / 266.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000895/0.396, allocations: 68 kB / 325.7 MB, free: 6.664 MB / 266.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000381/0.3964, allocations: 104.3 kB / 325.8 MB, free: 6.559 MB / 266.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 8.901e-05/0.3965, allocations: 35.92 kB / 325.9 MB, free: 6.523 MB / 266.7 MB Notification: Performance of sorting global known variables: time 0.000511/0.397, allocations: 237.9 kB / 326.1 MB, free: 6.293 MB / 266.7 MB Notification: Performance of sort global known variables: time 5.01e-07/0.3971, allocations: 0 / 326.1 MB, free: 6.293 MB / 266.7 MB Notification: Performance of remove unused functions: time 0.000836/0.3979, allocations: 152 kB / 326.2 MB, free: 6.145 MB / 266.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * 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 (39): * Single equations (assignments): 38 * 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.0004074/0.3983, allocations: 147.2 kB / 326.4 MB, free: 5.992 MB / 266.7 MB Notification: Performance of simCode: created initialization part: time 0.003032/0.4014, allocations: 0.7197 MB / 327.1 MB, free: 5.27 MB / 266.7 MB Notification: Performance of simCode: created event and clocks part: time 5.571e-06/0.4014, allocations: 3.938 kB / 327.1 MB, free: 5.266 MB / 266.7 MB Notification: Performance of simCode: created simulation system equations: time 0.001719/0.4032, allocations: 392.2 kB / 327.5 MB, free: 4.887 MB / 266.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006733/0.4039, allocations: 43.41 kB / 327.5 MB, free: 4.844 MB / 266.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004995/0.4089, allocations: 1.386 MB / 328.9 MB, free: 3.418 MB / 266.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000542/0.4095, allocations: 0.829 MB / 329.8 MB, free: 2.566 MB / 266.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003232/0.4099, allocations: 47.41 kB / 329.8 MB, free: 2.523 MB / 266.7 MB Notification: Performance of SimCode: time 8.81e-07/0.4099, allocations: 0 / 329.8 MB, free: 2.523 MB / 266.7 MB Notification: Performance of Templates: time 0.01684/0.4267, allocations: 6.944 MB / 336.7 MB, free: 11.58 MB / 282.7 MB