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.001264/0.001264, allocations: 102.5 kB / 16.27 MB, free: 6.414 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.001151/0.001151, allocations: 190 kB / 17.2 MB, free: 5.953 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.251/1.251, allocations: 222.9 MB / 240.9 MB, free: 15.28 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002212/0.002212, allocations: 299 kB / 291.3 MB, free: 14.48 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9049/0.9049, allocations: 169.3 MB / 0.4988 GB, free: 4.488 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001908/0.001908, allocations: 99.06 kB / 0.5959 GB, free: 15.17 MB / 414.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1485/0.1505, allocations: 86.98 MB / 0.6808 GB, free: 8.203 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003567/0.1541, allocations: 2.642 MB / 0.6834 GB, free: 5.539 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001589/0.1557, allocations: 1.068 MB / 0.6844 GB, free: 4.461 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.00015/0.1559, allocations: 15.88 kB / 0.6845 GB, free: 4.445 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002424/0.1562, allocations: 75.58 kB / 0.6845 GB, free: 4.371 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002019/0.1564, allocations: 127 kB / 0.6847 GB, free: 4.246 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0004044/0.1568, allocations: 179.6 kB / 0.6848 GB, free: 4.07 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004099/0.1572, allocations: 0.5099 MB / 0.6853 GB, free: 3.559 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001243/0.1573, allocations: 48.7 kB / 0.6854 GB, free: 3.512 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.000245/0.1576, allocations: 219.2 kB / 0.6856 GB, free: 3.297 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002631/0.1578, allocations: 223 kB / 0.6858 GB, free: 3.078 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 5.678e-05/0.1579, allocations: 28 kB / 0.6858 GB, free: 3.051 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001605/0.1581, allocations: 91.94 kB / 0.6859 GB, free: 2.961 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 7.086e-05/0.1582, allocations: 75.72 kB / 0.686 GB, free: 2.887 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.000163/0.1583, allocations: 191 kB / 0.6862 GB, free: 2.699 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0003816/0.1587, allocations: 406.6 kB / 0.6866 GB, free: 2.301 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.999e-06/0.1587, allocations: 0 / 0.6866 GB, free: 2.301 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.373e-06/0.1587, allocations: 0 / 0.6866 GB, free: 2.301 MB / 494.1 MB Notification: Performance of Transformations before backend: time 6.302e-06/0.1587, allocations: 0 / 0.6866 GB, free: 2.301 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.001668/0.1604, allocations: 0.8055 MB / 0.6873 GB, free: 1.43 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.616e-05/0.1605, allocations: 16.02 kB / 0.6874 GB, free: 1.414 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.983e-05/0.1606, allocations: 40.47 kB / 0.6874 GB, free: 1.375 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000356/0.1609, allocations: 339.9 kB / 0.6877 GB, free: 1.004 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.876e-05/0.1609, allocations: 12.81 kB / 0.6877 GB, free: 0.9922 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.855e-05/0.161, allocations: 28.38 kB / 0.6878 GB, free: 0.9648 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000671/0.1617, allocations: 333 kB / 0.6881 GB, free: 0.6289 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.436e-05/0.1617, allocations: 0 / 0.6881 GB, free: 0.6289 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.311e-05/0.1618, allocations: 11.98 kB / 0.6881 GB, free: 0.6172 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.779e-06/0.1618, allocations: 4 kB / 0.6881 GB, free: 0.6133 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008193/0.1626, allocations: 296.8 kB / 0.6884 GB, free: 332 kB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.2814/0.444, allocations: 0.7684 MB / 0.6891 GB, free: 17.98 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001132/0.4451, allocations: 390.3 kB / 0.6895 GB, free: 17.93 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004917/0.4457, allocations: 212.7 kB / 0.6897 GB, free: 17.91 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.000558/0.4462, allocations: 454.5 kB / 0.6901 GB, free: 17.45 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007456/0.447, allocations: 329.5 kB / 0.6904 GB, free: 17.38 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 2.625e-06/0.447, allocations: 0.5625 kB / 0.6904 GB, free: 17.38 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.00165/0.4487, allocations: 0.6028 MB / 0.691 GB, free: 17.31 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.831e-05/0.4487, allocations: 92.73 kB / 0.6911 GB, free: 17.21 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002919/0.449, allocations: 306.8 kB / 0.6914 GB, free: 17.05 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 3.834e-05/0.4491, allocations: 38.62 kB / 0.6915 GB, free: 17.01 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 8.767e-05/0.4491, allocations: 164.3 kB / 0.6916 GB, free: 16.89 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 9.359e-05/0.4492, allocations: 140.1 kB / 0.6917 GB, free: 16.8 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001496/0.4494, allocations: 95.17 kB / 0.6918 GB, free: 16.75 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 6.885e-05/0.4495, allocations: 352.1 kB / 0.6922 GB, free: 16.43 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000506/0.45, allocations: 206.1 kB / 0.6924 GB, free: 16.36 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000525/0.4505, allocations: 249.9 kB / 0.6926 GB, free: 16.25 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 6.183/6.634, allocations: 0.866 GB / 1.559 GB, free: 228 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.132e-06/6.634, allocations: 0 / 1.559 GB, free: 228 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001191/6.635, allocations: 0.6352 MB / 1.559 GB, free: 227.5 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 3.904e-05/6.635, allocations: 92.59 kB / 1.559 GB, free: 227.4 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.236e-06/6.635, allocations: 4 kB / 1.559 GB, free: 227.4 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.037e-05/6.635, allocations: 7 kB / 1.559 GB, free: 227.4 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004891/6.635, allocations: 113.1 kB / 1.559 GB, free: 227.3 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.074e-05/6.635, allocations: 5.5 kB / 1.559 GB, free: 227.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000443/6.636, allocations: 74.02 kB / 1.56 GB, free: 227.2 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.711e-05/6.636, allocations: 19.3 kB / 1.56 GB, free: 227.2 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.000251/6.636, allocations: 198.1 kB / 1.56 GB, free: 227 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.855e-05/6.636, allocations: 43.53 kB / 1.56 GB, free: 227 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001362/6.638, allocations: 0.6252 MB / 1.56 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.162e-06/6.638, allocations: 8 kB / 1.56 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.44e-06/6.638, allocations: 4.812 kB / 1.56 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.763e-06/6.638, allocations: 3.984 kB / 1.56 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003241/6.638, allocations: 439.3 kB / 1.561 GB, free: 226.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.074e-06/6.638, allocations: 0 / 1.561 GB, free: 226.2 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005185/6.638, allocations: 111.7 kB / 1.561 GB, free: 226.1 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.386e-06/6.638, allocations: 0 / 1.561 GB, free: 226.1 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.419e-05/6.638, allocations: 21.95 kB / 1.561 GB, free: 226.1 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.625e-06/6.638, allocations: 0 / 1.561 GB, free: 226.1 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.613e-06/6.638, allocations: 3.938 kB / 1.561 GB, free: 226 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001366/6.64, allocations: 0.7825 MB / 1.562 GB, free: 225.3 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.000128/6.64, allocations: 164.2 kB / 1.562 GB, free: 225.1 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.346e-05/6.64, allocations: 12 kB / 1.562 GB, free: 225.1 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003754/6.64, allocations: 47.89 kB / 1.562 GB, free: 225.1 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001166/6.641, allocations: 58.69 kB / 1.562 GB, free: 225 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.797e-05/6.641, allocations: 16 kB / 1.562 GB, free: 225 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001369/6.641, allocations: 219.7 kB / 1.562 GB, free: 224.8 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.2e-07/6.641, allocations: 0 / 1.562 GB, free: 224.8 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003253/6.641, allocations: 114.4 kB / 1.562 GB, free: 224.7 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.0001467/6.641, allocations: 128.8 kB / 1.562 GB, free: 224.6 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.001039/6.642, allocations: 0.6608 MB / 1.563 GB, free: 223.9 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.723e-06/6.642, allocations: 0 / 1.563 GB, free: 223.9 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0004649/6.643, allocations: 255.9 kB / 1.563 GB, free: 223.6 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003782/6.643, allocations: 85.25 kB / 1.563 GB, free: 223.5 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001358/6.645, allocations: 1.132 MB / 1.565 GB, free: 222.4 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001484/6.645, allocations: 0.8051 MB / 1.565 GB, free: 221.6 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001623/6.645, allocations: 55.41 kB / 1.565 GB, free: 221.5 MB / 0.7169 GB Notification: Performance of SimCode: time 2.3e-07/6.645, allocations: 0 / 1.565 GB, free: 221.5 MB / 0.7169 GB Notification: Performance of Templates: time 0.006245/6.651, allocations: 5.956 MB / 1.571 GB, free: 215.6 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)