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.001228/0.001228, allocations: 101.6 kB / 16.4 MB, free: 6.461 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.001167/0.001168, allocations: 189.7 kB / 17.34 MB, free: 5.719 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.27/1.27, allocations: 222.9 MB / 241 MB, free: 15.15 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002088/0.002088, allocations: 297.4 kB / 291.5 MB, free: 14.44 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9281/0.9281, allocations: 169.3 MB / 0.499 GB, free: 4.41 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001683/0.001683, allocations: 91.86 kB / 0.6821 GB, free: 6.984 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.452/0.4537, allocations: 86.97 MB / 0.767 GB, free: 3.902 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003732/0.4574, allocations: 2.654 MB / 0.7696 GB, free: 1.23 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.00178/0.4592, allocations: 1.076 MB / 0.7707 GB, free: 148 kB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001299/0.4594, allocations: 11.94 kB / 0.7707 GB, free: 136 kB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0002535/0.4597, allocations: 75.06 kB / 0.7707 GB, free: 64 kB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 0.0002359/0.4599, allocations: 119.1 kB / 0.7709 GB, free: 15.94 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004086/0.4603, allocations: 171.6 kB / 0.771 GB, free: 15.77 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.0004881/0.4608, allocations: 0.5214 MB / 0.7715 GB, free: 15.25 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001392/0.461, allocations: 48.7 kB / 0.7716 GB, free: 15.21 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002923/0.4613, allocations: 235.1 kB / 0.7718 GB, free: 14.98 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003066/0.4616, allocations: 219.1 kB / 0.772 GB, free: 14.76 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 5.258e-05/0.4616, allocations: 32 kB / 0.772 GB, free: 14.73 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001671/0.4618, allocations: 79.94 kB / 0.7721 GB, free: 14.65 MB / 0.545 GB Notification: Performance of NFScalarize.scalarize: time 7.901e-05/0.4619, allocations: 79.67 kB / 0.7722 GB, free: 14.57 MB / 0.545 GB Notification: Performance of NFVerifyModel.verify: time 0.0001647/0.4621, allocations: 187 kB / 0.7724 GB, free: 14.39 MB / 0.545 GB Notification: Performance of NFConvertDAE.convert: time 0.0004495/0.4625, allocations: 417.2 kB / 0.7728 GB, free: 13.98 MB / 0.545 GB Notification: Performance of FrontEnd - DAE generated: time 5.611e-06/0.4625, allocations: 0 / 0.7728 GB, free: 13.98 MB / 0.545 GB Notification: Performance of FrontEnd: time 3.316e-06/0.4625, allocations: 7.922 kB / 0.7728 GB, free: 13.98 MB / 0.545 GB Notification: Performance of Transformations before backend: time 6.212e-06/0.4626, allocations: 4 kB / 0.7728 GB, free: 13.97 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.00175/0.4643, allocations: 0.8016 MB / 0.7736 GB, free: 13.11 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 3.913e-05/0.4644, allocations: 8.031 kB / 0.7736 GB, free: 13.1 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001004/0.4645, allocations: 40.47 kB / 0.7736 GB, free: 13.06 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004313/0.4649, allocations: 347.8 kB / 0.7739 GB, free: 12.68 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.478e-05/0.4649, allocations: 12.81 kB / 0.7739 GB, free: 12.66 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.166e-05/0.465, allocations: 32.28 kB / 0.774 GB, free: 12.63 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006947/0.4657, allocations: 325.1 kB / 0.7743 GB, free: 12.3 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.7e-05/0.4657, allocations: 7.984 kB / 0.7743 GB, free: 12.3 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.919e-05/0.4658, allocations: 4 kB / 0.7743 GB, free: 12.29 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.522e-06/0.4658, allocations: 4 kB / 0.7743 GB, free: 12.29 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008242/0.4666, allocations: 302.1 kB / 0.7746 GB, free: 12 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001089/0.4677, allocations: 0.7695 MB / 0.7753 GB, free: 11.17 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001034/0.4688, allocations: 390.4 kB / 0.7757 GB, free: 10.77 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004599/0.4692, allocations: 204.1 kB / 0.7759 GB, free: 10.57 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006433/0.4699, allocations: 457.4 kB / 0.7763 GB, free: 10.03 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000724/0.4706, allocations: 325.2 kB / 0.7767 GB, free: 9.695 MB / 0.545 GB Notification: Performance of pre-optimization done (n=42): time 2.625e-06/0.4706, allocations: 0 / 0.7767 GB, free: 9.695 MB / 0.545 GB Notification: Performance of matching and sorting (n=42): time 0.001586/0.4722, allocations: 0.6102 MB / 0.7773 GB, free: 9.082 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.059e-05/0.4723, allocations: 89.09 kB / 0.7773 GB, free: 8.977 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002949/0.4726, allocations: 312.5 kB / 0.7776 GB, free: 8.664 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 3.674e-05/0.4726, allocations: 33.7 kB / 0.7777 GB, free: 8.625 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001173/0.4727, allocations: 164.8 kB / 0.7778 GB, free: 8.457 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001045/0.4729, allocations: 138 kB / 0.778 GB, free: 8.32 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.000157/0.473, allocations: 90.02 kB / 0.778 GB, free: 8.227 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.0001314/0.4732, allocations: 358.8 kB / 0.7784 GB, free: 7.867 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004937/0.4737, allocations: 202.7 kB / 0.7786 GB, free: 7.664 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005062/0.4742, allocations: 246.4 kB / 0.7788 GB, free: 7.41 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.418/6.892, allocations: 0.866 GB / 1.645 GB, free: 275.9 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.733e-06/6.892, allocations: 0 / 1.645 GB, free: 275.9 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001274/6.893, allocations: 0.635 MB / 1.645 GB, free: 275.4 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 4.273e-05/6.893, allocations: 93.03 kB / 1.646 GB, free: 275.3 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.318e-06/6.893, allocations: 5.562 kB / 1.646 GB, free: 275.3 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.094e-05/6.894, allocations: 4 kB / 1.646 GB, free: 275.3 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004914/6.894, allocations: 114 kB / 1.646 GB, free: 275.2 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.011e-05/6.894, allocations: 4 kB / 1.646 GB, free: 275.2 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004654/6.895, allocations: 67.84 kB / 1.646 GB, free: 275.2 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.302e-05/6.895, allocations: 23.92 kB / 1.646 GB, free: 275.1 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.0002582/6.895, allocations: 205.7 kB / 1.646 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.998e-05/6.895, allocations: 38.12 kB / 1.646 GB, free: 274.9 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00137/6.896, allocations: 0.6333 MB / 1.647 GB, free: 274.3 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.101e-06/6.896, allocations: 8 kB / 1.647 GB, free: 274.3 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.242e-06/6.896, allocations: 3.938 kB / 1.647 GB, free: 274.3 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.684e-06/6.896, allocations: 3.984 kB / 1.647 GB, free: 274.3 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003537/6.897, allocations: 440.3 kB / 1.647 GB, free: 273.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.186e-06/6.897, allocations: 0 / 1.647 GB, free: 273.8 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000517/6.897, allocations: 107.9 kB / 1.647 GB, free: 273.7 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.62e-06/6.897, allocations: 0 / 1.647 GB, free: 273.7 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.1e-05/6.897, allocations: 19.98 kB / 1.647 GB, free: 273.7 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.675e-06/6.897, allocations: 4 kB / 1.647 GB, free: 273.7 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.785e-06/6.897, allocations: 7.938 kB / 1.647 GB, free: 273.7 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001448/6.899, allocations: 0.7788 MB / 1.648 GB, free: 272.9 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001637/6.899, allocations: 162.2 kB / 1.648 GB, free: 272.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.068e-05/6.899, allocations: 12 kB / 1.648 GB, free: 272.8 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003839/6.899, allocations: 43.89 kB / 1.648 GB, free: 272.7 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001269/6.9, allocations: 51.92 kB / 1.648 GB, free: 272.7 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.061e-05/6.9, allocations: 25.12 kB / 1.648 GB, free: 272.7 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0001572/6.9, allocations: 219.1 kB / 1.648 GB, free: 272.4 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.61e-07/6.9, allocations: 0 / 1.648 GB, free: 272.4 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.000351/6.9, allocations: 116.4 kB / 1.649 GB, free: 272.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.0001673/6.9, allocations: 134.5 kB / 1.649 GB, free: 272.2 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.001032/6.901, allocations: 0.6354 MB / 1.649 GB, free: 271.5 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 2.515e-06/6.901, allocations: 0 / 1.649 GB, free: 271.5 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0004748/6.902, allocations: 259 kB / 1.65 GB, free: 271.3 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003983/6.902, allocations: 75.98 kB / 1.65 GB, free: 271.2 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001459/6.904, allocations: 1.123 MB / 1.651 GB, free: 270.1 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001649/6.904, allocations: 0.8012 MB / 1.652 GB, free: 269.2 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001817/6.904, allocations: 59.41 kB / 1.652 GB, free: 269.2 MB / 0.8419 GB Notification: Performance of SimCode: time 4.41e-07/6.904, allocations: 0 / 1.652 GB, free: 269.2 MB / 0.8419 GB Notification: Performance of Templates: time 0.007271/6.911, allocations: 6.071 MB / 1.657 GB, free: 263.2 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)