Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.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.BatterySimple,fileNamePrefix="BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatterySimple",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple,fileNamePrefix="BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatterySimple",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.007593/0.007594, allocations: 98.23 kB / 15.73 MB, free: 6.004 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.002095/0.002095, allocations: 192.6 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.461/1.461, allocations: 222.9 MB / 240.4 MB, free: 4.309 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002524/0.002524, allocations: 287 kB / 290.8 MB, free: 1.91 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 1.082/1.082, allocations: 178.6 MB / 0.5074 GB, free: 4.461 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002742/0.002742, allocations: 100.2 kB / 0.6942 GB, free: 3.609 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4494/0.4522, allocations: 89.14 MB / 0.7813 GB, free: 13.85 MB / 0.5606 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.003116/0.4553, allocations: 1.955 MB / 0.7832 GB, free: 12.46 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.001411/0.4568, allocations: 0.8654 MB / 0.7841 GB, free: 11.85 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 8.576e-05/0.4569, allocations: 4.188 kB / 0.7841 GB, free: 11.85 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.0002121/0.4571, allocations: 48.5 kB / 0.7841 GB, free: 11.82 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0001121/0.4572, allocations: 54.36 kB / 0.7842 GB, free: 11.78 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0002794/0.4575, allocations: 87.05 kB / 0.7842 GB, free: 11.74 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.0002455/0.4578, allocations: 195.5 kB / 0.7844 GB, free: 11.64 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 9.289e-05/0.4579, allocations: 21.92 kB / 0.7844 GB, free: 11.64 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0001381/0.458, allocations: 79.48 kB / 0.7845 GB, free: 11.61 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0001482/0.4582, allocations: 85.78 kB / 0.7846 GB, free: 11.57 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 2.946e-05/0.4582, allocations: 10.38 kB / 0.7846 GB, free: 11.57 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001354/0.4583, allocations: 63.16 kB / 0.7847 GB, free: 11.55 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 4.614e-05/0.4584, allocations: 30.3 kB / 0.7847 GB, free: 11.53 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 9.283e-05/0.4585, allocations: 72.73 kB / 0.7848 GB, free: 11.49 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.0002903/0.4588, allocations: 189.2 kB / 0.785 GB, free: 11.41 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 4.258e-06/0.4588, allocations: 0 / 0.785 GB, free: 11.41 MB / 0.5606 GB Notification: Performance of FrontEnd: time 2.074e-06/0.4588, allocations: 0.9062 kB / 0.785 GB, free: 11.41 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 5.239e-06/0.4588, allocations: 0 / 0.785 GB, free: 11.41 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: 19 * Number of variables: 19 Notification: Performance of Generate backend data structure: time 0.0009859/0.4598, allocations: 0.5033 MB / 0.7854 GB, free: 10.95 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 3.548e-05/0.4599, allocations: 13 kB / 0.7855 GB, free: 10.95 MB / 0.5606 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 4.824e-05/0.4599, allocations: 44.38 kB / 0.7855 GB, free: 10.9 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.78e-05/0.46, allocations: 17.09 kB / 0.7855 GB, free: 10.89 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000304/0.4603, allocations: 244.2 kB / 0.7857 GB, free: 10.65 MB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 9.698e-06/0.4603, allocations: 5.703 kB / 0.7858 GB, free: 10.65 MB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 3.486e-05/0.4603, allocations: 9.938 kB / 0.7858 GB, free: 10.65 MB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003116/0.4607, allocations: 122.1 kB / 0.7859 GB, free: 10.59 MB / 0.5606 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.237e-05/0.4607, allocations: 1.125 kB / 0.7859 GB, free: 10.59 MB / 0.5606 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.783e-05/0.4607, allocations: 5.188 kB / 0.7859 GB, free: 10.59 MB / 0.5606 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.112e-06/0.4607, allocations: 3.094 kB / 0.7859 GB, free: 10.59 MB / 0.5606 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003286/0.461, allocations: 101.8 kB / 0.786 GB, free: 10.56 MB / 0.5606 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007058/0.4618, allocations: 425 kB / 0.7864 GB, free: 10.21 MB / 0.5606 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0003613/0.4621, allocations: 129.3 kB / 0.7865 GB, free: 10.16 MB / 0.5606 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001947/0.4623, allocations: 81.33 kB / 0.7866 GB, free: 10.12 MB / 0.5606 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006961/0.463, allocations: 443.2 kB / 0.787 GB, free: 9.652 MB / 0.5606 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003468/0.4634, allocations: 134.8 kB / 0.7871 GB, free: 9.574 MB / 0.5606 GB Notification: Performance of pre-optimization done (n=16): time 1.643e-06/0.4634, allocations: 0 / 0.7871 GB, free: 9.574 MB / 0.5606 GB Notification: Performance of matching and sorting (n=16): time 0.0006846/0.4641, allocations: 234.5 kB / 0.7874 GB, free: 9.484 MB / 0.5606 GB Notification: Performance of inlineWhenForInitialization (initialization): time 4.827e-05/0.4642, allocations: 55.47 kB / 0.7874 GB, free: 9.422 MB / 0.5606 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001817/0.4644, allocations: 180.7 kB / 0.7876 GB, free: 9.297 MB / 0.5606 GB Notification: Performance of collectPreVariables (initialization): time 2.842e-05/0.4644, allocations: 31.05 kB / 0.7876 GB, free: 9.262 MB / 0.5606 GB Notification: Performance of collectInitialEqns (initialization): time 8.281e-05/0.4645, allocations: 113.7 kB / 0.7877 GB, free: 9.156 MB / 0.5606 GB Notification: Performance of collectInitialBindings (initialization): time 6.068e-05/0.4645, allocations: 63.66 kB / 0.7878 GB, free: 9.105 MB / 0.5606 GB Notification: Performance of simplifyInitialFunctions (initialization): time 8.613e-05/0.4646, allocations: 40.31 kB / 0.7878 GB, free: 9.078 MB / 0.5606 GB Notification: Performance of setup shared object (initialization): time 0.0001613/0.4648, allocations: 336.5 kB / 0.7881 GB, free: 8.75 MB / 0.5606 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002048/0.465, allocations: 72.81 kB / 0.7882 GB, free: 8.723 MB / 0.5606 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002135/0.4652, allocations: 87.03 kB / 0.7883 GB, free: 8.68 MB / 0.5606 GB Notification: Performance of analyzeInitialSystem (initialization): time 2.807/3.272, allocations: 378.8 MB / 1.158 GB, free: 219.2 MB / 0.8262 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.105e-06/3.272, allocations: 0 / 1.158 GB, free: 219.2 MB / 0.8262 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.000475/3.273, allocations: 250.6 kB / 1.158 GB, free: 219 MB / 0.8262 GB Notification: Performance of prepare postOptimizeDAE: time 2.589e-05/3.273, allocations: 37.69 kB / 1.158 GB, free: 219 MB / 0.8262 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.182e-06/3.273, allocations: 0 / 1.158 GB, free: 219 MB / 0.8262 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.705e-05/3.273, allocations: 7.062 kB / 1.158 GB, free: 219 MB / 0.8262 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002202/3.273, allocations: 43.19 kB / 1.159 GB, free: 218.9 MB / 0.8262 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.704e-06/3.273, allocations: 4 kB / 1.159 GB, free: 218.9 MB / 0.8262 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001937/3.273, allocations: 23.27 kB / 1.159 GB, free: 218.9 MB / 0.8262 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.819e-05/3.273, allocations: 4 kB / 1.159 GB, free: 218.9 MB / 0.8262 GB Warning: Assuming fixed start value for the following 4 variables: battery.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery.EAva:VARIABLE(start = 0.315 * battery.SOC_start * battery.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery.EBou:VARIABLE(start = 0.685 * battery.SOC_start * battery.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: 3 * Number of states: 0 () * Number of discrete variables: 5 ($PRE.gain.count,$PRE.gain.T_start,gain.count,gain.T_start,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (22): * Single equations (assignments): 21 * Array equations: 0 * Algorithm blocks: 1 * 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.0001685/3.273, allocations: 159.8 kB / 1.159 GB, free: 218.8 MB / 0.8262 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.837e-05/3.273, allocations: 15.05 kB / 1.159 GB, free: 218.8 MB / 0.8262 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005516/3.274, allocations: 235.8 kB / 1.159 GB, free: 218.6 MB / 0.8262 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.298e-06/3.274, allocations: 4 kB / 1.159 GB, free: 218.6 MB / 0.8262 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.789e-06/3.274, allocations: 0 / 1.159 GB, free: 218.6 MB / 0.8262 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.188e-06/3.274, allocations: 0 / 1.159 GB, free: 218.6 MB / 0.8262 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.000166/3.274, allocations: 256 kB / 1.159 GB, free: 218.3 MB / 0.8262 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.215e-06/3.274, allocations: 7.938 kB / 1.159 GB, free: 218.3 MB / 0.8262 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002269/3.275, allocations: 39.97 kB / 1.159 GB, free: 218.2 MB / 0.8262 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.124e-06/3.275, allocations: 0 / 1.159 GB, free: 218.2 MB / 0.8262 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.833e-05/3.275, allocations: 4 kB / 1.159 GB, free: 218.2 MB / 0.8262 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.074e-06/3.275, allocations: 4 kB / 1.159 GB, free: 218.2 MB / 0.8262 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.162e-06/3.275, allocations: 0 / 1.159 GB, free: 218.2 MB / 0.8262 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005783/3.275, allocations: 318.9 kB / 1.16 GB, free: 217.9 MB / 0.8262 GB Notification: Performance of postOpt removeConstants (simulation): time 6.447e-05/3.275, allocations: 110.1 kB / 1.16 GB, free: 217.8 MB / 0.8262 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.294e-05/3.275, allocations: 4.875 kB / 1.16 GB, free: 217.8 MB / 0.8262 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001579/3.275, allocations: 15.98 kB / 1.16 GB, free: 217.8 MB / 0.8262 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.631e-05/3.275, allocations: 15.98 kB / 1.16 GB, free: 217.8 MB / 0.8262 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.413e-05/3.276, allocations: 7.984 kB / 1.16 GB, free: 217.7 MB / 0.8262 GB Notification: Performance of sorting global known variables: time 7.405e-05/3.276, allocations: 136 kB / 1.16 GB, free: 217.6 MB / 0.8262 GB Notification: Performance of sort global known variables: time 5.21e-07/3.276, allocations: 0 / 1.16 GB, free: 217.6 MB / 0.8262 GB Notification: Performance of remove unused functions: time 0.0002679/3.276, allocations: 63.88 kB / 1.16 GB, free: 217.6 MB / 0.8262 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 4 (battery.EAva,battery.EBou,battery.E_charged,battery.E_discharged) * Number of discrete variables: 3 ($whenCondition1,gain.T_start,gain.count) * Number of discrete states: 1 (gain.count) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (20): * Single equations (assignments): 18 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 2 * 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.0007517/3.277, allocations: 0.8661 MB / 1.161 GB, free: 216.7 MB / 0.8262 GB Notification: Performance of simCode: created initialization part: time 0.0004196/3.277, allocations: 231.2 kB / 1.161 GB, free: 216.4 MB / 0.8262 GB Notification: Performance of simCode: created event and clocks part: time 1.713e-06/3.277, allocations: 0 / 1.161 GB, free: 216.4 MB / 0.8262 GB Notification: Performance of simCode: created simulation system equations: time 0.0001853/3.277, allocations: 94.08 kB / 1.161 GB, free: 216.3 MB / 0.8262 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002634/3.278, allocations: 34.66 kB / 1.161 GB, free: 216.3 MB / 0.8262 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002321/3.28, allocations: 2.309 MB / 1.163 GB, free: 213.9 MB / 0.8262 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000108/3.28, allocations: 0.7208 MB / 1.164 GB, free: 213.2 MB / 0.8262 GB Notification: Performance of simCode: alias equations: time 0.0001178/3.28, allocations: 33.52 kB / 1.164 GB, free: 213.2 MB / 0.8262 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.292e-05/3.28, allocations: 59.41 kB / 1.164 GB, free: 213.1 MB / 0.8262 GB Notification: Performance of SimCode: time 2.4e-07/3.28, allocations: 0 / 1.164 GB, free: 213.1 MB / 0.8262 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02536/3.306, allocations: 4.674 MB / 1.169 GB, free: 208.6 MB / 0.8262 GB Notification: Performance of buildModelFMU: Generate platform static: time 8.228/11.53, allocations: 19.47 kB / 1.169 GB, free: 208.6 MB / 0.8262 GB (rm -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe ; mkfifo BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe ; head -c 1048576 < BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe >> ../files/BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.sim & python3 -m fmpy simulate --output-file BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple_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_BatterySimple.fmu > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)