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_trunk_cpp_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2") Notification: Performance of loadModel(Modelica): time 2.225/2.225, allocations: 224.7 MB / 241.1 MB, free: 1.684 MB / 186.7 MB Notification: Performance of FrontEnd - loaded program: time 2.532e-05/2.532e-05, allocations: 0 / 294.6 MB, free: 11.41 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1131/0.1132, allocations: 50.41 MB / 345 MB, free: 8.961 MB / 282.7 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.Rotational.Examples.LossyGearDemo2): time 0.003719/0.117, allocations: 2.159 MB / 347.1 MB, free: 6.789 MB / 282.7 MB Notification: Performance of NFInst.instExpressions: time 0.002663/0.1197, allocations: 0.9797 MB / 348.1 MB, free: 5.801 MB / 282.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000325/0.1201, allocations: 11.94 kB / 348.1 MB, free: 5.789 MB / 282.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0001852/0.1203, allocations: 47.67 kB / 348.2 MB, free: 5.742 MB / 282.7 MB Notification: Performance of NFTyping.typeBindings: time 0.0006678/0.1209, allocations: 167.5 kB / 348.3 MB, free: 5.578 MB / 282.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0006101/0.1216, allocations: 175.8 kB / 348.5 MB, free: 5.406 MB / 282.7 MB Notification: Performance of NFFlatten.flatten: time 0.0006553/0.1222, allocations: 303.8 kB / 348.8 MB, free: 5.109 MB / 282.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001941/0.1225, allocations: 60.88 kB / 348.9 MB, free: 5.051 MB / 282.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0004608/0.1229, allocations: 231.5 kB / 349.1 MB, free: 4.824 MB / 282.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0005714/0.1235, allocations: 275.3 kB / 349.4 MB, free: 4.555 MB / 282.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003559/0.1239, allocations: 95.92 kB / 349.4 MB, free: 4.461 MB / 282.7 MB Notification: Performance of NFPackage.collectConstants: time 0.0001327/0.124, allocations: 28 kB / 349.5 MB, free: 4.434 MB / 282.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0001999/0.1243, allocations: 107.7 kB / 349.6 MB, free: 4.328 MB / 282.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001402/0.1244, allocations: 39.94 kB / 349.6 MB, free: 4.289 MB / 282.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0007681/0.1252, allocations: 463.1 kB / 350.1 MB, free: 3.836 MB / 282.7 MB Notification: Performance of FrontEnd - DAE generated: time 3.787e-06/0.1252, allocations: 4 kB / 350.1 MB, free: 3.832 MB / 282.7 MB Notification: Performance of FrontEnd: time 2.645e-06/0.1252, allocations: 0 / 350.1 MB, free: 3.832 MB / 282.7 MB Notification: Performance of Transformations before backend: time 1.498e-05/0.1252, allocations: 0 / 350.1 MB, free: 3.832 MB / 282.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.002224/0.1275, allocations: 0.6944 MB / 350.8 MB, free: 3.086 MB / 282.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.252e-05/0.1275, allocations: 16.02 kB / 350.8 MB, free: 3.07 MB / 282.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005735/0.1281, allocations: 67.38 kB / 350.8 MB, free: 3.004 MB / 282.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008202/0.129, allocations: 357.2 kB / 351.2 MB, free: 2.617 MB / 282.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001884/0.1292, allocations: 96.39 kB / 351.3 MB, free: 2.512 MB / 282.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001309/0.1293, allocations: 36 kB / 351.3 MB, free: 2.477 MB / 282.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001751/0.1311, allocations: 0.5682 MB / 351.9 MB, free: 1.898 MB / 282.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 5.01e-05/0.1312, allocations: 0 / 351.9 MB, free: 1.898 MB / 282.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.287e-05/0.1313, allocations: 16 kB / 351.9 MB, free: 1.883 MB / 282.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.536e-05/0.1313, allocations: 15.95 kB / 351.9 MB, free: 1.867 MB / 282.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002309/0.1336, allocations: 0.6519 MB / 352.6 MB, free: 1.215 MB / 282.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004087/0.1378, allocations: 1.31 MB / 353.9 MB, free: 15.85 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001986/0.1398, allocations: 0.5561 MB / 354.4 MB, free: 15.28 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 8.515e-05/0.1399, allocations: 12.56 kB / 354.5 MB, free: 15.27 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.626e-05/0.14, allocations: 39.31 kB / 354.5 MB, free: 15.22 MB / 298.7 MB Notification: Performance of pre-optimization done (n=61): time 6.612e-06/0.14, allocations: 0 / 354.5 MB, free: 15.22 MB / 298.7 MB Notification: Performance of matching and sorting (n=69): time 0.01227/0.1523, allocations: 2.947 MB / 357.4 MB, free: 12.15 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.104e-05/0.1524, allocations: 85.67 kB / 357.5 MB, free: 12.05 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006412/0.1531, allocations: 306 kB / 357.8 MB, free: 11.75 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0001388/0.1532, allocations: 41.7 kB / 357.9 MB, free: 11.7 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001729/0.1534, allocations: 216 kB / 358.1 MB, free: 11.48 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0003006/0.1537, allocations: 224.8 kB / 358.3 MB, free: 11.26 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 6.696e-05/0.1538, allocations: 20 kB / 358.3 MB, free: 11.24 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 0.0001621/0.154, allocations: 330.8 kB / 358.6 MB, free: 10.91 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001101/0.1551, allocations: 297.2 kB / 358.9 MB, free: 10.62 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001173/0.1563, allocations: 358.4 kB / 359.3 MB, free: 10.26 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001031/0.1573, allocations: 263.2 kB / 359.5 MB, free: 10 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.528e-06/0.1574, allocations: 0 / 359.5 MB, free: 10 MB / 298.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.003245/0.1606, allocations: 0.9086 MB / 360.4 MB, free: 9.086 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 3.79e-05/0.1607, allocations: 4 kB / 360.4 MB, free: 9.082 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.5e-05/0.1607, allocations: 4 kB / 360.5 MB, free: 9.078 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.00187/0.1626, allocations: 474.6 kB / 360.9 MB, free: 8.613 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0007829/0.1635, allocations: 83.89 kB / 361 MB, free: 8.531 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.002174/0.1656, allocations: 1.087 MB / 362.1 MB, free: 7.418 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001011/0.1667, allocations: 80 kB / 362.2 MB, free: 7.34 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0001128/0.1669, allocations: 23.98 kB / 362.2 MB, free: 7.316 MB / 298.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.0004205/0.1673, allocations: 181.7 kB / 362.4 MB, free: 7.129 MB / 298.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001572/0.1675, allocations: 47.39 kB / 362.4 MB, free: 7.082 MB / 298.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0002299/0.1677, allocations: 67.77 kB / 362.5 MB, free: 7.012 MB / 298.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.063e-05/0.1677, allocations: 11.94 kB / 362.5 MB, free: 7 MB / 298.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.058e-05/0.1677, allocations: 0 / 362.5 MB, free: 7 MB / 298.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.353e-05/0.1678, allocations: 7.984 kB / 362.5 MB, free: 6.992 MB / 298.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00562/0.1734, allocations: 1.777 MB / 364.3 MB, free: 5.145 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.794e-06/0.1734, allocations: 0 / 364.3 MB, free: 5.145 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0007435/0.1742, allocations: 87.91 kB / 364.4 MB, free: 5.059 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.00167/0.1759, allocations: 440.5 kB / 364.8 MB, free: 4.625 MB / 298.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0001114/0.176, allocations: 19.97 kB / 364.8 MB, free: 4.605 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.002034/0.1781, allocations: 1.037 MB / 365.8 MB, free: 3.543 MB / 298.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.677e-06/0.1781, allocations: 8.094 kB / 365.9 MB, free: 3.535 MB / 298.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.004478/0.1826, allocations: 1.319 MB / 367.2 MB, free: 2.191 MB / 298.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004335/0.1831, allocations: 180.6 kB / 367.3 MB, free: 1.996 MB / 298.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001824/0.1833, allocations: 24 kB / 367.4 MB, free: 1.973 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0008458/0.1842, allocations: 79.83 kB / 367.4 MB, free: 1.895 MB / 298.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003468/0.1845, allocations: 104.3 kB / 367.6 MB, free: 1.793 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 7.78e-05/0.1846, allocations: 27.86 kB / 367.6 MB, free: 1.766 MB / 298.7 MB Notification: Performance of sorting global known variables: time 0.0004966/0.1851, allocations: 241.9 kB / 367.8 MB, free: 1.523 MB / 298.7 MB Notification: Performance of sort global known variables: time 4.01e-07/0.1851, allocations: 0 / 367.8 MB, free: 1.523 MB / 298.7 MB Notification: Performance of remove unused functions: time 0.0007405/0.1859, allocations: 152 kB / 368 MB, free: 1.375 MB / 298.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.0003633/0.1863, allocations: 147.2 kB / 368.1 MB, free: 1.223 MB / 298.7 MB Notification: Performance of simCode: created initialization part: time 0.002722/0.189, allocations: 0.7158 MB / 368.8 MB, free: 0.5039 MB / 298.7 MB Notification: Performance of simCode: created event and clocks part: time 4.508e-06/0.1891, allocations: 0 / 368.8 MB, free: 0.5039 MB / 298.7 MB Notification: Performance of simCode: created simulation system equations: time 0.001502/0.1906, allocations: 396.1 kB / 369.2 MB, free: 124 kB / 298.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006199/0.1912, allocations: 40.81 kB / 369.2 MB, free: 80 kB / 298.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004783/0.196, allocations: 1.376 MB / 370.6 MB, free: 14.66 MB / 314.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005089/0.1966, allocations: 0.8368 MB / 371.5 MB, free: 13.8 MB / 314.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003096/0.1969, allocations: 47.41 kB / 371.5 MB, free: 13.75 MB / 314.7 MB Notification: Performance of SimCode: time 1.072e-06/0.1969, allocations: 0 / 371.5 MB, free: 13.75 MB / 314.7 MB Notification: Performance of Templates: time 0.0169/0.2138, allocations: 6.933 MB / 378.4 MB, free: 6.82 MB / 314.7 MB