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: "" <> buildModelFMU(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,fileNamePrefix="BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,fileNamePrefix="BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex",fmuType="me",version="2.0",platforms={"static"}) [: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.6973/0.6973, allocations: 141.8 MB / 149.1 MB, free: 3.645 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.001135/0.001135, allocations: 178.9 kB / 181.9 MB, free: 15.42 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.298/1.298, allocations: 221.3 MB / 436 MB, free: 8.578 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.0009676/0.0009675, allocations: 94.05 kB / 0.507 GB, free: 24.35 MB / 394.9 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001906/0.001906, allocations: 273.2 kB / 0.5884 GB, free: 11.61 MB / 442.9 MB Notification: Performance of FrontEnd - loaded program: time 0.169/0.171, allocations: 89.64 MB / 0.676 GB, free: 1.895 MB / 0.5107 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3346/0.5056, allocations: 82.77 MB / 0.7568 GB, free: 112.1 MB / 0.5263 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.1075/0.6131, allocations: 111.3 MB / 0.8655 GB, free: 0.6836 MB / 0.5263 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0001709/0.6133, allocations: 77.38 kB / 0.8656 GB, free: 0.6133 MB / 0.5263 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.02511/0.6385, allocations: 8.203 MB / 0.8736 GB, free: 8.32 MB / 0.5419 GB Notification: Performance of prepare preOptimizeDAE: time 3.824e-05/0.6385, allocations: 8 kB / 0.8736 GB, free: 8.312 MB / 0.5419 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.005e-05/0.6386, allocations: 43.52 kB / 0.8736 GB, free: 8.27 MB / 0.5419 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002535/0.6389, allocations: 271 kB / 0.8739 GB, free: 7.969 MB / 0.5419 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.727e-05/0.6389, allocations: 4 kB / 0.8739 GB, free: 7.965 MB / 0.5419 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.816e-05/0.639, allocations: 16 kB / 0.8739 GB, free: 7.949 MB / 0.5419 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0004591/0.6394, allocations: 216.8 kB / 0.8741 GB, free: 7.738 MB / 0.5419 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004272/0.6399, allocations: 264 kB / 0.8744 GB, free: 7.469 MB / 0.5419 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.545e-05/0.6399, allocations: 4 kB / 0.8744 GB, free: 7.465 MB / 0.5419 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.327e-05/0.6399, allocations: 3.906 kB / 0.8744 GB, free: 7.461 MB / 0.5419 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.516e-06/0.6399, allocations: 4 kB / 0.8744 GB, free: 7.457 MB / 0.5419 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001499/0.6414, allocations: 0.8484 MB / 0.8752 GB, free: 6.562 MB / 0.5419 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0005717/0.642, allocations: 290.3 kB / 0.8755 GB, free: 6.262 MB / 0.5419 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002593/0.6423, allocations: 162 kB / 0.8756 GB, free: 6.098 MB / 0.5419 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006817/0.643, allocations: 449.6 kB / 0.8761 GB, free: 5.566 MB / 0.5419 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003569/0.6433, allocations: 244.9 kB / 0.8763 GB, free: 5.309 MB / 0.5419 GB Notification: Performance of pre-optimization done (n=42): time 2.154e-06/0.6434, allocations: 3.938 kB / 0.8763 GB, free: 5.305 MB / 0.5419 GB Notification: Performance of matching and sorting (n=42): time 0.003849/0.6472, allocations: 0.8938 MB / 0.8772 GB, free: 4.406 MB / 0.5419 GB Notification: Performance of inlineWhenForInitialization (initialization): time 3.873e-05/0.6473, allocations: 81.11 kB / 0.8773 GB, free: 4.309 MB / 0.5419 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003066/0.6476, allocations: 279.5 kB / 0.8775 GB, free: 4.027 MB / 0.5419 GB Notification: Performance of collectPreVariables (initialization): time 4.385e-05/0.6476, allocations: 33.7 kB / 0.8776 GB, free: 3.988 MB / 0.5419 GB Notification: Performance of collectInitialEqns (initialization): time 6.911e-05/0.6477, allocations: 120.9 kB / 0.8777 GB, free: 3.867 MB / 0.5419 GB Notification: Performance of collectInitialBindings (initialization): time 0.000157/0.6479, allocations: 138 kB / 0.8778 GB, free: 3.73 MB / 0.5419 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.671e-05/0.6479, allocations: 0 / 0.8778 GB, free: 3.73 MB / 0.5419 GB Notification: Performance of setup shared object (initialization): time 0.0001179/0.648, allocations: 358.7 kB / 0.8781 GB, free: 3.371 MB / 0.5419 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002622/0.6483, allocations: 157.7 kB / 0.8783 GB, free: 3.215 MB / 0.5419 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002764/0.6486, allocations: 189.4 kB / 0.8785 GB, free: 3.008 MB / 0.5419 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.003417/0.652, allocations: 0.6911 MB / 0.8792 GB, free: 2.316 MB / 0.5419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.637e-06/0.652, allocations: 0 / 0.8792 GB, free: 2.316 MB / 0.5419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.003874/0.6559, allocations: 0.9731 MB / 0.8801 GB, free: 1.336 MB / 0.5419 GB Notification: Performance of prepare postOptimizeDAE: time 1.738e-05/0.6559, allocations: 4 kB / 0.8801 GB, free: 1.332 MB / 0.5419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.192e-05/0.6559, allocations: 7.25 kB / 0.8801 GB, free: 1.328 MB / 0.5419 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.745e-05/0.656, allocations: 4 kB / 0.8801 GB, free: 1.324 MB / 0.5419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006675/0.6566, allocations: 127.8 kB / 0.8802 GB, free: 1.199 MB / 0.5419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.447e-06/0.6567, allocations: 4 kB / 0.8802 GB, free: 1.195 MB / 0.5419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0006268/0.6573, allocations: 71.48 kB / 0.8803 GB, free: 1.125 MB / 0.5419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.832e-05/0.6574, allocations: 23.98 kB / 0.8803 GB, free: 1.102 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.0002956/0.6577, allocations: 161.7 kB / 0.8805 GB, free: 0.9375 MB / 0.5419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.697e-05/0.6577, allocations: 39.53 kB / 0.8805 GB, free: 0.8984 MB / 0.5419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.004391/0.6621, allocations: 1.17 MB / 0.8817 GB, free: 15.73 MB / 0.5575 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.017e-06/0.6622, allocations: 4 kB / 0.8817 GB, free: 15.73 MB / 0.5575 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.751e-06/0.6622, allocations: 4 kB / 0.8817 GB, free: 15.72 MB / 0.5575 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.034e-05/0.6622, allocations: 3.984 kB / 0.8817 GB, free: 15.72 MB / 0.5575 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0005376/0.6627, allocations: 421.4 kB / 0.8821 GB, free: 15.27 MB / 0.5575 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.61e-06/0.6628, allocations: 8 kB / 0.8821 GB, free: 15.26 MB / 0.5575 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0006943/0.6635, allocations: 119.9 kB / 0.8822 GB, free: 15.14 MB / 0.5575 GB Notification: Performance of postOpt tearingSystem (simulation): time 8.226e-06/0.6635, allocations: 4 kB / 0.8822 GB, free: 15.14 MB / 0.5575 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.224e-05/0.6635, allocations: 8 kB / 0.8822 GB, free: 15.13 MB / 0.5575 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.967e-06/0.6635, allocations: 0 / 0.8822 GB, free: 15.13 MB / 0.5575 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.709e-06/0.6635, allocations: 7.984 kB / 0.8822 GB, free: 15.12 MB / 0.5575 GB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.004064/0.6676, allocations: 1.286 MB / 0.8835 GB, free: 13.82 MB / 0.5575 GB Notification: Performance of postOpt generateSymbolicLinearization (simulation): time 0.004492/0.6721, allocations: 1.855 MB / 0.8853 GB, free: 11.92 MB / 0.5575 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002842/0.6724, allocations: 164.4 kB / 0.8854 GB, free: 11.74 MB / 0.5575 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 9.553e-05/0.6725, allocations: 3.984 kB / 0.8854 GB, free: 11.74 MB / 0.5575 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005221/0.6731, allocations: 43.97 kB / 0.8855 GB, free: 11.7 MB / 0.5575 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001949/0.6733, allocations: 63.84 kB / 0.8856 GB, free: 11.63 MB / 0.5575 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.562e-05/0.6733, allocations: 19.98 kB / 0.8856 GB, free: 11.61 MB / 0.5575 GB Notification: Performance of sort global known variables: time 0.0002495/0.6736, allocations: 211.1 kB / 0.8858 GB, free: 11.41 MB / 0.5575 GB Notification: Performance of remove unused functions: time 0.001079/0.6747, allocations: 123.8 kB / 0.8859 GB, free: 11.29 MB / 0.5575 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.0002972/0.675, allocations: 153.8 kB / 0.886 GB, free: 11.13 MB / 0.5575 GB Notification: Performance of simCode: created initialization part: time 0.0007846/0.6758, allocations: 460.8 kB / 0.8865 GB, free: 10.66 MB / 0.5575 GB Notification: Performance of simCode: created event and clocks part: time 1.954e-06/0.6758, allocations: 0 / 0.8865 GB, free: 10.66 MB / 0.5575 GB Notification: Performance of simCode: created simulation system equations: time 0.0003758/0.6762, allocations: 216.4 kB / 0.8867 GB, free: 10.45 MB / 0.5575 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004026/0.6766, allocations: 46.17 kB / 0.8867 GB, free: 10.41 MB / 0.5575 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001804/0.6784, allocations: 0.9751 MB / 0.8877 GB, free: 9.406 MB / 0.5575 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0006769/0.6791, allocations: 0.8817 MB / 0.8885 GB, free: 8.5 MB / 0.5575 GB Notification: Performance of SimCode: time 3.71e-07/0.6791, allocations: 0 / 0.8885 GB, free: 8.5 MB / 0.5575 GB (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 & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator --tempDir=temp_BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex_fmu --startTime=0 --stopTime=3.1536e+07 --timeout=50 --tolerance=1e-06 BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex.fmu > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)