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.792/0.792, allocations: 141.7 MB / 154.3 MB, free: 15.48 MB / 138.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.0011/0.0011, allocations: 184.2 kB / 187.3 MB, free: 11.88 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.5/1.5, allocations: 221.3 MB / 441.4 MB, free: 4.633 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.0008197/0.0008197, allocations: 93.39 kB / 0.5124 GB, free: 24.22 MB / 394.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001834/0.001835, allocations: 275.1 kB / 0.5939 GB, free: 7.941 MB / 442.7 MB Notification: Performance of FrontEnd - loaded program: time 4.442e-05/4.476e-05, allocations: 11.98 kB / 0.6835 GB, free: 12.13 MB / 0.5261 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4677/0.4677, allocations: 82.76 MB / 0.7644 GB, free: 108.7 MB / 0.5261 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.1312/0.599, allocations: 112 MB / 0.8738 GB, free: 12.47 MB / 0.5417 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002936/0.5994, allocations: 72.53 kB / 0.8738 GB, free: 12.4 MB / 0.5417 GB Notification: Performance of FrontEnd - DAE generated: time 0.025/0.6244, allocations: 7.823 MB / 0.8815 GB, free: 4.508 MB / 0.5417 GB Notification: Performance of FrontEnd: time 2.435e-06/0.6244, allocations: 0 / 0.8815 GB, free: 4.508 MB / 0.5417 GB Notification: Performance of Transformations before backend: time 1.767e-05/0.6245, allocations: 4 kB / 0.8815 GB, free: 4.504 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.001752/0.6262, allocations: 0.7118 MB / 0.8822 GB, free: 3.727 MB / 0.5417 GB Notification: Performance of prepare preOptimizeDAE: time 5.4e-05/0.6263, allocations: 12.03 kB / 0.8822 GB, free: 3.715 MB / 0.5417 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001341/0.6264, allocations: 54.53 kB / 0.8822 GB, free: 3.652 MB / 0.5417 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001589/0.6266, allocations: 39.72 kB / 0.8823 GB, free: 3.613 MB / 0.5417 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000367/0.627, allocations: 267.8 kB / 0.8825 GB, free: 3.309 MB / 0.5417 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.197e-05/0.627, allocations: 16.39 kB / 0.8825 GB, free: 3.293 MB / 0.5417 GB Notification: Performance of preOpt expandDerOperator (simulation): time 8.999e-05/0.6271, allocations: 24 kB / 0.8826 GB, free: 3.27 MB / 0.5417 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0005648/0.6277, allocations: 280.9 kB / 0.8828 GB, free: 2.984 MB / 0.5417 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.524e-05/0.6277, allocations: 7.891 kB / 0.8828 GB, free: 2.977 MB / 0.5417 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.897e-05/0.6278, allocations: 16 kB / 0.8829 GB, free: 2.961 MB / 0.5417 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.777e-06/0.6278, allocations: 4 kB / 0.8829 GB, free: 2.957 MB / 0.5417 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0004621/0.6283, allocations: 215.9 kB / 0.8831 GB, free: 2.746 MB / 0.5417 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001702/0.63, allocations: 0.8907 MB / 0.8839 GB, free: 1.797 MB / 0.5417 GB Notification: Performance of preOpt comSubExp (simulation): time 0.000689/0.6307, allocations: 314.2 kB / 0.8842 GB, free: 1.473 MB / 0.5417 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002889/0.631, allocations: 170.1 kB / 0.8844 GB, free: 1.301 MB / 0.5417 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0007059/0.6317, allocations: 453.6 kB / 0.8848 GB, free: 0.7656 MB / 0.5417 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000499/0.6322, allocations: 284.8 kB / 0.8851 GB, free: 480 kB / 0.5417 GB Notification: Performance of pre-optimization done (n=42): time 3.226e-06/0.6322, allocations: 0 / 0.8851 GB, free: 480 kB / 0.5417 GB Notification: Performance of matching and sorting (n=42): time 0.0008037/0.633, allocations: 389.5 kB / 0.8855 GB, free: 88 kB / 0.5417 GB Notification: Performance of inlineWhenForInitialization (initialization): time 7.281e-05/0.6331, allocations: 85.06 kB / 0.8856 GB, free: 15.98 MB / 0.5573 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003652/0.6335, allocations: 299 kB / 0.8858 GB, free: 15.69 MB / 0.5573 GB Notification: Performance of collectPreVariables (initialization): time 4.965e-05/0.6335, allocations: 37.7 kB / 0.8859 GB, free: 15.65 MB / 0.5573 GB Notification: Performance of collectInitialEqns (initialization): time 0.000138/0.6337, allocations: 160.8 kB / 0.886 GB, free: 15.49 MB / 0.5573 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001406/0.6338, allocations: 146 kB / 0.8862 GB, free: 15.34 MB / 0.5573 GB Notification: Performance of simplifyInitialFunctions (initialization): time 3.073e-05/0.6339, allocations: 8 kB / 0.8862 GB, free: 15.34 MB / 0.5573 GB Notification: Performance of setup shared object (initialization): time 0.0001382/0.634, allocations: 350.8 kB / 0.8865 GB, free: 14.98 MB / 0.5573 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002966/0.6343, allocations: 161.8 kB / 0.8867 GB, free: 14.82 MB / 0.5573 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003019/0.6346, allocations: 206.7 kB / 0.8869 GB, free: 14.6 MB / 0.5573 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.000358/0.635, allocations: 240.6 kB / 0.8871 GB, free: 14.35 MB / 0.5573 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.829e-06/0.635, allocations: 4 kB / 0.8871 GB, free: 14.35 MB / 0.5573 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.0009423/0.636, allocations: 0.5643 MB / 0.8877 GB, free: 13.76 MB / 0.5573 GB Notification: Performance of prepare postOptimizeDAE: time 7.593e-05/0.6361, allocations: 85.11 kB / 0.8877 GB, free: 13.66 MB / 0.5573 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.017e-06/0.6361, allocations: 0 / 0.8877 GB, free: 13.66 MB / 0.5573 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.717e-05/0.6361, allocations: 7.938 kB / 0.8877 GB, free: 13.65 MB / 0.5573 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006202/0.6367, allocations: 119.8 kB / 0.8879 GB, free: 13.53 MB / 0.5573 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.912e-05/0.6368, allocations: 7.938 kB / 0.8879 GB, free: 13.52 MB / 0.5573 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005833/0.6374, allocations: 79.59 kB / 0.8879 GB, free: 13.45 MB / 0.5573 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.96e-05/0.6374, allocations: 23.98 kB / 0.888 GB, free: 13.42 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.0002921/0.6377, allocations: 176 kB / 0.8881 GB, free: 13.25 MB / 0.5573 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.969e-05/0.6378, allocations: 39.53 kB / 0.8882 GB, free: 13.21 MB / 0.5573 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001256/0.6391, allocations: 0.5415 MB / 0.8887 GB, free: 12.66 MB / 0.5573 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.317e-06/0.6391, allocations: 8 kB / 0.8887 GB, free: 12.65 MB / 0.5573 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.781e-06/0.6391, allocations: 0 / 0.8887 GB, free: 12.65 MB / 0.5573 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.848e-06/0.6391, allocations: 3.984 kB / 0.8887 GB, free: 12.64 MB / 0.5573 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0005741/0.6397, allocations: 480.8 kB / 0.8892 GB, free: 12.12 MB / 0.5573 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.278e-06/0.6397, allocations: 0 / 0.8892 GB, free: 12.12 MB / 0.5573 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0006163/0.6403, allocations: 119.9 kB / 0.8893 GB, free: 12.01 MB / 0.5573 GB Notification: Performance of postOpt tearingSystem (simulation): time 1.149e-05/0.6404, allocations: 7.938 kB / 0.8893 GB, free: 12 MB / 0.5573 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 5.447e-05/0.6404, allocations: 15.98 kB / 0.8893 GB, free: 11.98 MB / 0.5573 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.458e-06/0.6404, allocations: 7.938 kB / 0.8893 GB, free: 11.98 MB / 0.5573 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.276e-06/0.6405, allocations: 2.109 kB / 0.8893 GB, free: 11.98 MB / 0.5573 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001172/0.6416, allocations: 0.6936 MB / 0.89 GB, free: 11.25 MB / 0.5573 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002486/0.6419, allocations: 168.4 kB / 0.8901 GB, free: 11.07 MB / 0.5573 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.643e-05/0.642, allocations: 15.98 kB / 0.8902 GB, free: 11.05 MB / 0.5573 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004585/0.6425, allocations: 43.97 kB / 0.8902 GB, free: 11.01 MB / 0.5573 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001615/0.6426, allocations: 59.91 kB / 0.8903 GB, free: 10.95 MB / 0.5573 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.297e-05/0.6427, allocations: 23.94 kB / 0.8903 GB, free: 10.93 MB / 0.5573 GB Notification: Performance of sorting global known variables: time 0.0002724/0.643, allocations: 230.2 kB / 0.8905 GB, free: 10.71 MB / 0.5573 GB Notification: Performance of sort global known variables: time 1.8e-07/0.643, allocations: 4 kB / 0.8905 GB, free: 10.7 MB / 0.5573 GB Notification: Performance of remove unused functions: time 0.00054/0.6435, allocations: 131.9 kB / 0.8906 GB, free: 10.57 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.001742/0.6453, allocations: 1.365 MB / 0.892 GB, free: 9.172 MB / 0.5573 GB Notification: Performance of simCode: created initialization part: time 0.0009379/0.6462, allocations: 0.5556 MB / 0.8925 GB, free: 8.578 MB / 0.5573 GB Notification: Performance of simCode: created event and clocks part: time 2.966e-06/0.6462, allocations: 0 / 0.8925 GB, free: 8.578 MB / 0.5573 GB Notification: Performance of simCode: created simulation system equations: time 0.0003856/0.6466, allocations: 227.8 kB / 0.8927 GB, free: 8.355 MB / 0.5573 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000456/0.6471, allocations: 61.39 kB / 0.8928 GB, free: 8.297 MB / 0.5573 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002115/0.6492, allocations: 1.083 MB / 0.8938 GB, free: 7.176 MB / 0.5573 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003905/0.6496, allocations: 0.8094 MB / 0.8946 GB, free: 6.336 MB / 0.5573 GB Notification: Performance of simCode: alias equations: time 0.0004097/0.65, allocations: 71.8 kB / 0.8947 GB, free: 6.27 MB / 0.5573 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002902/0.6503, allocations: 139.3 kB / 0.8948 GB, free: 6.133 MB / 0.5573 GB Notification: Performance of SimCode: time 1.293e-06/0.6503, allocations: 0 / 0.8948 GB, free: 6.133 MB / 0.5573 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02835/0.6787, allocations: 9.565 MB / 0.9042 GB, free: 12.81 MB / 0.573 GB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0002601/0.679, allocations: 180.7 kB / 0.9043 GB, free: 12.59 MB / 0.573 GB Notification: Performance of buildModelFMU: Generate platform static: time 2.338/3.017, allocations: 0 / 0.9043 GB, free: 12.59 MB / 0.573 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)