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.00215/0.002151, allocations: 108 kB / 15.61 MB, free: 148 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.00286/0.00286, allocations: 194.4 kB / 16.53 MB, free: 6.664 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 2.45/2.45, allocations: 222.9 MB / 240.2 MB, free: 4.363 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.004186/0.004186, allocations: 287 kB / 290.7 MB, free: 1.969 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 1.784/1.784, allocations: 169.3 MB / 0.4982 GB, free: 13.95 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002842/0.002842, allocations: 90.36 kB / 0.5953 GB, free: 27.89 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2848/0.2877, allocations: 86.99 MB / 0.6803 GB, free: 0.6094 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.004704/0.2924, allocations: 1.927 MB / 0.6822 GB, free: 14.68 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.002/0.2945, allocations: 0.8772 MB / 0.683 GB, free: 13.8 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001481/0.2946, allocations: 7.938 kB / 0.683 GB, free: 13.79 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003163/0.295, allocations: 51.84 kB / 0.6831 GB, free: 13.74 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001472/0.2952, allocations: 43.62 kB / 0.6831 GB, free: 13.7 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.000429/0.2956, allocations: 95.7 kB / 0.6832 GB, free: 13.6 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0003038/0.2959, allocations: 187.4 kB / 0.6834 GB, free: 13.42 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000138/0.2961, allocations: 33.45 kB / 0.6834 GB, free: 13.39 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001894/0.2963, allocations: 71.72 kB / 0.6835 GB, free: 13.32 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001723/0.2964, allocations: 83.61 kB / 0.6836 GB, free: 13.23 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 4.181e-05/0.2965, allocations: 11.98 kB / 0.6836 GB, free: 13.22 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001904/0.2967, allocations: 59.95 kB / 0.6836 GB, free: 13.16 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 6.763e-05/0.2968, allocations: 35.84 kB / 0.6837 GB, free: 13.13 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001244/0.2969, allocations: 75.59 kB / 0.6837 GB, free: 13.05 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0003506/0.2973, allocations: 179.5 kB / 0.6839 GB, free: 12.88 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.643e-06/0.2973, allocations: 3.984 kB / 0.6839 GB, free: 12.88 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.613e-06/0.2973, allocations: 0 / 0.6839 GB, free: 12.88 MB / 494.1 MB Notification: Performance of Transformations before backend: time 7.494e-06/0.2973, allocations: 0 / 0.6839 GB, free: 12.88 MB / 494.1 MB 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.001242/0.2986, allocations: 0.5042 MB / 0.6844 GB, free: 12.32 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.693e-05/0.2986, allocations: 8.031 kB / 0.6844 GB, free: 12.31 MB / 494.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 6.026e-05/0.2987, allocations: 42.73 kB / 0.6845 GB, free: 12.26 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.048e-05/0.2988, allocations: 16.75 kB / 0.6845 GB, free: 12.24 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003526/0.2991, allocations: 232 kB / 0.6847 GB, free: 11.98 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.954e-05/0.2992, allocations: 8.375 kB / 0.6847 GB, free: 11.97 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.914e-05/0.2992, allocations: 16.28 kB / 0.6847 GB, free: 11.95 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000395/0.2996, allocations: 125.7 kB / 0.6848 GB, free: 11.82 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.945e-05/0.2997, allocations: 0 / 0.6848 GB, free: 11.82 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.331e-05/0.2997, allocations: 4 kB / 0.6848 GB, free: 11.82 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.428e-06/0.2997, allocations: 4 kB / 0.6848 GB, free: 11.82 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0004157/0.3001, allocations: 97.47 kB / 0.6849 GB, free: 11.72 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0008803/0.301, allocations: 420.5 kB / 0.6853 GB, free: 11.26 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004651/0.3015, allocations: 126.5 kB / 0.6855 GB, free: 11.13 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002502/0.3018, allocations: 76.81 kB / 0.6855 GB, free: 11.05 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0008183/0.3026, allocations: 441.5 kB / 0.686 GB, free: 10.53 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004797/0.3031, allocations: 131.5 kB / 0.6861 GB, free: 10.39 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 2.334e-06/0.3031, allocations: 0 / 0.6861 GB, free: 10.39 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.0008898/0.304, allocations: 238.7 kB / 0.6863 GB, free: 10.15 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.605e-05/0.3041, allocations: 55.41 kB / 0.6864 GB, free: 10.08 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002921/0.3044, allocations: 188 kB / 0.6865 GB, free: 9.891 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 3.514e-05/0.3044, allocations: 29.7 kB / 0.6866 GB, free: 9.855 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001133/0.3046, allocations: 116 kB / 0.6867 GB, free: 9.738 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 7.159e-05/0.3046, allocations: 51.27 kB / 0.6867 GB, free: 9.688 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001036/0.3048, allocations: 45.62 kB / 0.6868 GB, free: 9.637 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001563/0.3049, allocations: 330.8 kB / 0.6871 GB, free: 9.305 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002615/0.3052, allocations: 68.81 kB / 0.6872 GB, free: 9.234 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002838/0.3055, allocations: 94.45 kB / 0.6872 GB, free: 9.133 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 4.275/4.581, allocations: 378.8 MB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.43e-06/4.581, allocations: 0 / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0006681/4.581, allocations: 257.3 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 5.722e-05/4.581, allocations: 29.36 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.084e-05/4.581, allocations: 4.062 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 3.152e-05/4.582, allocations: 2.969 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002788/4.582, allocations: 48.81 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.109e-05/4.582, allocations: 0 / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002463/4.582, allocations: 23.8 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.398e-05/4.582, allocations: 5.625 kB / 1.058 GB, free: 257.2 MB / 0.7169 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.6850000000000001 * 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.0002366/4.582, allocations: 151.9 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 4.917e-05/4.582, allocations: 18.19 kB / 1.058 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0008763/4.583, allocations: 236.3 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.374e-06/4.583, allocations: 6.312 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.867e-06/4.583, allocations: 3.797 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.833e-06/4.583, allocations: 0.7031 kB / 1.058 GB, free: 257 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0002681/4.584, allocations: 259 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.689e-06/4.584, allocations: 1.5 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000255/4.584, allocations: 41.48 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.059e-06/4.584, allocations: 1.375 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.189e-05/4.584, allocations: 6.812 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.276e-06/4.584, allocations: 0 / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.314e-06/4.584, allocations: 0.5625 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0007166/4.585, allocations: 316.4 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001032/4.585, allocations: 110.6 kB / 1.059 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.857e-05/4.585, allocations: 3.438 kB / 1.059 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001672/4.585, allocations: 11.19 kB / 1.059 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 8.08e-05/4.585, allocations: 19.95 kB / 1.059 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.6e-05/4.585, allocations: 14.91 kB / 1.059 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001194/4.585, allocations: 133.8 kB / 1.059 GB, free: 256.6 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.3e-07/4.585, allocations: 0 / 1.059 GB, free: 256.6 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003196/4.586, allocations: 66.47 kB / 1.059 GB, free: 256.6 MB / 0.7169 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.001108/4.587, allocations: 0.8682 MB / 1.06 GB, free: 256 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0005536/4.587, allocations: 225.3 kB / 1.06 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 2.424e-06/4.587, allocations: 0 / 1.06 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0002221/4.588, allocations: 89.89 kB / 1.06 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003149/4.588, allocations: 37.06 kB / 1.06 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0037/4.592, allocations: 2.293 MB / 1.062 GB, free: 254.3 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000309/4.592, allocations: 0.7316 MB / 1.063 GB, free: 253.6 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001823/4.592, allocations: 31.31 kB / 1.063 GB, free: 253.6 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001359/4.592, allocations: 56.7 kB / 1.063 GB, free: 253.5 MB / 0.7169 GB Notification: Performance of SimCode: time 9.42e-07/4.592, allocations: 3.75 kB / 1.063 GB, free: 253.5 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.04364/4.636, allocations: 4.61 MB / 1.068 GB, free: 252.1 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate platform static: time 11.37/16.01, allocations: 19.31 kB / 1.068 GB, free: 252.1 MB / 0.7169 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)