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.005888/0.005888, allocations: 94.77 kB / 15.73 MB, free: 6.039 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.001297/0.001297, allocations: 202 kB / 16.68 MB, free: 5.969 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.286/1.286, allocations: 222.9 MB / 240.4 MB, free: 4.316 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002002/0.002002, allocations: 275 kB / 290.8 MB, free: 1.922 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9351/0.9351, allocations: 169.3 MB / 0.4983 GB, free: 13.78 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0016/0.0016, allocations: 87.86 kB / 0.6814 GB, free: 15.51 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1613/0.1629, allocations: 86.97 MB / 0.7664 GB, free: 8.453 MB / 0.5606 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003233/0.1662, allocations: 2.65 MB / 0.7689 GB, free: 5.785 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.001474/0.1677, allocations: 1.076 MB / 0.77 GB, free: 4.699 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001152/0.1678, allocations: 11.88 kB / 0.77 GB, free: 4.688 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.0002227/0.1681, allocations: 71.36 kB / 0.7701 GB, free: 4.617 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0002011/0.1683, allocations: 127 kB / 0.7702 GB, free: 4.492 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.00036/0.1686, allocations: 179.6 kB / 0.7704 GB, free: 4.316 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.0004406/0.1691, allocations: 0.5099 MB / 0.7709 GB, free: 3.805 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001149/0.1692, allocations: 48.66 kB / 0.7709 GB, free: 3.758 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002544/0.1695, allocations: 227.1 kB / 0.7711 GB, free: 3.535 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002874/0.1698, allocations: 223 kB / 0.7713 GB, free: 3.316 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 7.301e-05/0.1699, allocations: 32 kB / 0.7714 GB, free: 3.285 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001615/0.17, allocations: 83.95 kB / 0.7714 GB, free: 3.203 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 7.85e-05/0.1701, allocations: 75.72 kB / 0.7715 GB, free: 3.129 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 0.0001708/0.1703, allocations: 191 kB / 0.7717 GB, free: 2.941 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.0004123/0.1707, allocations: 418.2 kB / 0.7721 GB, free: 2.531 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 3.487e-06/0.1707, allocations: 0 / 0.7721 GB, free: 2.531 MB / 0.5606 GB Notification: Performance of FrontEnd: time 1.743e-06/0.1707, allocations: 0 / 0.7721 GB, free: 2.531 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 7.995e-06/0.1707, allocations: 0 / 0.7721 GB, free: 2.531 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.00167/0.1724, allocations: 0.8207 MB / 0.7729 GB, free: 1.645 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 3.386e-05/0.1724, allocations: 12.03 kB / 0.7729 GB, free: 1.633 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.925e-05/0.1725, allocations: 40.7 kB / 0.773 GB, free: 1.594 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003759/0.1729, allocations: 340.1 kB / 0.7733 GB, free: 1.219 MB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.077e-05/0.173, allocations: 20.81 kB / 0.7733 GB, free: 1.199 MB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.867e-05/0.173, allocations: 36.25 kB / 0.7733 GB, free: 1.164 MB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006703/0.1737, allocations: 321.1 kB / 0.7736 GB, free: 0.8398 MB / 0.5606 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.567e-05/0.1737, allocations: 4 kB / 0.7736 GB, free: 0.8359 MB / 0.5606 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.259e-05/0.1738, allocations: 8 kB / 0.7736 GB, free: 0.8281 MB / 0.5606 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.702e-06/0.1738, allocations: 7.938 kB / 0.7737 GB, free: 0.8203 MB / 0.5606 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008243/0.1746, allocations: 295.8 kB / 0.7739 GB, free: 0.5312 MB / 0.5606 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.3344/0.509, allocations: 0.7729 MB / 0.7747 GB, free: 14.82 MB / 0.5606 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001181/0.5102, allocations: 387.8 kB / 0.7751 GB, free: 14.77 MB / 0.5606 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005238/0.5107, allocations: 209.1 kB / 0.7753 GB, free: 14.76 MB / 0.5606 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006274/0.5114, allocations: 449.7 kB / 0.7757 GB, free: 14.29 MB / 0.5606 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0008595/0.5122, allocations: 327 kB / 0.776 GB, free: 14.23 MB / 0.5606 GB Notification: Performance of pre-optimization done (n=42): time 2.645e-06/0.5122, allocations: 1.375 kB / 0.776 GB, free: 14.23 MB / 0.5606 GB Notification: Performance of matching and sorting (n=42): time 0.001823/0.5141, allocations: 0.6105 MB / 0.7766 GB, free: 14.19 MB / 0.5606 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.286e-05/0.5141, allocations: 87.88 kB / 0.7767 GB, free: 14.1 MB / 0.5606 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004072/0.5146, allocations: 311.3 kB / 0.777 GB, free: 13.99 MB / 0.5606 GB Notification: Performance of collectPreVariables (initialization): time 4.075e-05/0.5146, allocations: 33.48 kB / 0.777 GB, free: 13.96 MB / 0.5606 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001354/0.5147, allocations: 165 kB / 0.7772 GB, free: 13.88 MB / 0.5606 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001448/0.5149, allocations: 153.8 kB / 0.7773 GB, free: 13.79 MB / 0.5606 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002051/0.5151, allocations: 91.33 kB / 0.7774 GB, free: 13.75 MB / 0.5606 GB Notification: Performance of setup shared object (initialization): time 0.0001081/0.5152, allocations: 352 kB / 0.7777 GB, free: 13.42 MB / 0.5606 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005802/0.5158, allocations: 206 kB / 0.7779 GB, free: 13.35 MB / 0.5606 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005526/0.5164, allocations: 247.5 kB / 0.7782 GB, free: 13.23 MB / 0.5606 GB Notification: Performance of analyzeInitialSystem (initialization): time 5.964/6.48, allocations: 0.866 GB / 1.644 GB, free: 103.5 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.52e-06/6.48, allocations: 0 / 1.644 GB, free: 103.5 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001263/6.481, allocations: 0.6337 MB / 1.645 GB, free: 103 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 4.052e-05/6.481, allocations: 88.48 kB / 1.645 GB, free: 102.9 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.865e-06/6.481, allocations: 4 kB / 1.645 GB, free: 102.9 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.027e-05/6.482, allocations: 128 / 1.645 GB, free: 102.9 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005057/6.482, allocations: 124.1 kB / 1.645 GB, free: 102.8 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.095e-05/6.482, allocations: 4.562 kB / 1.645 GB, free: 102.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004618/6.483, allocations: 62.7 kB / 1.645 GB, free: 102.8 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.28e-05/6.483, allocations: 22.55 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.0002578/6.483, allocations: 206.8 kB / 1.645 GB, free: 102.6 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.157e-05/6.483, allocations: 40.97 kB / 1.645 GB, free: 102.6 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00137/6.484, allocations: 0.6301 MB / 1.646 GB, free: 102.1 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.932e-06/6.484, allocations: 8 kB / 1.646 GB, free: 102.1 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.972e-06/6.484, allocations: 3.938 kB / 1.646 GB, free: 102.1 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.945e-06/6.484, allocations: 5.016 kB / 1.646 GB, free: 102.1 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003701/6.485, allocations: 446.5 kB / 1.646 GB, free: 101.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.176e-06/6.485, allocations: 4 kB / 1.646 GB, free: 101.7 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.00052/6.485, allocations: 109.7 kB / 1.647 GB, free: 101.6 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 4.758e-06/6.485, allocations: 0 / 1.647 GB, free: 101.6 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.231e-05/6.485, allocations: 19.73 kB / 1.647 GB, free: 101.6 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.807e-06/6.485, allocations: 6.375 kB / 1.647 GB, free: 101.6 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.683e-06/6.485, allocations: 3.938 kB / 1.647 GB, free: 101.6 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001477/6.487, allocations: 0.7855 MB / 1.647 GB, free: 100.9 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001456/6.487, allocations: 159.9 kB / 1.647 GB, free: 100.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.06e-05/6.487, allocations: 15.98 kB / 1.647 GB, free: 100.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003844/6.487, allocations: 43.91 kB / 1.648 GB, free: 100.7 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000124/6.488, allocations: 51.92 kB / 1.648 GB, free: 100.6 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.205e-05/6.488, allocations: 23.92 kB / 1.648 GB, free: 100.6 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0001503/6.488, allocations: 215.1 kB / 1.648 GB, free: 100.4 MB / 0.8419 GB Notification: Performance of sort global known variables: time 2.9e-07/6.488, allocations: 0 / 1.648 GB, free: 100.4 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.0003543/6.488, allocations: 117.9 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.0001657/6.488, allocations: 132 kB / 1.648 GB, free: 100.2 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.001058/6.489, allocations: 0.6356 MB / 1.649 GB, free: 99.48 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 2.355e-06/6.489, allocations: 0 / 1.649 GB, free: 99.48 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0005164/6.49, allocations: 263.9 kB / 1.649 GB, free: 99.22 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004027/6.49, allocations: 70.2 kB / 1.649 GB, free: 99.15 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001428/6.492, allocations: 1.106 MB / 1.65 GB, free: 98.06 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001606/6.492, allocations: 0.8051 MB / 1.651 GB, free: 97.22 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.0003131/6.492, allocations: 84.36 kB / 1.651 GB, free: 97.14 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001603/6.492, allocations: 58.47 kB / 1.651 GB, free: 97.09 MB / 0.8419 GB Notification: Performance of SimCode: time 2.31e-07/6.492, allocations: 0 / 1.651 GB, free: 97.09 MB / 0.8419 GB Notification: Performance of Templates: time 0.008921/6.501, allocations: 6.025 MB / 1.657 GB, free: 91.17 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)