Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo", uses=false) Using package ModelicaByExample with version 0.5.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: "" <> buildModelFMU(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter,fileNamePrefix="ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter,fileNamePrefix="ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.00541/0.00541, allocations: 97.62 kB / 15.73 MB, free: 6.059 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001228/0.001228, allocations: 197.3 kB / 16.68 MB, free: 5.977 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.493/1.493, allocations: 205.1 MB / 222.6 MB, free: 4.52 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo): time 0.04354/0.04354, allocations: 8.112 MB / 278 MB, free: 13.08 MB / 238.1 MB Notification: Modelica requested package Complex of version 3.2.3. Complex 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: Modelica requested package ModelicaServices of version 3.2.3. ModelicaServices 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: ModelicaByExample requested package Modelica of version 3.2.2. Modelica 3.2.3 is used instead which states that it is fully compatible without conversion script needed. Notification: Performance of FrontEnd - loaded program: time 0.001493/0.001493, allocations: 67.91 kB / 386.2 MB, free: 9.539 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3232/0.3247, allocations: 48.3 MB / 434.5 MB, free: 7.48 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter): time 0.003591/0.3284, allocations: 1.975 MB / 436.5 MB, free: 6.105 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.0009571/0.3294, allocations: 0.6122 MB / 437.1 MB, free: 5.664 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 8.51e-05/0.3295, allocations: 3.344 kB / 437.1 MB, free: 5.664 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 7.742e-05/0.3295, allocations: 26.14 kB / 437.1 MB, free: 5.648 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001519/0.3297, allocations: 51.47 kB / 437.2 MB, free: 5.609 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002592/0.33, allocations: 65.48 kB / 437.2 MB, free: 5.57 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002967/0.3303, allocations: 224.2 kB / 437.5 MB, free: 5.461 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002265/0.3305, allocations: 99.92 kB / 437.6 MB, free: 5.41 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001713/0.3307, allocations: 80.61 kB / 437.6 MB, free: 5.375 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001461/0.3309, allocations: 96.08 kB / 437.7 MB, free: 5.324 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 3.792e-05/0.3309, allocations: 22.28 kB / 437.7 MB, free: 5.324 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 4.868e-05/0.331, allocations: 28.38 kB / 437.8 MB, free: 5.316 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 5.555e-05/0.331, allocations: 40.75 kB / 437.8 MB, free: 5.289 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001501/0.3312, allocations: 106.2 kB / 437.9 MB, free: 5.227 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0003629/0.3315, allocations: 228.8 kB / 438.1 MB, free: 5.141 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.899e-06/0.3316, allocations: 0 / 438.1 MB, free: 5.141 MB / 318.1 MB Notification: Performance of FrontEnd: time 2.434e-06/0.3316, allocations: 0.5625 kB / 438.1 MB, free: 5.141 MB / 318.1 MB Notification: Performance of Transformations before backend: time 7.704e-06/0.3316, allocations: 1 kB / 438.1 MB, free: 5.141 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 49 * Number of variables: 49 Notification: Performance of Generate backend data structure: time 0.000816/0.3324, allocations: 0.5019 MB / 438.6 MB, free: 4.672 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.506e-05/0.3325, allocations: 12.42 kB / 438.7 MB, free: 4.668 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 6.899e-05/0.3325, allocations: 59.64 kB / 438.7 MB, free: 4.613 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 5.743e-05/0.3326, allocations: 22.81 kB / 438.7 MB, free: 4.602 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001223/0.3327, allocations: 195.6 kB / 438.9 MB, free: 4.379 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.218e-05/0.3328, allocations: 14.16 kB / 438.9 MB, free: 4.375 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.651e-05/0.3328, allocations: 26.97 kB / 439 MB, free: 4.363 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003487/0.3332, allocations: 187.6 kB / 439.1 MB, free: 4.27 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.897e-05/0.3332, allocations: 0.5625 kB / 439.2 MB, free: 4.27 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.561e-05/0.3332, allocations: 7.656 kB / 439.2 MB, free: 4.266 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.234e-05/0.3332, allocations: 12.72 kB / 439.2 MB, free: 4.258 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002475/0.3335, allocations: 116.6 kB / 439.3 MB, free: 4.219 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001268/0.3348, allocations: 0.714 MB / 440 MB, free: 3.695 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004297/0.3352, allocations: 240.9 kB / 440.2 MB, free: 3.527 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.000243/0.3355, allocations: 116.6 kB / 440.3 MB, free: 3.48 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.075e-05/0.3355, allocations: 1.094 kB / 440.3 MB, free: 3.48 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003764/0.3359, allocations: 180.1 kB / 440.5 MB, free: 3.34 MB / 318.1 MB Notification: Performance of pre-optimization done (n=22): time 1.894e-06/0.3359, allocations: 1.125 kB / 440.5 MB, free: 3.34 MB / 318.1 MB Notification: Performance of matching and sorting (n=25): time 0.001339/0.3372, allocations: 0.7999 MB / 441.3 MB, free: 2.75 MB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.056e-05/0.3373, allocations: 136 kB / 441.5 MB, free: 2.594 MB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001179/0.3374, allocations: 134 kB / 441.6 MB, free: 2.48 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 2.324e-05/0.3375, allocations: 32.36 kB / 441.6 MB, free: 2.445 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 7.525e-05/0.3376, allocations: 140.1 kB / 441.8 MB, free: 2.32 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.71e-05/0.3376, allocations: 88.14 kB / 441.8 MB, free: 2.254 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.548e-05/0.3377, allocations: 55.17 kB / 441.9 MB, free: 2.219 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 7.663e-05/0.3378, allocations: 327.7 kB / 442.2 MB, free: 1.898 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001495/0.338, allocations: 63.19 kB / 442.3 MB, free: 1.871 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001777/0.3381, allocations: 131.9 kB / 442.4 MB, free: 1.77 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003149/0.3385, allocations: 266.3 kB / 442.7 MB, free: 1.555 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.224e-06/0.3385, allocations: 5 kB / 442.7 MB, free: 1.551 MB / 318.1 MB Notification: Performance of matching and sorting (n=39) (initialization): time 0.0004366/0.3389, allocations: 297.5 kB / 443 MB, free: 1.395 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 3.582e-05/0.339, allocations: 40.17 kB / 443 MB, free: 1.359 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.799e-06/0.339, allocations: 2.75 kB / 443 MB, free: 1.359 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.894e-05/0.339, allocations: 2.656 kB / 443 MB, free: 1.359 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002282/0.3392, allocations: 61.72 kB / 443.1 MB, free: 1.352 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.034e-05/0.3393, allocations: 3.625 kB / 443.1 MB, free: 1.352 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001025/0.3394, allocations: 12.92 kB / 443.1 MB, free: 1.344 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.027e-05/0.3394, allocations: 13.98 kB / 443.1 MB, free: 1.34 MB / 318.1 MB Warning: Assuming fixed start value for the following 1 variables: pulseCounter.w:DISCRETE(flow=false fixed = true ) "Sensed speed" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 9 * Number of states: 0 () * Number of discrete variables: 11 ($PRE.pulseCounter.w,pulseCounter.w,pulseCounter.count,$PRE.pulseCounter.count,pulseCounter.prev_phi,$PRE.pulseCounter.prev_phi,pulseCounter.next_phi,$PRE.pulseCounter.next_phi,$whenCondition3,$whenCondition1,$whenCondition2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (37): * Single equations (assignments): 36 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0001618/0.3396, allocations: 181.1 kB / 443.3 MB, free: 1.168 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.848e-05/0.3396, allocations: 20.64 kB / 443.3 MB, free: 1.156 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 4.093e-05/0.3396, allocations: 18.09 kB / 443.3 MB, free: 1.145 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.698e-06/0.3397, allocations: 5.016 kB / 443.3 MB, free: 1.141 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.472e-06/0.3397, allocations: 1.25 kB / 443.3 MB, free: 1.141 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.557e-06/0.3397, allocations: 0 / 443.3 MB, free: 1.141 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0007993/0.3405, allocations: 0.7055 MB / 444 MB, free: 0.6367 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.715e-06/0.3405, allocations: 1.594 kB / 444 MB, free: 0.6367 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001929/0.3407, allocations: 42.53 kB / 444.1 MB, free: 0.6328 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.148e-06/0.3407, allocations: 1.312 kB / 444.1 MB, free: 0.6328 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.168e-05/0.3407, allocations: 9.281 kB / 444.1 MB, free: 0.6289 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.607e-06/0.3407, allocations: 2.578 kB / 444.1 MB, free: 0.6289 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.058e-06/0.3407, allocations: 5.719 kB / 444.1 MB, free: 0.625 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005553/0.3413, allocations: 466 kB / 444.5 MB, free: 336 kB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 4.059e-05/0.3414, allocations: 89.84 kB / 444.6 MB, free: 232 kB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.947e-05/0.3414, allocations: 10.2 kB / 444.6 MB, free: 228 kB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001146/0.3415, allocations: 8.641 kB / 444.6 MB, free: 224 kB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.415e-05/0.3416, allocations: 15.98 kB / 444.7 MB, free: 220 kB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.582e-05/0.3416, allocations: 17.55 kB / 444.7 MB, free: 212 kB / 318.1 MB Notification: Performance of sorting global known variables: time 6.139e-05/0.3417, allocations: 102.3 kB / 444.8 MB, free: 128 kB / 318.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.3417, allocations: 0 / 444.8 MB, free: 128 kB / 318.1 MB Notification: Performance of remove unused functions: time 0.0003233/0.342, allocations: 50.75 kB / 444.8 MB, free: 124 kB / 318.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * Number of states: 4 (inertia2.flange_a.phi,inertia2.w,inertia1.flange_a.phi,inertia1.w) * Number of discrete variables: 7 ($whenCondition2,$whenCondition1,$whenCondition3,pulseCounter.w,pulseCounter.next_phi,pulseCounter.prev_phi,pulseCounter.count) * Number of discrete states: 7 (pulseCounter.w,$whenCondition3,pulseCounter.count,pulseCounter.prev_phi,pulseCounter.next_phi,$whenCondition2,$whenCondition1) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (19): * Single equations (assignments): 18 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.000881/0.3429, allocations: 1.009 MB / 445.8 MB, free: 15.29 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0004014/0.3433, allocations: 253.2 kB / 446.1 MB, free: 15.16 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 2.935e-06/0.3433, allocations: 3.938 kB / 446.1 MB, free: 15.15 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002209/0.3436, allocations: 196.9 kB / 446.3 MB, free: 15.02 MB / 334.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002706/0.3438, allocations: 20.34 kB / 446.3 MB, free: 15.01 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003092/0.3469, allocations: 2.407 MB / 448.7 MB, free: 13.09 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003906/0.3474, allocations: 0.7318 MB / 449.4 MB, free: 12.39 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 6.94e-05/0.3474, allocations: 16.83 kB / 449.5 MB, free: 12.39 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.565e-05/0.3475, allocations: 57.44 kB / 449.5 MB, free: 12.35 MB / 334.1 MB Notification: Performance of SimCode: time 6.22e-07/0.3475, allocations: 1.5 kB / 449.5 MB, free: 12.35 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02086/0.3684, allocations: 3.512 MB / 453 MB, free: 11.17 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.87/8.239, allocations: 10.02 kB / 453 MB, free: 11.16 MB / 334.1 MB (rm -f ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe ; mkfifo ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe ; head -c 1048576 < ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe >> ../files/ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.sim & python3 -m fmpy simulate --output-file ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter_res.csv --start-time 0 --stop-time 10 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.004 ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter.fmu > ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe 2>&1)