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.001042/0.001042, allocations: 86.25 kB / 15.06 MB, free: 1.09 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.001337/0.001337, allocations: 168.7 kB / 15.95 MB, free: 204 kB / 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: 223.3 MB / 240 MB, free: 5.426 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001763/0.001763, allocations: 274.6 kB / 291.4 MB, free: 1.98 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9321/0.9321, allocations: 169.5 MB / 0.5 GB, free: 14.23 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0004204/0.0004204, allocations: 13.72 kB / 0.598 GB, free: 28.36 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.161/0.1614, allocations: 88.53 MB / 0.6845 GB, free: 15.49 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.002092/0.1635, allocations: 1.609 MB / 0.686 GB, free: 13.87 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001219/0.1648, allocations: 0.8092 MB / 0.6868 GB, free: 13.05 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 8.113e-05/0.1649, allocations: 4 kB / 0.6868 GB, free: 13.05 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0001738/0.165, allocations: 44.19 kB / 0.6869 GB, free: 13.01 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 9.206e-05/0.1651, allocations: 40.31 kB / 0.6869 GB, free: 12.97 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.000229/0.1654, allocations: 65.05 kB / 0.687 GB, free: 12.91 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0001843/0.1656, allocations: 167.3 kB / 0.6871 GB, free: 12.74 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001062/0.1657, allocations: 26.95 kB / 0.6872 GB, free: 12.72 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001543/0.1658, allocations: 77.39 kB / 0.6872 GB, free: 12.64 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001282/0.166, allocations: 71.67 kB / 0.6873 GB, free: 12.57 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 2.379e-05/0.166, allocations: 7.984 kB / 0.6873 GB, free: 12.57 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001092/0.1661, allocations: 52.92 kB / 0.6874 GB, free: 12.52 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 3.262e-05/0.1662, allocations: 23.86 kB / 0.6874 GB, free: 12.49 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 5.061e-05/0.1662, allocations: 49.11 kB / 0.6874 GB, free: 12.44 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0001844/0.1664, allocations: 135.9 kB / 0.6876 GB, free: 12.31 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 7.454e-06/0.1664, allocations: 0 / 0.6876 GB, free: 12.31 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.383e-06/0.1664, allocations: 3.938 kB / 0.6876 GB, free: 12.3 MB / 494.1 MB Notification: Performance of Transformations before backend: time 4.959e-06/0.1665, allocations: 0 / 0.6876 GB, free: 12.3 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.0008328/0.1673, allocations: 487.5 kB / 0.688 GB, free: 11.78 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.346e-05/0.1673, allocations: 8.031 kB / 0.688 GB, free: 11.77 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 5.21e-05/0.1674, allocations: 19.77 kB / 0.688 GB, free: 11.75 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002691/0.1677, allocations: 234.6 kB / 0.6883 GB, free: 11.48 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.943e-05/0.1677, allocations: 8 kB / 0.6883 GB, free: 11.47 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.377e-05/0.1677, allocations: 8 kB / 0.6883 GB, free: 11.46 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002878/0.168, allocations: 130.2 kB / 0.6884 GB, free: 11.34 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.187e-05/0.168, allocations: 0 / 0.6884 GB, free: 11.34 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.007e-05/0.1681, allocations: 8 kB / 0.6884 GB, free: 11.33 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.15e-06/0.1681, allocations: 0 / 0.6884 GB, free: 11.33 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003073/0.1684, allocations: 118.6 kB / 0.6885 GB, free: 11.21 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0006415/0.169, allocations: 423.1 kB / 0.6889 GB, free: 10.75 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003186/0.1694, allocations: 140.6 kB / 0.6891 GB, free: 10.61 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001779/0.1696, allocations: 78.88 kB / 0.6891 GB, free: 10.53 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006008/0.1702, allocations: 449.5 kB / 0.6896 GB, free: 10 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003323/0.1705, allocations: 129.1 kB / 0.6897 GB, free: 9.863 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 1.654e-06/0.1705, allocations: 7.875 kB / 0.6897 GB, free: 9.855 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.0006246/0.1712, allocations: 249.6 kB / 0.6899 GB, free: 9.605 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.614e-05/0.1712, allocations: 51.41 kB / 0.69 GB, free: 9.543 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000172/0.1714, allocations: 196 kB / 0.6902 GB, free: 9.344 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 2.379e-05/0.1714, allocations: 33.69 kB / 0.6902 GB, free: 9.305 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 6.522e-05/0.1715, allocations: 104.1 kB / 0.6903 GB, free: 9.199 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.593e-05/0.1716, allocations: 59.19 kB / 0.6904 GB, free: 9.141 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 1.231e-05/0.1716, allocations: 4 kB / 0.6904 GB, free: 9.137 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001145/0.1717, allocations: 326.8 kB / 0.6907 GB, free: 8.809 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001828/0.1719, allocations: 76.81 kB / 0.6908 GB, free: 8.73 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002005/0.1721, allocations: 101.1 kB / 0.6909 GB, free: 8.625 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001945/0.1723, allocations: 102.2 kB / 0.691 GB, free: 8.523 MB / 494.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.853e-06/0.1723, allocations: 4 kB / 0.691 GB, free: 8.52 MB / 494.1 MB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004789/0.1728, allocations: 261.4 kB / 0.6912 GB, free: 8.254 MB / 494.1 MB Notification: Performance of prepare postOptimizeDAE: time 4.275e-05/0.1728, allocations: 33.7 kB / 0.6912 GB, free: 8.215 MB / 494.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.13e-06/0.1729, allocations: 0 / 0.6912 GB, free: 8.215 MB / 494.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.287e-05/0.1729, allocations: 4 kB / 0.6912 GB, free: 8.211 MB / 494.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002279/0.1731, allocations: 52.02 kB / 0.6913 GB, free: 8.16 MB / 494.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.595e-06/0.1731, allocations: 3.938 kB / 0.6913 GB, free: 8.156 MB / 494.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001625/0.1733, allocations: 23.83 kB / 0.6913 GB, free: 8.133 MB / 494.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.111e-05/0.1733, allocations: 12 kB / 0.6913 GB, free: 8.121 MB / 494.1 MB Warning: Assuming fixed start value for the following 4 variables: battery.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to 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 battery.EAva:VARIABLE(start = 0.315 * battery.SOC_start * battery.E_nominal unit = "J" fixed = true ) "Available 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 ($whenCondition1,$PRE.gain.T_start,gain.T_start,$PRE.gain.count,gain.count) * 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 (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0001824/0.1735, allocations: 139.7 kB / 0.6915 GB, free: 7.977 MB / 494.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.977e-05/0.1735, allocations: 27.73 kB / 0.6915 GB, free: 7.949 MB / 494.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0006014/0.1742, allocations: 249 kB / 0.6917 GB, free: 7.699 MB / 494.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.016e-06/0.1742, allocations: 0 / 0.6917 GB, free: 7.699 MB / 494.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.721e-06/0.1742, allocations: 7.953 kB / 0.6917 GB, free: 7.691 MB / 494.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.231e-06/0.1742, allocations: 3.984 kB / 0.6917 GB, free: 7.688 MB / 494.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0002244/0.1744, allocations: 253.4 kB / 0.692 GB, free: 7.391 MB / 494.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.513e-06/0.1744, allocations: 0 / 0.692 GB, free: 7.391 MB / 494.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002271/0.1747, allocations: 39.98 kB / 0.692 GB, free: 7.352 MB / 494.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 2.565e-06/0.1747, allocations: 7.938 kB / 0.692 GB, free: 7.344 MB / 494.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.009e-05/0.1747, allocations: 7.984 kB / 0.692 GB, free: 7.336 MB / 494.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.763e-06/0.1747, allocations: 0 / 0.692 GB, free: 7.336 MB / 494.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.737e-06/0.1747, allocations: 7.891 kB / 0.692 GB, free: 7.328 MB / 494.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0006373/0.1754, allocations: 330.8 kB / 0.6924 GB, free: 6.988 MB / 494.1 MB Notification: Performance of postOpt removeConstants (simulation): time 8.301e-05/0.1755, allocations: 108.9 kB / 0.6925 GB, free: 6.863 MB / 494.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.182e-05/0.1755, allocations: 4 kB / 0.6925 GB, free: 6.859 MB / 494.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001576/0.1757, allocations: 15.98 kB / 0.6925 GB, free: 6.844 MB / 494.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.855e-05/0.1757, allocations: 19.97 kB / 0.6925 GB, free: 6.824 MB / 494.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.589e-05/0.1758, allocations: 15.92 kB / 0.6925 GB, free: 6.809 MB / 494.1 MB Notification: Performance of sorting global known variables: time 9.793e-05/0.1759, allocations: 135.2 kB / 0.6926 GB, free: 6.676 MB / 494.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.1759, allocations: 0 / 0.6926 GB, free: 6.676 MB / 494.1 MB Notification: Performance of remove unused functions: time 0.000257/0.1761, allocations: 55.98 kB / 0.6927 GB, free: 6.621 MB / 494.1 MB 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 (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0001588/0.1763, allocations: 115.2 kB / 0.6928 GB, free: 6.5 MB / 494.1 MB Notification: Performance of simCode: created initialization part: time 0.0004616/0.1768, allocations: 235.5 kB / 0.693 GB, free: 6.258 MB / 494.1 MB Notification: Performance of simCode: created event and clocks part: time 1.803e-06/0.1768, allocations: 0 / 0.693 GB, free: 6.258 MB / 494.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002003/0.177, allocations: 93.44 kB / 0.6931 GB, free: 6.168 MB / 494.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002733/0.1773, allocations: 35.88 kB / 0.6932 GB, free: 6.133 MB / 494.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0009447/0.1782, allocations: 0.6345 MB / 0.6938 GB, free: 5.477 MB / 494.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000287/0.1785, allocations: 0.7284 MB / 0.6945 GB, free: 4.723 MB / 494.1 MB Notification: Performance of simCode: alias equations: time 0.0001504/0.1787, allocations: 29.52 kB / 0.6945 GB, free: 4.695 MB / 494.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.831e-05/0.1788, allocations: 23.44 kB / 0.6945 GB, free: 4.672 MB / 494.1 MB Notification: Performance of SimCode: time 2.71e-07/0.1788, allocations: 4 kB / 0.6945 GB, free: 4.668 MB / 494.1 MB Notification: Performance of Templates: time 0.005504/0.1843, allocations: 2.293 MB / 0.6968 GB, free: 2.395 MB / 494.1 MB 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)