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.00144/0.00144, allocations: 104 kB / 15.98 MB, free: 6.359 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.001449/0.001449, allocations: 196.9 kB / 16.91 MB, free: 6.191 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.309/1.309, allocations: 222.9 MB / 240.6 MB, free: 15.41 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002594/0.002594, allocations: 284.6 kB / 291 MB, free: 14.69 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 1.131/1.131, allocations: 178.5 MB / 0.5076 GB, free: 12.7 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002709/0.002709, allocations: 95.84 kB / 0.6066 GB, free: 9.699 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1622/0.1649, allocations: 89.14 MB / 0.6936 GB, free: 488 kB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.004064/0.169, allocations: 2.686 MB / 0.6962 GB, free: 13.76 MB / 0.545 GB Notification: Performance of NFInst.instExpressions: time 0.001835/0.1709, allocations: 1.072 MB / 0.6973 GB, free: 12.68 MB / 0.545 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002091/0.1711, allocations: 11.94 kB / 0.6973 GB, free: 12.67 MB / 0.545 GB Notification: Performance of NFTyping.typeComponents: time 0.0002862/0.1715, allocations: 63.53 kB / 0.6974 GB, free: 12.61 MB / 0.545 GB Notification: Performance of NFTyping.typeBindings: time 0.0002876/0.1718, allocations: 103.2 kB / 0.6975 GB, free: 12.5 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004592/0.1722, allocations: 155.8 kB / 0.6976 GB, free: 12.35 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.0005982/0.1728, allocations: 0.5061 MB / 0.6981 GB, free: 11.84 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001366/0.173, allocations: 56.92 kB / 0.6982 GB, free: 11.79 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0003988/0.1734, allocations: 234.9 kB / 0.6984 GB, free: 11.56 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003614/0.1738, allocations: 219.1 kB / 0.6986 GB, free: 11.34 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 6.213e-05/0.1738, allocations: 28 kB / 0.6986 GB, free: 11.32 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001725/0.174, allocations: 79.95 kB / 0.6987 GB, free: 11.24 MB / 0.545 GB Notification: Performance of NFScalarize.scalarize: time 7.887e-05/0.1741, allocations: 79.67 kB / 0.6988 GB, free: 11.16 MB / 0.545 GB Notification: Performance of NFVerifyModel.verify: time 0.000191/0.1743, allocations: 183 kB / 0.6989 GB, free: 10.98 MB / 0.545 GB Notification: Performance of NFConvertDAE.convert: time 0.0003292/0.1746, allocations: 291.3 kB / 0.6992 GB, free: 10.7 MB / 0.545 GB Notification: Performance of FrontEnd - DAE generated: time 4.539e-06/0.1746, allocations: 4 kB / 0.6992 GB, free: 10.69 MB / 0.545 GB Notification: Performance of FrontEnd: time 3.016e-06/0.1747, allocations: 0 / 0.6992 GB, free: 10.69 MB / 0.545 GB Notification: Performance of Transformations before backend: time 7.033e-06/0.1747, allocations: 3.938 kB / 0.6992 GB, free: 10.69 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.001783/0.1765, allocations: 0.8094 MB / 0.7 GB, free: 9.812 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 3.659e-05/0.1765, allocations: 12.03 kB / 0.7 GB, free: 9.801 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.753e-05/0.1766, allocations: 40.47 kB / 0.7001 GB, free: 9.762 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004224/0.177, allocations: 335.9 kB / 0.7004 GB, free: 9.391 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.141e-05/0.1771, allocations: 20.75 kB / 0.7004 GB, free: 9.371 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.275e-05/0.1771, allocations: 28.36 kB / 0.7004 GB, free: 9.344 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007262/0.1779, allocations: 325.1 kB / 0.7007 GB, free: 9.016 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.673e-05/0.1779, allocations: 7.906 kB / 0.7007 GB, free: 9.008 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.658e-05/0.1779, allocations: 8 kB / 0.7008 GB, free: 9 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.397e-05/0.178, allocations: 11.98 kB / 0.7008 GB, free: 8.988 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008187/0.1788, allocations: 295.4 kB / 0.701 GB, free: 8.703 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001113/0.1799, allocations: 0.7734 MB / 0.7018 GB, free: 7.875 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001041/0.181, allocations: 381.5 kB / 0.7022 GB, free: 7.484 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004859/0.1814, allocations: 213.6 kB / 0.7024 GB, free: 7.27 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006702/0.1821, allocations: 453.4 kB / 0.7028 GB, free: 6.734 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007353/0.1829, allocations: 332.5 kB / 0.7031 GB, free: 6.391 MB / 0.545 GB Notification: Performance of pre-optimization done (n=42): time 1.814e-06/0.1829, allocations: 0 / 0.7031 GB, free: 6.391 MB / 0.545 GB Notification: Performance of matching and sorting (n=42): time 0.001566/0.1845, allocations: 0.6111 MB / 0.7037 GB, free: 5.777 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.872e-05/0.1845, allocations: 89.09 kB / 0.7038 GB, free: 5.672 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003167/0.1849, allocations: 304.5 kB / 0.7041 GB, free: 5.367 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 5.098e-05/0.1849, allocations: 45.62 kB / 0.7041 GB, free: 5.316 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001212/0.185, allocations: 156.9 kB / 0.7043 GB, free: 5.16 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 0.000129/0.1852, allocations: 138 kB / 0.7044 GB, free: 5.023 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001598/0.1854, allocations: 106 kB / 0.7045 GB, free: 4.914 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.000157/0.1855, allocations: 346.8 kB / 0.7048 GB, free: 4.566 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004972/0.186, allocations: 199.5 kB / 0.705 GB, free: 4.371 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005246/0.1866, allocations: 246.4 kB / 0.7053 GB, free: 4.109 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 5.986/6.172, allocations: 0.866 GB / 1.571 GB, free: 237.1 MB / 0.7325 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 7.114e-06/6.172, allocations: 1.828 kB / 1.571 GB, free: 237.1 MB / 0.7325 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001277/6.174, allocations: 0.6311 MB / 1.572 GB, free: 236.9 MB / 0.7325 GB Notification: Performance of prepare postOptimizeDAE: time 4.5e-05/6.174, allocations: 91.12 kB / 1.572 GB, free: 236.8 MB / 0.7325 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.975e-06/6.174, allocations: 2.25 kB / 1.572 GB, free: 236.8 MB / 0.7325 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.997e-05/6.174, allocations: 3.094 kB / 1.572 GB, free: 236.8 MB / 0.7325 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005275/6.174, allocations: 115.3 kB / 1.572 GB, free: 236.8 MB / 0.7325 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.488e-06/6.174, allocations: 7.375 kB / 1.572 GB, free: 236.8 MB / 0.7325 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004524/6.175, allocations: 65.92 kB / 1.572 GB, free: 236.8 MB / 0.7325 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.718e-05/6.175, allocations: 21.41 kB / 1.572 GB, free: 236.8 MB / 0.7325 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.0002753/6.175, allocations: 195.9 kB / 1.572 GB, free: 236.7 MB / 0.7325 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.894e-05/6.175, allocations: 36.2 kB / 1.572 GB, free: 236.7 MB / 0.7325 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001512/6.177, allocations: 0.639 MB / 1.573 GB, free: 236.6 MB / 0.7325 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.673e-06/6.177, allocations: 11.41 kB / 1.573 GB, free: 236.6 MB / 0.7325 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.491e-06/6.177, allocations: 3.938 kB / 1.573 GB, free: 236.6 MB / 0.7325 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.104e-06/6.177, allocations: 3.938 kB / 1.573 GB, free: 236.6 MB / 0.7325 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004004/6.177, allocations: 439.9 kB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.086e-06/6.177, allocations: 4.609 kB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.00055/6.178, allocations: 110.3 kB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt tearingSystem (simulation): time 4.578e-06/6.178, allocations: 4.062 kB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.767e-05/6.178, allocations: 14.23 kB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.509e-06/6.178, allocations: 4 kB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.525e-06/6.178, allocations: 6.094 kB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001515/6.179, allocations: 0.7796 MB / 1.574 GB, free: 236.4 MB / 0.7325 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001474/6.179, allocations: 161.1 kB / 1.575 GB, free: 236.3 MB / 0.7325 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.684e-05/6.179, allocations: 17.05 kB / 1.575 GB, free: 236.3 MB / 0.7325 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004075/6.18, allocations: 42.19 kB / 1.575 GB, free: 236.3 MB / 0.7325 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000143/6.18, allocations: 58.61 kB / 1.575 GB, free: 236.2 MB / 0.7325 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.548e-05/6.18, allocations: 17.22 kB / 1.575 GB, free: 236.2 MB / 0.7325 GB Notification: Performance of sorting global known variables: time 0.0001764/6.18, allocations: 214.3 kB / 1.575 GB, free: 236.2 MB / 0.7325 GB Notification: Performance of sort global known variables: time 7.82e-07/6.18, allocations: 0 / 1.575 GB, free: 236.2 MB / 0.7325 GB Notification: Performance of remove unused functions: time 0.0003627/6.181, allocations: 118.5 kB / 1.575 GB, free: 236.2 MB / 0.7325 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.0001754/6.181, allocations: 141.8 kB / 1.575 GB, free: 236.1 MB / 0.7325 GB Notification: Performance of simCode: created initialization part: time 0.001158/6.182, allocations: 0.6509 MB / 1.576 GB, free: 235.9 MB / 0.7325 GB Notification: Performance of simCode: created event and clocks part: time 1.903e-06/6.182, allocations: 0 / 1.576 GB, free: 235.9 MB / 0.7325 GB Notification: Performance of simCode: created simulation system equations: time 0.0005147/6.182, allocations: 264 kB / 1.576 GB, free: 235.9 MB / 0.7325 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004124/6.183, allocations: 71.12 kB / 1.576 GB, free: 235.8 MB / 0.7325 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001555/6.184, allocations: 1.259 MB / 1.577 GB, free: 235 MB / 0.7325 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002168/6.185, allocations: 0.8033 MB / 1.578 GB, free: 234.3 MB / 0.7325 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001838/6.185, allocations: 49.98 kB / 1.578 GB, free: 234.3 MB / 0.7325 GB Notification: Performance of SimCode: time 2.3e-07/6.185, allocations: 1.125 kB / 1.578 GB, free: 234.3 MB / 0.7325 GB Notification: Performance of Templates: time 0.008529/6.193, allocations: 5.963 MB / 1.584 GB, free: 233.7 MB / 0.7325 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)