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.005108/0.005108, allocations: 101.4 kB / 15.73 MB, free: 5.953 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.0011/0.0011, allocations: 192.2 kB / 16.67 MB, free: 5.883 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.335/1.335, allocations: 222.9 MB / 240.4 MB, free: 4.16 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002018/0.002018, allocations: 279 kB / 290.8 MB, free: 1.75 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9684/0.9684, allocations: 169.3 MB / 0.4983 GB, free: 13.79 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001886/0.001886, allocations: 91.86 kB / 0.6814 GB, free: 15.52 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1691/0.1709, allocations: 86.97 MB / 0.7663 GB, free: 8.469 MB / 0.5606 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003398/0.1744, allocations: 2.655 MB / 0.7689 GB, free: 5.797 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.001721/0.1761, allocations: 1.065 MB / 0.77 GB, free: 4.723 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001305/0.1763, allocations: 11.94 kB / 0.77 GB, free: 4.711 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.0002434/0.1766, allocations: 83.34 kB / 0.7701 GB, free: 4.629 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0002197/0.1768, allocations: 122.9 kB / 0.7702 GB, free: 4.508 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004091/0.1772, allocations: 175.6 kB / 0.7704 GB, free: 4.336 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.0004653/0.1777, allocations: 0.5138 MB / 0.7709 GB, free: 3.82 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001212/0.1778, allocations: 44.7 kB / 0.7709 GB, free: 3.777 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002888/0.1781, allocations: 243.1 kB / 0.7711 GB, free: 3.539 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003039/0.1784, allocations: 215.1 kB / 0.7713 GB, free: 3.328 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 6.097e-05/0.1785, allocations: 28 kB / 0.7714 GB, free: 3.301 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001792/0.1787, allocations: 87.94 kB / 0.7714 GB, free: 3.215 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 7.012e-05/0.1788, allocations: 83.66 kB / 0.7715 GB, free: 3.133 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 0.0001621/0.1789, allocations: 183 kB / 0.7717 GB, free: 2.953 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.0004213/0.1793, allocations: 414.6 kB / 0.7721 GB, free: 2.547 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 3.677e-06/0.1794, allocations: 0 / 0.7721 GB, free: 2.547 MB / 0.5606 GB Notification: Performance of FrontEnd: time 1.733e-06/0.1794, allocations: 0 / 0.7721 GB, free: 2.547 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 7.194e-06/0.1794, allocations: 4 kB / 0.7721 GB, free: 2.543 MB / 0.5606 GB 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.001755/0.1811, allocations: 0.8189 MB / 0.7729 GB, free: 1.66 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 3.471e-05/0.1812, allocations: 12.03 kB / 0.7729 GB, free: 1.648 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001021/0.1813, allocations: 40.47 kB / 0.773 GB, free: 1.609 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003791/0.1817, allocations: 339.8 kB / 0.7733 GB, free: 1.234 MB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.886e-05/0.1817, allocations: 16.81 kB / 0.7733 GB, free: 1.219 MB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.796e-05/0.1818, allocations: 28.36 kB / 0.7733 GB, free: 1.191 MB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007094/0.1825, allocations: 325.1 kB / 0.7736 GB, free: 0.8633 MB / 0.5606 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.611e-05/0.1825, allocations: 4 kB / 0.7736 GB, free: 0.8594 MB / 0.5606 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.38e-05/0.1826, allocations: 8 kB / 0.7736 GB, free: 0.8516 MB / 0.5606 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.715e-06/0.1826, allocations: 4 kB / 0.7736 GB, free: 0.8477 MB / 0.5606 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008176/0.1834, allocations: 296.9 kB / 0.7739 GB, free: 0.5586 MB / 0.5606 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.319/0.5024, allocations: 0.7676 MB / 0.7747 GB, free: 14.75 MB / 0.5606 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001342/0.5037, allocations: 386.7 kB / 0.775 GB, free: 14.7 MB / 0.5606 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005858/0.5044, allocations: 208 kB / 0.7752 GB, free: 14.68 MB / 0.5606 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006665/0.505, allocations: 453.4 kB / 0.7757 GB, free: 14.21 MB / 0.5606 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000889/0.5059, allocations: 328.3 kB / 0.776 GB, free: 14.15 MB / 0.5606 GB Notification: Performance of pre-optimization done (n=42): time 4.188e-06/0.506, allocations: 0 / 0.776 GB, free: 14.15 MB / 0.5606 GB Notification: Performance of matching and sorting (n=42): time 0.001746/0.5077, allocations: 0.6088 MB / 0.7766 GB, free: 14.11 MB / 0.5606 GB Notification: Performance of inlineWhenForInitialization (initialization): time 4.89e-05/0.5078, allocations: 86.33 kB / 0.7767 GB, free: 14.02 MB / 0.5606 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003924/0.5082, allocations: 304.2 kB / 0.777 GB, free: 13.91 MB / 0.5606 GB Notification: Performance of collectPreVariables (initialization): time 5.186e-05/0.5083, allocations: 37.19 kB / 0.777 GB, free: 13.88 MB / 0.5606 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001091/0.5084, allocations: 162.5 kB / 0.7771 GB, free: 13.8 MB / 0.5606 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001304/0.5085, allocations: 141.2 kB / 0.7773 GB, free: 13.74 MB / 0.5606 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001783/0.5087, allocations: 97 kB / 0.7774 GB, free: 13.69 MB / 0.5606 GB Notification: Performance of setup shared object (initialization): time 9.954e-05/0.5088, allocations: 352.7 kB / 0.7777 GB, free: 13.36 MB / 0.5606 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005491/0.5094, allocations: 209 kB / 0.7779 GB, free: 13.29 MB / 0.5606 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005433/0.5099, allocations: 243 kB / 0.7781 GB, free: 13.18 MB / 0.5606 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.049/6.559, allocations: 0.866 GB / 1.644 GB, free: 103.6 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 7.384e-06/6.559, allocations: 0.875 kB / 1.644 GB, free: 103.6 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001318/6.56, allocations: 0.6359 MB / 1.645 GB, free: 103.1 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 4.224e-05/6.56, allocations: 88.48 kB / 1.645 GB, free: 103 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.495e-06/6.56, allocations: 5.031 kB / 1.645 GB, free: 103 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.235e-05/6.56, allocations: 4 kB / 1.645 GB, free: 103 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005388/6.561, allocations: 114.9 kB / 1.645 GB, free: 102.9 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.488e-05/6.561, allocations: 6.062 kB / 1.645 GB, free: 102.9 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005211/6.562, allocations: 66.58 kB / 1.645 GB, free: 102.9 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.648e-05/6.562, allocations: 32.36 kB / 1.645 GB, free: 102.8 MB / 0.8419 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.685 * 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.685 * 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.0003119/6.562, allocations: 196.2 kB / 1.645 GB, free: 102.7 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.025e-05/6.562, allocations: 41.09 kB / 1.645 GB, free: 102.6 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00145/6.564, allocations: 0.6298 MB / 1.646 GB, free: 102.2 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.532e-06/6.564, allocations: 12 kB / 1.646 GB, free: 102.2 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.735e-06/6.564, allocations: 3.938 kB / 1.646 GB, free: 102.2 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.736e-06/6.564, allocations: 3.984 kB / 1.646 GB, free: 102.2 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004046/6.564, allocations: 443.2 kB / 1.646 GB, free: 101.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.799e-06/6.564, allocations: 3.984 kB / 1.646 GB, free: 101.8 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005483/6.565, allocations: 107.2 kB / 1.646 GB, free: 101.7 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.43e-06/6.565, allocations: 0 / 1.646 GB, free: 101.7 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.08e-05/6.565, allocations: 20.11 kB / 1.647 GB, free: 101.7 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.436e-06/6.565, allocations: 0 / 1.647 GB, free: 101.7 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.733e-06/6.565, allocations: 11.94 kB / 1.647 GB, free: 101.7 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001496/6.566, allocations: 0.7745 MB / 1.647 GB, free: 100.9 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001528/6.566, allocations: 162.9 kB / 1.647 GB, free: 100.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.384e-05/6.566, allocations: 15.98 kB / 1.647 GB, free: 100.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004237/6.567, allocations: 39.91 kB / 1.647 GB, free: 100.7 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001304/6.567, allocations: 59.86 kB / 1.648 GB, free: 100.7 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.057e-05/6.567, allocations: 15.98 kB / 1.648 GB, free: 100.6 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0001668/6.567, allocations: 215.1 kB / 1.648 GB, free: 100.4 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.3e-07/6.567, allocations: 4 kB / 1.648 GB, free: 100.4 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.000383/6.568, allocations: 114 kB / 1.648 GB, free: 100.3 MB / 0.8419 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.0001865/6.568, allocations: 131.5 kB / 1.648 GB, free: 100.2 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.001071/6.569, allocations: 0.6398 MB / 1.649 GB, free: 99.52 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 2.685e-06/6.569, allocations: 0 / 1.649 GB, free: 99.52 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0005096/6.569, allocations: 258.4 kB / 1.649 GB, free: 99.27 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004207/6.57, allocations: 79.53 kB / 1.649 GB, free: 99.2 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001477/6.571, allocations: 1.094 MB / 1.65 GB, free: 98.12 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001686/6.571, allocations: 0.8012 MB / 1.651 GB, free: 97.29 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.0003094/6.572, allocations: 85.02 kB / 1.651 GB, free: 97.21 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001633/6.572, allocations: 55.41 kB / 1.651 GB, free: 97.16 MB / 0.8419 GB Notification: Performance of SimCode: time 2.3e-07/6.572, allocations: 0 / 1.651 GB, free: 97.16 MB / 0.8419 GB Notification: Performance of Templates: time 0.009648/6.582, allocations: 6.027 MB / 1.657 GB, free: 91.24 MB / 0.8419 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)