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"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9225/0.9225, allocations: 141.8 MB / 149.3 MB, free: 9.199 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.001745/0.001745, allocations: 176.8 kB / 182.2 MB, free: 9.422 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.557/1.557, allocations: 221.5 MB / 436.4 MB, free: 13.32 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.0009125/0.0009125, allocations: 89.48 kB / 0.5074 GB, free: 10.14 MB / 410.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002057/0.002058, allocations: 272.4 kB / 0.5889 GB, free: 54.66 MB / 410.7 MB Notification: Performance of FrontEnd - loaded program: time 2.38e-05/2.373e-05, allocations: 4 kB / 0.6766 GB, free: 12.73 MB / 458.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.5048/0.5049, allocations: 82.78 MB / 0.7575 GB, free: 31.9 MB / 458.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.165/0.67, allocations: 111.4 MB / 0.8662 GB, free: 392 kB / 0.5261 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002221/0.6703, allocations: 74.03 kB / 0.8663 GB, free: 320 kB / 0.5261 GB Notification: Performance of FrontEnd - DAE generated: time 0.0242/0.6945, allocations: 7.731 MB / 0.8738 GB, free: 8.504 MB / 0.5417 GB Notification: Performance of FrontEnd: time 2.715e-06/0.6945, allocations: 0 / 0.8738 GB, free: 8.504 MB / 0.5417 GB Notification: Performance of Transformations before backend: time 1.237e-05/0.6946, allocations: 4 kB / 0.8738 GB, free: 8.5 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: 49 * Number of variables: 49 Notification: Performance of Generate backend data structure: time 0.001574/0.6961, allocations: 0.7079 MB / 0.8745 GB, free: 7.73 MB / 0.5417 GB Notification: Performance of prepare preOptimizeDAE: time 5.188e-05/0.6962, allocations: 20.02 kB / 0.8746 GB, free: 7.711 MB / 0.5417 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.927e-05/0.6963, allocations: 35.53 kB / 0.8746 GB, free: 7.676 MB / 0.5417 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003037/0.6966, allocations: 260 kB / 0.8748 GB, free: 7.379 MB / 0.5417 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.387e-05/0.6966, allocations: 7.953 kB / 0.8748 GB, free: 7.371 MB / 0.5417 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.304e-05/0.6967, allocations: 20 kB / 0.8749 GB, free: 7.352 MB / 0.5417 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0004298/0.6972, allocations: 208.8 kB / 0.8751 GB, free: 7.148 MB / 0.5417 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004598/0.6976, allocations: 260 kB / 0.8753 GB, free: 6.883 MB / 0.5417 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.909e-05/0.6977, allocations: 7.906 kB / 0.8753 GB, free: 6.875 MB / 0.5417 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.148e-05/0.6977, allocations: 0 / 0.8753 GB, free: 6.875 MB / 0.5417 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.494e-06/0.6977, allocations: 8 kB / 0.8753 GB, free: 6.867 MB / 0.5417 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001522/0.6992, allocations: 0.8483 MB / 0.8762 GB, free: 5.973 MB / 0.5417 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0005794/0.6998, allocations: 294.1 kB / 0.8764 GB, free: 5.668 MB / 0.5417 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.000238/0.7001, allocations: 154.1 kB / 0.8766 GB, free: 5.512 MB / 0.5417 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0007004/0.7008, allocations: 453.6 kB / 0.877 GB, free: 4.977 MB / 0.5417 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004505/0.7012, allocations: 272.8 kB / 0.8773 GB, free: 4.691 MB / 0.5417 GB Notification: Performance of pre-optimization done (n=42): time 2.024e-06/0.7013, allocations: 0 / 0.8773 GB, free: 4.691 MB / 0.5417 GB Notification: Performance of matching and sorting (n=42): time 0.04488/0.7461, allocations: 5.725 MB / 0.8829 GB, free: 14.96 MB / 0.5573 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.22e-05/0.7463, allocations: 89.09 kB / 0.8829 GB, free: 14.85 MB / 0.5573 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003892/0.7467, allocations: 273.2 kB / 0.8832 GB, free: 14.58 MB / 0.5573 GB Notification: Performance of collectPreVariables (initialization): time 5.056e-05/0.7467, allocations: 41.64 kB / 0.8833 GB, free: 14.54 MB / 0.5573 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001262/0.7469, allocations: 161.1 kB / 0.8834 GB, free: 14.37 MB / 0.5573 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001263/0.747, allocations: 134 kB / 0.8835 GB, free: 14.24 MB / 0.5573 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.661e-05/0.747, allocations: 0 / 0.8835 GB, free: 14.24 MB / 0.5573 GB Notification: Performance of setup shared object (initialization): time 0.0001902/0.7472, allocations: 358.8 kB / 0.8839 GB, free: 13.88 MB / 0.5573 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002546/0.7475, allocations: 153.8 kB / 0.884 GB, free: 13.73 MB / 0.5573 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002957/0.7478, allocations: 185.8 kB / 0.8842 GB, free: 13.52 MB / 0.5573 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.04341/0.7912, allocations: 5.524 MB / 0.8896 GB, free: 7.996 MB / 0.5573 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.13e-05/0.7913, allocations: 4 kB / 0.8896 GB, free: 7.992 MB / 0.5573 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.04413/0.8354, allocations: 5.816 MB / 0.8953 GB, free: 2.164 MB / 0.5573 GB Notification: Performance of prepare postOptimizeDAE: time 9.454e-05/0.8355, allocations: 93.23 kB / 0.8954 GB, free: 2.055 MB / 0.5573 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.858e-06/0.8356, allocations: 4 kB / 0.8954 GB, free: 2.051 MB / 0.5573 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.414e-05/0.8356, allocations: 4 kB / 0.8954 GB, free: 2.047 MB / 0.5573 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000617/0.8362, allocations: 119.8 kB / 0.8955 GB, free: 1.93 MB / 0.5573 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.173e-05/0.8362, allocations: 11.88 kB / 0.8955 GB, free: 1.918 MB / 0.5573 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005988/0.8368, allocations: 63.55 kB / 0.8956 GB, free: 1.855 MB / 0.5573 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.481e-05/0.8369, allocations: 23.98 kB / 0.8956 GB, free: 1.832 MB / 0.5573 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.0003103/0.8372, allocations: 161.3 kB / 0.8957 GB, free: 1.672 MB / 0.5573 GB Notification: Performance of postOpt createAliasVarsForOutputStates (simulation): time 0.5693/1.407, allocations: 5.727 MB / 0.9013 GB, free: 134.4 MB / 0.5573 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.124e-05/1.407, allocations: 37.8 kB / 0.9014 GB, free: 134.4 MB / 0.5573 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.04297/1.45, allocations: 6.717 MB / 0.9079 GB, free: 133.9 MB / 0.5573 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.624e-05/1.45, allocations: 10.56 kB / 0.9079 GB, free: 133.9 MB / 0.5573 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.097e-05/1.45, allocations: 0 / 0.9079 GB, free: 133.9 MB / 0.5573 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.176e-05/1.45, allocations: 3.516 kB / 0.9079 GB, free: 133.9 MB / 0.5573 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006618/1.45, allocations: 431 kB / 0.9083 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.987e-06/1.45, allocations: 0 / 0.9083 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000626/1.451, allocations: 119.1 kB / 0.9085 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt tearingSystem (simulation): time 1.075e-05/1.451, allocations: 2.859 kB / 0.9085 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.576e-05/1.451, allocations: 19.94 kB / 0.9085 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.879e-06/1.451, allocations: 3.422 kB / 0.9085 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.699e-06/1.451, allocations: 0.8594 kB / 0.9085 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.03874/1.49, allocations: 6.858 MB / 0.9152 GB, free: 128.8 MB / 0.5573 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002629/1.49, allocations: 169.5 kB / 0.9153 GB, free: 128.6 MB / 0.5573 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.465e-05/1.49, allocations: 4 kB / 0.9154 GB, free: 128.6 MB / 0.5573 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004334/1.491, allocations: 39.95 kB / 0.9154 GB, free: 128.5 MB / 0.5573 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001499/1.491, allocations: 63.69 kB / 0.9154 GB, free: 128.5 MB / 0.5573 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.697e-05/1.491, allocations: 15.98 kB / 0.9155 GB, free: 128.5 MB / 0.5573 GB Notification: Performance of sorting global known variables: time 0.0002356/1.491, allocations: 218.5 kB / 0.9157 GB, free: 128.3 MB / 0.5573 GB Notification: Performance of sort global known variables: time 1.3e-07/1.491, allocations: 0.6562 kB / 0.9157 GB, free: 128.3 MB / 0.5573 GB Notification: Performance of remove unused functions: time 0.0004626/1.492, allocations: 123.2 kB / 0.9158 GB, free: 128.1 MB / 0.5573 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.03955/1.531, allocations: 7.515 MB / 0.9231 GB, free: 120.6 MB / 0.5573 GB Notification: Performance of simCode: created initialization part: time 0.0007961/1.532, allocations: 0.5289 MB / 0.9236 GB, free: 120.1 MB / 0.5573 GB Notification: Performance of simCode: created event and clocks part: time 4.989e-06/1.532, allocations: 0 / 0.9236 GB, free: 120.1 MB / 0.5573 GB Notification: Performance of simCode: created simulation system equations: time 0.0002885/1.532, allocations: 212.8 kB / 0.9238 GB, free: 119.9 MB / 0.5573 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005232/1.533, allocations: 57.03 kB / 0.9239 GB, free: 119.8 MB / 0.5573 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001757/1.535, allocations: 1.051 MB / 0.9249 GB, free: 118.8 MB / 0.5573 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002406/1.535, allocations: 0.8123 MB / 0.9257 GB, free: 117.9 MB / 0.5573 GB Notification: Performance of simCode: alias equations: time 0.0003891/1.535, allocations: 69.2 kB / 0.9258 GB, free: 117.9 MB / 0.5573 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002422/1.536, allocations: 143.4 kB / 0.9259 GB, free: 117.7 MB / 0.5573 GB Notification: Performance of SimCode: time 1.312e-06/1.536, allocations: 0 / 0.9259 GB, free: 117.7 MB / 0.5573 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03035/1.566, allocations: 8.676 MB / 0.9344 GB, free: 109.2 MB / 0.5573 GB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0001897/1.566, allocations: 166.6 kB / 0.9346 GB, free: 109 MB / 0.5573 GB Notification: Performance of buildModelFMU: Generate platform static: time 2.517/4.083, allocations: 0 / 0.9346 GB, free: 109 MB / 0.5573 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)