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.001316/0.001316, allocations: 113.7 kB / 16.37 MB, free: 6.012 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.001324/0.001324, allocations: 188.9 kB / 17.3 MB, free: 5.613 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.228/1.228, 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.00207/0.00207, allocations: 280.7 kB / 291.4 MB, free: 14.49 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.8788/0.8788, allocations: 169.3 MB / 0.4989 GB, free: 4.473 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001723/0.001723, allocations: 89.86 kB / 0.5967 GB, free: 14.46 MB / 414.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1583/0.16, allocations: 86.98 MB / 0.6816 GB, free: 7.469 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.00347/0.1635, allocations: 2.639 MB / 0.6842 GB, free: 4.809 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001534/0.1651, allocations: 1.08 MB / 0.6852 GB, free: 3.719 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001108/0.1652, allocations: 7.938 kB / 0.6852 GB, free: 3.711 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002155/0.1654, allocations: 71.36 kB / 0.6853 GB, free: 3.641 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001939/0.1656, allocations: 130.9 kB / 0.6854 GB, free: 3.512 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003539/0.166, allocations: 171.6 kB / 0.6856 GB, free: 3.344 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004362/0.1664, allocations: 0.5177 MB / 0.6861 GB, free: 2.824 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001244/0.1666, allocations: 48.64 kB / 0.6861 GB, free: 2.777 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002499/0.1668, allocations: 231.1 kB / 0.6864 GB, free: 2.551 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002621/0.1671, allocations: 215.2 kB / 0.6866 GB, free: 2.34 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 5.844e-05/0.1672, allocations: 28 kB / 0.6866 GB, free: 2.312 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001404/0.1673, allocations: 83.95 kB / 0.6867 GB, free: 2.23 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 7.801e-05/0.1674, allocations: 83.59 kB / 0.6868 GB, free: 2.148 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001662/0.1676, allocations: 183.1 kB / 0.6869 GB, free: 1.969 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0003952/0.168, allocations: 418.6 kB / 0.6873 GB, free: 1.559 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.627e-06/0.168, allocations: 0 / 0.6873 GB, free: 1.559 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.443e-06/0.168, allocations: 0 / 0.6873 GB, free: 1.559 MB / 494.1 MB Notification: Performance of Transformations before backend: time 5.55e-06/0.168, allocations: 0 / 0.6873 GB, free: 1.559 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.001643/0.1696, allocations: 0.8093 MB / 0.6881 GB, free: 0.6836 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.267e-05/0.1697, allocations: 12.03 kB / 0.6881 GB, free: 0.6719 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.089e-05/0.1698, allocations: 44.47 kB / 0.6882 GB, free: 0.6289 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003817/0.1702, allocations: 339.8 kB / 0.6885 GB, free: 264 kB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.762e-05/0.1702, allocations: 20.81 kB / 0.6885 GB, free: 244 kB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.835e-05/0.1703, allocations: 28.36 kB / 0.6885 GB, free: 216 kB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.2572/0.4274, allocations: 319.9 kB / 0.6888 GB, free: 18.36 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.469e-05/0.4275, allocations: 0.625 kB / 0.6888 GB, free: 18.36 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.359e-05/0.4275, allocations: 12.52 kB / 0.6889 GB, free: 18.36 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.07e-05/0.4275, allocations: 4.969 kB / 0.6889 GB, free: 18.36 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008893/0.4284, allocations: 300 kB / 0.6892 GB, free: 18.36 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001052/0.4295, allocations: 0.7701 MB / 0.6899 GB, free: 18.01 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.000992/0.4305, allocations: 389 kB / 0.6903 GB, free: 17.96 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004524/0.431, allocations: 211.4 kB / 0.6905 GB, free: 17.93 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0005423/0.4315, allocations: 457.3 kB / 0.6909 GB, free: 17.45 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006979/0.4322, allocations: 326.2 kB / 0.6912 GB, free: 17.32 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 2.054e-06/0.4322, allocations: 0.9375 kB / 0.6912 GB, free: 17.32 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.00156/0.4338, allocations: 0.612 MB / 0.6918 GB, free: 17.14 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.11e-05/0.4338, allocations: 83.92 kB / 0.6919 GB, free: 17.05 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002865/0.4341, allocations: 306 kB / 0.6922 GB, free: 16.88 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 3.437e-05/0.4342, allocations: 35.22 kB / 0.6922 GB, free: 16.85 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 8.021e-05/0.4343, allocations: 168.2 kB / 0.6924 GB, free: 16.71 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 8.581e-05/0.4344, allocations: 141.6 kB / 0.6925 GB, free: 16.62 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001475/0.4345, allocations: 95.31 kB / 0.6926 GB, free: 16.57 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 6.732e-05/0.4346, allocations: 356.2 kB / 0.693 GB, free: 16.23 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004804/0.4351, allocations: 206.9 kB / 0.6932 GB, free: 16.16 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005008/0.4356, allocations: 252.7 kB / 0.6934 GB, free: 16.05 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 5.386/5.822, allocations: 0.866 GB / 1.559 GB, free: 227.1 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.82e-06/5.822, allocations: 0 / 1.559 GB, free: 227.1 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001167/5.823, allocations: 0.6363 MB / 1.56 GB, free: 226.6 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 3.724e-05/5.823, allocations: 92.41 kB / 1.56 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.482e-06/5.823, allocations: 0 / 1.56 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.76e-05/5.823, allocations: 4 kB / 1.56 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004996/5.823, allocations: 117.4 kB / 1.56 GB, free: 226.4 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.786e-06/5.823, allocations: 4 kB / 1.56 GB, free: 226.4 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004304/5.824, allocations: 68.62 kB / 1.56 GB, free: 226.3 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.168e-05/5.824, allocations: 22.98 kB / 1.56 GB, free: 226.3 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.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.0002391/5.824, allocations: 199.9 kB / 1.561 GB, free: 226.1 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.112e-05/5.824, allocations: 41.5 kB / 1.561 GB, free: 226.1 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001336/5.826, allocations: 0.626 MB / 1.561 GB, free: 225.6 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.56e-06/5.826, allocations: 7.656 kB / 1.561 GB, free: 225.6 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.819e-06/5.826, allocations: 4 kB / 1.561 GB, free: 225.6 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.274e-06/5.826, allocations: 9.359 kB / 1.561 GB, free: 225.6 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003253/5.826, allocations: 436 kB / 1.562 GB, free: 225.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.024e-06/5.826, allocations: 4 kB / 1.562 GB, free: 225.3 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005306/5.827, allocations: 113 kB / 1.562 GB, free: 225.2 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.036e-06/5.827, allocations: 0 / 1.562 GB, free: 225.2 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.638e-05/5.827, allocations: 15.86 kB / 1.562 GB, free: 225.2 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.456e-06/5.827, allocations: 4 kB / 1.562 GB, free: 225.2 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.104e-06/5.827, allocations: 7.875 kB / 1.562 GB, free: 225.1 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001368/5.828, allocations: 0.7845 MB / 1.563 GB, free: 224.4 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001505/5.828, allocations: 167 kB / 1.563 GB, free: 224.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.571e-05/5.828, allocations: 12 kB / 1.563 GB, free: 224.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003949/5.829, allocations: 39.89 kB / 1.563 GB, free: 224.2 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001203/5.829, allocations: 59.92 kB / 1.563 GB, free: 224.1 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.216e-05/5.829, allocations: 19.38 kB / 1.563 GB, free: 224.1 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001394/5.829, allocations: 215.1 kB / 1.563 GB, free: 223.9 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.71e-07/5.829, allocations: 0 / 1.563 GB, free: 223.9 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003325/5.829, allocations: 120 kB / 1.563 GB, free: 223.8 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.000149/5.829, allocations: 133.7 kB / 1.563 GB, free: 223.6 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.000969/5.83, allocations: 0.634 MB / 1.564 GB, free: 223 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.853e-06/5.83, allocations: 0 / 1.564 GB, free: 223 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0004923/5.831, allocations: 267.7 kB / 1.564 GB, free: 222.7 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003723/5.831, allocations: 75.8 kB / 1.564 GB, free: 222.6 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001314/5.833, allocations: 1.097 MB / 1.565 GB, free: 221.5 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001514/5.833, allocations: 0.8012 MB / 1.566 GB, free: 220.7 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0002881/5.833, allocations: 87.28 kB / 1.566 GB, free: 220.6 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001478/5.833, allocations: 47.42 kB / 1.566 GB, free: 220.6 MB / 0.7169 GB Notification: Performance of SimCode: time 3e-07/5.833, allocations: 0 / 1.566 GB, free: 220.6 MB / 0.7169 GB Notification: Performance of Templates: time 0.008041/5.841, allocations: 5.955 MB / 1.572 GB, free: 214.7 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 -s gbode -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)