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.005848/0.005848, allocations: 100.3 kB / 15.73 MB, free: 6.016 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.001307/0.001307, allocations: 189.4 kB / 16.67 MB, free: 5.938 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.325/1.325, allocations: 222.9 MB / 240.4 MB, free: 4.156 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002168/0.002168, allocations: 275 kB / 290.8 MB, free: 1.762 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9481/0.9481, allocations: 169.3 MB / 0.4983 GB, free: 13.78 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001717/0.001717, allocations: 87.86 kB / 0.6814 GB, free: 15.53 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.155/0.1567, allocations: 86.97 MB / 0.7663 GB, free: 8.48 MB / 0.5606 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.003106/0.1599, allocations: 1.944 MB / 0.7682 GB, free: 6.523 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.001372/0.1613, allocations: 0.8626 MB / 0.7691 GB, free: 5.652 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001147/0.1614, allocations: 4 kB / 0.7691 GB, free: 5.648 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.0002236/0.1616, allocations: 55.61 kB / 0.7691 GB, free: 5.594 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.000117/0.1618, allocations: 51.5 kB / 0.7692 GB, free: 5.543 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0003122/0.1621, allocations: 87.77 kB / 0.7693 GB, free: 5.457 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.0002249/0.1623, allocations: 191.3 kB / 0.7695 GB, free: 5.27 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 9.722e-05/0.1624, allocations: 29.5 kB / 0.7695 GB, free: 5.242 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.000161/0.1626, allocations: 83.64 kB / 0.7696 GB, free: 5.16 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0001424/0.1628, allocations: 87.59 kB / 0.7697 GB, free: 5.074 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 2.993e-05/0.1628, allocations: 8 kB / 0.7697 GB, free: 5.066 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001335/0.1629, allocations: 59.97 kB / 0.7697 GB, free: 5.008 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 4.203e-05/0.163, allocations: 27.91 kB / 0.7697 GB, free: 4.98 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 8.198e-05/0.1631, allocations: 75.58 kB / 0.7698 GB, free: 4.906 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.000269/0.1633, allocations: 191.1 kB / 0.77 GB, free: 4.719 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 4.418e-06/0.1634, allocations: 0 / 0.77 GB, free: 4.719 MB / 0.5606 GB Notification: Performance of FrontEnd: time 1.363e-06/0.1634, allocations: 4 kB / 0.77 GB, free: 4.715 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 5.861e-06/0.1634, allocations: 0 / 0.77 GB, free: 4.715 MB / 0.5606 GB 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.000935/0.1643, allocations: 0.5118 MB / 0.7705 GB, free: 4.148 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 3.717e-05/0.1644, allocations: 12.03 kB / 0.7705 GB, free: 4.137 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 6.147e-05/0.1644, allocations: 16.84 kB / 0.7705 GB, free: 4.121 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002828/0.1647, allocations: 240 kB / 0.7708 GB, free: 3.848 MB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.602e-05/0.1647, allocations: 12.38 kB / 0.7708 GB, free: 3.836 MB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 3.181e-05/0.1648, allocations: 4.375 kB / 0.7708 GB, free: 3.832 MB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003002/0.1651, allocations: 124.1 kB / 0.7709 GB, free: 3.707 MB / 0.5606 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.286e-05/0.1651, allocations: 4 kB / 0.7709 GB, free: 3.703 MB / 0.5606 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.924e-05/0.1651, allocations: 4 kB / 0.7709 GB, free: 3.699 MB / 0.5606 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.56e-06/0.1651, allocations: 0 / 0.7709 GB, free: 3.699 MB / 0.5606 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003067/0.1655, allocations: 103.9 kB / 0.771 GB, free: 3.598 MB / 0.5606 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0006527/0.1661, allocations: 416.5 kB / 0.7714 GB, free: 3.141 MB / 0.5606 GB Notification: Performance of preOpt comSubExp (simulation): time 0.000332/0.1665, allocations: 130.5 kB / 0.7715 GB, free: 3.004 MB / 0.5606 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001749/0.1666, allocations: 72.81 kB / 0.7716 GB, free: 2.93 MB / 0.5606 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006013/0.1673, allocations: 449.5 kB / 0.772 GB, free: 2.398 MB / 0.5606 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003251/0.1676, allocations: 127.5 kB / 0.7721 GB, free: 2.262 MB / 0.5606 GB Notification: Performance of pre-optimization done (n=16): time 1.683e-06/0.1676, allocations: 0 / 0.7721 GB, free: 2.262 MB / 0.5606 GB Notification: Performance of matching and sorting (n=16): time 0.0006383/0.1682, allocations: 239.5 kB / 0.7724 GB, free: 2.023 MB / 0.5606 GB Notification: Performance of inlineWhenForInitialization (initialization): time 4.185e-05/0.1683, allocations: 55.41 kB / 0.7724 GB, free: 1.957 MB / 0.5606 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001629/0.1685, allocations: 180.1 kB / 0.7726 GB, free: 1.773 MB / 0.5606 GB Notification: Performance of collectPreVariables (initialization): time 2.81e-05/0.1685, allocations: 37.64 kB / 0.7726 GB, free: 1.73 MB / 0.5606 GB Notification: Performance of collectInitialEqns (initialization): time 8.143e-05/0.1686, allocations: 112 kB / 0.7727 GB, free: 1.617 MB / 0.5606 GB Notification: Performance of collectInitialBindings (initialization): time 5.004e-05/0.1686, allocations: 55.55 kB / 0.7728 GB, free: 1.562 MB / 0.5606 GB Notification: Performance of simplifyInitialFunctions (initialization): time 7.655e-05/0.1687, allocations: 41.69 kB / 0.7728 GB, free: 1.516 MB / 0.5606 GB Notification: Performance of setup shared object (initialization): time 0.0001088/0.1688, allocations: 334.8 kB / 0.7731 GB, free: 1.18 MB / 0.5606 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001932/0.169, allocations: 76.75 kB / 0.7732 GB, free: 1.102 MB / 0.5606 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001931/0.1692, allocations: 87.73 kB / 0.7733 GB, free: 1.008 MB / 0.5606 GB Notification: Performance of analyzeInitialSystem (initialization): time 2.82/2.99, allocations: 378.8 MB / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.096e-06/2.99, allocations: 0 / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004572/2.99, allocations: 254.6 kB / 1.143 GB, free: 284.5 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 2.763e-05/2.99, allocations: 33.7 kB / 1.143 GB, free: 284.4 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.943e-06/2.99, allocations: 0.5625 kB / 1.143 GB, free: 284.4 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.852e-05/2.99, allocations: 4 kB / 1.143 GB, free: 284.4 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002128/2.991, allocations: 43.16 kB / 1.144 GB, free: 284.4 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.105e-06/2.991, allocations: 9.625 kB / 1.144 GB, free: 284.4 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001696/2.991, allocations: 17.78 kB / 1.144 GB, free: 284.4 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.08e-05/2.991, allocations: 8.812 kB / 1.144 GB, free: 284.4 MB / 0.8419 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.685 * 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.0001751/2.991, allocations: 157.6 kB / 1.144 GB, free: 284.2 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.803e-05/2.991, allocations: 17.45 kB / 1.144 GB, free: 284.2 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005125/2.991, allocations: 238.6 kB / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.968e-06/2.991, allocations: 4 kB / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.94e-06/2.991, allocations: 2.25 kB / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.398e-06/2.991, allocations: 0 / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001661/2.992, allocations: 256.7 kB / 1.144 GB, free: 283.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.695e-06/2.992, allocations: 4.656 kB / 1.144 GB, free: 283.8 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002153/2.992, allocations: 47.16 kB / 1.144 GB, free: 283.7 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.084e-06/2.992, allocations: 0 / 1.144 GB, free: 283.7 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.794e-05/2.992, allocations: 7.5 kB / 1.144 GB, free: 283.7 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.854e-06/2.992, allocations: 0 / 1.144 GB, free: 283.7 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.072e-06/2.992, allocations: 0 / 1.144 GB, free: 283.7 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005497/2.992, allocations: 318 kB / 1.145 GB, free: 283.5 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 7.492e-05/2.993, allocations: 112 kB / 1.145 GB, free: 283.4 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.358e-05/2.993, allocations: 7.734 kB / 1.145 GB, free: 283.4 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001477/2.993, allocations: 11.05 kB / 1.145 GB, free: 283.4 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.946e-05/2.993, allocations: 19.09 kB / 1.145 GB, free: 283.3 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.278e-05/2.993, allocations: 7.656 kB / 1.145 GB, free: 283.3 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 7.13e-05/2.993, allocations: 136.9 kB / 1.145 GB, free: 283.2 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.11e-07/2.993, allocations: 0.7656 kB / 1.145 GB, free: 283.2 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.0002492/2.993, allocations: 52.88 kB / 1.145 GB, free: 283.2 MB / 0.8419 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.0001264/2.993, allocations: 120.6 kB / 1.145 GB, free: 283.1 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.0004114/2.994, allocations: 226.1 kB / 1.145 GB, free: 282.9 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 2.004e-06/2.994, allocations: 0 / 1.145 GB, free: 282.9 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0001768/2.994, allocations: 88.11 kB / 1.145 GB, free: 282.8 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002569/2.994, allocations: 39.48 kB / 1.145 GB, free: 282.8 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0007238/2.995, allocations: 0.5345 MB / 1.146 GB, free: 282.3 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001106/2.995, allocations: 0.7211 MB / 1.147 GB, free: 281.6 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.000119/2.995, allocations: 32.3 kB / 1.147 GB, free: 281.5 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.411e-05/2.995, allocations: 22.75 kB / 1.147 GB, free: 281.5 MB / 0.8419 GB Notification: Performance of SimCode: time 2.4e-07/2.995, allocations: 0 / 1.147 GB, free: 281.5 MB / 0.8419 GB Notification: Performance of Templates: time 0.005058/3, allocations: 2.553 MB / 1.149 GB, free: 279 MB / 0.8419 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)