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.004695/0.004695, allocations: 99.83 kB / 15.73 MB, free: 6.012 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.001213/0.001213, allocations: 193.6 kB / 16.67 MB, free: 5.93 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.362/1.362, allocations: 222.9 MB / 240.4 MB, free: 15.09 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002486/0.002486, allocations: 297.1 kB / 290.8 MB, free: 14.44 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9843/0.9843, allocations: 169.3 MB / 0.4983 GB, free: 4.438 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.00269/0.00269, allocations: 100.1 kB / 0.6809 GB, free: 7.504 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4204/0.4231, allocations: 86.97 MB / 0.7659 GB, free: 3.883 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003876/0.427, allocations: 2.646 MB / 0.7685 GB, free: 1.219 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.002037/0.4291, allocations: 1.084 MB / 0.7695 GB, free: 128 kB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001393/0.4292, allocations: 7.938 kB / 0.7695 GB, free: 120 kB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0002519/0.4295, allocations: 75.16 kB / 0.7696 GB, free: 48 kB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 0.0002542/0.4298, allocations: 127 kB / 0.7697 GB, free: 15.92 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004192/0.4302, allocations: 179.6 kB / 0.7699 GB, free: 15.75 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.0005303/0.4307, allocations: 0.5099 MB / 0.7704 GB, free: 15.23 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.000132/0.4309, allocations: 40.73 kB / 0.7704 GB, free: 15.2 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002976/0.4312, allocations: 235.1 kB / 0.7706 GB, free: 14.96 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003228/0.4315, allocations: 215.1 kB / 0.7709 GB, free: 14.75 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 6.641e-05/0.4316, allocations: 32 kB / 0.7709 GB, free: 14.72 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001684/0.4318, allocations: 71.97 kB / 0.771 GB, free: 14.65 MB / 0.545 GB Notification: Performance of NFScalarize.scalarize: time 9.537e-05/0.4319, allocations: 87.59 kB / 0.771 GB, free: 14.57 MB / 0.545 GB Notification: Performance of NFVerifyModel.verify: time 0.0001828/0.432, allocations: 183 kB / 0.7712 GB, free: 14.39 MB / 0.545 GB Notification: Performance of NFConvertDAE.convert: time 0.0004787/0.4325, allocations: 423.5 kB / 0.7716 GB, free: 13.98 MB / 0.545 GB Notification: Performance of FrontEnd - DAE generated: time 3.778e-06/0.4325, allocations: 3.938 kB / 0.7716 GB, free: 13.97 MB / 0.545 GB Notification: Performance of FrontEnd: time 3.196e-06/0.4326, allocations: 4 kB / 0.7716 GB, free: 13.97 MB / 0.545 GB Notification: Performance of Transformations before backend: time 6.682e-06/0.4326, allocations: 0 / 0.7716 GB, free: 13.97 MB / 0.545 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.001758/0.4343, allocations: 0.8246 MB / 0.7724 GB, free: 13.08 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 3.499e-05/0.4344, allocations: 8.031 kB / 0.7724 GB, free: 13.07 MB / 0.545 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 7.266e-05/0.4344, allocations: 54.73 kB / 0.7725 GB, free: 13.01 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.205e-05/0.4345, allocations: 44.69 kB / 0.7725 GB, free: 12.96 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004128/0.435, allocations: 328.2 kB / 0.7728 GB, free: 12.6 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.47e-05/0.435, allocations: 24.75 kB / 0.7729 GB, free: 12.58 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.933e-05/0.4351, allocations: 28.33 kB / 0.7729 GB, free: 12.55 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007272/0.4358, allocations: 324.9 kB / 0.7732 GB, free: 12.22 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.861e-05/0.4358, allocations: 3.938 kB / 0.7732 GB, free: 12.22 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.739e-05/0.4359, allocations: 15.98 kB / 0.7732 GB, free: 12.2 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.584e-06/0.4359, allocations: 4 kB / 0.7732 GB, free: 12.2 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008385/0.4367, allocations: 294.2 kB / 0.7735 GB, free: 11.91 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001122/0.4379, allocations: 0.7774 MB / 0.7743 GB, free: 11.08 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001056/0.4389, allocations: 389.5 kB / 0.7746 GB, free: 10.68 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004817/0.4394, allocations: 205.6 kB / 0.7748 GB, free: 10.48 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006481/0.4401, allocations: 457.4 kB / 0.7753 GB, free: 9.938 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007582/0.4408, allocations: 329.2 kB / 0.7756 GB, free: 9.598 MB / 0.545 GB Notification: Performance of pre-optimization done (n=42): time 1.674e-06/0.4409, allocations: 0 / 0.7756 GB, free: 9.598 MB / 0.545 GB Notification: Performance of matching and sorting (n=42): time 0.001602/0.4425, allocations: 0.608 MB / 0.7762 GB, free: 8.988 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 7.007e-05/0.4425, allocations: 93.09 kB / 0.7763 GB, free: 8.879 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003199/0.4429, allocations: 300.5 kB / 0.7766 GB, free: 8.578 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 4.125e-05/0.4429, allocations: 41.7 kB / 0.7766 GB, free: 8.531 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001289/0.4431, allocations: 164.9 kB / 0.7767 GB, free: 8.363 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001267/0.4432, allocations: 150.7 kB / 0.7769 GB, free: 8.215 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001607/0.4434, allocations: 94.09 kB / 0.777 GB, free: 8.117 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.0001521/0.4435, allocations: 346.8 kB / 0.7773 GB, free: 7.77 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005181/0.444, allocations: 210.6 kB / 0.7775 GB, free: 7.559 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005316/0.4446, allocations: 246.4 kB / 0.7777 GB, free: 7.305 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.012/6.457, allocations: 0.866 GB / 1.644 GB, free: 275.6 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.612e-06/6.457, allocations: 0 / 1.644 GB, free: 275.6 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001227/6.458, allocations: 0.646 MB / 1.644 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 3.951e-05/6.458, allocations: 85.11 kB / 1.644 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.655e-06/6.458, allocations: 3.984 kB / 1.645 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.043e-05/6.458, allocations: 4.125 kB / 1.645 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004929/6.459, allocations: 118.8 kB / 1.645 GB, free: 274.9 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.968e-06/6.459, allocations: 7.984 kB / 1.645 GB, free: 274.9 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004333/6.459, allocations: 62.16 kB / 1.645 GB, free: 274.8 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.167e-05/6.459, allocations: 23.55 kB / 1.645 GB, free: 274.8 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.0002474/6.46, allocations: 198.6 kB / 1.645 GB, free: 274.6 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.705e-05/6.46, allocations: 40.44 kB / 1.645 GB, free: 274.6 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001324/6.461, allocations: 0.63 MB / 1.646 GB, free: 274 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.032e-06/6.461, allocations: 8 kB / 1.646 GB, free: 274 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.871e-06/6.461, allocations: 3.938 kB / 1.646 GB, free: 274 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.184e-06/6.461, allocations: 0 / 1.646 GB, free: 274 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003231/6.461, allocations: 442.7 kB / 1.646 GB, free: 273.6 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.554e-06/6.461, allocations: 4 kB / 1.646 GB, free: 273.6 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005149/6.462, allocations: 115 kB / 1.646 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.697e-06/6.462, allocations: 4 kB / 1.646 GB, free: 273.4 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.658e-05/6.462, allocations: 8 kB / 1.646 GB, free: 273.4 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.546e-06/6.462, allocations: 4.875 kB / 1.646 GB, free: 273.4 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.793e-06/6.462, allocations: 3.938 kB / 1.646 GB, free: 273.4 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001381/6.463, allocations: 0.7969 MB / 1.647 GB, free: 272.7 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001301/6.464, allocations: 157.5 kB / 1.647 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.2e-05/6.464, allocations: 12 kB / 1.647 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003687/6.464, allocations: 43.89 kB / 1.647 GB, free: 272.4 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001168/6.464, allocations: 59.81 kB / 1.647 GB, free: 272.4 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.23e-05/6.464, allocations: 21.94 kB / 1.647 GB, free: 272.4 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.000147/6.464, allocations: 211.1 kB / 1.647 GB, free: 272.2 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.3e-07/6.464, allocations: 0 / 1.647 GB, free: 272.2 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.0003341/6.465, allocations: 120.8 kB / 1.647 GB, free: 272 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.001599/6.466, allocations: 1.368 MB / 1.649 GB, free: 270.7 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.0009715/6.467, allocations: 0.6318 MB / 1.649 GB, free: 270 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 2.204e-06/6.467, allocations: 256 / 1.649 GB, free: 270 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0004783/6.468, allocations: 272.4 kB / 1.65 GB, free: 269.7 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003816/6.468, allocations: 66.39 kB / 1.65 GB, free: 269.7 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004801/6.473, allocations: 4.274 MB / 1.654 GB, free: 265.3 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001481/6.473, allocations: 0.8012 MB / 1.655 GB, free: 264.5 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.0002951/6.473, allocations: 83.61 kB / 1.655 GB, free: 264.4 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000213/6.474, allocations: 143.4 kB / 1.655 GB, free: 264.2 MB / 0.8419 GB Notification: Performance of SimCode: time 7.21e-07/6.474, allocations: 0 / 1.655 GB, free: 264.2 MB / 0.8419 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03038/6.504, allocations: 9.963 MB / 1.665 GB, free: 254.5 MB / 0.8419 GB Notification: Performance of buildModelFMU: Generate platform static: time 8.453/14.96, allocations: 8.547 kB / 1.665 GB, free: 254.5 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)