Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo", uses=false) Using package BuildingSystems with version 2.0.0-beta (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo) Using package NcDataReader2 with version 2.5.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo) 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: translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple") translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001323/0.001323, allocations: 103.4 kB / 15.33 MB, free: 0.5078 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.001554/0.001554, allocations: 192.7 kB / 16.25 MB, free: 6.621 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.307/1.307, allocations: 222.9 MB / 239.9 MB, free: 4.527 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002083/0.002083, allocations: 290.4 kB / 290.4 MB, free: 2.129 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9584/0.9584, allocations: 169.2 MB / 0.4978 GB, free: 14.06 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001636/0.001636, allocations: 95.61 kB / 0.5947 GB, free: 28.27 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1595/0.1612, allocations: 86.99 MB / 0.6796 GB, free: 1.062 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.003059/0.1643, allocations: 1.99 MB / 0.6816 GB, free: 15.07 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001321/0.1656, allocations: 0.8503 MB / 0.6824 GB, free: 14.21 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 9.377e-05/0.1657, allocations: 7.938 kB / 0.6824 GB, free: 14.21 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002314/0.1659, allocations: 47.97 kB / 0.6824 GB, free: 14.16 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001043/0.1661, allocations: 40.56 kB / 0.6825 GB, free: 14.12 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002834/0.1664, allocations: 80.58 kB / 0.6826 GB, free: 14.04 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002161/0.1666, allocations: 188.8 kB / 0.6827 GB, free: 13.86 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001107/0.1667, allocations: 30.66 kB / 0.6828 GB, free: 13.83 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001448/0.1669, allocations: 87.59 kB / 0.6829 GB, free: 13.75 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001217/0.167, allocations: 87.59 kB / 0.6829 GB, free: 13.66 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 2.53e-05/0.167, allocations: 8 kB / 0.6829 GB, free: 13.65 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001165/0.1671, allocations: 63.95 kB / 0.683 GB, free: 13.59 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 3.423e-05/0.1672, allocations: 23.91 kB / 0.683 GB, free: 13.57 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 8.697e-05/0.1673, allocations: 79.58 kB / 0.6831 GB, free: 13.49 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002331/0.1675, allocations: 179.5 kB / 0.6833 GB, free: 13.31 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.559e-06/0.1675, allocations: 0 / 0.6833 GB, free: 13.31 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.984e-06/0.1675, allocations: 0 / 0.6833 GB, free: 13.31 MB / 494.1 MB Notification: Performance of Transformations before backend: time 6.231e-06/0.1675, allocations: 0 / 0.6833 GB, free: 13.31 MB / 494.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 19 * Number of variables: 19 Notification: Performance of Generate backend data structure: time 0.0009051/0.1685, allocations: 0.5042 MB / 0.6838 GB, free: 12.75 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.304e-05/0.1685, allocations: 8.031 kB / 0.6838 GB, free: 12.75 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 6.025e-05/0.1686, allocations: 16.75 kB / 0.6838 GB, free: 12.73 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002314/0.1688, allocations: 235.9 kB / 0.684 GB, free: 12.46 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.211e-05/0.1688, allocations: 4.375 kB / 0.684 GB, free: 12.46 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.556e-05/0.1689, allocations: 16.38 kB / 0.684 GB, free: 12.44 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003021/0.1692, allocations: 125.9 kB / 0.6842 GB, free: 12.31 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.361e-05/0.1692, allocations: 3.906 kB / 0.6842 GB, free: 12.31 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.949e-05/0.1692, allocations: 8 kB / 0.6842 GB, free: 12.3 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.075e-06/0.1692, allocations: 0 / 0.6842 GB, free: 12.3 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002985/0.1695, allocations: 99.84 kB / 0.6843 GB, free: 12.2 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0006272/0.1702, allocations: 424.5 kB / 0.6847 GB, free: 11.74 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003387/0.1705, allocations: 130.5 kB / 0.6848 GB, free: 11.6 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001698/0.1707, allocations: 72.83 kB / 0.6849 GB, free: 11.53 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006477/0.1714, allocations: 449.5 kB / 0.6853 GB, free: 11 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003361/0.1717, allocations: 131.5 kB / 0.6854 GB, free: 10.86 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 1.833e-06/0.1717, allocations: 0 / 0.6854 GB, free: 10.86 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.0006087/0.1723, allocations: 231.2 kB / 0.6856 GB, free: 10.62 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.191e-05/0.1724, allocations: 51.41 kB / 0.6857 GB, free: 10.56 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001579/0.1725, allocations: 192 kB / 0.6859 GB, free: 10.37 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 2.768e-05/0.1726, allocations: 29.7 kB / 0.6859 GB, free: 10.33 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 7.623e-05/0.1727, allocations: 116 kB / 0.686 GB, free: 10.21 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 4.788e-05/0.1727, allocations: 47.27 kB / 0.6861 GB, free: 10.17 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.024e-05/0.1728, allocations: 41.7 kB / 0.6861 GB, free: 10.12 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001127/0.1729, allocations: 334.8 kB / 0.6864 GB, free: 9.785 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001833/0.1731, allocations: 80.69 kB / 0.6865 GB, free: 9.703 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000185/0.1733, allocations: 86.53 kB / 0.6866 GB, free: 9.609 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 2.679/2.852, allocations: 378.8 MB / 1.056 GB, free: 257.7 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.076e-06/2.852, allocations: 0 / 1.056 GB, free: 257.7 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004674/2.853, allocations: 253.2 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 2.826e-05/2.853, allocations: 35.86 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.171e-06/2.853, allocations: 3.188 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.441e-05/2.853, allocations: 0 / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002171/2.853, allocations: 44.86 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.434e-06/2.853, allocations: 3.281 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001737/2.853, allocations: 15.41 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.007e-05/2.853, allocations: 12.98 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Warning: Assuming fixed start value for the following 4 variables: battery.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery.EAva:VARIABLE(start = 0.315 * battery.SOC_start * battery.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery.EBou:VARIABLE(start = 0.6850000000000001 * battery.SOC_start * battery.E_nominal unit = "J" fixed = true ) "Bound charge of the battery" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 3 * Number of states: 0 () * Number of discrete variables: 5 ($PRE.gain.count,$PRE.gain.T_start,gain.count,gain.T_start,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (22): * Single equations (assignments): 21 * 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.0001653/2.853, allocations: 154.4 kB / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.921e-05/2.853, allocations: 16 kB / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005339/2.854, allocations: 244.1 kB / 1.057 GB, free: 257.4 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.637e-06/2.854, allocations: 2.562 kB / 1.057 GB, free: 257.4 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.798e-06/2.854, allocations: 0 / 1.057 GB, free: 257.4 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.601e-06/2.854, allocations: 3.703 kB / 1.057 GB, free: 257.4 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001684/2.854, allocations: 256 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.362e-06/2.854, allocations: 0 / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002248/2.854, allocations: 38.8 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.705e-06/2.854, allocations: 3.531 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.792e-05/2.854, allocations: 4.078 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.276e-06/2.854, allocations: 4.328 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.62e-07/2.854, allocations: 8.938 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005518/2.855, allocations: 307.4 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 6.401e-05/2.855, allocations: 111.5 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.113e-05/2.855, allocations: 0 / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001585/2.855, allocations: 13.47 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.685e-05/2.855, allocations: 23.81 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.456e-05/2.855, allocations: 7.594 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 7.25e-05/2.855, allocations: 131.4 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.31e-07/2.855, allocations: 0.7656 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0002508/2.856, allocations: 60 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 4 (battery.EAva,battery.EBou,battery.E_charged,battery.E_discharged) * Number of discrete variables: 3 ($whenCondition1,gain.T_start,gain.count) * Number of discrete states: 1 (gain.count) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (20): * Single equations (assignments): 18 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 2 * 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.0001311/2.856, allocations: 116.2 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0004285/2.856, allocations: 238.2 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.723e-06/2.856, allocations: 0 / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0001794/2.856, allocations: 89.16 kB / 1.059 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000271/2.857, allocations: 27.66 kB / 1.059 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0007672/2.858, allocations: 0.59 MB / 1.059 GB, free: 256.5 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001101/2.858, allocations: 0.7259 MB / 1.06 GB, free: 255.8 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.000148/2.858, allocations: 31.94 kB / 1.06 GB, free: 255.8 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.528e-05/2.858, allocations: 23.97 kB / 1.06 GB, free: 255.7 MB / 0.7169 GB Notification: Performance of SimCode: time 2.2e-07/2.858, allocations: 4 kB / 1.06 GB, free: 255.7 MB / 0.7169 GB Notification: Performance of Templates: time 0.005156/2.863, allocations: 2.493 MB / 1.062 GB, free: 255.6 MB / 0.7169 GB make -j1 -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.makefile (rm -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe ; mkfifo BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe ; head -c 1048576 < BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe >> ../files/BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.sim & ./BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple -abortSlowSimulation -alarm=480 -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)