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.0048/0.0048, allocations: 102.3 kB / 15.73 MB, free: 6.031 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.001144/0.001144, allocations: 197 kB / 16.67 MB, free: 5.969 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.363/1.363, allocations: 205.1 MB / 222.6 MB, free: 4.527 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo): time 0.04188/0.04188, allocations: 8.109 MB / 278 MB, free: 13.09 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.001661/0.001661, allocations: 73.09 kB / 386.2 MB, free: 9.543 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2757/0.2773, 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.002739/0.2801, allocations: 1.984 MB / 436.5 MB, free: 6.094 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.0009126/0.281, allocations: 0.6102 MB / 437.1 MB, free: 5.656 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 8.361e-05/0.2811, allocations: 3.781 kB / 437.1 MB, free: 5.656 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 7.124e-05/0.2812, allocations: 24.94 kB / 437.1 MB, free: 5.641 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001422/0.2814, allocations: 49.16 kB / 437.2 MB, free: 5.605 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002478/0.2816, allocations: 64.55 kB / 437.2 MB, free: 5.566 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002931/0.2819, allocations: 223.2 kB / 437.5 MB, free: 5.457 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002209/0.2822, allocations: 99.92 kB / 437.5 MB, free: 5.406 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.000165/0.2823, allocations: 90.14 kB / 437.6 MB, free: 5.363 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001456/0.2825, allocations: 90.81 kB / 437.7 MB, free: 5.316 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 4.184e-05/0.2825, allocations: 21.56 kB / 437.7 MB, free: 5.316 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 4.329e-05/0.2826, allocations: 21.53 kB / 437.8 MB, free: 5.316 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 4.246e-05/0.2826, allocations: 40.72 kB / 437.8 MB, free: 5.289 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001051/0.2827, allocations: 106.5 kB / 437.9 MB, free: 5.227 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.000305/0.283, allocations: 231.7 kB / 438.1 MB, free: 5.137 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.626e-06/0.2831, allocations: 0 / 438.1 MB, free: 5.137 MB / 318.1 MB Notification: Performance of FrontEnd: time 2.735e-06/0.2831, allocations: 0 / 438.1 MB, free: 5.137 MB / 318.1 MB Notification: Performance of Transformations before backend: time 6.722e-06/0.2831, allocations: 0 / 438.1 MB, free: 5.137 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.0006859/0.2838, allocations: 0.4982 MB / 438.6 MB, free: 4.672 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.368e-05/0.2838, allocations: 14.33 kB / 438.6 MB, free: 4.668 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.047e-05/0.2839, allocations: 59.06 kB / 438.7 MB, free: 4.613 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 5.081e-05/0.2839, allocations: 26.97 kB / 438.7 MB, free: 4.598 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001083/0.284, allocations: 183.2 kB / 438.9 MB, free: 4.387 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.298e-05/0.2841, allocations: 14.38 kB / 438.9 MB, free: 4.383 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.662e-05/0.2841, allocations: 28.06 kB / 439 MB, free: 4.371 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003316/0.2845, allocations: 190.8 kB / 439.1 MB, free: 4.273 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.01e-05/0.2845, allocations: 4 kB / 439.1 MB, free: 4.27 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.254e-05/0.2845, allocations: 7.219 kB / 439.2 MB, free: 4.266 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.989e-06/0.2845, allocations: 5.5 kB / 439.2 MB, free: 4.266 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002334/0.2848, allocations: 117 kB / 439.3 MB, free: 4.227 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00109/0.2859, allocations: 0.716 MB / 440 MB, free: 3.699 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003667/0.2863, allocations: 246.7 kB / 440.2 MB, free: 3.527 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002284/0.2865, allocations: 111.2 kB / 440.3 MB, free: 3.484 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.507e-05/0.2865, allocations: 2.406 kB / 440.3 MB, free: 3.484 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002411/0.2868, allocations: 185.9 kB / 440.5 MB, free: 3.34 MB / 318.1 MB Notification: Performance of pre-optimization done (n=22): time 1.473e-06/0.2868, allocations: 0 / 440.5 MB, free: 3.34 MB / 318.1 MB Notification: Performance of matching and sorting (n=25): time 0.001083/0.2879, allocations: 0.7946 MB / 441.3 MB, free: 2.754 MB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.65e-05/0.2879, allocations: 139.6 kB / 441.5 MB, free: 2.594 MB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 9.94e-05/0.288, allocations: 133.5 kB / 441.6 MB, free: 2.48 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 1.767e-05/0.2881, allocations: 32.45 kB / 441.6 MB, free: 2.445 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 6.223e-05/0.2881, allocations: 135.8 kB / 441.7 MB, free: 2.324 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.255e-05/0.2882, allocations: 77.58 kB / 441.8 MB, free: 2.266 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 9.072e-05/0.2883, allocations: 59.98 kB / 441.9 MB, free: 2.227 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 6.029e-05/0.2884, allocations: 330.5 kB / 442.2 MB, free: 1.902 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001264/0.2885, allocations: 60.77 kB / 442.3 MB, free: 1.879 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001651/0.2887, allocations: 131.9 kB / 442.4 MB, free: 1.777 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003433/0.289, allocations: 268.2 kB / 442.7 MB, free: 1.562 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.635e-06/0.289, allocations: 0.75 kB / 442.7 MB, free: 1.562 MB / 318.1 MB Notification: Performance of matching and sorting (n=39) (initialization): time 0.0004593/0.2895, allocations: 295.4 kB / 442.9 MB, free: 1.406 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 4.212e-05/0.2895, allocations: 38.53 kB / 443 MB, free: 1.371 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.428e-06/0.2896, allocations: 2.156 kB / 443 MB, free: 1.371 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.567e-05/0.2896, allocations: 4.391 kB / 443 MB, free: 1.371 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002454/0.2898, allocations: 61.61 kB / 443 MB, free: 1.363 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.105e-05/0.2899, allocations: 8.406 kB / 443.1 MB, free: 1.359 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 9.512e-05/0.29, allocations: 10.53 kB / 443.1 MB, free: 1.355 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.904e-05/0.29, allocations: 8.781 kB / 443.1 MB, free: 1.355 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.0001639/0.2902, allocations: 186.7 kB / 443.3 MB, free: 1.18 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.742e-05/0.2902, allocations: 20.09 kB / 443.3 MB, free: 1.168 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 3.759e-05/0.2902, allocations: 15.2 kB / 443.3 MB, free: 1.156 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.266e-06/0.2902, allocations: 3.5 kB / 443.3 MB, free: 1.156 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.869e-06/0.2903, allocations: 0 / 443.3 MB, free: 1.156 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.769e-06/0.2903, allocations: 4.75 kB / 443.3 MB, free: 1.152 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0009706/0.2912, allocations: 0.6991 MB / 444 MB, free: 0.6562 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.405e-06/0.2913, allocations: 1.375 kB / 444 MB, free: 0.6562 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001965/0.2915, allocations: 43.64 kB / 444 MB, free: 0.6523 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.517e-06/0.2915, allocations: 1.375 kB / 444 MB, free: 0.6523 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.127e-05/0.2915, allocations: 8.188 kB / 444.1 MB, free: 0.6484 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.136e-06/0.2915, allocations: 10.75 kB / 444.1 MB, free: 0.6406 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.493e-06/0.2915, allocations: 0 / 444.1 MB, free: 0.6406 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0004962/0.292, allocations: 469.8 kB / 444.5 MB, free: 348 kB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 3.119e-05/0.2921, allocations: 87.05 kB / 444.6 MB, free: 248 kB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.42e-05/0.2921, allocations: 9.156 kB / 444.6 MB, free: 244 kB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001101/0.2922, allocations: 17.14 kB / 444.6 MB, free: 232 kB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.531e-05/0.2923, allocations: 16.39 kB / 444.6 MB, free: 228 kB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.666e-05/0.2923, allocations: 12.27 kB / 444.7 MB, free: 224 kB / 318.1 MB Notification: Performance of sorting global known variables: time 5.011e-05/0.2924, allocations: 104.1 kB / 444.8 MB, free: 140 kB / 318.1 MB Notification: Performance of sort global known variables: time 1.3e-07/0.2924, allocations: 0 / 444.8 MB, free: 140 kB / 318.1 MB Notification: Performance of remove unused functions: time 0.0003164/0.2927, allocations: 49.62 kB / 444.8 MB, free: 136 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.000943/0.2936, allocations: 0.9997 MB / 445.8 MB, free: 15.3 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0003897/0.294, allocations: 257 kB / 446.1 MB, free: 15.17 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 2.084e-06/0.2941, allocations: 0 / 446.1 MB, free: 15.17 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002004/0.2943, allocations: 198.5 kB / 446.3 MB, free: 15.04 MB / 334.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002548/0.2945, allocations: 27.47 kB / 446.3 MB, free: 15.02 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002795/0.2973, allocations: 2.389 MB / 448.7 MB, free: 13.11 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003561/0.2977, allocations: 0.7328 MB / 449.4 MB, free: 12.41 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 6.138e-05/0.2978, allocations: 14.97 kB / 449.4 MB, free: 12.41 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001269/0.2979, allocations: 58.34 kB / 449.5 MB, free: 12.38 MB / 334.1 MB Notification: Performance of SimCode: time 3.31e-07/0.2979, allocations: 0 / 449.5 MB, free: 12.38 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02233/0.3202, allocations: 3.587 MB / 453.1 MB, free: 11.14 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.48/7.801, allocations: 16.72 kB / 453.1 MB, free: 11.14 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 & /home/hudson/saved_omc/OMSimulator/install/bin/OMSimulator --tempDir=temp_ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter_fmu --startTime=0 --stopTime=10 --timeout=50 --tolerance=1e-06 ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter.fmu > ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe 2>&1)