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/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.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") [:1:1-1:32:writable] Error: Class GC_set_max_heap_size not found in scope (looking for a function or record). Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.7645/0.7645, allocations: 141.8 MB / 149.1 MB, free: 1.512 MB / 122.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001108/0.001108, allocations: 177.3 kB / 181.9 MB, free: 0.9258 MB / 154.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.39/1.39, allocations: 221.4 MB / 436 MB, free: 5.664 MB / 330.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001015/0.001015, allocations: 96.61 kB / 0.507 GB, free: 2.348 MB / 410.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001963/0.001963, allocations: 271.4 kB / 0.5884 GB, free: 47.44 MB / 410.9 MB Notification: Performance of FrontEnd - loaded program: time 8.747e-06/8.787e-06, allocations: 1.5 kB / 0.6759 GB, free: 59.64 MB / 442.9 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1804/0.1805, allocations: 82.78 MB / 0.7567 GB, free: 0.8945 MB / 442.9 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1639/0.3444, allocations: 111.3 MB / 0.8654 GB, free: 1.434 MB / 0.5419 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002281/0.3447, allocations: 75.95 kB / 0.8655 GB, free: 1.359 MB / 0.5419 GB Notification: Performance of FrontEnd: time 0.3769/0.7216, allocations: 7.475 MB / 0.8728 GB, free: 109.9 MB / 0.5419 GB Notification: Performance of Transformations before backend: time 1.135e-05/0.7217, allocations: 5.719 kB / 0.8728 GB, free: 109.9 MB / 0.5419 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.001469/0.7231, allocations: 0.7207 MB / 0.8735 GB, free: 109.4 MB / 0.5419 GB Notification: Performance of prepare preOptimizeDAE: time 3.928e-05/0.7232, allocations: 9.219 kB / 0.8735 GB, free: 109.4 MB / 0.5419 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001006/0.7233, allocations: 40.08 kB / 0.8735 GB, free: 109.4 MB / 0.5419 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002406/0.7235, allocations: 263.8 kB / 0.8738 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.039e-05/0.7236, allocations: 7.188 kB / 0.8738 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.277e-05/0.7236, allocations: 20.59 kB / 0.8738 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.000521/0.7242, allocations: 218.2 kB / 0.874 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004865/0.7247, allocations: 258 kB / 0.8743 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.954e-05/0.7247, allocations: 10.03 kB / 0.8743 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.277e-05/0.7247, allocations: 0.7031 kB / 0.8743 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.688e-06/0.7247, allocations: 5.25 kB / 0.8743 GB, free: 109.1 MB / 0.5419 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001536/0.7263, allocations: 0.8548 MB / 0.8751 GB, free: 108.7 MB / 0.5419 GB Notification: Performance of preOpt comSubExp (simulation): time 0.000586/0.7269, allocations: 277.9 kB / 0.8754 GB, free: 108.7 MB / 0.5419 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002677/0.7272, allocations: 160.6 kB / 0.8755 GB, free: 108.6 MB / 0.5419 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0005984/0.7278, allocations: 457.8 kB / 0.876 GB, free: 108.2 MB / 0.5419 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004197/0.7282, allocations: 247.8 kB / 0.8762 GB, free: 108.1 MB / 0.5419 GB Notification: Performance of pre-optimization done (n=42): time 1.543e-06/0.7282, allocations: 1.312 kB / 0.8762 GB, free: 108.1 MB / 0.5419 GB Notification: Performance of matching and sorting (n=42): time 0.004142/0.7324, allocations: 0.8928 MB / 0.8771 GB, free: 108 MB / 0.5419 GB Notification: Performance of inlineWhenForInitialization (initialization): time 4.182e-05/0.7324, allocations: 93.58 kB / 0.8772 GB, free: 107.9 MB / 0.5419 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003529/0.7328, allocations: 277.3 kB / 0.8774 GB, free: 107.8 MB / 0.5419 GB Notification: Performance of collectPreVariables (initialization): time 4.011e-05/0.7328, allocations: 28.08 kB / 0.8775 GB, free: 107.8 MB / 0.5419 GB Notification: Performance of collectInitialEqns (initialization): time 6.448e-05/0.7329, allocations: 128 kB / 0.8776 GB, free: 107.7 MB / 0.5419 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001131/0.733, allocations: 129 kB / 0.8777 GB, free: 107.6 MB / 0.5419 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.823e-05/0.7331, allocations: 5.125 kB / 0.8777 GB, free: 107.6 MB / 0.5419 GB Notification: Performance of setup shared object (initialization): time 9.059e-05/0.7331, allocations: 356.5 kB / 0.878 GB, free: 107.3 MB / 0.5419 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002979/0.7335, allocations: 154.3 kB / 0.8782 GB, free: 107.3 MB / 0.5419 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003117/0.7338, allocations: 193.5 kB / 0.8784 GB, free: 107.2 MB / 0.5419 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.003607/0.7374, allocations: 0.6898 MB / 0.8791 GB, free: 107.2 MB / 0.5419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.337e-06/0.7374, allocations: 1 kB / 0.8791 GB, free: 107.2 MB / 0.5419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.004092/0.7415, allocations: 0.9788 MB / 0.88 GB, free: 107.1 MB / 0.5419 GB Notification: Performance of prepare postOptimizeDAE: time 1.6e-05/0.7415, allocations: 8 kB / 0.88 GB, free: 107.1 MB / 0.5419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.887e-06/0.7415, allocations: 2.125 kB / 0.88 GB, free: 107.1 MB / 0.5419 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.991e-05/0.7416, allocations: 4.031 kB / 0.88 GB, free: 107.1 MB / 0.5419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006866/0.7423, allocations: 129.8 kB / 0.8801 GB, free: 107.1 MB / 0.5419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.648e-06/0.7423, allocations: 4.156 kB / 0.8802 GB, free: 107.1 MB / 0.5419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0006519/0.7429, allocations: 66.53 kB / 0.8802 GB, free: 107.1 MB / 0.5419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.804e-05/0.743, allocations: 25.45 kB / 0.8802 GB, free: 107.1 MB / 0.5419 GB Warning: Assuming fixed start value for the following 8 variables: battery_1C.E_discharged:VARIABLE(start = 0.0 unit = "J" ) "Total energy taken from the battery" type: Real battery_1C.E_charged:VARIABLE(start = 0.0 unit = "J" ) "Total energy charged to the battery" type: Real battery_C20.E_discharged:VARIABLE(start = 0.0 unit = "J" ) "Total energy taken from the battery" type: Real battery_C20.E_charged:VARIABLE(start = 0.0 unit = "J" ) "Total energy charged to the battery" type: Real battery_1C.EBou:VARIABLE(start = (1.0 - battery_1C.c) * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" ) "Bound charge of the battery" type: Real battery_1C.EAva:VARIABLE(start = battery_1C.c * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" ) "Available charge of the battery" type: Real battery_C20.EBou:VARIABLE(start = (1.0 - battery_C20.c) * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" ) "Bound charge of the battery" type: Real battery_C20.EAva:VARIABLE(start = battery_C20.c * battery_C20.SOC_start * battery_C20.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: 6 * Number of states: 0 () * Number of discrete variables: 15 ($whenCondition3,$whenCondition2,$PRE.gain.T_start,gain.T_start,$PRE.gain.count,gain.count,$PRE.load_1C.T_start,load_1C.T_start,$PRE.load_1C.count,load_1C.count,$whenCondition1,$PRE.load_C20.T_start,load_C20.T_start,$PRE.load_C20.count,load_C20.count) * Number of discrete 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 (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002487/0.7433, allocations: 148.4 kB / 0.8804 GB, free: 106.9 MB / 0.5419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.34e-05/0.7433, allocations: 37.55 kB / 0.8804 GB, free: 106.9 MB / 0.5419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.004757/0.7481, allocations: 1.175 MB / 0.8816 GB, free: 106.8 MB / 0.5419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.355e-05/0.7481, allocations: 5.656 kB / 0.8816 GB, free: 106.8 MB / 0.5419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.714e-06/0.7481, allocations: 1.312 kB / 0.8816 GB, free: 106.8 MB / 0.5419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.463e-05/0.7482, allocations: 8.047 kB / 0.8816 GB, free: 106.8 MB / 0.5419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006678/0.7488, allocations: 421.5 kB / 0.882 GB, free: 106.6 MB / 0.5419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.757e-06/0.7488, allocations: 4 kB / 0.882 GB, free: 106.6 MB / 0.5419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0007271/0.7496, allocations: 126.1 kB / 0.8821 GB, free: 106.6 MB / 0.5419 GB Notification: Performance of postOpt tearingSystem (simulation): time 9.157e-06/0.7496, allocations: 2.281 kB / 0.8821 GB, free: 106.6 MB / 0.5419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 5.123e-05/0.7497, allocations: 10.7 kB / 0.8821 GB, free: 106.6 MB / 0.5419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.478e-06/0.7497, allocations: 2.656 kB / 0.8821 GB, free: 106.6 MB / 0.5419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.606e-06/0.7497, allocations: 4.969 kB / 0.8821 GB, free: 106.6 MB / 0.5419 GB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.004663/0.7543, allocations: 1.283 MB / 0.8834 GB, free: 106.2 MB / 0.5419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002839/0.7546, allocations: 162.8 kB / 0.8835 GB, free: 106.1 MB / 0.5419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 9.327e-05/0.7548, allocations: 7.656 kB / 0.8835 GB, free: 106.1 MB / 0.5419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005232/0.7553, allocations: 41.7 kB / 0.8836 GB, free: 106.1 MB / 0.5419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001825/0.7555, allocations: 58 kB / 0.8836 GB, free: 106.1 MB / 0.5419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.695e-05/0.7555, allocations: 15.67 kB / 0.8837 GB, free: 106.1 MB / 0.5419 GB Notification: Performance of sort global known variables: time 0.0003392/0.7559, allocations: 220.9 kB / 0.8839 GB, free: 106 MB / 0.5419 GB Notification: Performance of remove unused functions: time 0.0005882/0.7565, allocations: 125 kB / 0.884 GB, free: 105.9 MB / 0.5419 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) * 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 (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.0002951/0.7568, allocations: 153 kB / 0.8841 GB, free: 105.8 MB / 0.5419 GB Notification: Performance of simCode: created initialization part: time 0.0009296/0.7577, allocations: 455.7 kB / 0.8846 GB, free: 105.7 MB / 0.5419 GB Notification: Performance of simCode: created event and clocks part: time 2.084e-06/0.7577, allocations: 0 / 0.8846 GB, free: 105.7 MB / 0.5419 GB Notification: Performance of simCode: created simulation system equations: time 0.0004683/0.7582, allocations: 222.5 kB / 0.8848 GB, free: 105.7 MB / 0.5419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004413/0.7587, allocations: 43.34 kB / 0.8848 GB, free: 105.7 MB / 0.5419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001876/0.7605, allocations: 0.9622 MB / 0.8858 GB, free: 105.1 MB / 0.5419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0005102/0.7611, allocations: 0.8683 MB / 0.8866 GB, free: 104.3 MB / 0.5419 GB Notification: Performance of SimCode: time 4.61e-07/0.7611, allocations: 0.6875 kB / 0.8866 GB, free: 104.3 MB / 0.5419 GB Notification: Performance of Templates: time 0.01113/0.7722, allocations: 6.3 MB / 0.8928 GB, free: 99.27 MB / 0.5419 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)