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.001202/0.001202, allocations: 108 kB / 15.61 MB, free: 152 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.0009952/0.0009953, allocations: 194.3 kB / 16.53 MB, free: 6.664 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.261/1.261, allocations: 222.9 MB / 240.2 MB, free: 4.379 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001984/0.001984, allocations: 275 kB / 290.7 MB, free: 1.984 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.8978/0.8978, allocations: 169.3 MB / 0.4982 GB, free: 13.93 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001753/0.001753, allocations: 92.27 kB / 0.5952 GB, free: 27.93 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.133/0.1347, allocations: 86.99 MB / 0.6802 GB, free: 0.6836 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.002967/0.1377, allocations: 1.933 MB / 0.6821 GB, free: 14.75 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001316/0.1391, allocations: 0.8537 MB / 0.6829 GB, free: 13.89 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000113/0.1392, allocations: 12.69 kB / 0.6829 GB, free: 13.88 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002422/0.1394, allocations: 47.95 kB / 0.683 GB, free: 13.83 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001178/0.1396, allocations: 54.31 kB / 0.683 GB, free: 13.78 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003132/0.1399, allocations: 95.75 kB / 0.6831 GB, free: 13.69 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002176/0.1401, allocations: 187.3 kB / 0.6833 GB, free: 13.5 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000102/0.1403, allocations: 34.09 kB / 0.6833 GB, free: 13.47 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001506/0.1404, allocations: 87.62 kB / 0.6834 GB, free: 13.39 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001316/0.1405, allocations: 79.62 kB / 0.6835 GB, free: 13.31 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 3.082e-05/0.1406, allocations: 8 kB / 0.6835 GB, free: 13.3 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001321/0.1407, allocations: 59.95 kB / 0.6835 GB, free: 13.24 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 3.75e-05/0.1408, allocations: 27.89 kB / 0.6836 GB, free: 13.21 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 8.268e-05/0.1409, allocations: 71.59 kB / 0.6836 GB, free: 13.14 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002344/0.1411, allocations: 179.5 kB / 0.6838 GB, free: 12.97 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.497e-06/0.1411, allocations: 4 kB / 0.6838 GB, free: 12.96 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.001e-06/0.1411, allocations: 0 / 0.6838 GB, free: 12.96 MB / 494.1 MB Notification: Performance of Transformations before backend: time 8.055e-06/0.1411, allocations: 0 / 0.6838 GB, free: 12.96 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.0008967/0.142, allocations: 0.5042 MB / 0.6843 GB, free: 12.41 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.206e-05/0.1421, allocations: 8.031 kB / 0.6843 GB, free: 12.4 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.314e-05/0.1422, allocations: 24.73 kB / 0.6843 GB, free: 12.38 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002315/0.1424, allocations: 232 kB / 0.6845 GB, free: 12.11 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.214e-05/0.1424, allocations: 4.375 kB / 0.6845 GB, free: 12.11 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.954e-05/0.1425, allocations: 16.36 kB / 0.6846 GB, free: 12.09 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002886/0.1428, allocations: 121.9 kB / 0.6847 GB, free: 11.96 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.407e-05/0.1428, allocations: 7.844 kB / 0.6847 GB, free: 11.96 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.766e-05/0.1428, allocations: 3.984 kB / 0.6847 GB, free: 11.95 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.472e-06/0.1428, allocations: 4 kB / 0.6847 GB, free: 11.95 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003128/0.1431, allocations: 99.92 kB / 0.6848 GB, free: 11.85 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0006228/0.1438, allocations: 416.5 kB / 0.6852 GB, free: 11.39 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003371/0.1441, allocations: 134.4 kB / 0.6853 GB, free: 11.25 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001771/0.1443, allocations: 80.75 kB / 0.6854 GB, free: 11.17 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006156/0.1449, allocations: 441.5 kB / 0.6858 GB, free: 10.65 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003054/0.1452, allocations: 127.5 kB / 0.6859 GB, free: 10.51 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 1.664e-06/0.1452, allocations: 0 / 0.6859 GB, free: 10.51 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.0006239/0.1459, allocations: 235.5 kB / 0.6862 GB, free: 10.28 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.991e-05/0.1459, allocations: 59.34 kB / 0.6862 GB, free: 10.21 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001636/0.1461, allocations: 180.1 kB / 0.6864 GB, free: 10.02 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 2.918e-05/0.1461, allocations: 33.7 kB / 0.6864 GB, free: 9.984 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 6.814e-05/0.1462, allocations: 112 kB / 0.6865 GB, free: 9.871 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 4.855e-05/0.1463, allocations: 55.25 kB / 0.6866 GB, free: 9.816 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 6.88e-05/0.1463, allocations: 45.7 kB / 0.6866 GB, free: 9.766 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001038/0.1465, allocations: 334.8 kB / 0.6869 GB, free: 9.43 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001946/0.1467, allocations: 72.75 kB / 0.687 GB, free: 9.355 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001999/0.1469, allocations: 88.14 kB / 0.6871 GB, free: 9.262 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 2.848/2.995, allocations: 378.8 MB / 1.057 GB, free: 257.4 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.975e-06/2.995, allocations: 0 / 1.057 GB, free: 257.4 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004774/2.996, allocations: 252.4 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 2.857e-05/2.996, allocations: 32.83 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.861e-06/2.996, allocations: 0 / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.587e-05/2.996, allocations: 3.438 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002263/2.996, allocations: 53.33 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 6.502e-06/2.996, allocations: 0 / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001808/2.996, allocations: 21.61 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.788e-05/2.996, allocations: 4.906 kB / 1.057 GB, free: 257.3 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.0001583/2.996, allocations: 158.9 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.872e-05/2.996, allocations: 16.09 kB / 1.058 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005464/2.997, allocations: 240.9 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.078e-06/2.997, allocations: 2.125 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.578e-06/2.997, allocations: 4.641 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.238e-06/2.997, allocations: 0 / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001641/2.997, allocations: 256.6 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.813e-06/2.997, allocations: 0.5625 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002293/2.997, allocations: 41.05 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.665e-06/2.997, allocations: 0.8125 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.78e-05/2.997, allocations: 9.312 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.523e-06/2.997, allocations: 0 / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.322e-06/2.997, allocations: 0 / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005797/2.998, allocations: 319.2 kB / 1.058 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 6.423e-05/2.998, allocations: 112.5 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.165e-05/2.998, allocations: 1.5 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000169/2.998, allocations: 13.95 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.887e-05/2.998, allocations: 15.61 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.444e-05/2.998, allocations: 11.97 kB / 1.059 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 7.525e-05/2.998, allocations: 128.5 kB / 1.059 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.5e-07/2.998, allocations: 4.766 kB / 1.059 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0002578/2.999, allocations: 55.12 kB / 1.059 GB, free: 256.7 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.0001248/2.999, allocations: 125.9 kB / 1.059 GB, free: 256.6 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0004591/2.999, allocations: 232.9 kB / 1.059 GB, free: 256.5 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.854e-06/2.999, allocations: 0 / 1.059 GB, free: 256.5 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0001956/2.999, allocations: 90.2 kB / 1.059 GB, free: 256.5 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002547/3, allocations: 34.09 kB / 1.059 GB, free: 256.5 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0007701/3, allocations: 0.5409 MB / 1.06 GB, free: 256.2 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001084/3.001, allocations: 0.7251 MB / 1.06 GB, free: 255.5 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001419/3.001, allocations: 37.22 kB / 1.06 GB, free: 255.5 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.432e-05/3.001, allocations: 19.53 kB / 1.06 GB, free: 255.5 MB / 0.7169 GB Notification: Performance of SimCode: time 2.41e-07/3.001, allocations: 1.156 kB / 1.06 GB, free: 255.5 MB / 0.7169 GB Notification: Performance of Templates: time 0.005039/3.006, allocations: 2.527 MB / 1.063 GB, free: 255.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 -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)