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/ModelicaServices 4.0.0+maint.om/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/NcDataReader2 2.5.1-master/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo", uses=false) Using package BuildingSystems with version 2.0.0-beta (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo) Using package NcDataReader2 with version 2.5.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/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 ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/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/ModelicaServices 4.0.0+maint.om/package.mo): time 0.008471/0.008471, allocations: 99.41 kB / 15.73 MB, free: 6.008 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.002179/0.002179, allocations: 191.1 kB / 16.67 MB, free: 5.934 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.524/1.524, allocations: 222.9 MB / 240.4 MB, free: 15.14 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002564/0.002564, allocations: 280.4 kB / 290.8 MB, free: 14.45 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 1.195/1.195, allocations: 178.6 MB / 0.5074 GB, free: 12.66 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002799/0.002799, allocations: 104.1 kB / 0.6943 GB, free: 15.22 MB / 0.545 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3988/0.4016, allocations: 89.11 MB / 0.7813 GB, free: 1.281 MB / 0.545 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.00358/0.4052, allocations: 2.651 MB / 0.7839 GB, free: 15.18 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.001963/0.4072, allocations: 1.079 MB / 0.7849 GB, free: 14.3 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001483/0.4074, allocations: 18.66 kB / 0.785 GB, free: 14.29 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.0002423/0.4076, allocations: 72.53 kB / 0.785 GB, free: 14.23 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0002382/0.4079, allocations: 130.3 kB / 0.7852 GB, free: 14.11 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004184/0.4083, allocations: 171.1 kB / 0.7853 GB, free: 13.98 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.0005281/0.4089, allocations: 0.515 MB / 0.7858 GB, free: 13.67 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001152/0.409, allocations: 39.33 kB / 0.7859 GB, free: 13.65 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0003072/0.4093, allocations: 231.1 kB / 0.7861 GB, free: 13.52 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003404/0.4096, allocations: 221.8 kB / 0.7863 GB, free: 13.38 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 6.4e-05/0.4097, allocations: 29.12 kB / 0.7863 GB, free: 13.38 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001723/0.4099, allocations: 82.25 kB / 0.7864 GB, free: 13.35 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 9.636e-05/0.41, allocations: 78.5 kB / 0.7865 GB, free: 13.28 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 0.0002033/0.4102, allocations: 182.5 kB / 0.7866 GB, free: 13.15 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.0005063/0.4107, allocations: 426.4 kB / 0.7871 GB, free: 12.85 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 3.387e-06/0.4107, allocations: 1.094 kB / 0.7871 GB, free: 12.85 MB / 0.5606 GB Notification: Performance of FrontEnd: time 1.684e-06/0.4107, allocations: 0 / 0.7871 GB, free: 12.85 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 6.923e-06/0.4107, allocations: 0 / 0.7871 GB, free: 12.85 MB / 0.5606 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.001851/0.4126, allocations: 0.8216 MB / 0.7879 GB, free: 12.12 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 3.501e-05/0.4126, allocations: 9.375 kB / 0.7879 GB, free: 12.12 MB / 0.5606 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 7.316e-05/0.4127, allocations: 57.08 kB / 0.7879 GB, free: 12.06 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.533e-05/0.4128, allocations: 40.52 kB / 0.788 GB, free: 12.04 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004326/0.4133, allocations: 347.6 kB / 0.7883 GB, free: 11.71 MB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.079e-05/0.4133, allocations: 13.75 kB / 0.7883 GB, free: 11.7 MB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.879e-05/0.4134, allocations: 24.62 kB / 0.7883 GB, free: 11.7 MB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007537/0.4141, allocations: 330.1 kB / 0.7886 GB, free: 11.48 MB / 0.5606 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.581e-05/0.4141, allocations: 5.219 kB / 0.7886 GB, free: 11.48 MB / 0.5606 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.268e-05/0.4142, allocations: 6.188 kB / 0.7886 GB, free: 11.48 MB / 0.5606 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.694e-06/0.4142, allocations: 5.531 kB / 0.7887 GB, free: 11.48 MB / 0.5606 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008825/0.4151, allocations: 292.6 kB / 0.7889 GB, free: 11.34 MB / 0.5606 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001141/0.4162, allocations: 0.7778 MB / 0.7897 GB, free: 10.66 MB / 0.5606 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001116/0.4174, allocations: 394.6 kB / 0.7901 GB, free: 10.45 MB / 0.5606 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005245/0.4179, allocations: 205.4 kB / 0.7903 GB, free: 10.34 MB / 0.5606 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006889/0.4186, allocations: 457.2 kB / 0.7907 GB, free: 9.832 MB / 0.5606 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007521/0.4194, allocations: 320.7 kB / 0.791 GB, free: 9.617 MB / 0.5606 GB Notification: Performance of pre-optimization done (n=42): time 1.823e-06/0.4194, allocations: 1.312 kB / 0.791 GB, free: 9.617 MB / 0.5606 GB Notification: Performance of matching and sorting (n=42): time 0.00168/0.4211, allocations: 0.6145 MB / 0.7916 GB, free: 9.312 MB / 0.5606 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.861e-05/0.4211, allocations: 87.14 kB / 0.7917 GB, free: 9.215 MB / 0.5606 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003322/0.4215, allocations: 311.9 kB / 0.792 GB, free: 9.004 MB / 0.5606 GB Notification: Performance of collectPreVariables (initialization): time 4.345e-05/0.4215, allocations: 37.45 kB / 0.792 GB, free: 8.965 MB / 0.5606 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001301/0.4217, allocations: 162 kB / 0.7922 GB, free: 8.816 MB / 0.5606 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001364/0.4218, allocations: 148.2 kB / 0.7923 GB, free: 8.688 MB / 0.5606 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001643/0.422, allocations: 90.81 kB / 0.7924 GB, free: 8.625 MB / 0.5606 GB Notification: Performance of setup shared object (initialization): time 0.0001666/0.4222, allocations: 355.6 kB / 0.7927 GB, free: 8.277 MB / 0.5606 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005606/0.4227, allocations: 209 kB / 0.7929 GB, free: 8.164 MB / 0.5606 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.00057/0.4233, allocations: 250 kB / 0.7932 GB, free: 8.004 MB / 0.5606 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.935/7.358, allocations: 0.866 GB / 1.659 GB, free: 311.8 MB / 0.8575 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.31e-06/7.358, allocations: 0 / 1.659 GB, free: 311.8 MB / 0.8575 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001237/7.36, allocations: 0.6385 MB / 1.66 GB, free: 311.6 MB / 0.8575 GB Notification: Performance of prepare postOptimizeDAE: time 3.782e-05/7.36, allocations: 85.02 kB / 1.66 GB, free: 311.5 MB / 0.8575 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.314e-06/7.36, allocations: 3.969 kB / 1.66 GB, free: 311.5 MB / 0.8575 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.8e-05/7.36, allocations: 3.938 kB / 1.66 GB, free: 311.5 MB / 0.8575 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005175/7.36, allocations: 121 kB / 1.66 GB, free: 311.5 MB / 0.8575 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.836e-06/7.36, allocations: 4.719 kB / 1.66 GB, free: 311.5 MB / 0.8575 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004989/7.361, allocations: 67.7 kB / 1.66 GB, free: 311.5 MB / 0.8575 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.364e-05/7.361, allocations: 23.61 kB / 1.66 GB, free: 311.5 MB / 0.8575 GB Warning: Assuming fixed start value for the following 8 variables: battery_C20.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_1C.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery_1C.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_1C.EAva:VARIABLE(start = 0.315 * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery_1C.EBou:VARIABLE(start = 0.685 * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" fixed = true ) "Bound charge of the battery" type: Real battery_C20.EAva:VARIABLE(start = 0.315 * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery_C20.EBou:VARIABLE(start = 0.685 * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" fixed = true ) "Bound 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 ($PRE.load_1C.count,$PRE.load_1C.T_start,$PRE.gain.count,$PRE.gain.T_start,load_1C.count,load_1C.T_start,gain.count,gain.T_start,$whenCondition2,$whenCondition3,$PRE.load_C20.count,$PRE.load_C20.T_start,load_C20.count,load_C20.T_start,$whenCondition1) * 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 (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002621/7.361, allocations: 193.3 kB / 1.66 GB, free: 311.3 MB / 0.8575 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.072e-05/7.361, allocations: 43.59 kB / 1.66 GB, free: 311.3 MB / 0.8575 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001401/7.363, allocations: 0.6323 MB / 1.661 GB, free: 311 MB / 0.8575 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.65e-06/7.363, allocations: 3.875 kB / 1.661 GB, free: 311 MB / 0.8575 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.991e-06/7.363, allocations: 3.938 kB / 1.661 GB, free: 311 MB / 0.8575 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.735e-06/7.363, allocations: 3.984 kB / 1.661 GB, free: 311 MB / 0.8575 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003483/7.363, allocations: 444.4 kB / 1.661 GB, free: 310.6 MB / 0.8575 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.966e-06/7.363, allocations: 3.984 kB / 1.661 GB, free: 310.6 MB / 0.8575 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005274/7.364, allocations: 106.3 kB / 1.662 GB, free: 310.6 MB / 0.8575 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.239e-06/7.364, allocations: 3.969 kB / 1.662 GB, free: 310.6 MB / 0.8575 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.645e-05/7.364, allocations: 19.53 kB / 1.662 GB, free: 310.6 MB / 0.8575 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.637e-06/7.364, allocations: 3.969 kB / 1.662 GB, free: 310.6 MB / 0.8575 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.005e-06/7.364, allocations: 5 kB / 1.662 GB, free: 310.6 MB / 0.8575 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001463/7.365, allocations: 0.7853 MB / 1.662 GB, free: 310.2 MB / 0.8575 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001381/7.365, allocations: 163.3 kB / 1.662 GB, free: 310 MB / 0.8575 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.435e-05/7.365, allocations: 15.92 kB / 1.662 GB, free: 310 MB / 0.8575 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004011/7.366, allocations: 43.31 kB / 1.663 GB, free: 310 MB / 0.8575 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001201/7.366, allocations: 51.2 kB / 1.663 GB, free: 310 MB / 0.8575 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.161e-05/7.366, allocations: 19.42 kB / 1.663 GB, free: 310 MB / 0.8575 GB Notification: Performance of sorting global known variables: time 0.0001378/7.366, allocations: 214.7 kB / 1.663 GB, free: 309.8 MB / 0.8575 GB Notification: Performance of sort global known variables: time 1.2e-07/7.366, allocations: 0 / 1.663 GB, free: 309.8 MB / 0.8575 GB Notification: Performance of remove unused functions: time 0.0003401/7.366, allocations: 116.8 kB / 1.663 GB, free: 309.7 MB / 0.8575 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 (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.001663/7.368, allocations: 1.367 MB / 1.664 GB, free: 308.3 MB / 0.8575 GB Notification: Performance of simCode: created initialization part: time 0.001044/7.369, allocations: 0.6321 MB / 1.665 GB, free: 307.6 MB / 0.8575 GB Notification: Performance of simCode: created event and clocks part: time 2.064e-06/7.369, allocations: 0 / 1.665 GB, free: 307.6 MB / 0.8575 GB Notification: Performance of simCode: created simulation system equations: time 0.000517/7.37, allocations: 276.8 kB / 1.665 GB, free: 307.3 MB / 0.8575 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000401/7.37, allocations: 74.06 kB / 1.665 GB, free: 307.3 MB / 0.8575 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004936/7.375, allocations: 4.261 MB / 1.669 GB, free: 302.9 MB / 0.8575 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001573/7.375, allocations: 0.8012 MB / 1.67 GB, free: 302.1 MB / 0.8575 GB Notification: Performance of simCode: alias equations: time 0.0003032/7.375, allocations: 79.31 kB / 1.67 GB, free: 302 MB / 0.8575 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002208/7.376, allocations: 142.5 kB / 1.67 GB, free: 301.9 MB / 0.8575 GB Notification: Performance of SimCode: time 4.31e-07/7.376, allocations: 0 / 1.67 GB, free: 301.9 MB / 0.8575 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03007/7.406, allocations: 9.969 MB / 1.68 GB, free: 292.1 MB / 0.8575 GB Notification: Performance of buildModelFMU: Generate platform static: time 8.706/16.11, allocations: 11.02 kB / 1.68 GB, free: 292.1 MB / 0.8575 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 & python3 -m fmpy simulate --output-file BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex_res.csv --start-time 0 --stop-time 3.1536e+07 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 12614.4 BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex.fmu > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)