Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/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/ModelicaServices 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) Using package NcDataReader2 with version 2.5.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/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) 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 BuildingSystems with version 2.0.0-beta (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo) Running command: translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple") translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.8201/0.8201, allocations: 141.8 MB / 149.3 MB, free: 9.195 MB / 122.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001046/0.001046, allocations: 187.7 kB / 182.2 MB, free: 9.43 MB / 154.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.488/1.488, allocations: 221.5 MB / 436.4 MB, free: 13.28 MB / 330.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008574/0.0008574, allocations: 88.17 kB / 0.5074 GB, free: 10.12 MB / 410.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001812/0.001812, allocations: 277.6 kB / 0.5889 GB, free: 54.68 MB / 410.7 MB Notification: Performance of FrontEnd - loaded program: time 2.54e-05/2.541e-05, allocations: 4 kB / 0.6765 GB, free: 12.85 MB / 458.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4421/0.4421, allocations: 82.77 MB / 0.7574 GB, free: 32.03 MB / 458.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1541/0.5963, allocations: 110.6 MB / 0.8654 GB, free: 1.242 MB / 0.5261 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0003354/0.5967, allocations: 79.83 kB / 0.8655 GB, free: 1.168 MB / 0.5261 GB Notification: Performance of FrontEnd - DAE generated: time 0.01203/0.6088, allocations: 4.067 MB / 0.8695 GB, free: 13.05 MB / 0.5417 GB Notification: Performance of FrontEnd: time 1.694e-06/0.6088, allocations: 448 / 0.8695 GB, free: 13.05 MB / 0.5417 GB Notification: Performance of Transformations before backend: time 9.438e-06/0.6088, allocations: 4 kB / 0.8695 GB, free: 13.04 MB / 0.5417 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 19 * Number of variables: 19 Notification: Performance of Generate backend data structure: time 0.0007795/0.6096, allocations: 471.7 kB / 0.8699 GB, free: 12.53 MB / 0.5417 GB Notification: Performance of prepare preOptimizeDAE: time 4.628e-05/0.6097, allocations: 16.03 kB / 0.8699 GB, free: 12.52 MB / 0.5417 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 6.299e-05/0.6098, allocations: 20 kB / 0.8699 GB, free: 12.5 MB / 0.5417 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000196/0.61, allocations: 202.8 kB / 0.8701 GB, free: 12.26 MB / 0.5417 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.361e-05/0.61, allocations: 7.953 kB / 0.8701 GB, free: 12.25 MB / 0.5417 GB Notification: Performance of preOpt expandDerOperator (simulation): time 4.057e-05/0.61, allocations: 11.98 kB / 0.8702 GB, free: 12.24 MB / 0.5417 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0001768/0.6102, allocations: 67.98 kB / 0.8702 GB, free: 12.17 MB / 0.5417 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0001766/0.6104, allocations: 93.64 kB / 0.8703 GB, free: 12.07 MB / 0.5417 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.382e-05/0.6104, allocations: 3.938 kB / 0.8703 GB, free: 12.07 MB / 0.5417 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.748e-05/0.6105, allocations: 0 / 0.8703 GB, free: 12.07 MB / 0.5417 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.193e-06/0.6105, allocations: 4 kB / 0.8703 GB, free: 12.07 MB / 0.5417 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0006945/0.6112, allocations: 413 kB / 0.8707 GB, free: 11.62 MB / 0.5417 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0001666/0.6114, allocations: 102.5 kB / 0.8708 GB, free: 11.52 MB / 0.5417 GB Notification: Performance of preOpt resolveLoops (simulation): time 8.789e-05/0.6114, allocations: 52.86 kB / 0.8709 GB, free: 11.46 MB / 0.5417 GB Notification: Performance of preOpt evalFunc (simulation): time 0.00061/0.6121, allocations: 449.5 kB / 0.8713 GB, free: 10.93 MB / 0.5417 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002214/0.6123, allocations: 115.4 kB / 0.8714 GB, free: 10.8 MB / 0.5417 GB Notification: Performance of pre-optimization done (n=16): time 1.402e-06/0.6123, allocations: 0 / 0.8714 GB, free: 10.8 MB / 0.5417 GB Notification: Performance of matching and sorting (n=16): time 0.0111/0.6234, allocations: 1.248 MB / 0.8726 GB, free: 9.551 MB / 0.5417 GB Notification: Performance of inlineWhenForInitialization (initialization): time 4.176e-05/0.6235, allocations: 55.34 kB / 0.8727 GB, free: 9.484 MB / 0.5417 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001945/0.6237, allocations: 158.7 kB / 0.8728 GB, free: 9.316 MB / 0.5417 GB Notification: Performance of collectPreVariables (initialization): time 2.53e-05/0.6237, allocations: 33.58 kB / 0.8729 GB, free: 9.277 MB / 0.5417 GB Notification: Performance of collectInitialEqns (initialization): time 8.139e-05/0.6238, allocations: 112 kB / 0.873 GB, free: 9.164 MB / 0.5417 GB Notification: Performance of collectInitialBindings (initialization): time 4.963e-05/0.6239, allocations: 55.2 kB / 0.873 GB, free: 9.109 MB / 0.5417 GB Notification: Performance of simplifyInitialFunctions (initialization): time 1.04e-05/0.6239, allocations: 0 / 0.873 GB, free: 9.109 MB / 0.5417 GB Notification: Performance of setup shared object (initialization): time 0.0001131/0.624, allocations: 326.8 kB / 0.8733 GB, free: 8.781 MB / 0.5417 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001028/0.6241, allocations: 56.84 kB / 0.8734 GB, free: 8.723 MB / 0.5417 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001011/0.6242, allocations: 75.19 kB / 0.8734 GB, free: 8.641 MB / 0.5417 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.01078/0.635, allocations: 1.154 MB / 0.8746 GB, free: 7.484 MB / 0.5417 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.292e-06/0.6351, allocations: 4 kB / 0.8746 GB, free: 7.48 MB / 0.5417 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.01087/0.646, allocations: 1.276 MB / 0.8758 GB, free: 6.199 MB / 0.5417 GB Notification: Performance of prepare postOptimizeDAE: time 5.969e-05/0.6461, allocations: 33.7 kB / 0.8759 GB, free: 6.16 MB / 0.5417 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.485e-06/0.6461, allocations: 0 / 0.8759 GB, free: 6.16 MB / 0.5417 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.138e-05/0.6461, allocations: 4 kB / 0.8759 GB, free: 6.156 MB / 0.5417 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002733/0.6464, allocations: 48.03 kB / 0.8759 GB, free: 6.109 MB / 0.5417 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.618e-06/0.6464, allocations: 4 kB / 0.8759 GB, free: 6.105 MB / 0.5417 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000203/0.6466, allocations: 15.89 kB / 0.8759 GB, free: 6.09 MB / 0.5417 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.532e-05/0.6466, allocations: 11.98 kB / 0.8759 GB, free: 6.078 MB / 0.5417 GB Warning: Assuming fixed start value for the following 4 variables: battery.E_discharged:VARIABLE(start = 0.0 unit = "J" ) "Total energy taken from the battery" type: Real battery.E_charged:VARIABLE(start = 0.0 unit = "J" ) "Total energy charged to the battery" type: Real battery.EBou:VARIABLE(start = (1.0 - battery.c) * battery.SOC_start * battery.E_nominal unit = "J" ) "Bound charge of the battery" type: Real battery.EAva:VARIABLE(start = battery.c * battery.SOC_start * battery.E_nominal unit = "J" ) "Available charge of the battery" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 3 * Number of states: 0 () * Number of discrete variables: 5 ($whenCondition1,$PRE.gain.T_start,gain.T_start,$PRE.gain.count,gain.count) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (22): * Single equations (assignments): 21 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002102/0.6469, allocations: 129 kB / 0.8761 GB, free: 5.945 MB / 0.5417 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.18e-05/0.6469, allocations: 15.81 kB / 0.8761 GB, free: 5.93 MB / 0.5417 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.009817/0.6567, allocations: 1.733 MB / 0.8778 GB, free: 4.191 MB / 0.5417 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.981e-05/0.6568, allocations: 7.984 kB / 0.8778 GB, free: 4.184 MB / 0.5417 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 9.828e-06/0.6568, allocations: 3.938 kB / 0.8778 GB, free: 4.18 MB / 0.5417 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.025e-06/0.6568, allocations: 0 / 0.8778 GB, free: 4.18 MB / 0.5417 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004242/0.6573, allocations: 230 kB / 0.878 GB, free: 3.918 MB / 0.5417 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.068e-06/0.6573, allocations: 0 / 0.878 GB, free: 3.918 MB / 0.5417 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003389/0.6576, allocations: 43.97 kB / 0.878 GB, free: 3.875 MB / 0.5417 GB Notification: Performance of postOpt tearingSystem (simulation): time 1.149e-05/0.6577, allocations: 8 kB / 0.878 GB, free: 3.867 MB / 0.5417 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.983e-05/0.6577, allocations: 4 kB / 0.8781 GB, free: 3.863 MB / 0.5417 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 8.356e-06/0.6577, allocations: 3.953 kB / 0.8781 GB, free: 3.859 MB / 0.5417 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.057e-06/0.6577, allocations: 3.938 kB / 0.8781 GB, free: 3.855 MB / 0.5417 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.009846/0.6676, allocations: 1.797 MB / 0.8798 GB, free: 2.039 MB / 0.5417 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001578/0.6678, allocations: 117 kB / 0.8799 GB, free: 1.906 MB / 0.5417 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.378e-05/0.6678, allocations: 0 / 0.8799 GB, free: 1.906 MB / 0.5417 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001876/0.668, allocations: 15.98 kB / 0.8799 GB, free: 1.891 MB / 0.5417 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 8.733e-05/0.6681, allocations: 31.86 kB / 0.88 GB, free: 1.859 MB / 0.5417 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.997e-05/0.6682, allocations: 4 kB / 0.88 GB, free: 1.855 MB / 0.5417 GB Notification: Performance of sorting global known variables: time 0.0001248/0.6683, allocations: 133.2 kB / 0.8801 GB, free: 1.727 MB / 0.5417 GB Notification: Performance of sort global known variables: time 1.5e-07/0.6683, allocations: 0 / 0.8801 GB, free: 1.727 MB / 0.5417 GB Notification: Performance of remove unused functions: time 0.0003407/0.6687, allocations: 63.94 kB / 0.8802 GB, free: 1.664 MB / 0.5417 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 4 (battery.EAva,battery.EBou,battery.E_charged,battery.E_discharged) * Number of discrete variables: 3 ($whenCondition1,gain.T_start,gain.count) * Number of discrete states: 1 (gain.count) * Top-level inputs: 0 Notification: Strong component statistics for simulation (20): * Single equations (assignments): 18 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 2 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0002543/0.6689, allocations: 139.1 kB / 0.8803 GB, free: 1.516 MB / 0.5417 GB Notification: Performance of simCode: created initialization part: time 0.0003479/0.6693, allocations: 180.4 kB / 0.8805 GB, free: 1.328 MB / 0.5417 GB Notification: Performance of simCode: created event and clocks part: time 3.236e-06/0.6693, allocations: 3.938 kB / 0.8805 GB, free: 1.324 MB / 0.5417 GB Notification: Performance of simCode: created simulation system equations: time 0.0001368/0.6694, allocations: 71.92 kB / 0.8805 GB, free: 1.254 MB / 0.5417 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002712/0.6697, allocations: 24.12 kB / 0.8806 GB, free: 1.23 MB / 0.5417 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0008449/0.6706, allocations: 446.4 kB / 0.881 GB, free: 0.7773 MB / 0.5417 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002909/0.6709, allocations: 0.728 MB / 0.8817 GB, free: 24 kB / 0.5417 GB Notification: Performance of simCode: alias equations: time 0.000134/0.671, allocations: 25.08 kB / 0.8817 GB, free: 4 kB / 0.5417 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 8.768e-05/0.6711, allocations: 19.48 kB / 0.8817 GB, free: 15.98 MB / 0.5573 GB Notification: Performance of SimCode: time 5.31e-07/0.6711, allocations: 4 kB / 0.8817 GB, free: 15.98 MB / 0.5573 GB Notification: Performance of Templates: time 0.005643/0.6768, allocations: 2.304 MB / 0.884 GB, free: 13.7 MB / 0.5573 GB make -j1 -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.makefile (rm -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe ; mkfifo BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe ; head -c 1048576 < BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe >> ../files/BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.sim & ./BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple -abortSlowSimulation -alarm=480 -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)