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.7719/0.7719, allocations: 143.3 MB / 158.3 MB, free: 5.773 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.001034/0.001033, allocations: 181 kB / 191.5 MB, free: 5.777 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.366/1.366, allocations: 223.2 MB / 447.7 MB, free: 4.754 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.0008473/0.0008473, allocations: 92.33 kB / 0.5187 GB, free: 1.121 MB / 410.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001839/0.001839, allocations: 274.4 kB / 0.6005 GB, free: 48.77 MB / 410.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0004368/0.0004371, allocations: 10.72 kB / 0.6929 GB, free: 59.54 MB / 442.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1851/0.1855, allocations: 82.8 MB / 0.7738 GB, free: 13.78 MB / 458.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.5745/0.76, allocations: 112.1 MB / 0.8832 GB, free: 32.7 MB / 0.5417 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0003146/0.7604, allocations: 75.7 kB / 0.8833 GB, free: 32.7 MB / 0.5417 GB Notification: Performance of FrontEnd - DAE generated: time 0.02607/0.7865, allocations: 7.849 MB / 0.891 GB, free: 31.74 MB / 0.5417 GB Notification: Performance of FrontEnd: time 3.336e-06/0.7866, allocations: 0 / 0.891 GB, free: 31.74 MB / 0.5417 GB Notification: Performance of Transformations before backend: time 1.15e-05/0.7866, allocations: 3.656 kB / 0.891 GB, free: 31.74 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.001746/0.7884, allocations: 0.7796 MB / 0.8917 GB, free: 31.15 MB / 0.5417 GB Notification: Performance of prepare preOptimizeDAE: time 6.509e-05/0.7884, allocations: 9.031 kB / 0.8918 GB, free: 31.15 MB / 0.5417 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 7.969e-05/0.7885, allocations: 52.52 kB / 0.8918 GB, free: 31.11 MB / 0.5417 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.57e-05/0.7886, allocations: 42.17 kB / 0.8918 GB, free: 31.09 MB / 0.5417 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000246/0.7889, allocations: 257.6 kB / 0.8921 GB, free: 30.86 MB / 0.5417 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.53e-05/0.7889, allocations: 20.36 kB / 0.8921 GB, free: 30.86 MB / 0.5417 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.957e-05/0.789, allocations: 31.89 kB / 0.8921 GB, free: 30.85 MB / 0.5417 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000762/0.7898, allocations: 348.4 kB / 0.8925 GB, free: 30.79 MB / 0.5417 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.928e-05/0.7898, allocations: 9.906 kB / 0.8925 GB, free: 30.78 MB / 0.5417 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.815e-05/0.7898, allocations: 10.28 kB / 0.8925 GB, free: 30.78 MB / 0.5417 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.588e-06/0.7898, allocations: 5.281 kB / 0.8925 GB, free: 30.78 MB / 0.5417 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0009087/0.7908, allocations: 335 kB / 0.8928 GB, free: 30.78 MB / 0.5417 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001585/0.7924, allocations: 0.8918 MB / 0.8937 GB, free: 30.39 MB / 0.5417 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001322/0.7937, allocations: 435.2 kB / 0.8941 GB, free: 30.33 MB / 0.5417 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0007757/0.7945, allocations: 450.5 kB / 0.8945 GB, free: 29.86 MB / 0.5417 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0009431/0.7954, allocations: 344.9 kB / 0.8949 GB, free: 29.79 MB / 0.5417 GB Notification: Performance of pre-optimization done (n=42): time 1.993e-06/0.7954, allocations: 0 / 0.8949 GB, free: 29.79 MB / 0.5417 GB Notification: Performance of matching and sorting (n=42): time 0.002369/0.7978, allocations: 0.6795 MB / 0.8955 GB, free: 29.71 MB / 0.5417 GB Notification: Performance of inlineWhenForInitialization (initialization): time 8.719e-05/0.7979, allocations: 89.08 kB / 0.8956 GB, free: 29.61 MB / 0.5417 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006227/0.7986, allocations: 301.5 kB / 0.8959 GB, free: 29.51 MB / 0.5417 GB Notification: Performance of collectPreVariables (initialization): time 5.579e-05/0.7986, allocations: 38.14 kB / 0.8959 GB, free: 29.48 MB / 0.5417 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001547/0.7988, allocations: 160.3 kB / 0.8961 GB, free: 29.38 MB / 0.5417 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001488/0.7989, allocations: 150 kB / 0.8962 GB, free: 29.29 MB / 0.5417 GB Notification: Performance of simplifyInitialFunctions (initialization): time 3.107e-05/0.799, allocations: 6.375 kB / 0.8962 GB, free: 29.29 MB / 0.5417 GB Notification: Performance of setup shared object (initialization): time 0.0001699/0.7992, allocations: 352.4 kB / 0.8966 GB, free: 28.97 MB / 0.5417 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0007234/0.7999, allocations: 225.9 kB / 0.8968 GB, free: 28.96 MB / 0.5417 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007145/0.8006, allocations: 266.3 kB / 0.897 GB, free: 28.9 MB / 0.5417 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.000667/0.8013, allocations: 308.8 kB / 0.8973 GB, free: 28.79 MB / 0.5417 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.785e-06/0.8013, allocations: 0 / 0.8973 GB, free: 28.79 MB / 0.5417 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001553/0.8029, allocations: 0.6735 MB / 0.898 GB, free: 28.62 MB / 0.5417 GB Notification: Performance of prepare postOptimizeDAE: time 8.189e-05/0.803, allocations: 92.31 kB / 0.8981 GB, free: 28.53 MB / 0.5417 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.109e-05/0.803, allocations: 1.281 kB / 0.8981 GB, free: 28.53 MB / 0.5417 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.719e-05/0.803, allocations: 4.656 kB / 0.8981 GB, free: 28.53 MB / 0.5417 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006781/0.8037, allocations: 129.5 kB / 0.8982 GB, free: 28.52 MB / 0.5417 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.488e-05/0.8037, allocations: 3.938 kB / 0.8982 GB, free: 28.52 MB / 0.5417 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005825/0.8043, allocations: 68.02 kB / 0.8983 GB, free: 28.5 MB / 0.5417 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.887e-05/0.8044, allocations: 22.66 kB / 0.8983 GB, free: 28.5 MB / 0.5417 GB Warning: Assuming fixed start value for the following 8 variables: battery_1C.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_1C.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery_C20.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_C20.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "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" fixed = true ) "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" fixed = true ) "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" fixed = true ) "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" fixed = true ) "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 () * Number of clocked 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.0003725/0.8048, allocations: 206.4 kB / 0.8985 GB, free: 28.36 MB / 0.5417 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.148e-05/0.8048, allocations: 37.78 kB / 0.8985 GB, free: 28.34 MB / 0.5417 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001943/0.8068, allocations: 0.6771 MB / 0.8992 GB, free: 28.23 MB / 0.5417 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.112e-05/0.8068, allocations: 6.531 kB / 0.8992 GB, free: 28.23 MB / 0.5417 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.274e-06/0.8068, allocations: 15.89 kB / 0.8992 GB, free: 28.22 MB / 0.5417 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.274e-05/0.8068, allocations: 4.062 kB / 0.8992 GB, free: 28.22 MB / 0.5417 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006244/0.8075, allocations: 477.8 kB / 0.8997 GB, free: 28.01 MB / 0.5417 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.915e-06/0.8075, allocations: 1.188 kB / 0.8997 GB, free: 28.01 MB / 0.5417 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0006767/0.8082, allocations: 114 kB / 0.8998 GB, free: 28.01 MB / 0.5417 GB Notification: Performance of postOpt tearingSystem (simulation): time 6.382e-06/0.8082, allocations: 2.438 kB / 0.8998 GB, free: 28.01 MB / 0.5417 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.618e-05/0.8082, allocations: 15.45 kB / 0.8998 GB, free: 28.01 MB / 0.5417 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.593e-06/0.8083, allocations: 8.469 kB / 0.8998 GB, free: 28 MB / 0.5417 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.665e-06/0.8083, allocations: 1.5 kB / 0.8998 GB, free: 28 MB / 0.5417 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001882/0.8102, allocations: 0.8692 MB / 0.9007 GB, free: 27.87 MB / 0.5417 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002364/0.8104, allocations: 174.7 kB / 0.9008 GB, free: 27.74 MB / 0.5417 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.037e-05/0.8105, allocations: 12.59 kB / 0.9008 GB, free: 27.74 MB / 0.5417 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004647/0.811, allocations: 47.69 kB / 0.9009 GB, free: 27.74 MB / 0.5417 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001673/0.8111, allocations: 60.31 kB / 0.9009 GB, free: 27.73 MB / 0.5417 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.358e-05/0.8112, allocations: 18.91 kB / 0.901 GB, free: 27.73 MB / 0.5417 GB Notification: Performance of sorting global known variables: time 0.0002955/0.8115, allocations: 235 kB / 0.9012 GB, free: 27.65 MB / 0.5417 GB Notification: Performance of sort global known variables: time 1.2e-07/0.8115, allocations: 0 / 0.9012 GB, free: 27.65 MB / 0.5417 GB Notification: Performance of remove unused functions: time 0.0005758/0.8121, allocations: 143.7 kB / 0.9013 GB, free: 27.64 MB / 0.5417 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) * Number of clocked states: 0 () * 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.002254/0.8143, allocations: 1.537 MB / 0.9028 GB, free: 26.89 MB / 0.5417 GB Notification: Performance of simCode: created initialization part: time 0.001418/0.8158, allocations: 0.6709 MB / 0.9035 GB, free: 26.68 MB / 0.5417 GB Notification: Performance of simCode: created event and clocks part: time 2.364e-06/0.8158, allocations: 0 / 0.9035 GB, free: 26.68 MB / 0.5417 GB Notification: Performance of simCode: created simulation system equations: time 0.0006386/0.8164, allocations: 288.4 kB / 0.9037 GB, free: 26.66 MB / 0.5417 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004404/0.8169, allocations: 66.45 kB / 0.9038 GB, free: 26.66 MB / 0.5417 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.007141/0.824, allocations: 3.818 MB / 0.9075 GB, free: 40.7 MB / 0.5573 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006112/0.8247, allocations: 0.8098 MB / 0.9083 GB, free: 39.99 MB / 0.5573 GB Notification: Performance of simCode: alias equations: time 0.0005472/0.8253, allocations: 68.27 kB / 0.9084 GB, free: 39.97 MB / 0.5573 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003681/0.8257, allocations: 138.2 kB / 0.9085 GB, free: 39.96 MB / 0.5573 GB Notification: Performance of SimCode: time 2.405e-06/0.8257, allocations: 3.938 kB / 0.9085 GB, free: 39.96 MB / 0.5573 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02793/0.8536, allocations: 9.491 MB / 0.9178 GB, free: 39.31 MB / 0.5573 GB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0001684/0.8538, allocations: 205.4 kB / 0.918 GB, free: 39.07 MB / 0.5573 GB Notification: Performance of buildModelFMU: Generate platform static: time 2.515/3.369, allocations: 0 / 0.918 GB, free: 39.07 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)