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.00107/0.00107, allocations: 107.7 kB / 16.36 MB, free: 6.285 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.001133/0.001133, allocations: 193.4 kB / 17.29 MB, free: 5.863 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.247/1.247, allocations: 222.9 MB / 241 MB, free: 15.17 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002411/0.002411, allocations: 278.9 kB / 291.4 MB, free: 14.5 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9074/0.9074, allocations: 169.3 MB / 0.4989 GB, free: 4.473 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001691/0.001691, allocations: 89.64 kB / 0.5966 GB, free: 14.46 MB / 414.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1458/0.1475, allocations: 86.98 MB / 0.6816 GB, free: 7.473 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.002775/0.1503, allocations: 1.942 MB / 0.6835 GB, free: 5.512 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001204/0.1516, allocations: 0.855 MB / 0.6843 GB, free: 4.648 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 8.253e-05/0.1517, allocations: 4 kB / 0.6843 GB, free: 4.645 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.000194/0.1519, allocations: 51.56 kB / 0.6844 GB, free: 4.594 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 9.468e-05/0.152, allocations: 59.55 kB / 0.6844 GB, free: 4.535 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002525/0.1522, allocations: 87.78 kB / 0.6845 GB, free: 4.449 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002001/0.1525, allocations: 191.3 kB / 0.6847 GB, free: 4.262 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 9.053e-05/0.1526, allocations: 25.34 kB / 0.6847 GB, free: 4.242 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001317/0.1527, allocations: 87.62 kB / 0.6848 GB, free: 4.156 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001221/0.1528, allocations: 83.61 kB / 0.6849 GB, free: 4.074 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 2.487e-05/0.1529, allocations: 12 kB / 0.6849 GB, free: 4.062 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001171/0.153, allocations: 59.95 kB / 0.6849 GB, free: 4.004 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 3.733e-05/0.153, allocations: 23.91 kB / 0.685 GB, free: 3.98 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 8.268e-05/0.1531, allocations: 79.58 kB / 0.685 GB, free: 3.902 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002218/0.1533, allocations: 179.5 kB / 0.6852 GB, free: 3.727 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.859e-06/0.1533, allocations: 4 kB / 0.6852 GB, free: 3.723 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.723e-06/0.1534, allocations: 3.938 kB / 0.6852 GB, free: 3.719 MB / 494.1 MB Notification: Performance of Transformations before backend: time 5.019e-06/0.1534, allocations: 0 / 0.6852 GB, free: 3.719 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.0008335/0.1542, allocations: 0.5003 MB / 0.6857 GB, free: 3.164 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.008e-05/0.1542, allocations: 11.97 kB / 0.6857 GB, free: 3.152 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.649e-05/0.1543, allocations: 24.69 kB / 0.6857 GB, free: 3.129 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002278/0.1545, allocations: 224.1 kB / 0.686 GB, free: 2.871 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.739e-05/0.1546, allocations: 8.359 kB / 0.686 GB, free: 2.863 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.691e-05/0.1546, allocations: 12.38 kB / 0.686 GB, free: 2.852 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002647/0.1549, allocations: 131.2 kB / 0.6861 GB, free: 2.719 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.05e-05/0.1549, allocations: 0 / 0.6861 GB, free: 2.719 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.425e-05/0.1549, allocations: 0 / 0.6861 GB, free: 2.719 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.26e-06/0.1549, allocations: 11.94 kB / 0.6861 GB, free: 2.707 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002816/0.1552, allocations: 99.91 kB / 0.6862 GB, free: 2.609 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0005487/0.1558, allocations: 424.4 kB / 0.6866 GB, free: 2.145 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0002958/0.1561, allocations: 130.5 kB / 0.6867 GB, free: 2.008 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001681/0.1562, allocations: 79.7 kB / 0.6868 GB, free: 1.93 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0005636/0.1568, allocations: 445.5 kB / 0.6872 GB, free: 1.402 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002497/0.1571, allocations: 127.5 kB / 0.6874 GB, free: 1.266 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 1.764e-06/0.1571, allocations: 4 kB / 0.6874 GB, free: 1.262 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.0005734/0.1577, allocations: 229.4 kB / 0.6876 GB, free: 1.031 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.686e-05/0.1577, allocations: 55.34 kB / 0.6876 GB, free: 0.9648 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001471/0.1579, allocations: 182.5 kB / 0.6878 GB, free: 0.7773 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 2.337e-05/0.1579, allocations: 29.7 kB / 0.6878 GB, free: 0.7422 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 6.489e-05/0.158, allocations: 119.9 kB / 0.688 GB, free: 0.6211 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 4.029e-05/0.158, allocations: 47.27 kB / 0.688 GB, free: 0.5742 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.223e-05/0.1581, allocations: 45.7 kB / 0.688 GB, free: 0.5234 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 9.733e-05/0.1582, allocations: 334.8 kB / 0.6884 GB, free: 192 kB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000178/0.1584, allocations: 68.81 kB / 0.6884 GB, free: 120 kB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000194/0.1586, allocations: 95.53 kB / 0.6885 GB, free: 16 kB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 2.429/2.587, allocations: 378.8 MB / 1.058 GB, free: 180.8 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.238e-06/2.587, allocations: 4 kB / 1.058 GB, free: 180.8 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004823/2.588, allocations: 253.1 kB / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 3.373e-05/2.588, allocations: 36.05 kB / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.384e-06/2.588, allocations: 0 / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.848e-05/2.588, allocations: 4 kB / 1.059 GB, free: 180.6 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002202/2.588, allocations: 42.97 kB / 1.059 GB, free: 180.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.546e-06/2.588, allocations: 4 kB / 1.059 GB, free: 180.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001828/2.588, allocations: 23.16 kB / 1.059 GB, free: 180.5 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.155e-05/2.588, allocations: 11.36 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.0001692/2.588, allocations: 143.6 kB / 1.059 GB, free: 180.4 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.299e-05/2.588, allocations: 15.34 kB / 1.059 GB, free: 180.4 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0004997/2.589, allocations: 242.4 kB / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.359e-06/2.589, allocations: 4 kB / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.168e-06/2.589, allocations: 0 / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.697e-06/2.589, allocations: 0 / 1.059 GB, free: 180.2 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001623/2.589, allocations: 257.1 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.683e-06/2.589, allocations: 0 / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002179/2.589, allocations: 47.81 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.827e-06/2.589, allocations: 0.8125 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.912e-05/2.589, allocations: 7.312 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.224e-06/2.589, allocations: 0 / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.533e-06/2.589, allocations: 3.984 kB / 1.059 GB, free: 179.9 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005275/2.59, allocations: 308.5 kB / 1.06 GB, free: 179.6 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 7.269e-05/2.59, allocations: 111.4 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.396e-05/2.59, allocations: 10.02 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001519/2.59, allocations: 15.27 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.299e-05/2.59, allocations: 19.03 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.329e-05/2.59, allocations: 4 kB / 1.06 GB, free: 179.5 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 7.571e-05/2.59, allocations: 139.2 kB / 1.06 GB, free: 179.4 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.41e-07/2.59, allocations: 3.75 kB / 1.06 GB, free: 179.4 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0002614/2.591, allocations: 56.56 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.0001349/2.591, allocations: 126.3 kB / 1.06 GB, free: 179.2 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0004002/2.591, allocations: 223.8 kB / 1.06 GB, free: 179 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 2.034e-06/2.591, allocations: 0 / 1.06 GB, free: 179 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0001752/2.591, allocations: 91.2 kB / 1.061 GB, free: 178.9 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002461/2.592, allocations: 32.95 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.0007158/2.592, allocations: 0.5346 MB / 1.061 GB, free: 178.4 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 9.956e-05/2.592, allocations: 0.7203 MB / 1.062 GB, free: 177.7 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001116/2.593, allocations: 32.73 kB / 1.062 GB, free: 177.7 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.151e-05/2.593, allocations: 19.44 kB / 1.062 GB, free: 177.6 MB / 0.7169 GB Notification: Performance of SimCode: time 6.61e-07/2.593, allocations: 4 kB / 1.062 GB, free: 177.6 MB / 0.7169 GB Notification: Performance of Templates: time 0.004661/2.597, allocations: 2.531 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 cvode -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)