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.001321/0.001321, allocations: 115.6 kB / 16.37 MB, free: 6.004 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.001407/0.001407, allocations: 192.1 kB / 17.31 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.239/1.239, 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.002018/0.002018, allocations: 282.8 kB / 291.4 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.8933/0.8933, allocations: 169.3 MB / 0.4989 GB, free: 4.445 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001699/0.001699, allocations: 93.84 kB / 0.5967 GB, free: 14.43 MB / 414.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1392/0.141, allocations: 86.97 MB / 0.6816 GB, free: 7.457 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003435/0.1444, allocations: 2.634 MB / 0.6842 GB, free: 4.805 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001613/0.1461, allocations: 1.084 MB / 0.6852 GB, free: 3.711 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001324/0.1462, allocations: 15.88 kB / 0.6852 GB, free: 3.695 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.000213/0.1464, allocations: 71.34 kB / 0.6853 GB, free: 3.625 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002022/0.1466, allocations: 123 kB / 0.6854 GB, free: 3.504 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003681/0.147, allocations: 175.6 kB / 0.6856 GB, free: 3.332 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004389/0.1475, allocations: 0.5099 MB / 0.6861 GB, free: 2.82 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001173/0.1476, allocations: 60.62 kB / 0.6861 GB, free: 2.762 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.00026/0.1479, allocations: 227.2 kB / 0.6864 GB, free: 2.539 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002738/0.1481, allocations: 219.1 kB / 0.6866 GB, free: 2.324 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 5.17e-05/0.1482, allocations: 28 kB / 0.6866 GB, free: 2.297 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001442/0.1484, allocations: 71.97 kB / 0.6867 GB, free: 2.227 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 8.239e-05/0.1484, allocations: 83.66 kB / 0.6867 GB, free: 2.145 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001735/0.1486, allocations: 187 kB / 0.6869 GB, free: 1.961 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.000383/0.149, allocations: 418.6 kB / 0.6873 GB, free: 1.551 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 1.138e-05/0.149, allocations: 4 kB / 0.6873 GB, free: 1.547 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.373e-06/0.149, allocations: 0 / 0.6873 GB, free: 1.547 MB / 494.1 MB Notification: Performance of Transformations before backend: time 6.192e-06/0.1491, allocations: 0 / 0.6873 GB, free: 1.547 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.001647/0.1507, allocations: 0.8093 MB / 0.6881 GB, free: 0.6719 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 2.82e-05/0.1507, allocations: 8.031 kB / 0.6881 GB, free: 0.6641 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.608e-05/0.1508, allocations: 44.47 kB / 0.6882 GB, free: 0.6211 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003824/0.1512, allocations: 335.9 kB / 0.6885 GB, free: 260 kB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.919e-05/0.1512, allocations: 20.8 kB / 0.6885 GB, free: 240 kB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.646e-05/0.1513, allocations: 20.38 kB / 0.6885 GB, free: 220 kB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.2445/0.3959, allocations: 333.6 kB / 0.6888 GB, free: 18.94 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.309e-05/0.3959, allocations: 0 / 0.6888 GB, free: 18.94 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.938e-05/0.396, allocations: 8.141 kB / 0.6889 GB, free: 18.94 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.087e-05/0.396, allocations: 4.562 kB / 0.6889 GB, free: 18.94 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0009351/0.3969, allocations: 296 kB / 0.6891 GB, free: 18.92 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001141/0.3981, allocations: 0.7721 MB / 0.6899 GB, free: 18.41 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001009/0.3991, allocations: 387.1 kB / 0.6903 GB, free: 18.27 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004632/0.3996, allocations: 214.2 kB / 0.6905 GB, free: 18.19 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0005278/0.4001, allocations: 453.3 kB / 0.6909 GB, free: 17.71 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007078/0.4008, allocations: 333.2 kB / 0.6912 GB, free: 17.58 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 2.084e-06/0.4008, allocations: 0 / 0.6912 GB, free: 17.58 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.001725/0.4026, allocations: 0.6069 MB / 0.6918 GB, free: 17.4 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.741e-05/0.4026, allocations: 91.11 kB / 0.6919 GB, free: 17.3 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003943/0.403, allocations: 303.5 kB / 0.6922 GB, free: 17.14 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 4.923e-05/0.4031, allocations: 39.09 kB / 0.6922 GB, free: 17.11 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 9.937e-05/0.4032, allocations: 160.7 kB / 0.6924 GB, free: 16.97 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001172/0.4033, allocations: 141.3 kB / 0.6925 GB, free: 16.88 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001912/0.4035, allocations: 95.61 kB / 0.6926 GB, free: 16.83 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001135/0.4036, allocations: 356.1 kB / 0.6929 GB, free: 16.5 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006022/0.4043, allocations: 207.7 kB / 0.6931 GB, free: 16.42 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005972/0.4049, allocations: 246.7 kB / 0.6934 GB, free: 16.31 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 5.512/5.916, allocations: 0.866 GB / 1.559 GB, free: 228.6 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.993e-06/5.917, allocations: 4 kB / 1.559 GB, free: 228.6 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001208/5.918, allocations: 0.6465 MB / 1.56 GB, free: 228.1 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 4.033e-05/5.918, allocations: 85.11 kB / 1.56 GB, free: 228 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.875e-06/5.918, allocations: 0 / 1.56 GB, free: 228 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.909e-05/5.918, allocations: 8.125 kB / 1.56 GB, free: 228 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005103/5.918, allocations: 116 kB / 1.56 GB, free: 227.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.498e-06/5.918, allocations: 4 kB / 1.56 GB, free: 227.9 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004352/5.919, allocations: 63.28 kB / 1.56 GB, free: 227.9 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.273e-05/5.919, allocations: 28.56 kB / 1.56 GB, free: 227.9 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.0002575/5.919, allocations: 195 kB / 1.561 GB, free: 227.7 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.587e-05/5.919, allocations: 37.09 kB / 1.561 GB, free: 227.7 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001317/5.92, allocations: 0.6283 MB / 1.561 GB, free: 227.1 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.933e-06/5.921, allocations: 9.438 kB / 1.561 GB, free: 227 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.64e-06/5.921, allocations: 3.938 kB / 1.561 GB, free: 227 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.115e-06/5.921, allocations: 7.734 kB / 1.561 GB, free: 227 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003709/5.921, allocations: 443 kB / 1.562 GB, free: 226.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.194e-06/5.921, allocations: 4 kB / 1.562 GB, free: 226.6 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005344/5.921, allocations: 103.9 kB / 1.562 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 4.97e-06/5.921, allocations: 4 kB / 1.562 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.684e-05/5.922, allocations: 15.98 kB / 1.562 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.326e-06/5.922, allocations: 4 kB / 1.562 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.964e-06/5.922, allocations: 3.938 kB / 1.562 GB, free: 226.5 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001346/5.923, allocations: 0.7876 MB / 1.563 GB, free: 225.7 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001553/5.923, allocations: 164.3 kB / 1.563 GB, free: 225.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.038e-05/5.923, allocations: 23.98 kB / 1.563 GB, free: 225.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003749/5.923, allocations: 35.91 kB / 1.563 GB, free: 225.4 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001129/5.924, allocations: 55.92 kB / 1.563 GB, free: 225.4 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.189e-05/5.924, allocations: 21.95 kB / 1.563 GB, free: 225.4 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001422/5.924, allocations: 211.1 kB / 1.563 GB, free: 225.2 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.31e-07/5.924, allocations: 0 / 1.563 GB, free: 225.2 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003411/5.924, allocations: 116.9 kB / 1.563 GB, free: 225 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.0001591/5.924, allocations: 141.1 kB / 1.563 GB, free: 224.9 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0009769/5.925, allocations: 0.6408 MB / 1.564 GB, free: 224.2 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.743e-06/5.925, allocations: 0 / 1.564 GB, free: 224.2 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0004652/5.926, allocations: 256 kB / 1.564 GB, free: 224 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003619/5.926, allocations: 74.33 kB / 1.564 GB, free: 223.9 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001298/5.927, allocations: 1.099 MB / 1.565 GB, free: 222.8 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001502/5.928, allocations: 0.8051 MB / 1.566 GB, free: 222 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0002704/5.928, allocations: 79.47 kB / 1.566 GB, free: 221.9 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001505/5.928, allocations: 51.41 kB / 1.566 GB, free: 221.8 MB / 0.7169 GB Notification: Performance of SimCode: time 6.82e-07/5.928, allocations: 4 kB / 1.566 GB, free: 221.8 MB / 0.7169 GB Notification: Performance of Templates: time 0.007872/5.936, allocations: 5.955 MB / 1.572 GB, free: 216 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 cvode -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)