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.005475/0.005475, allocations: 104.1 kB / 15.74 MB, free: 5.984 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.001125/0.001125, allocations: 197.8 kB / 16.68 MB, free: 5.91 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.283/1.283, allocations: 222.9 MB / 240.3 MB, free: 15.09 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002046/0.002046, allocations: 297.6 kB / 290.8 MB, free: 14.45 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9201/0.9201, allocations: 169.3 MB / 0.4983 GB, free: 4.453 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001817/0.001818, allocations: 91.86 kB / 0.6814 GB, free: 7.023 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4254/0.4272, allocations: 86.99 MB / 0.7664 GB, free: 3.914 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003331/0.4306, allocations: 2.646 MB / 0.7689 GB, free: 1.25 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.00182/0.4324, allocations: 1.072 MB / 0.77 GB, free: 172 kB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001598/0.4326, allocations: 11.94 kB / 0.77 GB, free: 160 kB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0002788/0.4329, allocations: 75 kB / 0.7701 GB, free: 88 kB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 0.0002626/0.4332, allocations: 123 kB / 0.7702 GB, free: 15.96 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004359/0.4336, allocations: 175.6 kB / 0.7703 GB, free: 15.79 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.0004965/0.4341, allocations: 0.5099 MB / 0.7708 GB, free: 15.28 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001369/0.4343, allocations: 52.7 kB / 0.7709 GB, free: 15.23 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002871/0.4346, allocations: 235.1 kB / 0.7711 GB, free: 15 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002891/0.4349, allocations: 231 kB / 0.7713 GB, free: 14.77 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 5.531e-05/0.4349, allocations: 28 kB / 0.7714 GB, free: 14.75 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.000179/0.4351, allocations: 75.97 kB / 0.7714 GB, free: 14.67 MB / 0.545 GB Notification: Performance of NFScalarize.scalarize: time 0.0001018/0.4352, allocations: 83.66 kB / 0.7715 GB, free: 14.59 MB / 0.545 GB Notification: Performance of NFVerifyModel.verify: time 0.0001906/0.4354, allocations: 187 kB / 0.7717 GB, free: 14.41 MB / 0.545 GB Notification: Performance of NFConvertDAE.convert: time 0.0004377/0.4359, allocations: 421.1 kB / 0.7721 GB, free: 14 MB / 0.545 GB Notification: Performance of FrontEnd - DAE generated: time 4.859e-06/0.4359, allocations: 3.938 kB / 0.7721 GB, free: 13.99 MB / 0.545 GB Notification: Performance of FrontEnd: time 1.643e-06/0.4359, allocations: 0 / 0.7721 GB, free: 13.99 MB / 0.545 GB Notification: Performance of Transformations before backend: time 8.095e-06/0.4359, allocations: 0 / 0.7721 GB, free: 13.99 MB / 0.545 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.001787/0.4377, allocations: 0.8016 MB / 0.7729 GB, free: 13.12 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 4.653e-05/0.4378, allocations: 12.03 kB / 0.7729 GB, free: 13.11 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.566e-05/0.4379, allocations: 40.47 kB / 0.7729 GB, free: 13.07 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003879/0.4383, allocations: 343.8 kB / 0.7733 GB, free: 12.7 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.963e-05/0.4383, allocations: 20.8 kB / 0.7733 GB, free: 12.68 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.608e-05/0.4384, allocations: 28.28 kB / 0.7733 GB, free: 12.65 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006823/0.439, allocations: 333 kB / 0.7736 GB, free: 12.31 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.614e-05/0.4391, allocations: 0 / 0.7736 GB, free: 12.31 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.34e-05/0.4391, allocations: 8 kB / 0.7736 GB, free: 12.3 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.957e-06/0.4391, allocations: 4 kB / 0.7736 GB, free: 12.3 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007956/0.4399, allocations: 298.2 kB / 0.7739 GB, free: 12.01 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001265/0.4412, allocations: 0.7773 MB / 0.7747 GB, free: 11.18 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.00109/0.4423, allocations: 389.5 kB / 0.7751 GB, free: 10.78 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004764/0.4428, allocations: 202.5 kB / 0.7752 GB, free: 10.58 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006977/0.4435, allocations: 457.4 kB / 0.7757 GB, free: 10.04 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007442/0.4443, allocations: 325.2 kB / 0.776 GB, free: 9.703 MB / 0.545 GB Notification: Performance of pre-optimization done (n=42): time 1.834e-06/0.4443, allocations: 0 / 0.776 GB, free: 9.703 MB / 0.545 GB Notification: Performance of matching and sorting (n=42): time 0.001585/0.4459, allocations: 0.6117 MB / 0.7766 GB, free: 9.09 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.132e-05/0.4459, allocations: 85.11 kB / 0.7767 GB, free: 8.988 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003191/0.4463, allocations: 312.5 kB / 0.777 GB, free: 8.676 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 4.486e-05/0.4463, allocations: 33.7 kB / 0.777 GB, free: 8.637 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001365/0.4465, allocations: 164.9 kB / 0.7772 GB, free: 8.469 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001313/0.4466, allocations: 138 kB / 0.7773 GB, free: 8.332 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001598/0.4468, allocations: 94 kB / 0.7774 GB, free: 8.234 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.0001874/0.447, allocations: 346.8 kB / 0.7777 GB, free: 7.887 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005129/0.4475, allocations: 214.6 kB / 0.7779 GB, free: 7.672 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004916/0.448, allocations: 242.4 kB / 0.7781 GB, free: 7.422 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 5.676/6.124, allocations: 0.866 GB / 1.644 GB, free: 275.7 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 8.295e-06/6.124, allocations: 2.906 kB / 1.644 GB, free: 275.7 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001176/6.125, allocations: 0.6431 MB / 1.645 GB, free: 275.2 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 4.393e-05/6.125, allocations: 88.98 kB / 1.645 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.824e-06/6.125, allocations: 0 / 1.645 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.141e-05/6.125, allocations: 4 kB / 1.645 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005034/6.125, allocations: 115.2 kB / 1.645 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.578e-06/6.125, allocations: 4 kB / 1.645 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004257/6.126, allocations: 68.28 kB / 1.645 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.216e-05/6.126, allocations: 23.36 kB / 1.645 GB, free: 275 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.0002589/6.126, allocations: 193.7 kB / 1.645 GB, free: 274.8 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.465e-05/6.126, allocations: 43.19 kB / 1.645 GB, free: 274.8 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001326/6.128, allocations: 0.6387 MB / 1.646 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.17e-06/6.128, allocations: 4 kB / 1.646 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.451e-06/6.128, allocations: 3.938 kB / 1.646 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.577e-06/6.128, allocations: 3.984 kB / 1.646 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003355/6.128, allocations: 442.8 kB / 1.646 GB, free: 273.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.124e-06/6.128, allocations: 0 / 1.646 GB, free: 273.7 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005227/6.128, allocations: 103.9 kB / 1.646 GB, free: 273.6 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 4.028e-06/6.128, allocations: 4 kB / 1.646 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.838e-05/6.128, allocations: 23.55 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.436e-06/6.129, allocations: 4 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.024e-06/6.129, allocations: 3.938 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001366/6.13, allocations: 0.7792 MB / 1.647 GB, free: 272.8 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001369/6.13, allocations: 162.9 kB / 1.647 GB, free: 272.6 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 5.77e-05/6.13, allocations: 19.48 kB / 1.647 GB, free: 272.6 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003664/6.13, allocations: 35.91 kB / 1.647 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001219/6.131, allocations: 55.92 kB / 1.648 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.17e-05/6.131, allocations: 19.98 kB / 1.648 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0001432/6.131, allocations: 215.1 kB / 1.648 GB, free: 272.3 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.3e-07/6.131, allocations: 4 kB / 1.648 GB, free: 272.3 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.0003487/6.131, allocations: 112.4 kB / 1.648 GB, free: 272.1 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.0001586/6.131, allocations: 134.9 kB / 1.648 GB, free: 272 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.0009762/6.132, allocations: 0.6435 MB / 1.649 GB, free: 271.3 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 1.964e-06/6.132, allocations: 0 / 1.649 GB, free: 271.3 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0004673/6.133, allocations: 259.5 kB / 1.649 GB, free: 271.1 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003811/6.133, allocations: 74.95 kB / 1.649 GB, free: 271 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001364/6.135, allocations: 1.09 MB / 1.65 GB, free: 269.9 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000157/6.135, allocations: 0.8012 MB / 1.651 GB, free: 269.1 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.0002716/6.135, allocations: 95.31 kB / 1.651 GB, free: 269 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001582/6.135, allocations: 59.41 kB / 1.651 GB, free: 268.9 MB / 0.8419 GB Notification: Performance of SimCode: time 3.51e-07/6.135, allocations: 0 / 1.651 GB, free: 268.9 MB / 0.8419 GB Notification: Performance of Templates: time 0.00843/6.144, allocations: 6.222 MB / 1.657 GB, free: 262.8 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)