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.001172/0.001172, allocations: 109.3 kB / 15.99 MB, free: 5.91 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.001229/0.001229, allocations: 193.3 kB / 16.91 MB, free: 5.758 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.203/1.203, allocations: 222.9 MB / 240.6 MB, free: 15.43 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002066/0.002066, allocations: 293.4 kB / 291 MB, free: 14.71 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.8587/0.8587, allocations: 169.2 MB / 0.4985 GB, free: 4.758 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001579/0.001579, allocations: 92.7 kB / 0.5953 GB, free: 15.57 MB / 414.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1592/0.1608, allocations: 86.97 MB / 0.6803 GB, free: 8.605 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003334/0.1642, allocations: 2.688 MB / 0.6829 GB, free: 5.891 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001416/0.1656, allocations: 1.053 MB / 0.6839 GB, free: 4.828 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001138/0.1657, allocations: 15.88 kB / 0.6839 GB, free: 4.812 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.000214/0.166, allocations: 67.75 kB / 0.684 GB, free: 4.746 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001951/0.1662, allocations: 107.2 kB / 0.6841 GB, free: 4.641 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003382/0.1665, allocations: 159.8 kB / 0.6842 GB, free: 4.484 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004189/0.1669, allocations: 0.5061 MB / 0.6847 GB, free: 3.977 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000109/0.167, allocations: 48.7 kB / 0.6848 GB, free: 3.93 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002571/0.1673, allocations: 231 kB / 0.685 GB, free: 3.703 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002521/0.1676, allocations: 227 kB / 0.6852 GB, free: 3.48 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 4.837e-05/0.1676, allocations: 32 kB / 0.6853 GB, free: 3.449 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001353/0.1678, allocations: 79.94 kB / 0.6853 GB, free: 3.371 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 7.376e-05/0.1678, allocations: 75.72 kB / 0.6854 GB, free: 3.297 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001571/0.168, allocations: 183 kB / 0.6856 GB, free: 3.117 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002662/0.1683, allocations: 291.4 kB / 0.6859 GB, free: 2.832 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.507e-06/0.1683, allocations: 0 / 0.6859 GB, free: 2.832 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.533e-06/0.1683, allocations: 0 / 0.6859 GB, free: 2.832 MB / 494.1 MB Notification: Performance of Transformations before backend: time 7.093e-06/0.1683, allocations: 0 / 0.6859 GB, free: 2.832 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.001645/0.17, allocations: 0.8132 MB / 0.6866 GB, free: 1.953 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.045e-05/0.17, allocations: 8.031 kB / 0.6867 GB, free: 1.945 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.531e-05/0.1701, allocations: 40.47 kB / 0.6867 GB, free: 1.906 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003433/0.1704, allocations: 343.9 kB / 0.687 GB, free: 1.535 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.569e-05/0.1705, allocations: 20.81 kB / 0.687 GB, free: 1.516 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.678e-05/0.1705, allocations: 24.38 kB / 0.6871 GB, free: 1.492 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006684/0.1712, allocations: 329 kB / 0.6874 GB, free: 1.16 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.754e-05/0.1712, allocations: 3.938 kB / 0.6874 GB, free: 1.156 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.492e-05/0.1713, allocations: 8 kB / 0.6874 GB, free: 1.148 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.494e-06/0.1713, allocations: 4 kB / 0.6874 GB, free: 1.145 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007789/0.1721, allocations: 299.7 kB / 0.6877 GB, free: 0.8516 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.000958/0.173, allocations: 0.7734 MB / 0.6884 GB, free: 24 kB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.2382/0.4113, allocations: 387.7 kB / 0.6888 GB, free: 18.29 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004616/0.4118, allocations: 214.7 kB / 0.689 GB, free: 18.27 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0005544/0.4123, allocations: 454.6 kB / 0.6894 GB, free: 17.8 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007278/0.4131, allocations: 331.8 kB / 0.6898 GB, free: 17.73 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 2.254e-06/0.4131, allocations: 0 / 0.6898 GB, free: 17.73 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.001546/0.4146, allocations: 0.6121 MB / 0.6904 GB, free: 17.7 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.545e-05/0.4147, allocations: 84.16 kB / 0.6904 GB, free: 17.6 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002771/0.4149, allocations: 305.6 kB / 0.6907 GB, free: 17.5 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 4.056e-05/0.415, allocations: 38.23 kB / 0.6908 GB, free: 17.46 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 8.961e-05/0.4151, allocations: 163.9 kB / 0.6909 GB, free: 17.36 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 9.897e-05/0.4152, allocations: 140.3 kB / 0.6911 GB, free: 17.29 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001645/0.4154, allocations: 100.1 kB / 0.6911 GB, free: 17.23 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 7.309e-05/0.4154, allocations: 348.5 kB / 0.6915 GB, free: 16.91 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004814/0.4159, allocations: 207.7 kB / 0.6917 GB, free: 16.84 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004765/0.4164, allocations: 244.5 kB / 0.6919 GB, free: 16.73 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 5.572/5.989, allocations: 0.866 GB / 1.558 GB, free: 229.2 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.593e-06/5.989, allocations: 0 / 1.558 GB, free: 229.2 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001285/5.99, allocations: 0.647 MB / 1.559 GB, free: 228.7 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 4.586e-05/5.99, allocations: 92.16 kB / 1.559 GB, free: 228.6 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.818e-06/5.99, allocations: 0 / 1.559 GB, free: 228.6 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.202e-05/5.99, allocations: 4 kB / 1.559 GB, free: 228.6 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006508/5.991, allocations: 115.8 kB / 1.559 GB, free: 228.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.025e-05/5.991, allocations: 4 kB / 1.559 GB, free: 228.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004462/5.991, allocations: 59.05 kB / 1.559 GB, free: 228.5 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.458e-05/5.991, allocations: 26.17 kB / 1.559 GB, free: 228.5 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.0002704/5.992, allocations: 208.7 kB / 1.559 GB, free: 228.3 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.204e-05/5.992, allocations: 34.75 kB / 1.559 GB, free: 228.3 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001387/5.993, allocations: 0.6277 MB / 1.56 GB, free: 227.8 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.781e-06/5.993, allocations: 4 kB / 1.56 GB, free: 227.8 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.322e-06/5.993, allocations: 3.938 kB / 1.56 GB, free: 227.8 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.075e-06/5.993, allocations: 7.984 kB / 1.56 GB, free: 227.8 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003565/5.993, allocations: 446 kB / 1.56 GB, free: 227.4 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.697e-06/5.993, allocations: 0 / 1.56 GB, free: 227.4 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005287/5.994, allocations: 107.5 kB / 1.56 GB, free: 227.3 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 6.493e-06/5.994, allocations: 4 kB / 1.56 GB, free: 227.3 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.916e-05/5.994, allocations: 16.36 kB / 1.56 GB, free: 227.3 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.717e-06/5.994, allocations: 4 kB / 1.56 GB, free: 227.3 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.094e-06/5.994, allocations: 5.766 kB / 1.56 GB, free: 227.3 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001383/5.995, allocations: 0.783 MB / 1.561 GB, free: 226.6 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001425/5.996, allocations: 172 kB / 1.561 GB, free: 226.4 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.661e-05/5.996, allocations: 12.56 kB / 1.561 GB, free: 226.4 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003953/5.996, allocations: 39.89 kB / 1.561 GB, free: 226.3 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001246/5.996, allocations: 55.92 kB / 1.561 GB, free: 226.3 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.226e-05/5.996, allocations: 19.98 kB / 1.561 GB, free: 226.2 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001451/5.996, allocations: 211.1 kB / 1.562 GB, free: 226 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.11e-07/5.996, allocations: 7.938 kB / 1.562 GB, free: 226 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003709/5.997, allocations: 116.5 kB / 1.562 GB, free: 225.9 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.0001683/5.997, allocations: 139.7 kB / 1.562 GB, free: 225.8 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.00107/5.998, allocations: 0.6516 MB / 1.562 GB, free: 225.1 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 2.004e-06/5.998, allocations: 4.25 kB / 1.562 GB, free: 225.1 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0004567/5.998, allocations: 264.3 kB / 1.563 GB, free: 224.8 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003972/5.999, allocations: 68.55 kB / 1.563 GB, free: 224.8 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001485/6, allocations: 1.256 MB / 1.564 GB, free: 223.5 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001547/6.001, allocations: 0.8012 MB / 1.565 GB, free: 222.7 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001796/6.001, allocations: 55.41 kB / 1.565 GB, free: 222.6 MB / 0.7169 GB Notification: Performance of SimCode: time 2.5e-07/6.001, allocations: 0 / 1.565 GB, free: 222.6 MB / 0.7169 GB Notification: Performance of Templates: time 0.007039/6.008, allocations: 5.962 MB / 1.571 GB, free: 216.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 -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)