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.001012/0.001012, allocations: 111.3 kB / 15.23 MB, free: 0.6406 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.001134/0.001134, allocations: 191.7 kB / 16.14 MB, free: 6.707 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.312/1.312, allocations: 222.9 MB / 239.8 MB, free: 4.629 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002044/0.002044, allocations: 271.1 kB / 290.2 MB, free: 2.234 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9585/0.9585, allocations: 169.2 MB / 0.4977 GB, free: 14.17 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001645/0.001645, allocations: 85.22 kB / 0.5945 GB, free: 28.23 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1492/0.1508, allocations: 86.99 MB / 0.6794 GB, free: 1.199 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003362/0.1542, allocations: 2.673 MB / 0.682 GB, free: 14.52 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001589/0.1558, allocations: 1.086 MB / 0.6831 GB, free: 13.43 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001097/0.156, allocations: 11.94 kB / 0.6831 GB, free: 13.42 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002273/0.1562, allocations: 68.38 kB / 0.6832 GB, free: 13.36 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002096/0.1564, allocations: 108.8 kB / 0.6833 GB, free: 13.25 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003166/0.1568, allocations: 149.7 kB / 0.6834 GB, free: 13.11 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0003845/0.1571, allocations: 494.1 kB / 0.6839 GB, free: 12.62 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001147/0.1573, allocations: 45.47 kB / 0.6839 GB, free: 12.58 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002535/0.1575, allocations: 211 kB / 0.6841 GB, free: 12.37 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002706/0.1578, allocations: 211.1 kB / 0.6843 GB, free: 12.16 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 5.743e-05/0.1579, allocations: 16 kB / 0.6844 GB, free: 12.15 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.000158/0.158, allocations: 67.89 kB / 0.6844 GB, free: 12.08 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 7.859e-05/0.1581, allocations: 71.66 kB / 0.6845 GB, free: 12.01 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001795/0.1583, allocations: 167.1 kB / 0.6847 GB, free: 11.85 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.000384/0.1587, allocations: 402.6 kB / 0.685 GB, free: 11.45 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.118e-06/0.1587, allocations: 0 / 0.685 GB, free: 11.45 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.002e-06/0.1587, allocations: 0 / 0.685 GB, free: 11.45 MB / 494.1 MB Notification: Performance of Transformations before backend: time 5.19e-06/0.1587, allocations: 0 / 0.685 GB, free: 11.45 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.1605, allocations: 0.8055 MB / 0.6858 GB, free: 10.58 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.341e-05/0.1606, allocations: 8.031 kB / 0.6858 GB, free: 10.57 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.495e-05/0.1607, allocations: 44.47 kB / 0.6859 GB, free: 10.53 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003767/0.161, allocations: 335.9 kB / 0.6862 GB, free: 10.17 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.793e-05/0.1611, allocations: 20.8 kB / 0.6862 GB, free: 10.15 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.013e-05/0.1611, allocations: 20.38 kB / 0.6862 GB, free: 10.13 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007243/0.1619, allocations: 341 kB / 0.6866 GB, free: 9.785 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.389e-05/0.1619, allocations: 0 / 0.6866 GB, free: 9.785 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.521e-05/0.1619, allocations: 8 kB / 0.6866 GB, free: 9.777 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.596e-06/0.1619, allocations: 8 kB / 0.6866 GB, free: 9.77 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008474/0.1628, allocations: 296.3 kB / 0.6869 GB, free: 9.48 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001071/0.1639, allocations: 0.7773 MB / 0.6876 GB, free: 8.648 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001078/0.165, allocations: 393.5 kB / 0.688 GB, free: 8.246 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004849/0.1655, allocations: 205.6 kB / 0.6882 GB, free: 8.039 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006381/0.1661, allocations: 453.5 kB / 0.6886 GB, free: 7.504 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007304/0.1669, allocations: 332.5 kB / 0.6889 GB, free: 7.16 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 1.863e-06/0.1669, allocations: 4 kB / 0.6889 GB, free: 7.156 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.001616/0.1685, allocations: 0.606 MB / 0.6895 GB, free: 6.547 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.017e-05/0.1686, allocations: 97.03 kB / 0.6896 GB, free: 6.434 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003072/0.1689, allocations: 308.5 kB / 0.6899 GB, free: 6.113 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 4.554e-05/0.1689, allocations: 37.7 kB / 0.69 GB, free: 6.07 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001056/0.169, allocations: 156.9 kB / 0.6901 GB, free: 5.914 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001206/0.1692, allocations: 142 kB / 0.6902 GB, free: 5.773 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001566/0.1693, allocations: 94.09 kB / 0.6903 GB, free: 5.676 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.000133/0.1695, allocations: 346.8 kB / 0.6907 GB, free: 5.328 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005211/0.17, allocations: 219.2 kB / 0.6909 GB, free: 5.109 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005152/0.1705, allocations: 238.4 kB / 0.6911 GB, free: 4.859 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 5.993/6.163, allocations: 0.866 GB / 1.557 GB, free: 33.02 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 7.995e-06/6.164, allocations: 4 kB / 1.557 GB, free: 33.02 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001259/6.165, allocations: 0.6383 MB / 1.558 GB, free: 32.54 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 4.415e-05/6.165, allocations: 91.97 kB / 1.558 GB, free: 32.43 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.386e-06/6.165, allocations: 0 / 1.558 GB, free: 32.43 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.908e-05/6.165, allocations: 4 kB / 1.558 GB, free: 32.43 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005237/6.165, allocations: 113 kB / 1.558 GB, free: 32.32 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.098e-05/6.165, allocations: 5.875 kB / 1.558 GB, free: 32.32 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004459/6.166, allocations: 71.97 kB / 1.558 GB, free: 32.28 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.079e-05/6.166, allocations: 15.12 kB / 1.558 GB, free: 32.27 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.0002885/6.166, allocations: 200.5 kB / 1.558 GB, free: 32.1 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.081e-05/6.166, allocations: 41.41 kB / 1.558 GB, free: 32.08 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001473/6.168, allocations: 0.6272 MB / 1.559 GB, free: 31.61 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.67e-06/6.168, allocations: 4 kB / 1.559 GB, free: 31.61 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.291e-06/6.168, allocations: 3.938 kB / 1.559 GB, free: 31.61 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.773e-06/6.168, allocations: 7.984 kB / 1.559 GB, free: 31.6 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003603/6.168, allocations: 428.6 kB / 1.559 GB, free: 31.24 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.374e-06/6.168, allocations: 2.062 kB / 1.559 GB, free: 31.24 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005795/6.169, allocations: 111.8 kB / 1.559 GB, free: 31.13 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.259e-06/6.169, allocations: 4 kB / 1.559 GB, free: 31.13 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.314e-05/6.169, allocations: 17.3 kB / 1.559 GB, free: 31.12 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.1e-06/6.169, allocations: 7.312 kB / 1.559 GB, free: 31.12 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.535e-06/6.169, allocations: 3.938 kB / 1.559 GB, free: 31.11 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001486/6.17, allocations: 0.7953 MB / 1.56 GB, free: 30.38 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001438/6.17, allocations: 160.2 kB / 1.56 GB, free: 30.21 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.856e-05/6.171, allocations: 12 kB / 1.56 GB, free: 30.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004148/6.171, allocations: 39.89 kB / 1.56 GB, free: 30.16 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001478/6.171, allocations: 63.92 kB / 1.56 GB, free: 30.1 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.296e-05/6.171, allocations: 19.98 kB / 1.561 GB, free: 30.08 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001548/6.171, allocations: 211.1 kB / 1.561 GB, free: 29.88 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.31e-07/6.171, allocations: 0 / 1.561 GB, free: 29.88 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003686/6.172, allocations: 110 kB / 1.561 GB, free: 29.77 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.0001706/6.172, allocations: 135.9 kB / 1.561 GB, free: 29.64 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.001044/6.173, allocations: 0.6348 MB / 1.562 GB, free: 28.96 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.884e-06/6.173, allocations: 0 / 1.562 GB, free: 28.96 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0004994/6.173, allocations: 260.7 kB / 1.562 GB, free: 28.71 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000423/6.174, allocations: 72.33 kB / 1.562 GB, free: 28.64 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001518/6.175, allocations: 1.23 MB / 1.563 GB, free: 27.45 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000175/6.176, allocations: 0.8015 MB / 1.564 GB, free: 26.61 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0003935/6.176, allocations: 88.42 kB / 1.564 GB, free: 26.54 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001662/6.176, allocations: 47.42 kB / 1.564 GB, free: 26.49 MB / 0.7169 GB Notification: Performance of SimCode: time 4.5e-07/6.176, allocations: 4 kB / 1.564 GB, free: 26.48 MB / 0.7169 GB Notification: Performance of Templates: time 0.008435/6.185, allocations: 5.568 MB / 1.569 GB, free: 21.01 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)