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.1_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2") Notification: Performance of loadModel(Modelica): time 2.025/2.025, allocations: 171.1 MB / 186.3 MB, free: 1.418 MB / 154.7 MB Notification: Performance of FrontEnd - loaded program: time 2.785e-05/2.793e-05, allocations: 0 / 228.1 MB, free: 7.996 MB / 186.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08071/0.08077, allocations: 38.77 MB / 266.9 MB, free: 1.152 MB / 218.7 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.Rotational.Examples.LossyGearDemo2): time 0.003582/0.0844, allocations: 2.124 MB / 269 MB, free: 15 MB / 234.7 MB Notification: Performance of NFInst.instExpressions: time 0.00289/0.08735, allocations: 1.093 MB / 270.1 MB, free: 13.91 MB / 234.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002759/0.08768, allocations: 8 kB / 270.1 MB, free: 13.9 MB / 234.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0001841/0.08788, allocations: 47.67 kB / 270.2 MB, free: 13.85 MB / 234.7 MB Notification: Performance of NFTyping.typeBindings: time 0.0006238/0.08852, allocations: 163.4 kB / 270.3 MB, free: 13.69 MB / 234.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0006744/0.0892, allocations: 207.6 kB / 270.5 MB, free: 13.49 MB / 234.7 MB Notification: Performance of NFFlatten.flatten: time 0.0005713/0.08979, allocations: 303.8 kB / 270.8 MB, free: 13.19 MB / 234.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001915/0.09, allocations: 68.89 kB / 270.9 MB, free: 13.12 MB / 234.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0004351/0.09045, allocations: 223.5 kB / 271.1 MB, free: 12.91 MB / 234.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0005126/0.09098, allocations: 271.3 kB / 271.4 MB, free: 12.64 MB / 234.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0004988/0.09149, allocations: 183.8 kB / 271.5 MB, free: 12.46 MB / 234.7 MB Notification: Performance of NFPackage.collectConstants: time 0.0001393/0.09165, allocations: 36 kB / 271.6 MB, free: 12.43 MB / 234.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0001917/0.09185, allocations: 107.7 kB / 271.7 MB, free: 12.32 MB / 234.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001423/0.09201, allocations: 39.94 kB / 271.7 MB, free: 12.28 MB / 234.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0008176/0.09283, allocations: 499 kB / 272.2 MB, free: 11.79 MB / 234.7 MB Notification: Performance of FrontEnd - DAE generated: time 3.897e-06/0.09286, allocations: 4 kB / 272.2 MB, free: 11.79 MB / 234.7 MB Notification: Performance of FrontEnd: time 4.508e-06/0.09287, allocations: 3.984 kB / 272.2 MB, free: 11.79 MB / 234.7 MB Notification: Performance of Transformations before backend: time 1.332e-05/0.09289, allocations: 0 / 272.2 MB, free: 11.79 MB / 234.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.002145/0.09505, allocations: 0.7023 MB / 272.9 MB, free: 11.04 MB / 234.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.389e-05/0.09511, allocations: 11.97 kB / 272.9 MB, free: 11.02 MB / 234.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005233/0.09564, allocations: 63.42 kB / 273 MB, free: 10.96 MB / 234.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007434/0.0964, allocations: 349.3 kB / 273.3 MB, free: 10.58 MB / 234.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001762/0.0966, allocations: 100.3 kB / 273.4 MB, free: 10.47 MB / 234.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001298/0.09674, allocations: 40 kB / 273.5 MB, free: 10.43 MB / 234.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001667/0.09842, allocations: 0.5565 MB / 274 MB, free: 9.859 MB / 234.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.859e-05/0.09847, allocations: 3.906 kB / 274 MB, free: 9.855 MB / 234.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.692e-05/0.09856, allocations: 16 kB / 274 MB, free: 9.84 MB / 234.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.205e-05/0.09859, allocations: 15.98 kB / 274.1 MB, free: 9.824 MB / 234.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002226/0.1008, allocations: 0.6363 MB / 274.7 MB, free: 9.188 MB / 234.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003934/0.1048, allocations: 1.299 MB / 276 MB, free: 7.828 MB / 234.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001898/0.1067, allocations: 0.5444 MB / 276.5 MB, free: 7.273 MB / 234.7 MB Notification: Performance of preOpt evalFunc (simulation): time 8.156e-05/0.1068, allocations: 12.56 kB / 276.6 MB, free: 7.262 MB / 234.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 6.695e-05/0.1069, allocations: 39.31 kB / 276.6 MB, free: 7.215 MB / 234.7 MB Notification: Performance of pre-optimization done (n=61): time 7.194e-06/0.1069, allocations: 0 / 276.6 MB, free: 7.215 MB / 234.7 MB Notification: Performance of matching and sorting (n=69): time 0.01221/0.1192, allocations: 3.013 MB / 279.6 MB, free: 4.078 MB / 234.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.294e-05/0.1193, allocations: 89.67 kB / 279.7 MB, free: 3.973 MB / 234.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006257/0.1199, allocations: 302.1 kB / 280 MB, free: 3.668 MB / 234.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0001342/0.1201, allocations: 45.69 kB / 280 MB, free: 3.617 MB / 234.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001588/0.1202, allocations: 212 kB / 280.2 MB, free: 3.406 MB / 234.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002964/0.1206, allocations: 236.7 kB / 280.5 MB, free: 3.172 MB / 234.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 5.772e-05/0.1206, allocations: 8 kB / 280.5 MB, free: 3.164 MB / 234.7 MB Notification: Performance of setup shared object (initialization): time 0.0001545/0.1208, allocations: 338.8 kB / 280.8 MB, free: 2.824 MB / 234.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001053/0.1219, allocations: 289.2 kB / 281.1 MB, free: 2.543 MB / 234.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001123/0.123, allocations: 346.5 kB / 281.4 MB, free: 2.191 MB / 234.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0009621/0.124, allocations: 259.2 kB / 281.7 MB, free: 1.941 MB / 234.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.377e-06/0.124, allocations: 0 / 281.7 MB, free: 1.941 MB / 234.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.003328/0.1273, allocations: 0.9983 MB / 282.7 MB, free: 0.9336 MB / 234.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.472e-05/0.1274, allocations: 4 kB / 282.7 MB, free: 0.9297 MB / 234.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.598e-06/0.1274, allocations: 0 / 282.7 MB, free: 0.9297 MB / 234.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001632/0.1291, allocations: 418.7 kB / 283.1 MB, free: 0.5195 MB / 234.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0007193/0.1298, allocations: 87.88 kB / 283.2 MB, free: 444 kB / 234.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.002103/0.1319, allocations: 1.052 MB / 284.2 MB, free: 15.36 MB / 250.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0009335/0.1329, allocations: 87.94 kB / 284.3 MB, free: 15.27 MB / 250.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 9.377e-05/0.133, allocations: 20 kB / 284.3 MB, free: 15.25 MB / 250.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.0003554/0.1333, allocations: 177.8 kB / 284.5 MB, free: 15.07 MB / 250.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001297/0.1335, allocations: 39.53 kB / 284.6 MB, free: 15.03 MB / 250.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0002112/0.1337, allocations: 67.77 kB / 284.6 MB, free: 14.96 MB / 250.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.141e-05/0.1337, allocations: 8 kB / 284.6 MB, free: 14.95 MB / 250.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.246e-06/0.1338, allocations: 0 / 284.6 MB, free: 14.95 MB / 250.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.249e-05/0.1338, allocations: 7.969 kB / 284.6 MB, free: 14.95 MB / 250.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.005919/0.1397, allocations: 1.851 MB / 286.5 MB, free: 13.03 MB / 250.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.052e-05/0.1398, allocations: 4 kB / 286.5 MB, free: 13.02 MB / 250.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0007457/0.1405, allocations: 87.88 kB / 286.6 MB, free: 12.94 MB / 250.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.00152/0.1421, allocations: 392.5 kB / 287 MB, free: 12.55 MB / 250.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0001152/0.1422, allocations: 23.94 kB / 287 MB, free: 12.53 MB / 250.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001986/0.1442, allocations: 1.009 MB / 288 MB, free: 11.49 MB / 250.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.697e-06/0.1442, allocations: 0 / 288 MB, free: 11.49 MB / 250.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.004713/0.149, allocations: 1.412 MB / 289.4 MB, free: 10.05 MB / 250.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004005/0.1494, allocations: 176.5 kB / 289.6 MB, free: 9.855 MB / 250.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001588/0.1496, allocations: 20 kB / 289.6 MB, free: 9.836 MB / 250.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000819/0.1504, allocations: 72 kB / 289.7 MB, free: 9.766 MB / 250.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003081/0.1507, allocations: 96.36 kB / 289.8 MB, free: 9.672 MB / 250.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 8.623e-05/0.1508, allocations: 27.97 kB / 289.8 MB, free: 9.645 MB / 250.7 MB Notification: Performance of sorting global known variables: time 0.0004869/0.1513, allocations: 241.9 kB / 290 MB, free: 9.41 MB / 250.7 MB Notification: Performance of sort global known variables: time 3.637e-06/0.1514, allocations: 0 / 290 MB, free: 9.41 MB / 250.7 MB Notification: Performance of remove unused functions: time 0.0007531/0.1521, allocations: 159.9 kB / 290.2 MB, free: 9.254 MB / 250.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.0004113/0.1525, allocations: 170.3 kB / 290.3 MB, free: 9.078 MB / 250.7 MB Notification: Performance of simCode: created initialization part: time 0.002701/0.1553, allocations: 0.7041 MB / 291 MB, free: 8.375 MB / 250.7 MB Notification: Performance of simCode: created event and clocks part: time 5.36e-06/0.1553, allocations: 0 / 291 MB, free: 8.375 MB / 250.7 MB Notification: Performance of simCode: created simulation system equations: time 0.001483/0.1568, allocations: 384.1 kB / 291.4 MB, free: 8 MB / 250.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005954/0.1574, allocations: 44.95 kB / 291.5 MB, free: 7.953 MB / 250.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004756/0.1622, allocations: 1.386 MB / 292.9 MB, free: 6.539 MB / 250.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000528/0.1628, allocations: 0.8329 MB / 293.7 MB, free: 5.676 MB / 250.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003183/0.1631, allocations: 43.41 kB / 293.7 MB, free: 5.633 MB / 250.7 MB Notification: Performance of SimCode: time 1.333e-06/0.1631, allocations: 0 / 293.7 MB, free: 5.633 MB / 250.7 MB Notification: Performance of Templates: time 0.2203/0.3834, allocations: 6.907 MB / 300.6 MB, free: 30.7 MB / 250.7 MB