Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.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.BatteryComplex,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex") translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001314/0.001314, allocations: 108 kB / 15.6 MB, free: 132 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.001375/0.001375, allocations: 193.1 kB / 16.53 MB, free: 6.391 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.318/1.318, allocations: 222.9 MB / 240.2 MB, free: 4.414 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002126/0.002126, allocations: 287.1 kB / 290.7 MB, free: 2.008 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9384/0.9384, allocations: 169.3 MB / 0.4982 GB, free: 13.94 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001782/0.001782, allocations: 94.05 kB / 0.5952 GB, free: 27.9 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1504/0.1522, allocations: 86.99 MB / 0.6802 GB, free: 0.6992 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003555/0.1558, allocations: 2.626 MB / 0.6827 GB, free: 14.07 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.00166/0.1575, allocations: 1.084 MB / 0.6838 GB, free: 12.98 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001307/0.1576, allocations: 11.88 kB / 0.6838 GB, free: 12.96 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002354/0.1579, allocations: 79.56 kB / 0.6839 GB, free: 12.89 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002145/0.1581, allocations: 123 kB / 0.684 GB, free: 12.77 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003826/0.1585, allocations: 175.6 kB / 0.6842 GB, free: 12.59 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004574/0.159, allocations: 0.51 MB / 0.6847 GB, free: 12.08 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001302/0.1591, allocations: 44.7 kB / 0.6847 GB, free: 12.04 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002827/0.1594, allocations: 227.2 kB / 0.6849 GB, free: 11.82 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003086/0.1597, allocations: 223 kB / 0.6851 GB, free: 11.6 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 6.369e-05/0.1598, allocations: 28 kB / 0.6852 GB, free: 11.57 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001727/0.16, allocations: 87.94 kB / 0.6852 GB, free: 11.48 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 8.041e-05/0.1601, allocations: 75.72 kB / 0.6853 GB, free: 11.41 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001892/0.1603, allocations: 187 kB / 0.6855 GB, free: 11.23 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004454/0.1607, allocations: 410.6 kB / 0.6859 GB, free: 10.82 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.64e-06/0.1607, allocations: 4 kB / 0.6859 GB, free: 10.82 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.764e-06/0.1607, allocations: 0 / 0.6859 GB, free: 10.82 MB / 494.1 MB Notification: Performance of Transformations before backend: time 6.573e-06/0.1608, allocations: 0 / 0.6859 GB, free: 10.82 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: 49 * Number of variables: 49 Notification: Performance of Generate backend data structure: time 0.001782/0.1625, allocations: 0.8094 MB / 0.6867 GB, free: 9.945 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.693e-05/0.1626, allocations: 8.031 kB / 0.6867 GB, free: 9.938 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.804e-05/0.1627, allocations: 40.47 kB / 0.6867 GB, free: 9.898 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0005247/0.1632, allocations: 339.9 kB / 0.6871 GB, free: 9.527 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.643e-05/0.1633, allocations: 20.81 kB / 0.6871 GB, free: 9.508 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.017e-05/0.1633, allocations: 20.38 kB / 0.6871 GB, free: 9.488 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007023/0.164, allocations: 341 kB / 0.6874 GB, free: 9.145 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.558e-05/0.1641, allocations: 0 / 0.6874 GB, free: 9.145 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.424e-05/0.1641, allocations: 8 kB / 0.6874 GB, free: 9.137 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.885e-06/0.1641, allocations: 4 kB / 0.6874 GB, free: 9.133 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008465/0.165, allocations: 292.4 kB / 0.6877 GB, free: 8.848 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001052/0.166, allocations: 0.785 MB / 0.6885 GB, free: 8.008 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001046/0.1671, allocations: 377.6 kB / 0.6888 GB, free: 7.621 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004761/0.1676, allocations: 209.5 kB / 0.689 GB, free: 7.41 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006349/0.1682, allocations: 453.4 kB / 0.6895 GB, free: 6.875 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007313/0.169, allocations: 324.8 kB / 0.6898 GB, free: 6.539 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 3.356e-06/0.169, allocations: 3.984 kB / 0.6898 GB, free: 6.535 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.001597/0.1706, allocations: 0.609 MB / 0.6904 GB, free: 5.922 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.832e-05/0.1707, allocations: 89.09 kB / 0.6905 GB, free: 5.816 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002969/0.171, allocations: 308.4 kB / 0.6908 GB, free: 5.5 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 4.249e-05/0.171, allocations: 37.64 kB / 0.6908 GB, free: 5.457 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001196/0.1711, allocations: 172.8 kB / 0.691 GB, free: 5.285 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001191/0.1713, allocations: 138 kB / 0.6911 GB, free: 5.148 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001456/0.1714, allocations: 86.11 kB / 0.6912 GB, free: 5.059 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001273/0.1716, allocations: 354.8 kB / 0.6915 GB, free: 4.703 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005144/0.1721, allocations: 211.3 kB / 0.6917 GB, free: 4.492 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.00055/0.1726, allocations: 246.4 kB / 0.6919 GB, free: 4.234 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 6.351/6.524, allocations: 0.866 GB / 1.558 GB, free: 31.51 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 9.558e-06/6.524, allocations: 0 / 1.558 GB, free: 31.51 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001405/6.525, allocations: 0.635 MB / 1.559 GB, free: 31.02 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 4.875e-05/6.525, allocations: 92.09 kB / 1.559 GB, free: 30.92 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.034e-05/6.525, allocations: 4 kB / 1.559 GB, free: 30.91 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.386e-05/6.525, allocations: 4 kB / 1.559 GB, free: 30.91 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005211/6.526, allocations: 113.8 kB / 1.559 GB, free: 30.81 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.171e-05/6.526, allocations: 4 kB / 1.559 GB, free: 30.8 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005273/6.526, allocations: 66.34 kB / 1.559 GB, free: 30.77 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.315e-05/6.526, allocations: 18.86 kB / 1.559 GB, free: 30.75 MB / 0.7169 GB Warning: Assuming fixed start value for the following 8 variables: battery_C20.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery_C20.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_1C.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery_1C.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_1C.EAva:VARIABLE(start = 0.315 * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery_1C.EBou:VARIABLE(start = 0.6850000000000001 * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" fixed = true ) "Bound charge of the battery" type: Real battery_C20.EAva:VARIABLE(start = 0.315 * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery_C20.EBou:VARIABLE(start = 0.6850000000000001 * battery_C20.SOC_start * battery_C20.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: 6 * Number of states: 0 () * Number of discrete variables: 15 ($PRE.load_1C.count,$PRE.load_1C.T_start,$PRE.gain.count,$PRE.gain.T_start,load_1C.count,load_1C.T_start,gain.count,gain.T_start,$whenCondition2,$whenCondition3,$PRE.load_C20.count,$PRE.load_C20.T_start,load_C20.count,load_C20.T_start,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (58): * Single equations (assignments): 55 * Array equations: 0 * Algorithm blocks: 3 * 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.0003662/6.527, allocations: 203 kB / 1.559 GB, free: 30.58 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001069/6.527, allocations: 41.41 kB / 1.559 GB, free: 30.56 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001566/6.528, allocations: 0.6322 MB / 1.56 GB, free: 30.1 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.492e-06/6.528, allocations: 8 kB / 1.56 GB, free: 30.09 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.496e-06/6.528, allocations: 3.938 kB / 1.56 GB, free: 30.09 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.236e-06/6.528, allocations: 3.984 kB / 1.56 GB, free: 30.08 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003814/6.529, allocations: 438.7 kB / 1.56 GB, free: 29.72 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.228e-06/6.529, allocations: 0 / 1.56 GB, free: 29.72 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005452/6.529, allocations: 111.6 kB / 1.56 GB, free: 29.62 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 6.052e-06/6.529, allocations: 0 / 1.56 GB, free: 29.62 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.686e-05/6.529, allocations: 23.8 kB / 1.56 GB, free: 29.6 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.446e-06/6.529, allocations: 0 / 1.56 GB, free: 29.6 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.024e-06/6.529, allocations: 3.938 kB / 1.56 GB, free: 29.6 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001542/6.531, allocations: 0.7785 MB / 1.561 GB, free: 28.87 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002112/6.531, allocations: 167 kB / 1.561 GB, free: 28.7 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.948e-05/6.531, allocations: 12 kB / 1.561 GB, free: 28.69 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004135/6.532, allocations: 43.89 kB / 1.561 GB, free: 28.65 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001287/6.532, allocations: 62.17 kB / 1.561 GB, free: 28.59 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.275e-05/6.532, allocations: 23.98 kB / 1.561 GB, free: 28.57 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001604/6.532, allocations: 211.1 kB / 1.562 GB, free: 28.36 MB / 0.7169 GB Notification: Performance of sort global known variables: time 2.3e-07/6.532, allocations: 0 / 1.562 GB, free: 28.36 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0004272/6.533, allocations: 114 kB / 1.562 GB, free: 28.25 MB / 0.7169 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 8 (battery_1C.EAva,battery_1C.EBou,battery_1C.E_charged,battery_1C.E_discharged,battery_C20.EAva,battery_C20.EBou,battery_C20.E_charged,battery_C20.E_discharged) * Number of discrete variables: 9 ($whenCondition3,$whenCondition2,gain.T_start,gain.count,load_1C.T_start,load_1C.count,$whenCondition1,load_C20.T_start,load_C20.count) * Number of discrete states: 3 (load_C20.count,gain.count,load_1C.count) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (54): * Single equations (assignments): 48 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 6 * 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.0001866/6.533, allocations: 144.4 kB / 1.562 GB, free: 28.11 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.001177/6.534, allocations: 0.6558 MB / 1.562 GB, free: 27.43 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 2.014e-06/6.534, allocations: 0 / 1.562 GB, free: 27.43 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0005048/6.534, allocations: 265.2 kB / 1.563 GB, free: 27.17 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004494/6.535, allocations: 75.98 kB / 1.563 GB, free: 27.11 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001549/6.536, allocations: 1.103 MB / 1.564 GB, free: 26.03 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001631/6.537, allocations: 0.7973 MB / 1.565 GB, free: 25.2 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0003885/6.537, allocations: 91.64 kB / 1.565 GB, free: 25.12 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001556/6.537, allocations: 51.41 kB / 1.565 GB, free: 25.07 MB / 0.7169 GB Notification: Performance of SimCode: time 4.31e-07/6.537, allocations: 0 / 1.565 GB, free: 25.07 MB / 0.7169 GB Notification: Performance of Templates: time 0.009392/6.547, allocations: 5.965 MB / 1.571 GB, free: 19.21 MB / 0.7169 GB make -j1 -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.makefile (rm -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe ; mkfifo BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe ; head -c 1048576 < BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe >> ../files/BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.sim & ./BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex -abortSlowSimulation -alarm=480 -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)