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.004638/0.004638, allocations: 97.58 kB / 15.73 MB, free: 5.988 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.001118/0.001118, allocations: 191.8 kB / 16.67 MB, free: 5.918 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.396/1.396, 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.002092/0.002092, allocations: 275 kB / 290.8 MB, free: 1.914 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9686/0.9686, allocations: 169.3 MB / 0.4983 GB, free: 13.78 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001763/0.001763, allocations: 91.84 kB / 0.6809 GB, free: 24 kB / 478.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1545/0.1563, allocations: 86.97 MB / 0.7659 GB, free: 8.965 MB / 0.5606 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003296/0.1596, allocations: 2.644 MB / 0.7685 GB, free: 6.309 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.001579/0.1612, allocations: 1.072 MB / 0.7695 GB, free: 5.227 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001209/0.1613, allocations: 11.94 kB / 0.7695 GB, free: 5.215 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.0002295/0.1616, allocations: 71.62 kB / 0.7696 GB, free: 5.145 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0002317/0.1618, allocations: 135 kB / 0.7697 GB, free: 5.012 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0003794/0.1622, allocations: 171.6 kB / 0.7699 GB, free: 4.844 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.000448/0.1626, allocations: 0.5178 MB / 0.7704 GB, free: 4.324 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001252/0.1628, allocations: 52.62 kB / 0.7704 GB, free: 4.273 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002773/0.1631, allocations: 235.1 kB / 0.7707 GB, free: 4.043 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002939/0.1634, allocations: 231 kB / 0.7709 GB, free: 3.816 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 5.333e-05/0.1634, allocations: 28 kB / 0.7709 GB, free: 3.789 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001457/0.1636, allocations: 83.94 kB / 0.771 GB, free: 3.707 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 7.642e-05/0.1637, allocations: 71.73 kB / 0.7711 GB, free: 3.637 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 0.000173/0.1638, allocations: 187 kB / 0.7712 GB, free: 3.453 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.000434/0.1643, allocations: 426.2 kB / 0.7716 GB, free: 3.035 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 3.827e-06/0.1643, allocations: 0 / 0.7716 GB, free: 3.035 MB / 0.5606 GB Notification: Performance of FrontEnd: time 1.392e-06/0.1643, allocations: 0 / 0.7716 GB, free: 3.035 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 9.628e-06/0.1643, allocations: 0 / 0.7716 GB, free: 3.035 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.001788/0.1661, allocations: 0.8246 MB / 0.7724 GB, free: 2.145 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 4.19e-05/0.1662, allocations: 8.031 kB / 0.7724 GB, free: 2.137 MB / 0.5606 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 6.692e-05/0.1662, allocations: 58.73 kB / 0.7725 GB, free: 2.07 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.03e-05/0.1663, allocations: 36.7 kB / 0.7725 GB, free: 2.035 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003884/0.1667, allocations: 344.1 kB / 0.7729 GB, free: 1.656 MB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.937e-05/0.1668, allocations: 16.81 kB / 0.7729 GB, free: 1.641 MB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.691e-05/0.1668, allocations: 32.31 kB / 0.7729 GB, free: 1.609 MB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000712/0.1675, allocations: 328.8 kB / 0.7732 GB, free: 1.277 MB / 0.5606 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.814e-05/0.1676, allocations: 4 kB / 0.7732 GB, free: 1.273 MB / 0.5606 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.507e-05/0.1676, allocations: 8 kB / 0.7732 GB, free: 1.266 MB / 0.5606 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.315e-06/0.1676, allocations: 4 kB / 0.7732 GB, free: 1.262 MB / 0.5606 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000852/0.1685, allocations: 295.7 kB / 0.7735 GB, free: 0.9727 MB / 0.5606 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001042/0.1695, allocations: 0.7813 MB / 0.7743 GB, free: 140 kB / 0.5606 GB Notification: Performance of preOpt comSubExp (simulation): time 0.3234/0.4929, allocations: 384.5 kB / 0.7747 GB, free: 14.92 MB / 0.5606 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005647/0.4935, allocations: 202.5 kB / 0.7748 GB, free: 14.9 MB / 0.5606 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006043/0.4941, allocations: 453.6 kB / 0.7753 GB, free: 14.43 MB / 0.5606 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000847/0.495, allocations: 330.7 kB / 0.7756 GB, free: 14.37 MB / 0.5606 GB Notification: Performance of pre-optimization done (n=42): time 2.444e-06/0.495, allocations: 1.031 kB / 0.7756 GB, free: 14.37 MB / 0.5606 GB Notification: Performance of matching and sorting (n=42): time 0.001707/0.4967, allocations: 0.6129 MB / 0.7762 GB, free: 14.34 MB / 0.5606 GB Notification: Performance of inlineWhenForInitialization (initialization): time 3.968e-05/0.4968, allocations: 88.66 kB / 0.7763 GB, free: 14.24 MB / 0.5606 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003248/0.4971, allocations: 309.6 kB / 0.7766 GB, free: 14.14 MB / 0.5606 GB Notification: Performance of collectPreVariables (initialization): time 4.11e-05/0.4972, allocations: 36.92 kB / 0.7766 GB, free: 14.11 MB / 0.5606 GB Notification: Performance of collectInitialEqns (initialization): time 9.302e-05/0.4973, allocations: 158.4 kB / 0.7768 GB, free: 14.02 MB / 0.5606 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001069/0.4974, allocations: 154 kB / 0.7769 GB, free: 13.95 MB / 0.5606 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001598/0.4975, allocations: 93.27 kB / 0.777 GB, free: 13.93 MB / 0.5606 GB Notification: Performance of setup shared object (initialization): time 7.251e-05/0.4976, allocations: 349.5 kB / 0.7773 GB, free: 13.62 MB / 0.5606 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005577/0.4982, allocations: 206.2 kB / 0.7775 GB, free: 13.61 MB / 0.5606 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005582/0.4987, allocations: 249.1 kB / 0.7778 GB, free: 13.49 MB / 0.5606 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.397/6.896, allocations: 0.866 GB / 1.644 GB, free: 104.2 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.613e-06/6.896, allocations: 0 / 1.644 GB, free: 104.2 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001326/6.897, allocations: 0.6361 MB / 1.644 GB, free: 103.7 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 4.182e-05/6.898, allocations: 88.17 kB / 1.645 GB, free: 103.6 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.987e-06/6.898, allocations: 8.875 kB / 1.645 GB, free: 103.6 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.935e-05/6.898, allocations: 0 / 1.645 GB, free: 103.6 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005329/6.898, allocations: 118.9 kB / 1.645 GB, free: 103.5 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.023e-05/6.898, allocations: 4 kB / 1.645 GB, free: 103.5 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005034/6.899, allocations: 68.94 kB / 1.645 GB, free: 103.5 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.978e-05/6.899, allocations: 20.66 kB / 1.645 GB, free: 103.4 MB / 0.8419 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.0003351/6.899, allocations: 200.5 kB / 1.645 GB, free: 103.3 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.000113/6.899, allocations: 44.83 kB / 1.645 GB, free: 103.3 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001539/6.901, allocations: 0.6323 MB / 1.646 GB, free: 102.8 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.261e-06/6.901, allocations: 4 kB / 1.646 GB, free: 102.8 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.035e-06/6.901, allocations: 9.547 kB / 1.646 GB, free: 102.8 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.885e-06/6.901, allocations: 3.75 kB / 1.646 GB, free: 102.8 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004052/6.901, allocations: 438.6 kB / 1.646 GB, free: 102.4 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.547e-06/6.901, allocations: 4 kB / 1.646 GB, free: 102.4 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000567/6.902, allocations: 105.5 kB / 1.646 GB, free: 102.3 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 6.692e-06/6.902, allocations: 7.984 kB / 1.646 GB, free: 102.3 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.054e-05/6.902, allocations: 15.5 kB / 1.646 GB, free: 102.3 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.508e-06/6.902, allocations: 0 / 1.646 GB, free: 102.3 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.435e-06/6.902, allocations: 3.938 kB / 1.646 GB, free: 102.3 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001553/6.903, allocations: 0.7918 MB / 1.647 GB, free: 101.5 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001696/6.904, allocations: 159.2 kB / 1.647 GB, free: 101.4 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.311e-05/6.904, allocations: 16.8 kB / 1.647 GB, free: 101.3 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004189/6.904, allocations: 43.89 kB / 1.647 GB, free: 101.3 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001264/6.904, allocations: 47.94 kB / 1.647 GB, free: 101.2 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.307e-05/6.904, allocations: 23.98 kB / 1.647 GB, free: 101.2 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0001636/6.904, allocations: 211.1 kB / 1.647 GB, free: 101 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.2e-07/6.904, allocations: 0 / 1.647 GB, free: 101 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.0004106/6.905, allocations: 119.1 kB / 1.648 GB, free: 100.9 MB / 0.8419 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.001853/6.907, allocations: 1.37 MB / 1.649 GB, free: 99.52 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.001119/6.908, allocations: 0.6259 MB / 1.649 GB, free: 98.86 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 2.204e-06/6.908, allocations: 4 kB / 1.649 GB, free: 98.86 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0005209/6.908, allocations: 264.2 kB / 1.65 GB, free: 98.6 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004416/6.909, allocations: 81.56 kB / 1.65 GB, free: 98.53 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.005306/6.914, allocations: 4.256 MB / 1.654 GB, free: 94.19 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001519/6.914, allocations: 0.8051 MB / 1.655 GB, free: 93.36 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.0003207/6.915, allocations: 79.83 kB / 1.655 GB, free: 93.28 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002304/6.915, allocations: 148.2 kB / 1.655 GB, free: 93.13 MB / 0.8419 GB Notification: Performance of SimCode: time 3.41e-07/6.915, allocations: 0 / 1.655 GB, free: 93.13 MB / 0.8419 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02539/6.94, allocations: 9.968 MB / 1.665 GB, free: 83.41 MB / 0.8419 GB Notification: Performance of buildModelFMU: Generate platform static: time 8.117/15.06, allocations: 7.875 kB / 1.665 GB, free: 83.4 MB / 0.8419 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)