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.001044/0.001044, allocations: 103.7 kB / 16.41 MB, free: 6.484 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.00105/0.00105, allocations: 187 kB / 17.34 MB, free: 5.734 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.264/1.264, allocations: 222.9 MB / 241 MB, free: 15.16 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002087/0.002087, allocations: 289.8 kB / 291.5 MB, free: 14.46 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9078/0.9078, allocations: 169.3 MB / 0.499 GB, free: 4.43 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001825/0.001825, allocations: 95.86 kB / 0.6821 GB, free: 6.98 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4478/0.4496, allocations: 86.97 MB / 0.767 GB, free: 3.914 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003713/0.4534, allocations: 2.646 MB / 0.7696 GB, free: 1.25 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.001841/0.4552, allocations: 1.076 MB / 0.7706 GB, free: 168 kB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.000251/0.4555, allocations: 11.88 kB / 0.7707 GB, free: 156 kB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0002866/0.4558, allocations: 79.06 kB / 0.7707 GB, free: 80 kB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 0.0003421/0.4562, allocations: 123.1 kB / 0.7709 GB, free: 15.95 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004917/0.4567, allocations: 175.6 kB / 0.771 GB, free: 15.78 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.000595/0.4573, allocations: 0.5098 MB / 0.7715 GB, free: 15.27 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001385/0.4574, allocations: 44.72 kB / 0.7716 GB, free: 15.23 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.000385/0.4578, allocations: 243.1 kB / 0.7718 GB, free: 14.99 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003501/0.4582, allocations: 223.1 kB / 0.772 GB, free: 14.77 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 8.177e-05/0.4583, allocations: 28 kB / 0.772 GB, free: 14.75 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001878/0.4585, allocations: 75.95 kB / 0.7721 GB, free: 14.67 MB / 0.545 GB Notification: Performance of NFScalarize.scalarize: time 8.494e-05/0.4586, allocations: 79.66 kB / 0.7722 GB, free: 14.59 MB / 0.545 GB Notification: Performance of NFVerifyModel.verify: time 0.0001938/0.4588, allocations: 187 kB / 0.7724 GB, free: 14.41 MB / 0.545 GB Notification: Performance of NFConvertDAE.convert: time 0.0004519/0.4592, allocations: 437 kB / 0.7728 GB, free: 13.98 MB / 0.545 GB Notification: Performance of FrontEnd - DAE generated: time 4.428e-06/0.4592, allocations: 0 / 0.7728 GB, free: 13.98 MB / 0.545 GB Notification: Performance of FrontEnd: time 1.773e-06/0.4592, allocations: 0 / 0.7728 GB, free: 13.98 MB / 0.545 GB Notification: Performance of Transformations before backend: time 1.129e-05/0.4593, allocations: 0 / 0.7728 GB, free: 13.98 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.001815/0.4611, allocations: 0.8016 MB / 0.7736 GB, free: 13.12 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 3.635e-05/0.4611, allocations: 8.031 kB / 0.7736 GB, free: 13.11 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001171/0.4612, allocations: 40.47 kB / 0.7736 GB, free: 13.07 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004265/0.4617, allocations: 339.9 kB / 0.7739 GB, free: 12.7 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.121e-05/0.4617, allocations: 16.8 kB / 0.7739 GB, free: 12.68 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.942e-05/0.4618, allocations: 28.28 kB / 0.774 GB, free: 12.65 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007031/0.4625, allocations: 333 kB / 0.7743 GB, free: 12.32 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.608e-05/0.4625, allocations: 0 / 0.7743 GB, free: 12.32 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.345e-05/0.4626, allocations: 8 kB / 0.7743 GB, free: 12.31 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.484e-06/0.4626, allocations: 8 kB / 0.7743 GB, free: 12.3 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007976/0.4634, allocations: 301.2 kB / 0.7746 GB, free: 12.01 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001089/0.4645, allocations: 0.7734 MB / 0.7753 GB, free: 11.18 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001029/0.4655, allocations: 381.5 kB / 0.7757 GB, free: 10.79 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004646/0.466, allocations: 213.5 kB / 0.7759 GB, free: 10.58 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006094/0.4666, allocations: 445.5 kB / 0.7763 GB, free: 10.05 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006948/0.4673, allocations: 333.2 kB / 0.7767 GB, free: 9.707 MB / 0.545 GB Notification: Performance of pre-optimization done (n=42): time 2.224e-06/0.4673, allocations: 0 / 0.7767 GB, free: 9.707 MB / 0.545 GB Notification: Performance of matching and sorting (n=42): time 0.001537/0.4689, allocations: 0.6063 MB / 0.7772 GB, free: 9.094 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.391e-05/0.4689, allocations: 81.11 kB / 0.7773 GB, free: 8.996 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002945/0.4692, allocations: 308.5 kB / 0.7776 GB, free: 8.688 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 4.464e-05/0.4693, allocations: 41.64 kB / 0.7777 GB, free: 8.641 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001202/0.4694, allocations: 164.8 kB / 0.7778 GB, free: 8.473 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001247/0.4696, allocations: 142 kB / 0.778 GB, free: 8.332 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001471/0.4697, allocations: 98 kB / 0.778 GB, free: 8.23 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.0001221/0.4698, allocations: 346.8 kB / 0.7784 GB, free: 7.883 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004975/0.4703, allocations: 202.7 kB / 0.7786 GB, free: 7.68 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005141/0.4709, allocations: 246.4 kB / 0.7788 GB, free: 7.426 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.18/6.651, allocations: 0.866 GB / 1.645 GB, free: 276 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 7.023e-06/6.651, allocations: 0 / 1.645 GB, free: 276 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001153/6.652, allocations: 0.6375 MB / 1.645 GB, free: 275.6 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 4.159e-05/6.652, allocations: 89.09 kB / 1.646 GB, free: 275.4 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.886e-06/6.652, allocations: 4 kB / 1.646 GB, free: 275.4 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.096e-05/6.652, allocations: 4 kB / 1.646 GB, free: 275.4 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004899/6.653, allocations: 119 kB / 1.646 GB, free: 275.3 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.267e-06/6.653, allocations: 4 kB / 1.646 GB, free: 275.3 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004468/6.653, allocations: 68.66 kB / 1.646 GB, free: 275.3 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.935e-05/6.653, allocations: 25.23 kB / 1.646 GB, free: 275.3 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.0002512/6.654, allocations: 204.1 kB / 1.646 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.608e-05/6.654, allocations: 38.28 kB / 1.646 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001282/6.655, allocations: 0.6272 MB / 1.647 GB, free: 274.4 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.601e-06/6.655, allocations: 8 kB / 1.647 GB, free: 274.4 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.71e-06/6.655, allocations: 3.938 kB / 1.647 GB, free: 274.4 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.993e-06/6.655, allocations: 3.984 kB / 1.647 GB, free: 274.4 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003281/6.655, allocations: 441.2 kB / 1.647 GB, free: 274 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.174e-06/6.655, allocations: 0 / 1.647 GB, free: 274 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005085/6.656, allocations: 110.9 kB / 1.647 GB, free: 273.9 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.216e-06/6.656, allocations: 0 / 1.647 GB, free: 273.9 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.444e-05/6.656, allocations: 19.98 kB / 1.647 GB, free: 273.8 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.565e-06/6.656, allocations: 4 kB / 1.647 GB, free: 273.8 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.633e-06/6.656, allocations: 3.938 kB / 1.647 GB, free: 273.8 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001391/6.657, allocations: 0.7806 MB / 1.648 GB, free: 273.1 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001402/6.657, allocations: 162.3 kB / 1.648 GB, free: 272.9 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.435e-05/6.657, allocations: 12 kB / 1.648 GB, free: 272.9 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003787/6.658, allocations: 43.89 kB / 1.648 GB, free: 272.9 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001124/6.658, allocations: 51.92 kB / 1.648 GB, free: 272.8 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.841e-05/6.658, allocations: 19.98 kB / 1.648 GB, free: 272.8 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0001352/6.658, allocations: 219.1 kB / 1.648 GB, free: 272.6 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.1e-07/6.658, allocations: 3.094 kB / 1.648 GB, free: 272.6 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.000334/6.658, allocations: 119.9 kB / 1.649 GB, free: 272.5 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.000153/6.659, allocations: 135.2 kB / 1.649 GB, free: 272.3 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.0009793/6.66, allocations: 0.6353 MB / 1.649 GB, free: 271.7 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 1.853e-06/6.66, allocations: 0 / 1.649 GB, free: 271.7 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0004637/6.66, allocations: 259.2 kB / 1.65 GB, free: 271.4 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003861/6.661, allocations: 79.67 kB / 1.65 GB, free: 271.3 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00137/6.662, allocations: 1.121 MB / 1.651 GB, free: 270.2 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001627/6.662, allocations: 0.8012 MB / 1.651 GB, free: 269.4 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001728/6.662, allocations: 55.42 kB / 1.652 GB, free: 269.3 MB / 0.8419 GB Notification: Performance of SimCode: time 4.01e-07/6.662, allocations: 0 / 1.652 GB, free: 269.3 MB / 0.8419 GB Notification: Performance of Templates: time 0.006061/6.668, allocations: 6.071 MB / 1.657 GB, free: 263.3 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)