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") [: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.7812/0.7812, allocations: 141.8 MB / 149.1 MB, free: 7.793 MB / 138.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001065/0.001065, allocations: 185.5 kB / 181.9 MB, free: 5.184 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.36/1.36, allocations: 221.4 MB / 436 MB, free: 12.98 MB / 346.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0009421/0.0009421, allocations: 95.89 kB / 0.507 GB, free: 6.43 MB / 394.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001829/0.001829, allocations: 273.6 kB / 0.5884 GB, free: 3.227 MB / 474.9 MB Notification: Performance of FrontEnd - loaded program: time 7.244e-06/7.274e-06, allocations: 1.031 kB / 0.6759 GB, free: 164.4 MB / 0.5419 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1794/0.1794, allocations: 82.78 MB / 0.7567 GB, free: 110.7 MB / 0.5419 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.1236/0.303, allocations: 110.6 MB / 0.8647 GB, free: 15.92 MB / 0.5575 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002049/0.3033, allocations: 75.95 kB / 0.8648 GB, free: 15.85 MB / 0.5575 GB Notification: Performance of FrontEnd: time 0.01132/0.3146, allocations: 3.782 MB / 0.8685 GB, free: 12.01 MB / 0.5575 GB Notification: Performance of Transformations before backend: time 7.464e-06/0.3147, allocations: 0 / 0.8685 GB, free: 12.01 MB / 0.5575 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.0007318/0.3154, allocations: 483.6 kB / 0.8689 GB, free: 11.48 MB / 0.5575 GB Notification: Performance of prepare preOptimizeDAE: time 3.821e-05/0.3155, allocations: 8.031 kB / 0.8689 GB, free: 11.48 MB / 0.5575 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 5.826e-05/0.3155, allocations: 15.81 kB / 0.8689 GB, free: 11.46 MB / 0.5575 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001963/0.3157, allocations: 214.7 kB / 0.8692 GB, free: 11.21 MB / 0.5575 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.498e-05/0.3158, allocations: 0 / 0.8692 GB, free: 11.21 MB / 0.5575 GB Notification: Performance of preOpt expandDerOperator (simulation): time 3.573e-05/0.3158, allocations: 8 kB / 0.8692 GB, free: 11.2 MB / 0.5575 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0001777/0.316, allocations: 67.98 kB / 0.8692 GB, free: 11.14 MB / 0.5575 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000171/0.3162, allocations: 93.64 kB / 0.8693 GB, free: 11.04 MB / 0.5575 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.445e-05/0.3162, allocations: 0 / 0.8693 GB, free: 11.04 MB / 0.5575 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.002e-05/0.3162, allocations: 7.984 kB / 0.8693 GB, free: 11.03 MB / 0.5575 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.929e-06/0.3162, allocations: 0 / 0.8693 GB, free: 11.03 MB / 0.5575 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007032/0.3169, allocations: 421 kB / 0.8697 GB, free: 10.58 MB / 0.5575 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0001605/0.3171, allocations: 94.56 kB / 0.8698 GB, free: 10.48 MB / 0.5575 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001444/0.3173, allocations: 60.86 kB / 0.8699 GB, free: 10.42 MB / 0.5575 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006365/0.3179, allocations: 441.5 kB / 0.8703 GB, free: 9.895 MB / 0.5575 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0001625/0.3181, allocations: 99.28 kB / 0.8704 GB, free: 9.785 MB / 0.5575 GB Notification: Performance of pre-optimization done (n=16): time 1.653e-06/0.3181, allocations: 4 kB / 0.8704 GB, free: 9.781 MB / 0.5575 GB Notification: Performance of matching and sorting (n=16): time 0.001/0.3191, allocations: 249 kB / 0.8706 GB, free: 9.535 MB / 0.5575 GB Notification: Performance of inlineWhenForInitialization (initialization): time 3.798e-05/0.3192, allocations: 56 kB / 0.8707 GB, free: 9.469 MB / 0.5575 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001561/0.3193, allocations: 162.8 kB / 0.8708 GB, free: 9.297 MB / 0.5575 GB Notification: Performance of collectPreVariables (initialization): time 2.246e-05/0.3193, allocations: 25.7 kB / 0.8709 GB, free: 9.266 MB / 0.5575 GB Notification: Performance of collectInitialEqns (initialization): time 5.641e-05/0.3194, allocations: 96.03 kB / 0.871 GB, free: 9.168 MB / 0.5575 GB Notification: Performance of collectInitialBindings (initialization): time 5.02e-05/0.3195, allocations: 55.2 kB / 0.871 GB, free: 9.113 MB / 0.5575 GB Notification: Performance of simplifyInitialFunctions (initialization): time 1.178e-05/0.3195, allocations: 0 / 0.871 GB, free: 9.113 MB / 0.5575 GB Notification: Performance of setup shared object (initialization): time 0.0001108/0.3196, allocations: 330.8 kB / 0.8713 GB, free: 8.781 MB / 0.5575 GB Notification: Performance of preBalanceInitialSystem (initialization): time 9.843e-05/0.3197, allocations: 56.84 kB / 0.8714 GB, free: 8.723 MB / 0.5575 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001048/0.3198, allocations: 70.58 kB / 0.8714 GB, free: 8.645 MB / 0.5575 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.000758/0.3206, allocations: 158.4 kB / 0.8716 GB, free: 8.488 MB / 0.5575 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.044e-06/0.3206, allocations: 4 kB / 0.8716 GB, free: 8.484 MB / 0.5575 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0009503/0.3215, allocations: 279.6 kB / 0.8719 GB, free: 8.207 MB / 0.5575 GB Notification: Performance of prepare postOptimizeDAE: time 1.659e-05/0.3216, allocations: 7.938 kB / 0.8719 GB, free: 8.199 MB / 0.5575 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.62e-06/0.3216, allocations: 3.938 kB / 0.8719 GB, free: 8.195 MB / 0.5575 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.467e-05/0.3216, allocations: 4 kB / 0.8719 GB, free: 8.191 MB / 0.5575 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002664/0.3219, allocations: 43.91 kB / 0.8719 GB, free: 8.148 MB / 0.5575 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.033e-06/0.3219, allocations: 8.062 kB / 0.8719 GB, free: 8.141 MB / 0.5575 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002047/0.3221, allocations: 27.83 kB / 0.872 GB, free: 8.113 MB / 0.5575 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.399e-05/0.3221, allocations: 7.984 kB / 0.872 GB, free: 8.105 MB / 0.5575 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.0001811/0.3223, allocations: 128.4 kB / 0.8721 GB, free: 7.977 MB / 0.5575 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.934e-05/0.3224, allocations: 15.81 kB / 0.8721 GB, free: 7.961 MB / 0.5575 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001124/0.3235, allocations: 351.7 kB / 0.8724 GB, free: 7.613 MB / 0.5575 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.288e-06/0.3235, allocations: 4 kB / 0.8724 GB, free: 7.609 MB / 0.5575 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.841e-06/0.3235, allocations: 4 kB / 0.8724 GB, free: 7.605 MB / 0.5575 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.149e-06/0.3235, allocations: 0 / 0.8724 GB, free: 7.605 MB / 0.5575 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0002386/0.3238, allocations: 234 kB / 0.8727 GB, free: 7.34 MB / 0.5575 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.423e-06/0.3238, allocations: 0 / 0.8727 GB, free: 7.34 MB / 0.5575 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002809/0.3241, allocations: 47.91 kB / 0.8727 GB, free: 7.293 MB / 0.5575 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.156e-06/0.3241, allocations: 0 / 0.8727 GB, free: 7.293 MB / 0.5575 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.322e-05/0.3241, allocations: 15.97 kB / 0.8727 GB, free: 7.277 MB / 0.5575 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.753e-06/0.3241, allocations: 4 kB / 0.8727 GB, free: 7.273 MB / 0.5575 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.946e-06/0.3241, allocations: 0 / 0.8727 GB, free: 7.273 MB / 0.5575 GB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.001068/0.3252, allocations: 407.7 kB / 0.8731 GB, free: 6.859 MB / 0.5575 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001025/0.3253, allocations: 112.8 kB / 0.8732 GB, free: 6.73 MB / 0.5575 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.887e-05/0.3254, allocations: 3.906 kB / 0.8732 GB, free: 6.727 MB / 0.5575 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001784/0.3255, allocations: 15.98 kB / 0.8732 GB, free: 6.711 MB / 0.5575 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.961e-05/0.3256, allocations: 15.97 kB / 0.8733 GB, free: 6.695 MB / 0.5575 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.698e-05/0.3256, allocations: 8 kB / 0.8733 GB, free: 6.688 MB / 0.5575 GB Notification: Performance of sort global known variables: time 0.0001073/0.3258, allocations: 133.2 kB / 0.8734 GB, free: 6.559 MB / 0.5575 GB Notification: Performance of remove unused functions: time 0.0002799/0.326, allocations: 59.92 kB / 0.8735 GB, free: 6.5 MB / 0.5575 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.0002847/0.3263, allocations: 143.1 kB / 0.8736 GB, free: 6.352 MB / 0.5575 GB Notification: Performance of simCode: created initialization part: time 0.0002879/0.3266, allocations: 169.8 kB / 0.8738 GB, free: 6.18 MB / 0.5575 GB Notification: Performance of simCode: created event and clocks part: time 2.114e-06/0.3266, allocations: 4.125 kB / 0.8738 GB, free: 6.176 MB / 0.5575 GB Notification: Performance of simCode: created simulation system equations: time 0.0001194/0.3268, allocations: 71.92 kB / 0.8738 GB, free: 6.105 MB / 0.5575 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002338/0.327, allocations: 16.19 kB / 0.8738 GB, free: 6.09 MB / 0.5575 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0008087/0.3278, allocations: 443 kB / 0.8743 GB, free: 5.637 MB / 0.5575 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003254/0.3282, allocations: 0.755 MB / 0.875 GB, free: 4.855 MB / 0.5575 GB Notification: Performance of SimCode: time 2.71e-07/0.3282, allocations: 0 / 0.875 GB, free: 4.855 MB / 0.5575 GB Notification: Performance of Templates: time 0.005588/0.3338, allocations: 2.54 MB / 0.8775 GB, free: 2.344 MB / 0.5575 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)