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.001233/0.001233, allocations: 108 kB / 15.6 MB, free: 132 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.001277/0.001277, allocations: 192 kB / 16.53 MB, free: 6.391 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.357/1.357, allocations: 222.9 MB / 240.2 MB, free: 4.254 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002425/0.002425, allocations: 283.1 kB / 290.7 MB, free: 1.855 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9879/0.9879, allocations: 169.3 MB / 0.4982 GB, free: 13.86 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002685/0.002685, allocations: 100.9 kB / 0.5953 GB, free: 27.99 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.17/0.1727, allocations: 86.98 MB / 0.6803 GB, free: 0.5664 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.004059/0.1768, allocations: 2.635 MB / 0.6829 GB, free: 13.93 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001861/0.1787, allocations: 1.078 MB / 0.6839 GB, free: 12.85 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001336/0.1789, allocations: 11.94 kB / 0.6839 GB, free: 12.84 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.000269/0.1792, allocations: 79.56 kB / 0.684 GB, free: 12.76 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.000228/0.1794, allocations: 124.5 kB / 0.6841 GB, free: 12.64 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0004028/0.1798, allocations: 172.2 kB / 0.6843 GB, free: 12.47 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0005136/0.1803, allocations: 0.5081 MB / 0.6848 GB, free: 11.96 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001469/0.1805, allocations: 52.7 kB / 0.6848 GB, free: 11.91 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002848/0.1808, allocations: 223.1 kB / 0.685 GB, free: 11.69 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000311/0.1811, allocations: 219.1 kB / 0.6852 GB, free: 11.48 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 6.103e-05/0.1812, allocations: 32 kB / 0.6853 GB, free: 11.45 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.000175/0.1814, allocations: 83.94 kB / 0.6854 GB, free: 11.36 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 9.05e-05/0.1815, allocations: 79.66 kB / 0.6854 GB, free: 11.29 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.000199/0.1817, allocations: 187 kB / 0.6856 GB, free: 11.1 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004637/0.1821, allocations: 410.6 kB / 0.686 GB, free: 10.7 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.429e-06/0.1821, allocations: 0 / 0.686 GB, free: 10.7 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.302e-06/0.1822, allocations: 0 / 0.686 GB, free: 10.7 MB / 494.1 MB Notification: Performance of Transformations before backend: time 8.355e-06/0.1822, allocations: 0 / 0.686 GB, free: 10.7 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: 49 * Number of variables: 49 Notification: Performance of Generate backend data structure: time 0.001901/0.1841, allocations: 0.8055 MB / 0.6868 GB, free: 9.828 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.136e-05/0.1841, allocations: 12.03 kB / 0.6868 GB, free: 9.816 MB / 494.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 6.921e-05/0.1842, allocations: 50.73 kB / 0.6868 GB, free: 9.758 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.319e-05/0.1843, allocations: 40.47 kB / 0.6869 GB, free: 9.719 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004189/0.1847, allocations: 347.8 kB / 0.6872 GB, free: 9.34 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.484e-05/0.1848, allocations: 20.8 kB / 0.6872 GB, free: 9.32 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.031e-05/0.1848, allocations: 24.38 kB / 0.6873 GB, free: 9.297 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007255/0.1856, allocations: 332.8 kB / 0.6876 GB, free: 8.961 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.797e-05/0.1856, allocations: 3.906 kB / 0.6876 GB, free: 8.957 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.394e-05/0.1856, allocations: 8 kB / 0.6876 GB, free: 8.949 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.049e-05/0.1856, allocations: 8 kB / 0.6876 GB, free: 8.941 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008603/0.1865, allocations: 298.6 kB / 0.6879 GB, free: 8.652 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001173/0.1877, allocations: 0.7734 MB / 0.6886 GB, free: 7.824 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001072/0.1888, allocations: 389.5 kB / 0.689 GB, free: 7.426 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004858/0.1893, allocations: 201.6 kB / 0.6892 GB, free: 7.223 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006675/0.1899, allocations: 457.4 kB / 0.6896 GB, free: 6.684 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007441/0.1907, allocations: 328.8 kB / 0.69 GB, free: 6.344 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 1.973e-06/0.1907, allocations: 0 / 0.69 GB, free: 6.344 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.001671/0.1924, allocations: 0.6079 MB / 0.6905 GB, free: 5.73 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.027e-05/0.1925, allocations: 85.11 kB / 0.6906 GB, free: 5.629 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003261/0.1928, allocations: 308.5 kB / 0.6909 GB, free: 5.312 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 4.686e-05/0.1929, allocations: 37.64 kB / 0.691 GB, free: 5.27 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001272/0.193, allocations: 160.9 kB / 0.6911 GB, free: 5.109 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001323/0.1931, allocations: 142 kB / 0.6912 GB, free: 4.969 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001554/0.1933, allocations: 94 kB / 0.6913 GB, free: 4.871 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001674/0.1935, allocations: 354.8 kB / 0.6917 GB, free: 4.516 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005158/0.194, allocations: 207.4 kB / 0.6919 GB, free: 4.309 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005328/0.1945, allocations: 246.4 kB / 0.6921 GB, free: 4.051 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 6.327/6.522, allocations: 0.866 GB / 1.558 GB, free: 31.36 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 8.176e-06/6.522, allocations: 0 / 1.558 GB, free: 31.36 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001379/6.523, allocations: 0.6392 MB / 1.559 GB, free: 30.88 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 5.292e-05/6.523, allocations: 92.09 kB / 1.559 GB, free: 30.77 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.588e-06/6.523, allocations: 4 kB / 1.559 GB, free: 30.77 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.399e-05/6.523, allocations: 8.125 kB / 1.559 GB, free: 30.76 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005051/6.524, allocations: 112.2 kB / 1.559 GB, free: 30.66 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.372e-05/6.524, allocations: 4.875 kB / 1.559 GB, free: 30.66 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004715/6.524, allocations: 63.38 kB / 1.559 GB, free: 30.62 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.537e-05/6.524, allocations: 25.8 kB / 1.559 GB, free: 30.6 MB / 0.7169 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.6850000000000001 * 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.6850000000000001 * 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.000286/6.525, allocations: 192 kB / 1.559 GB, free: 30.44 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.596e-05/6.525, allocations: 41.25 kB / 1.559 GB, free: 30.42 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001459/6.526, allocations: 0.6288 MB / 1.56 GB, free: 29.95 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.902e-06/6.526, allocations: 8 kB / 1.56 GB, free: 29.95 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.907e-06/6.526, allocations: 9.625 kB / 1.56 GB, free: 29.94 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.935e-06/6.526, allocations: 7.703 kB / 1.56 GB, free: 29.93 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.000375/6.526, allocations: 435.8 kB / 1.56 GB, free: 29.57 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.068e-06/6.526, allocations: 3.625 kB / 1.56 GB, free: 29.57 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005281/6.527, allocations: 106.8 kB / 1.56 GB, free: 29.47 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.03e-06/6.527, allocations: 0.5625 kB / 1.56 GB, free: 29.47 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.215e-05/6.527, allocations: 21.55 kB / 1.56 GB, free: 29.46 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.745e-06/6.527, allocations: 0 / 1.56 GB, free: 29.46 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.875e-06/6.527, allocations: 7.875 kB / 1.56 GB, free: 29.45 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001454/6.529, allocations: 0.7836 MB / 1.561 GB, free: 28.73 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.000159/6.529, allocations: 158.9 kB / 1.561 GB, free: 28.56 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.113e-05/6.529, allocations: 14.16 kB / 1.561 GB, free: 28.55 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004023/6.529, allocations: 39.89 kB / 1.561 GB, free: 28.51 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001184/6.529, allocations: 59.92 kB / 1.562 GB, free: 28.45 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.028e-05/6.529, allocations: 16 kB / 1.562 GB, free: 28.44 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001477/6.53, allocations: 215 kB / 1.562 GB, free: 28.23 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.1e-07/6.53, allocations: 0 / 1.562 GB, free: 28.23 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003701/6.53, allocations: 127 kB / 1.562 GB, free: 28.11 MB / 0.7169 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.001741/6.532, allocations: 1.362 MB / 1.563 GB, free: 26.73 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.001154/6.533, allocations: 0.6637 MB / 1.564 GB, free: 26.05 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 3.076e-06/6.533, allocations: 4 kB / 1.564 GB, free: 26.04 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0005005/6.533, allocations: 263.7 kB / 1.564 GB, free: 25.79 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004173/6.534, allocations: 74.36 kB / 1.564 GB, free: 25.72 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00521/6.539, allocations: 4.272 MB / 1.568 GB, free: 21.38 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001632/6.539, allocations: 0.8012 MB / 1.569 GB, free: 20.55 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0003721/6.54, allocations: 84.91 kB / 1.569 GB, free: 20.46 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002116/6.54, allocations: 144.5 kB / 1.569 GB, free: 20.32 MB / 0.7169 GB Notification: Performance of SimCode: time 5.81e-07/6.54, allocations: 4 kB / 1.569 GB, free: 20.32 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03106/6.571, allocations: 9.818 MB / 1.579 GB, free: 10.73 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate platform static: time 7.643/14.21, allocations: 4.062 kB / 1.579 GB, free: 10.73 MB / 0.7169 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)