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.004843/0.004843, allocations: 101 kB / 15.73 MB, free: 6.055 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.001226/0.001226, allocations: 195.2 kB / 16.67 MB, free: 5.969 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.352/1.352, allocations: 222.9 MB / 240.4 MB, free: 15.14 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.00245/0.00245, allocations: 279.9 kB / 290.8 MB, free: 14.45 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9595/0.9595, allocations: 169.3 MB / 0.4983 GB, free: 4.43 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002582/0.002582, allocations: 95.84 kB / 0.6809 GB, free: 7.508 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4595/0.462, allocations: 86.98 MB / 0.7659 GB, free: 3.867 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.003285/0.4654, allocations: 1.938 MB / 0.7678 GB, free: 1.914 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.001493/0.4669, allocations: 0.866 MB / 0.7686 GB, free: 1.039 MB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001114/0.467, allocations: 7.938 kB / 0.7686 GB, free: 1.031 MB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0002309/0.4673, allocations: 47.69 kB / 0.7687 GB, free: 0.9844 MB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 0.0001181/0.4674, allocations: 47.56 kB / 0.7687 GB, free: 0.9375 MB / 0.5294 GB Notification: Performance of NFTyping.typeClassSections: time 0.0003295/0.4677, allocations: 87.77 kB / 0.7688 GB, free: 0.8516 MB / 0.5294 GB Notification: Performance of NFFlatten.flatten: time 0.0002465/0.468, allocations: 195.2 kB / 0.769 GB, free: 0.6602 MB / 0.5294 GB Notification: Performance of NFFlatten.resolveConnections: time 9.659e-05/0.4681, allocations: 25.34 kB / 0.769 GB, free: 0.6406 MB / 0.5294 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0001449/0.4683, allocations: 83.64 kB / 0.7691 GB, free: 0.5586 MB / 0.5294 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0001407/0.4684, allocations: 83.66 kB / 0.7692 GB, free: 488 kB / 0.5294 GB Notification: Performance of NFPackage.collectConstants: time 2.886e-05/0.4684, allocations: 12 kB / 0.7692 GB, free: 476 kB / 0.5294 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001294/0.4686, allocations: 55.95 kB / 0.7692 GB, free: 420 kB / 0.5294 GB Notification: Performance of NFScalarize.scalarize: time 4.013e-05/0.4686, allocations: 27.86 kB / 0.7693 GB, free: 392 kB / 0.5294 GB Notification: Performance of NFVerifyModel.verify: time 9.031e-05/0.4687, allocations: 79.58 kB / 0.7693 GB, free: 312 kB / 0.5294 GB Notification: Performance of NFConvertDAE.convert: time 0.000274/0.469, allocations: 188.5 kB / 0.7695 GB, free: 128 kB / 0.5294 GB Notification: Performance of FrontEnd - DAE generated: time 4.078e-06/0.469, allocations: 0 / 0.7695 GB, free: 128 kB / 0.5294 GB Notification: Performance of FrontEnd: time 1.403e-06/0.469, allocations: 3.938 kB / 0.7695 GB, free: 124 kB / 0.5294 GB Notification: Performance of Transformations before backend: time 1.032e-05/0.469, allocations: 0 / 0.7695 GB, free: 124 kB / 0.5294 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.001034/0.4701, allocations: 0.5116 MB / 0.77 GB, free: 15.55 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 4.159e-05/0.4701, allocations: 12.03 kB / 0.77 GB, free: 15.54 MB / 0.545 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.626e-05/0.4702, allocations: 38.73 kB / 0.7701 GB, free: 15.5 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.958e-05/0.4702, allocations: 20.78 kB / 0.7701 GB, free: 15.48 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002948/0.4705, allocations: 244 kB / 0.7703 GB, free: 15.2 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.612e-05/0.4706, allocations: 8.312 kB / 0.7703 GB, free: 15.19 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 3.527e-05/0.4706, allocations: 8.375 kB / 0.7703 GB, free: 15.18 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003027/0.4709, allocations: 121.9 kB / 0.7705 GB, free: 15.06 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.428e-05/0.4709, allocations: 0 / 0.7705 GB, free: 15.06 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.678e-05/0.471, allocations: 8 kB / 0.7705 GB, free: 15.05 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.628e-06/0.471, allocations: 4 kB / 0.7705 GB, free: 15.05 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003012/0.4713, allocations: 103.9 kB / 0.7706 GB, free: 14.95 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007892/0.4721, allocations: 420.5 kB / 0.771 GB, free: 14.48 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0003539/0.4724, allocations: 138.4 kB / 0.7711 GB, free: 14.34 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001809/0.4726, allocations: 72.81 kB / 0.7712 GB, free: 14.27 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006578/0.4733, allocations: 441.5 kB / 0.7716 GB, free: 13.74 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003744/0.4737, allocations: 130.3 kB / 0.7717 GB, free: 13.61 MB / 0.545 GB Notification: Performance of pre-optimization done (n=16): time 1.623e-06/0.4737, allocations: 0 / 0.7717 GB, free: 13.61 MB / 0.545 GB Notification: Performance of matching and sorting (n=16): time 0.0006764/0.4744, allocations: 237.8 kB / 0.7719 GB, free: 13.37 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.365e-05/0.4744, allocations: 55.41 kB / 0.772 GB, free: 13.3 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001917/0.4746, allocations: 174.5 kB / 0.7722 GB, free: 13.12 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 2.748e-05/0.4747, allocations: 29.7 kB / 0.7722 GB, free: 13.09 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 8.34e-05/0.4748, allocations: 116.1 kB / 0.7723 GB, free: 12.97 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 6.112e-05/0.4748, allocations: 59.48 kB / 0.7724 GB, free: 12.91 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 7.912e-05/0.4749, allocations: 41.69 kB / 0.7724 GB, free: 12.86 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.0001669/0.4751, allocations: 330.8 kB / 0.7727 GB, free: 12.53 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002012/0.4753, allocations: 68.81 kB / 0.7728 GB, free: 12.46 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002011/0.4755, allocations: 97.36 kB / 0.7729 GB, free: 12.36 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 2.437/2.912, allocations: 378.8 MB / 1.143 GB, free: 9.215 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.568e-06/2.912, allocations: 0 / 1.143 GB, free: 9.215 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004998/2.913, allocations: 248.8 kB / 1.143 GB, free: 9.027 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 3.227e-05/2.913, allocations: 39.16 kB / 1.143 GB, free: 8.988 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.634e-06/2.913, allocations: 0 / 1.143 GB, free: 8.988 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.146e-05/2.913, allocations: 7.562 kB / 1.143 GB, free: 8.984 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002143/2.913, allocations: 40.38 kB / 1.143 GB, free: 8.949 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.576e-06/2.913, allocations: 8.062 kB / 1.143 GB, free: 8.941 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001767/2.913, allocations: 25.81 kB / 1.143 GB, free: 8.93 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.995e-05/2.913, allocations: 11.92 kB / 1.143 GB, free: 8.922 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.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.0001866/2.914, allocations: 146.4 kB / 1.143 GB, free: 8.785 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.008e-05/2.914, allocations: 19.8 kB / 1.143 GB, free: 8.773 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005032/2.914, allocations: 236.4 kB / 1.144 GB, free: 8.598 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.039e-06/2.914, allocations: 7.75 kB / 1.144 GB, free: 8.594 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.28e-06/2.914, allocations: 0 / 1.144 GB, free: 8.594 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.057e-06/2.914, allocations: 0 / 1.144 GB, free: 8.594 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001732/2.914, allocations: 250 kB / 1.144 GB, free: 8.34 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.583e-06/2.914, allocations: 0 / 1.144 GB, free: 8.34 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.00021/2.915, allocations: 47.91 kB / 1.144 GB, free: 8.293 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.416e-06/2.915, allocations: 0 / 1.144 GB, free: 8.293 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.297e-05/2.915, allocations: 15 kB / 1.144 GB, free: 8.285 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.785e-06/2.915, allocations: 3.984 kB / 1.144 GB, free: 8.281 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.142e-06/2.915, allocations: 0 / 1.144 GB, free: 8.281 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005433/2.915, allocations: 309.9 kB / 1.144 GB, free: 7.988 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 6.972e-05/2.915, allocations: 112.6 kB / 1.144 GB, free: 7.863 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.382e-05/2.915, allocations: 11.94 kB / 1.144 GB, free: 7.852 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001413/2.915, allocations: 7.984 kB / 1.144 GB, free: 7.844 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 7.284e-05/2.915, allocations: 23.34 kB / 1.144 GB, free: 7.824 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.049e-05/2.916, allocations: 6.406 kB / 1.144 GB, free: 7.82 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001086/2.916, allocations: 142.1 kB / 1.144 GB, free: 7.684 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.1e-07/2.916, allocations: 3.656 kB / 1.144 GB, free: 7.684 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0002567/2.916, allocations: 54.11 kB / 1.144 GB, free: 7.633 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.0007326/2.917, allocations: 0.8713 MB / 1.145 GB, free: 6.742 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0003976/2.917, allocations: 225.7 kB / 1.146 GB, free: 6.512 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.934e-06/2.917, allocations: 0 / 1.146 GB, free: 6.512 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0001729/2.917, allocations: 87.89 kB / 1.146 GB, free: 6.426 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002445/2.917, allocations: 27.98 kB / 1.146 GB, free: 6.398 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002246/2.92, allocations: 2.305 MB / 1.148 GB, free: 4.023 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001191/2.92, allocations: 0.7203 MB / 1.149 GB, free: 3.277 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001111/2.92, allocations: 27.64 kB / 1.149 GB, free: 3.254 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.399e-05/2.92, allocations: 63.41 kB / 1.149 GB, free: 3.195 MB / 0.7169 GB Notification: Performance of SimCode: time 7.92e-07/2.92, allocations: 4 kB / 1.149 GB, free: 3.191 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02625/2.946, allocations: 4.679 MB / 1.153 GB, free: 14.69 MB / 0.7325 GB Notification: Performance of buildModelFMU: Generate platform static: time 7.643/10.59, allocations: 13.28 kB / 1.153 GB, free: 14.68 MB / 0.7325 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)