Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.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 4.0.0+maint.om/package.mo", uses=false) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+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(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",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.00111/0.00111, allocations: 110.6 kB / 16.62 MB, free: 6.961 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.001063/0.001063, allocations: 190 kB / 17.54 MB, free: 6.066 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.371/1.371, allocations: 222.9 MB / 241.2 MB, free: 15.45 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0009899/0.00099, allocations: 46.41 kB / 300.2 MB, free: 6.125 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08643/0.08744, allocations: 49.45 MB / 349.7 MB, free: 4.664 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.006406/0.09388, allocations: 5.778 MB / 355.5 MB, free: 14.85 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.003886/0.0978, allocations: 2.529 MB / 358 MB, free: 12.31 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0008709/0.09871, allocations: 27.94 kB / 358 MB, free: 12.28 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001841/0.1006, allocations: 0.716 MB / 358.7 MB, free: 11.56 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001172/0.1018, allocations: 457.8 kB / 359.2 MB, free: 11.11 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001109/0.1029, allocations: 473.6 kB / 359.6 MB, free: 10.66 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.002269/0.1052, allocations: 1.59 MB / 361.2 MB, free: 9.062 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0009113/0.1061, allocations: 0.6 MB / 361.8 MB, free: 8.438 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.000946/0.1071, allocations: 0.6034 MB / 362.4 MB, free: 7.832 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0009275/0.108, allocations: 0.751 MB / 363.2 MB, free: 7.078 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001768/0.1082, allocations: 132 kB / 363.3 MB, free: 6.949 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003623/0.1086, allocations: 211.9 kB / 363.5 MB, free: 6.742 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0004464/0.109, allocations: 0.6388 MB / 364.2 MB, free: 6.102 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0007309/0.1098, allocations: 0.9244 MB / 365.1 MB, free: 5.172 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002165/0.112, allocations: 2.445 MB / 367.5 MB, free: 2.719 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.481e-06/0.112, allocations: 8 kB / 367.5 MB, free: 2.711 MB / 302.1 MB Notification: Performance of FrontEnd: time 1.833e-06/0.112, allocations: 0 / 367.5 MB, free: 2.711 MB / 302.1 MB Notification: Performance of Transformations before backend: time 2.55e-05/0.112, allocations: 0 / 367.5 MB, free: 2.711 MB / 302.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 215 * Number of variables: 215 Notification: Performance of Generate backend data structure: time 0.004327/0.1164, allocations: 2.563 MB / 370.1 MB, free: 88 kB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.813e-05/0.1164, allocations: 8.031 kB / 370.1 MB, free: 80 kB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.1427/0.2591, allocations: 134.3 kB / 370.2 MB, free: 20.08 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0004956/0.2597, allocations: 222 kB / 370.5 MB, free: 20.08 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.00228/0.262, allocations: 1.52 MB / 372 MB, free: 19.65 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.000532/0.2625, allocations: 176.4 kB / 372.2 MB, free: 19.62 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001233/0.2626, allocations: 87.05 kB / 372.2 MB, free: 19.61 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001972/0.2646, allocations: 1.129 MB / 373.4 MB, free: 19.37 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.114e-05/0.2647, allocations: 0 / 373.4 MB, free: 19.37 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.373e-05/0.2647, allocations: 40.45 kB / 373.4 MB, free: 19.37 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.679e-05/0.2648, allocations: 20.81 kB / 373.4 MB, free: 19.37 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001401/0.2662, allocations: 0.7363 MB / 374.2 MB, free: 19.37 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007235/0.2734, allocations: 4.653 MB / 378.8 MB, free: 17.39 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001639/0.2751, allocations: 0.9948 MB / 379.8 MB, free: 16.69 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0009793/0.2761, allocations: 402.4 kB / 380.2 MB, free: 16.57 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 6.673e-05/0.2762, allocations: 21.31 kB / 380.2 MB, free: 16.56 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.924e-05/0.2762, allocations: 36.75 kB / 380.3 MB, free: 16.52 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 3.526e-06/0.2762, allocations: 0 / 380.3 MB, free: 16.52 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002516/0.2788, allocations: 0.8807 MB / 381.1 MB, free: 16.2 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001288/0.2789, allocations: 422.4 kB / 381.6 MB, free: 15.7 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.004491/0.2834, allocations: 2.747 MB / 384.3 MB, free: 14.79 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001144/0.2835, allocations: 37.89 kB / 384.3 MB, free: 14.75 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0006257/0.2842, allocations: 0.8746 MB / 385.2 MB, free: 14.07 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001604/0.2843, allocations: 158.9 kB / 385.4 MB, free: 13.96 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002487/0.2846, allocations: 130.7 kB / 385.5 MB, free: 13.89 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 7.986e-05/0.2847, allocations: 327.8 kB / 385.8 MB, free: 13.57 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006782/0.2854, allocations: 282.1 kB / 386.1 MB, free: 13.49 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007655/0.2862, allocations: 0.5506 MB / 386.6 MB, free: 13.07 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001128/0.2873, allocations: 0.6586 MB / 387.3 MB, free: 12.7 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.913e-06/0.2873, allocations: 2.25 kB / 387.3 MB, free: 12.7 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001963/0.2893, allocations: 0.8973 MB / 388.2 MB, free: 12.37 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.28e-05/0.2893, allocations: 10.88 kB / 388.2 MB, free: 12.37 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.294e-05/0.2893, allocations: 7.188 kB / 388.2 MB, free: 12.37 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.559e-05/0.2894, allocations: 9.312 kB / 388.2 MB, free: 12.37 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006217/0.29, allocations: 171.1 kB / 388.4 MB, free: 12.36 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.332e-05/0.29, allocations: 14.91 kB / 388.4 MB, free: 12.36 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001171/0.2912, allocations: 164.9 kB / 388.6 MB, free: 12.31 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.427e-05/0.2913, allocations: 30.09 kB / 388.6 MB, free: 12.31 MB / 302.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 25 * Number of states: 0 () * Number of discrete variables: 6 (pulseSeries.on2,pulseSeries.on1,energy2.local_reset,battery2.limIntegrator.local_reset,energy1.local_reset,battery1.limIntegrator.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (76): * Single equations (assignments): 76 * Array equations: 0 * Algorithm blocks: 0 * 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.0006894/0.292, allocations: 0.56 MB / 389.2 MB, free: 12.04 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002799/0.2922, allocations: 179.7 kB / 389.3 MB, free: 11.95 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001432/0.2937, allocations: 0.7367 MB / 390.1 MB, free: 11.64 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.3e-06/0.2937, allocations: 6.594 kB / 390.1 MB, free: 11.64 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.959e-06/0.2937, allocations: 3.938 kB / 390.1 MB, free: 11.64 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.071e-06/0.2937, allocations: 7.922 kB / 390.1 MB, free: 11.63 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00317/0.2969, allocations: 2.165 MB / 392.3 MB, free: 10.21 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.408e-06/0.2969, allocations: 6.062 kB / 392.3 MB, free: 10.21 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005367/0.2975, allocations: 122.4 kB / 392.4 MB, free: 10.18 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 5.911e-06/0.2975, allocations: 2.75 kB / 392.4 MB, free: 10.18 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.823e-05/0.2975, allocations: 12.11 kB / 392.4 MB, free: 10.17 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.817e-06/0.2975, allocations: 2.75 kB / 392.4 MB, free: 10.17 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.194e-06/0.2975, allocations: 1.375 kB / 392.4 MB, free: 10.17 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001972/0.2995, allocations: 1.117 MB / 393.5 MB, free: 9.52 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005454/0.3001, allocations: 411.5 kB / 393.9 MB, free: 9.223 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001889/0.3003, allocations: 12 kB / 393.9 MB, free: 9.215 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001007/0.3013, allocations: 159.9 kB / 394.1 MB, free: 9.148 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002652/0.3016, allocations: 149.6 kB / 394.2 MB, free: 9.066 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.834e-05/0.3016, allocations: 23.58 kB / 394.3 MB, free: 9.059 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.002008/0.3036, allocations: 1.949 MB / 396.2 MB, free: 7.891 MB / 302.1 MB Notification: Performance of sort global known variables: time 6.51e-07/0.3036, allocations: 0 / 396.2 MB, free: 7.891 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0007439/0.3044, allocations: 315.6 kB / 396.5 MB, free: 7.586 MB / 302.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 4 * Number of states: 6 (battery1.limIntegrator.y,energy1.y,battery2.limIntegrator.y,battery2.capacitor[1].v,battery2.capacitor[2].v,energy2.y) * Number of discrete variables: 2 (pulseSeries.on1,pulseSeries.on2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (44): * Single equations (assignments): 44 * Array equations: 0 * Algorithm blocks: 0 * 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.002862/0.3073, allocations: 2.021 MB / 398.5 MB, free: 5.758 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001394/0.3087, allocations: 0.6832 MB / 399.2 MB, free: 5.082 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 3.637e-06/0.3087, allocations: 0 / 399.2 MB, free: 5.082 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006591/0.3093, allocations: 376.7 kB / 399.6 MB, free: 4.715 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001366/0.3107, allocations: 315.5 kB / 399.9 MB, free: 4.406 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02952/0.3403, allocations: 20.22 MB / 420.1 MB, free: 14.88 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001113/0.3414, allocations: 1.433 MB / 421.6 MB, free: 13.41 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 0.0009309/0.3424, allocations: 294.8 kB / 421.8 MB, free: 13.12 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0009012/0.3433, allocations: 0.7062 MB / 422.5 MB, free: 12.41 MB / 334.1 MB Notification: Performance of SimCode: time 7.91e-07/0.3433, allocations: 0 / 422.5 MB, free: 12.41 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.05959/0.4029, allocations: 37.13 MB / 459.7 MB, free: 7.672 MB / 366.1 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0002/0.4031, allocations: 255.7 kB / 459.9 MB, free: 7.414 MB / 366.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 3.031/3.434, allocations: 3.938 kB / 459.9 MB, free: 7.41 MB / 366.1 MB (rm -f Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; mkfifo Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe >> ../files/Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.sim & /home/hudson/saved_omc/OMSimulator/install/bin/OMSimulator -r=Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.mat --tempDir=temp_Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge_fmu --startTime=0 --stopTime=3600 --timeout=50 --tolerance=1e-06 Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge.fmu > Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1)