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.001611/0.001611, allocations: 108.2 kB / 16.92 MB, free: 6.145 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.001923/0.001923, allocations: 187.4 kB / 17.85 MB, free: 5.285 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.383/1.383, allocations: 222.9 MB / 241.5 MB, free: 15.2 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001783/0.001783, allocations: 43.62 kB / 300.7 MB, free: 5.754 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.135/0.1368, allocations: 49.45 MB / 350.2 MB, free: 4.301 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.008503/0.1454, allocations: 5.802 MB / 356 MB, free: 14.46 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.005159/0.1506, allocations: 2.567 MB / 358.5 MB, free: 11.88 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001024/0.1516, allocations: 27.88 kB / 358.6 MB, free: 11.86 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001947/0.1536, allocations: 0.7661 MB / 359.3 MB, free: 11.09 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001791/0.1554, allocations: 0.5049 MB / 359.8 MB, free: 10.58 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001812/0.1573, allocations: 0.5067 MB / 360.3 MB, free: 10.08 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.003188/0.1605, allocations: 1.578 MB / 361.9 MB, free: 8.496 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001235/0.1617, allocations: 0.6 MB / 362.5 MB, free: 7.871 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001041/0.1628, allocations: 0.6073 MB / 363.1 MB, free: 7.262 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001405/0.1642, allocations: 0.7471 MB / 363.9 MB, free: 6.512 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0005846/0.1648, allocations: 132 kB / 364 MB, free: 6.383 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0008985/0.1657, allocations: 204 kB / 364.2 MB, free: 6.184 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0007366/0.1665, allocations: 0.6426 MB / 364.8 MB, free: 5.539 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0009852/0.1675, allocations: 0.9127 MB / 365.8 MB, free: 4.621 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.00234/0.1698, allocations: 2.453 MB / 368.2 MB, free: 2.16 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.27e-06/0.1698, allocations: 0 / 368.2 MB, free: 2.16 MB / 302.1 MB Notification: Performance of FrontEnd: time 2.104e-06/0.1698, allocations: 0 / 368.2 MB, free: 2.16 MB / 302.1 MB Notification: Performance of Transformations before backend: time 3.967e-05/0.1699, allocations: 0 / 368.2 MB, free: 2.16 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.1975/0.3674, allocations: 2.561 MB / 370.8 MB, free: 24.21 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.839e-05/0.3674, allocations: 10.41 kB / 370.8 MB, free: 24.21 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.00029/0.3677, allocations: 139.6 kB / 370.9 MB, free: 24.17 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.000626/0.3684, allocations: 223 kB / 371.1 MB, free: 24.06 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.003278/0.3716, allocations: 1.519 MB / 372.7 MB, free: 23.49 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0005185/0.3722, allocations: 179.3 kB / 372.8 MB, free: 23.43 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001648/0.3724, allocations: 79.59 kB / 372.9 MB, free: 23.4 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002105/0.3745, allocations: 1.131 MB / 374 MB, free: 22.84 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.035e-05/0.3745, allocations: 0 / 374 MB, free: 22.84 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.361e-05/0.3746, allocations: 40.08 kB / 374.1 MB, free: 22.81 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.952e-05/0.3746, allocations: 21.25 kB / 374.1 MB, free: 22.81 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001497/0.3761, allocations: 0.7393 MB / 374.8 MB, free: 22.57 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007967/0.3841, allocations: 4.658 MB / 379.5 MB, free: 19.98 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001582/0.3857, allocations: 0.9903 MB / 380.5 MB, free: 19.28 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001003/0.3867, allocations: 402.3 kB / 380.9 MB, free: 19.16 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 6.921e-05/0.3868, allocations: 7.594 kB / 380.9 MB, free: 19.16 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 5.186e-05/0.3869, allocations: 46.84 kB / 380.9 MB, free: 19.11 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 3.456e-06/0.3869, allocations: 1.781 kB / 380.9 MB, free: 19.11 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002964/0.3899, allocations: 0.8815 MB / 381.8 MB, free: 18.79 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001551/0.39, allocations: 423.5 kB / 382.2 MB, free: 18.29 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.004883/0.3949, allocations: 2.745 MB / 385 MB, free: 17.38 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 8.925e-05/0.395, allocations: 39.39 kB / 385 MB, free: 17.34 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0005708/0.3956, allocations: 0.875 MB / 385.9 MB, free: 16.67 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001066/0.3957, allocations: 156.9 kB / 386 MB, free: 16.55 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.000189/0.3959, allocations: 125.7 kB / 386.2 MB, free: 16.48 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 6.507e-05/0.396, allocations: 340 kB / 386.5 MB, free: 16.16 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006036/0.3966, allocations: 279.4 kB / 386.8 MB, free: 16.07 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007534/0.3974, allocations: 0.5531 MB / 387.3 MB, free: 15.57 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001208/0.3986, allocations: 0.6516 MB / 388 MB, free: 15.11 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.041e-06/0.3986, allocations: 6.625 kB / 388 MB, free: 15.11 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.002153/0.4008, allocations: 0.8943 MB / 388.9 MB, free: 14.65 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.328e-05/0.4008, allocations: 7.906 kB / 388.9 MB, free: 14.65 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.181e-05/0.4008, allocations: 7.875 kB / 388.9 MB, free: 14.65 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.386e-05/0.4009, allocations: 9.656 kB / 388.9 MB, free: 14.65 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005893/0.4015, allocations: 175 kB / 389.1 MB, free: 14.6 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.246e-05/0.4015, allocations: 11.84 kB / 389.1 MB, free: 14.6 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001144/0.4026, allocations: 170.1 kB / 389.2 MB, free: 14.51 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.994e-05/0.4027, allocations: 35.45 kB / 389.3 MB, free: 14.5 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.0007188/0.4034, allocations: 0.5516 MB / 389.8 MB, free: 14.17 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002646/0.4037, allocations: 178.8 kB / 390 MB, free: 14.08 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001507/0.4052, allocations: 0.7431 MB / 390.7 MB, free: 13.68 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.466e-06/0.4052, allocations: 7.75 kB / 390.8 MB, free: 13.68 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.011e-06/0.4052, allocations: 3.984 kB / 390.8 MB, free: 13.68 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.841e-06/0.4052, allocations: 0 / 390.8 MB, free: 13.68 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003158/0.4084, allocations: 2.171 MB / 392.9 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.551e-06/0.4084, allocations: 5.281 kB / 392.9 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005343/0.409, allocations: 121.4 kB / 393.1 MB, free: 12.2 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 5.971e-06/0.409, allocations: 3.625 kB / 393.1 MB, free: 12.2 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.539e-05/0.409, allocations: 11.61 kB / 393.1 MB, free: 12.2 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.839e-06/0.409, allocations: 3.625 kB / 393.1 MB, free: 12.2 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.894e-06/0.409, allocations: 0 / 393.1 MB, free: 12.2 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001811/0.4109, allocations: 1.111 MB / 394.2 MB, free: 11.55 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005422/0.4114, allocations: 416.6 kB / 394.6 MB, free: 11.25 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002194/0.4116, allocations: 14.77 kB / 394.6 MB, free: 11.24 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.00131/0.413, allocations: 153.8 kB / 394.8 MB, free: 11.16 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002828/0.4133, allocations: 151.8 kB / 394.9 MB, free: 11.01 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.059e-05/0.4133, allocations: 24.86 kB / 394.9 MB, free: 10.98 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.002138/0.4155, allocations: 1.943 MB / 396.9 MB, free: 9.02 MB / 302.1 MB Notification: Performance of sort global known variables: time 3.61e-07/0.4155, allocations: 0 / 396.9 MB, free: 9.02 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0009138/0.4164, allocations: 315.5 kB / 397.2 MB, free: 8.715 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.002914/0.4193, allocations: 2.029 MB / 399.2 MB, free: 6.867 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001489/0.4208, allocations: 0.6793 MB / 399.9 MB, free: 6.195 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 5.43e-06/0.4208, allocations: 4 kB / 399.9 MB, free: 6.191 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.000627/0.4215, allocations: 372.7 kB / 400.3 MB, free: 5.828 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001355/0.4228, allocations: 322.2 kB / 400.6 MB, free: 5.516 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0238/0.4466, allocations: 19.79 MB / 420.4 MB, free: 424 kB / 318.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0009813/0.4476, allocations: 1.433 MB / 421.8 MB, free: 14.95 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 0.0008191/0.4485, allocations: 294.8 kB / 422.1 MB, free: 14.66 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0008527/0.4493, allocations: 0.6984 MB / 422.8 MB, free: 13.95 MB / 334.1 MB Notification: Performance of SimCode: time 6.91e-07/0.4493, allocations: 0 / 422.8 MB, free: 13.95 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.07383/0.5232, allocations: 38.34 MB / 461.1 MB, free: 7.953 MB / 366.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.721/9.244, allocations: 0 / 461.1 MB, free: 7.953 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)