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.001569/0.001569, allocations: 108 kB / 15.6 MB, free: 132 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001857/0.001857, allocations: 198.5 kB / 16.54 MB, free: 6.672 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.61/1.61, allocations: 205.1 MB / 222.4 MB, free: 4.625 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo): time 0.04213/0.04213, allocations: 8.124 MB / 277.9 MB, free: 13.17 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.001452/0.001452, allocations: 68.52 kB / 337.3 MB, free: 26.43 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.09823/0.09969, allocations: 48.31 MB / 385.6 MB, free: 10.07 MB / 286.1 MB Notification: Performance of NFInst.instantiate(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter): time 0.003222/0.103, allocations: 1.974 MB / 387.6 MB, free: 8.078 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.001008/0.104, allocations: 0.6125 MB / 388.2 MB, free: 7.457 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.482e-05/0.1041, allocations: 4 kB / 388.2 MB, free: 7.453 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 8.281e-05/0.1042, allocations: 27.72 kB / 388.2 MB, free: 7.426 MB / 286.1 MB Notification: Performance of NFTyping.typeBindings: time 0.000149/0.1043, allocations: 43.56 kB / 388.3 MB, free: 7.383 MB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002315/0.1046, allocations: 63.86 kB / 388.3 MB, free: 7.32 MB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002507/0.1048, allocations: 227.1 kB / 388.5 MB, free: 7.098 MB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001973/0.105, allocations: 98.17 kB / 388.6 MB, free: 7.004 MB / 286.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001456/0.1052, allocations: 87.77 kB / 388.7 MB, free: 6.918 MB / 286.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001221/0.1053, allocations: 91.61 kB / 388.8 MB, free: 6.828 MB / 286.1 MB Notification: Performance of NFPackage.collectConstants: time 3.804e-05/0.1054, allocations: 27.94 kB / 388.8 MB, free: 6.801 MB / 286.1 MB Notification: Performance of NFFlatten.collectFunctions: time 3.56e-05/0.1054, allocations: 20 kB / 388.9 MB, free: 6.781 MB / 286.1 MB Notification: Performance of NFScalarize.scalarize: time 4.518e-05/0.1055, allocations: 43.84 kB / 388.9 MB, free: 6.738 MB / 286.1 MB Notification: Performance of NFVerifyModel.verify: time 9.885e-05/0.1056, allocations: 103.6 kB / 389 MB, free: 6.637 MB / 286.1 MB Notification: Performance of NFConvertDAE.convert: time 0.000222/0.1058, allocations: 223.5 kB / 389.2 MB, free: 6.418 MB / 286.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.45e-06/0.1058, allocations: 4 kB / 389.2 MB, free: 6.414 MB / 286.1 MB Notification: Performance of FrontEnd: time 1.663e-06/0.1058, allocations: 0 / 389.2 MB, free: 6.414 MB / 286.1 MB Notification: Performance of Transformations before backend: time 6.021e-06/0.1058, allocations: 0 / 389.2 MB, free: 6.414 MB / 286.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.0007237/0.1066, allocations: 0.5009 MB / 389.7 MB, free: 5.855 MB / 286.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.945e-05/0.1066, allocations: 11.89 kB / 389.7 MB, free: 5.844 MB / 286.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.034e-05/0.1067, allocations: 58.73 kB / 389.8 MB, free: 5.777 MB / 286.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.799e-05/0.1067, allocations: 20.75 kB / 389.8 MB, free: 5.758 MB / 286.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001359/0.1069, allocations: 188 kB / 390 MB, free: 5.535 MB / 286.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.906e-05/0.1069, allocations: 20.69 kB / 390 MB, free: 5.516 MB / 286.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.152e-05/0.1069, allocations: 24.38 kB / 390.1 MB, free: 5.492 MB / 286.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002952/0.1072, allocations: 186 kB / 390.2 MB, free: 5.301 MB / 286.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.459e-05/0.1073, allocations: 4 kB / 390.2 MB, free: 5.297 MB / 286.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.5e-05/0.1073, allocations: 4 kB / 390.2 MB, free: 5.293 MB / 286.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.606e-06/0.1073, allocations: 4 kB / 390.2 MB, free: 5.289 MB / 286.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000199/0.1075, allocations: 117.1 kB / 390.4 MB, free: 5.176 MB / 286.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00106/0.1086, allocations: 0.7279 MB / 391.1 MB, free: 4.387 MB / 286.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003483/0.1089, allocations: 243.6 kB / 391.3 MB, free: 4.121 MB / 286.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002209/0.1092, allocations: 112.8 kB / 391.4 MB, free: 4.008 MB / 286.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.606e-05/0.1092, allocations: 0 / 391.4 MB, free: 4.008 MB / 286.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003092/0.1095, allocations: 182.7 kB / 391.6 MB, free: 3.805 MB / 286.1 MB Notification: Performance of pre-optimization done (n=22): time 1.543e-06/0.1095, allocations: 0 / 391.6 MB, free: 3.805 MB / 286.1 MB Notification: Performance of matching and sorting (n=25): time 0.001256/0.1108, allocations: 0.7986 MB / 392.4 MB, free: 2.926 MB / 286.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.486e-05/0.1109, allocations: 140.5 kB / 392.5 MB, free: 2.758 MB / 286.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001052/0.111, allocations: 137.6 kB / 392.7 MB, free: 2.617 MB / 286.1 MB Notification: Performance of collectPreVariables (initialization): time 3.186e-05/0.111, allocations: 33.7 kB / 392.7 MB, free: 2.578 MB / 286.1 MB Notification: Performance of collectInitialEqns (initialization): time 7.327e-05/0.1111, allocations: 140.4 kB / 392.9 MB, free: 2.438 MB / 286.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.71e-05/0.1112, allocations: 82.83 kB / 392.9 MB, free: 2.355 MB / 286.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.606e-05/0.1113, allocations: 57.7 kB / 393 MB, free: 2.293 MB / 286.1 MB Notification: Performance of setup shared object (initialization): time 0.0001242/0.1114, allocations: 322.8 kB / 393.3 MB, free: 1.969 MB / 286.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001047/0.1115, allocations: 64.3 kB / 393.4 MB, free: 1.906 MB / 286.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001467/0.1117, allocations: 132.6 kB / 393.5 MB, free: 1.75 MB / 286.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002926/0.112, allocations: 255.5 kB / 393.7 MB, free: 1.461 MB / 286.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.543e-06/0.112, allocations: 7.938 kB / 393.8 MB, free: 1.453 MB / 286.1 MB Notification: Performance of matching and sorting (n=39) (initialization): time 0.0004001/0.1124, allocations: 292.9 kB / 394 MB, free: 1.156 MB / 286.1 MB Notification: Performance of prepare postOptimizeDAE: time 4.556e-05/0.1125, allocations: 40.55 kB / 394.1 MB, free: 1.113 MB / 286.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.316e-06/0.1125, allocations: 8 kB / 394.1 MB, free: 1.105 MB / 286.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.984e-05/0.1125, allocations: 7.938 kB / 394.1 MB, free: 1.098 MB / 286.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002194/0.1127, allocations: 59.91 kB / 394.2 MB, free: 1.039 MB / 286.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.231e-05/0.1127, allocations: 8.062 kB / 394.2 MB, free: 1.031 MB / 286.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 9.569e-05/0.1128, allocations: 8 kB / 394.2 MB, free: 1.023 MB / 286.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.899e-05/0.1129, allocations: 12 kB / 394.2 MB, free: 1.012 MB / 286.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.0002158/0.1131, allocations: 179.5 kB / 394.4 MB, free: 0.8203 MB / 286.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.224e-05/0.1131, allocations: 23.75 kB / 394.4 MB, free: 0.7969 MB / 286.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 4.842e-05/0.1132, allocations: 24.77 kB / 394.4 MB, free: 0.7695 MB / 286.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.317e-06/0.1132, allocations: 4 kB / 394.4 MB, free: 0.7656 MB / 286.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.771e-06/0.1132, allocations: 0 / 394.4 MB, free: 0.7656 MB / 286.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.797e-06/0.1132, allocations: 0 / 394.4 MB, free: 0.7656 MB / 286.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0008853/0.1141, allocations: 0.7006 MB / 395.1 MB, free: 15.99 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.923e-06/0.1141, allocations: 0 / 395.1 MB, free: 15.99 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001917/0.1143, allocations: 43.88 kB / 395.2 MB, free: 15.95 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.679e-06/0.1143, allocations: 4 kB / 395.2 MB, free: 15.95 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.295e-05/0.1144, allocations: 11.98 kB / 395.2 MB, free: 15.94 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.813e-06/0.1144, allocations: 0 / 395.2 MB, free: 15.94 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.322e-06/0.1144, allocations: 0 / 395.2 MB, free: 15.94 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005409/0.1149, allocations: 470.7 kB / 395.6 MB, free: 15.45 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 4.502e-05/0.115, allocations: 88.92 kB / 395.7 MB, free: 15.34 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.367e-05/0.115, allocations: 12 kB / 395.7 MB, free: 15.33 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001146/0.1151, allocations: 4 kB / 395.7 MB, free: 15.33 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.594e-05/0.1152, allocations: 19.95 kB / 395.7 MB, free: 15.31 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.547e-05/0.1152, allocations: 19.94 kB / 395.8 MB, free: 15.29 MB / 302.1 MB Notification: Performance of sorting global known variables: time 7.988e-05/0.1153, allocations: 95.27 kB / 395.9 MB, free: 15.2 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.5e-07/0.1153, allocations: 4 kB / 395.9 MB, free: 15.19 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0003081/0.1157, allocations: 56 kB / 395.9 MB, free: 15.14 MB / 302.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.0008467/0.1165, allocations: 0.9932 MB / 396.9 MB, free: 14.1 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.0003944/0.1169, allocations: 264.8 kB / 397.2 MB, free: 13.83 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 2.505e-06/0.1169, allocations: 3.938 kB / 397.2 MB, free: 13.83 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.000189/0.1171, allocations: 195.3 kB / 397.4 MB, free: 13.62 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002708/0.1174, allocations: 27.81 kB / 397.4 MB, free: 13.6 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002533/0.1199, allocations: 2.38 MB / 399.8 MB, free: 11.07 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002941/0.1203, allocations: 0.728 MB / 400.5 MB, free: 10.32 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 5.652e-05/0.1203, allocations: 21.53 kB / 400.5 MB, free: 10.3 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 8.703e-05/0.1204, allocations: 63.17 kB / 400.6 MB, free: 10.24 MB / 302.1 MB Notification: Performance of SimCode: time 5.61e-07/0.1204, allocations: 0 / 400.6 MB, free: 10.24 MB / 302.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02157/0.142, allocations: 3.418 MB / 404 MB, free: 6.891 MB / 302.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.544/7.686, allocations: 24.06 kB / 404 MB, free: 6.867 MB / 302.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)