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.001236/0.001236, allocations: 104.3 kB / 16.35 MB, free: 5.824 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.001275/0.001275, allocations: 190.5 kB / 17.29 MB, free: 5.48 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.245/1.245, allocations: 222.9 MB / 241 MB, free: 15.16 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002058/0.002058, allocations: 295.4 kB / 291.4 MB, free: 14.46 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.8901/0.8901, allocations: 169.2 MB / 0.4989 GB, free: 4.449 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0017/0.001701, allocations: 97.84 kB / 0.5966 GB, free: 14.44 MB / 414.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1467/0.1485, allocations: 86.97 MB / 0.6816 GB, free: 7.453 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.002789/0.1513, allocations: 1.941 MB / 0.6835 GB, free: 5.496 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001167/0.1525, allocations: 0.8589 MB / 0.6843 GB, free: 4.629 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.641e-05/0.1526, allocations: 7.938 kB / 0.6843 GB, free: 4.621 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0001781/0.1527, allocations: 59.5 kB / 0.6844 GB, free: 4.562 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 8.43e-05/0.1528, allocations: 43.62 kB / 0.6844 GB, free: 4.52 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002457/0.1531, allocations: 103.7 kB / 0.6845 GB, free: 4.418 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0001955/0.1533, allocations: 187.3 kB / 0.6847 GB, free: 4.234 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 8.307e-05/0.1534, allocations: 25.48 kB / 0.6847 GB, free: 4.211 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001177/0.1535, allocations: 79.69 kB / 0.6848 GB, free: 4.133 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001226/0.1537, allocations: 87.61 kB / 0.6849 GB, free: 4.047 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 2.357e-05/0.1537, allocations: 15.94 kB / 0.6849 GB, free: 4.031 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001075/0.1538, allocations: 63.95 kB / 0.685 GB, free: 3.969 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 3.656e-05/0.1538, allocations: 27.91 kB / 0.685 GB, free: 3.941 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 7.085e-05/0.1539, allocations: 67.59 kB / 0.6851 GB, free: 3.875 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002152/0.1541, allocations: 183.4 kB / 0.6852 GB, free: 3.695 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.411e-06/0.1541, allocations: 0 / 0.6852 GB, free: 3.695 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.202e-06/0.1542, allocations: 3.938 kB / 0.6852 GB, free: 3.691 MB / 494.1 MB Notification: Performance of Transformations before backend: time 4.338e-06/0.1542, allocations: 4 kB / 0.6852 GB, free: 3.688 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.0008219/0.155, allocations: 0.5004 MB / 0.6857 GB, free: 3.133 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 2.871e-05/0.155, allocations: 8.031 kB / 0.6857 GB, free: 3.125 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 5.439e-05/0.1551, allocations: 16.75 kB / 0.6857 GB, free: 3.109 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002225/0.1553, allocations: 231.9 kB / 0.686 GB, free: 2.844 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.089e-05/0.1553, allocations: 4.375 kB / 0.686 GB, free: 2.84 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.365e-05/0.1554, allocations: 12.38 kB / 0.686 GB, free: 2.828 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002667/0.1556, allocations: 131.2 kB / 0.6861 GB, free: 2.695 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.042e-05/0.1557, allocations: 0 / 0.6861 GB, free: 2.695 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.548e-05/0.1557, allocations: 4 kB / 0.6861 GB, free: 2.691 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.811e-06/0.1557, allocations: 4 kB / 0.6861 GB, free: 2.688 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003153/0.156, allocations: 95.91 kB / 0.6862 GB, free: 2.594 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0005945/0.1566, allocations: 424.4 kB / 0.6866 GB, free: 2.129 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003017/0.1569, allocations: 134.5 kB / 0.6867 GB, free: 1.988 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001628/0.1571, allocations: 68.83 kB / 0.6868 GB, free: 1.918 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0005799/0.1577, allocations: 449.5 kB / 0.6872 GB, free: 1.387 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002849/0.158, allocations: 131.5 kB / 0.6874 GB, free: 1.246 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 1.562e-06/0.158, allocations: 0 / 0.6874 GB, free: 1.246 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.0005847/0.1586, allocations: 229.4 kB / 0.6876 GB, free: 1.016 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.557e-05/0.1586, allocations: 51.41 kB / 0.6876 GB, free: 0.9531 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001525/0.1588, allocations: 182.5 kB / 0.6878 GB, free: 0.7656 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 2.537e-05/0.1588, allocations: 33.69 kB / 0.6878 GB, free: 0.7266 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 5.946e-05/0.1589, allocations: 111.9 kB / 0.6879 GB, free: 0.6133 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 4.378e-05/0.1589, allocations: 59.23 kB / 0.688 GB, free: 0.5547 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.283e-05/0.159, allocations: 45.7 kB / 0.688 GB, free: 0.5039 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001022/0.1591, allocations: 338.7 kB / 0.6884 GB, free: 168 kB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001747/0.1593, allocations: 68.81 kB / 0.6884 GB, free: 96 kB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.2329/0.3922, allocations: 88.05 kB / 0.6885 GB, free: 18.22 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 2.182/2.574, allocations: 378.8 MB / 1.058 GB, free: 180.8 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.457e-06/2.574, allocations: 4 kB / 1.058 GB, free: 180.8 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004376/2.575, allocations: 251.7 kB / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 2.503e-05/2.575, allocations: 33.7 kB / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.22e-06/2.575, allocations: 0 / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.764e-05/2.575, allocations: 4.75 kB / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000211/2.575, allocations: 40.62 kB / 1.059 GB, free: 180.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.785e-06/2.575, allocations: 7.984 kB / 1.059 GB, free: 180.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001602/2.575, allocations: 18.91 kB / 1.059 GB, free: 180.5 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.869e-05/2.575, allocations: 7.984 kB / 1.059 GB, free: 180.5 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.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.0001593/2.575, allocations: 157 kB / 1.059 GB, free: 180.4 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.572e-05/2.576, allocations: 15.34 kB / 1.059 GB, free: 180.4 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0004939/2.576, allocations: 240.8 kB / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.167e-06/2.576, allocations: 4 kB / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.609e-06/2.576, allocations: 0.875 kB / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.96e-06/2.576, allocations: 3.984 kB / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001534/2.576, allocations: 261.8 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.004e-06/2.576, allocations: 3.984 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002116/2.576, allocations: 43.83 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.054e-06/2.576, allocations: 0 / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.776e-05/2.576, allocations: 11.73 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.703e-06/2.576, allocations: 0 / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.62e-07/2.576, allocations: 0 / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.000509/2.577, allocations: 308.5 kB / 1.06 GB, free: 179.6 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 6.71e-05/2.577, allocations: 114.9 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.102e-05/2.577, allocations: 4.5 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001436/2.577, allocations: 15.14 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.541e-05/2.577, allocations: 22.94 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.432e-05/2.577, allocations: 10 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 6.901e-05/2.577, allocations: 135.8 kB / 1.06 GB, free: 179.4 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.3e-07/2.577, allocations: 0 / 1.06 GB, free: 179.4 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0002421/2.578, allocations: 52.81 kB / 1.06 GB, free: 179.3 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.0001205/2.578, allocations: 120.7 kB / 1.06 GB, free: 179.2 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0003773/2.578, allocations: 221.2 kB / 1.06 GB, free: 179 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.723e-06/2.578, allocations: 0 / 1.06 GB, free: 179 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.000168/2.578, allocations: 89.33 kB / 1.061 GB, free: 179 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002375/2.579, allocations: 26.42 kB / 1.061 GB, free: 178.9 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0006701/2.579, allocations: 0.5441 MB / 1.061 GB, free: 178.4 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 9.993e-05/2.579, allocations: 0.7203 MB / 1.062 GB, free: 177.7 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001049/2.58, allocations: 33.52 kB / 1.062 GB, free: 177.7 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 5.75e-05/2.58, allocations: 19.44 kB / 1.062 GB, free: 177.6 MB / 0.7169 GB Notification: Performance of SimCode: time 4.41e-07/2.58, allocations: 0 / 1.062 GB, free: 177.6 MB / 0.7169 GB Notification: Performance of Templates: time 0.004551/2.584, allocations: 2.539 MB / 1.064 GB, free: 175.2 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 -s gbode -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)