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.001066/0.001066, allocations: 107.3 kB / 15.23 MB, free: 0.6523 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.001125/0.001125, allocations: 198 kB / 16.14 MB, free: 6.125 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.343/1.343, allocations: 222.9 MB / 239.8 MB, free: 4.625 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001998/0.001998, allocations: 278.9 kB / 290.2 MB, free: 2.23 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9511/0.9511, allocations: 169.2 MB / 0.4977 GB, free: 14.17 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001635/0.001636, allocations: 89.75 kB / 0.5945 GB, free: 28.42 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1547/0.1563, allocations: 86.99 MB / 0.6794 GB, free: 1.188 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.00425/0.1606, allocations: 1.988 MB / 0.6814 GB, free: 15.2 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001837/0.1625, allocations: 0.8582 MB / 0.6822 GB, free: 14.33 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001395/0.1627, allocations: 8.562 kB / 0.6822 GB, free: 14.32 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.00028/0.163, allocations: 49.36 kB / 0.6823 GB, free: 14.28 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002469/0.1632, allocations: 43.7 kB / 0.6823 GB, free: 14.23 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.00034/0.1636, allocations: 76.5 kB / 0.6824 GB, free: 14.16 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002733/0.1639, allocations: 179.3 kB / 0.6826 GB, free: 13.98 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001193/0.164, allocations: 29.41 kB / 0.6826 GB, free: 13.96 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002218/0.1642, allocations: 79.62 kB / 0.6827 GB, free: 13.88 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002321/0.1645, allocations: 75.62 kB / 0.6827 GB, free: 13.8 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 3.682e-05/0.1645, allocations: 4 kB / 0.6827 GB, free: 13.8 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001686/0.1647, allocations: 63.94 kB / 0.6828 GB, free: 13.74 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 5.142e-05/0.1648, allocations: 31.84 kB / 0.6828 GB, free: 13.71 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001084/0.1649, allocations: 67.59 kB / 0.6829 GB, free: 13.64 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0003967/0.1653, allocations: 175.4 kB / 0.6831 GB, free: 13.47 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.057e-06/0.1653, allocations: 0 / 0.6831 GB, free: 13.47 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.523e-06/0.1653, allocations: 0 / 0.6831 GB, free: 13.47 MB / 494.1 MB Notification: Performance of Transformations before backend: time 6.191e-06/0.1653, allocations: 0 / 0.6831 GB, free: 13.47 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.001157/0.1665, allocations: 0.5042 MB / 0.6835 GB, free: 12.91 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.149e-05/0.1666, allocations: 8.031 kB / 0.6836 GB, free: 12.9 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001047/0.1667, allocations: 20.73 kB / 0.6836 GB, free: 12.88 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003225/0.167, allocations: 228 kB / 0.6838 GB, free: 12.62 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.905e-05/0.167, allocations: 8.375 kB / 0.6838 GB, free: 12.61 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.315e-05/0.1671, allocations: 12.3 kB / 0.6838 GB, free: 12.6 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003979/0.1675, allocations: 123.8 kB / 0.6839 GB, free: 12.48 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.941e-05/0.1675, allocations: 3.906 kB / 0.6839 GB, free: 12.47 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.897e-05/0.1676, allocations: 11.98 kB / 0.6839 GB, free: 12.46 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.791e-06/0.1676, allocations: 4 kB / 0.6839 GB, free: 12.46 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0004509/0.168, allocations: 99.92 kB / 0.684 GB, free: 12.36 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0009332/0.169, allocations: 412.5 kB / 0.6844 GB, free: 11.91 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004437/0.1694, allocations: 138.4 kB / 0.6846 GB, free: 11.76 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002321/0.1697, allocations: 76.81 kB / 0.6846 GB, free: 11.68 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0007493/0.1705, allocations: 441.5 kB / 0.6851 GB, free: 11.16 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004946/0.171, allocations: 135.5 kB / 0.6852 GB, free: 11.02 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 2.194e-06/0.171, allocations: 0 / 0.6852 GB, free: 11.02 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.0008526/0.1718, allocations: 234.7 kB / 0.6854 GB, free: 10.78 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.154e-05/0.1719, allocations: 55.41 kB / 0.6855 GB, free: 10.71 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002137/0.1721, allocations: 180.1 kB / 0.6856 GB, free: 10.53 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 3.456e-05/0.1722, allocations: 29.7 kB / 0.6857 GB, free: 10.5 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 8.869e-05/0.1723, allocations: 120 kB / 0.6858 GB, free: 10.38 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.793e-05/0.1723, allocations: 51.27 kB / 0.6858 GB, free: 10.32 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 9.731e-05/0.1725, allocations: 37.7 kB / 0.6859 GB, free: 10.28 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001382/0.1726, allocations: 338.7 kB / 0.6862 GB, free: 9.941 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.00026/0.1729, allocations: 68.81 kB / 0.6863 GB, free: 9.871 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003554/0.1732, allocations: 90.52 kB / 0.6863 GB, free: 9.773 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 2.668/2.841, allocations: 378.8 MB / 1.056 GB, free: 257.7 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.178e-06/2.841, allocations: 0 / 1.056 GB, free: 257.7 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0005025/2.842, allocations: 256.7 kB / 1.056 GB, free: 257.7 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 2.857e-05/2.842, allocations: 30.72 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.003e-06/2.842, allocations: 0 / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.646e-05/2.842, allocations: 4.656 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002384/2.842, allocations: 44.17 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.484e-06/2.842, allocations: 7 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000179/2.842, allocations: 14.52 kB / 1.057 GB, free: 257.6 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.097e-05/2.842, allocations: 10.19 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.0001758/2.842, allocations: 149.1 kB / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.108e-05/2.842, allocations: 23.27 kB / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005663/2.843, allocations: 244.5 kB / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.166e-06/2.843, allocations: 0 / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.657e-06/2.843, allocations: 0 / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.727e-06/2.843, allocations: 0 / 1.057 GB, free: 257.5 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001659/2.843, allocations: 257.5 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.272e-06/2.843, allocations: 4 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002316/2.843, allocations: 41.59 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.234e-06/2.843, allocations: 0 / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.883e-05/2.843, allocations: 7.688 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.743e-06/2.843, allocations: 3.656 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 8.82e-07/2.843, allocations: 0 / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005734/2.844, allocations: 322 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 6.592e-05/2.844, allocations: 106.7 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.355e-05/2.844, allocations: 5.719 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001557/2.844, allocations: 13.02 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 7.088e-05/2.844, allocations: 24 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.413e-05/2.844, allocations: 7.297 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 7.771e-05/2.844, allocations: 129.3 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.11e-07/2.844, allocations: 0 / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0002612/2.845, allocations: 59.69 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.0001316/2.845, allocations: 129.4 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.00043/2.845, allocations: 219.4 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.904e-06/2.845, allocations: 0 / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0001877/2.845, allocations: 94.3 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002621/2.846, allocations: 30.89 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0008342/2.847, allocations: 0.578 MB / 1.059 GB, free: 256.5 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001436/2.847, allocations: 0.7226 MB / 1.06 GB, free: 255.8 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001516/2.847, allocations: 30.84 kB / 1.06 GB, free: 255.8 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.943e-05/2.847, allocations: 23.84 kB / 1.06 GB, free: 255.8 MB / 0.7169 GB Notification: Performance of SimCode: time 2e-07/2.847, allocations: 0.9375 kB / 1.06 GB, free: 255.8 MB / 0.7169 GB Notification: Performance of Templates: time 0.005381/2.852, allocations: 2.38 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)