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.00473/0.004729, allocations: 99.95 kB / 15.73 MB, free: 6.062 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.001089/0.001089, allocations: 189.6 kB / 16.67 MB, free: 5.973 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.343/1.343, allocations: 222.9 MB / 240.4 MB, free: 4.156 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002211/0.002211, allocations: 278.9 kB / 290.8 MB, free: 1.758 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9662/0.9662, allocations: 169.3 MB / 0.4983 GB, free: 13.81 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001884/0.001884, allocations: 91.84 kB / 0.6809 GB, free: 32 kB / 478.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1626/0.1645, allocations: 86.97 MB / 0.7659 GB, free: 8.98 MB / 0.5606 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.0033/0.1678, allocations: 1.943 MB / 0.7678 GB, free: 7.023 MB / 0.5606 GB Notification: Performance of NFInst.instExpressions: time 0.001506/0.1694, allocations: 0.8704 MB / 0.7686 GB, free: 6.145 MB / 0.5606 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.000134/0.1695, allocations: 4 kB / 0.7686 GB, free: 6.141 MB / 0.5606 GB Notification: Performance of NFTyping.typeComponents: time 0.0002478/0.1698, allocations: 55.56 kB / 0.7687 GB, free: 6.086 MB / 0.5606 GB Notification: Performance of NFTyping.typeBindings: time 0.0001527/0.17, allocations: 47.58 kB / 0.7687 GB, free: 6.039 MB / 0.5606 GB Notification: Performance of NFTyping.typeClassSections: time 0.0003421/0.1703, allocations: 95.69 kB / 0.7688 GB, free: 5.945 MB / 0.5606 GB Notification: Performance of NFFlatten.flatten: time 0.000263/0.1706, allocations: 187.3 kB / 0.769 GB, free: 5.762 MB / 0.5606 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001124/0.1707, allocations: 29.8 kB / 0.769 GB, free: 5.734 MB / 0.5606 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0001892/0.1709, allocations: 91.62 kB / 0.7691 GB, free: 5.645 MB / 0.5606 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0001476/0.1711, allocations: 79.61 kB / 0.7692 GB, free: 5.566 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 3.098e-05/0.1711, allocations: 12 kB / 0.7692 GB, free: 5.555 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001425/0.1713, allocations: 67.94 kB / 0.7693 GB, free: 5.488 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 3.71e-05/0.1713, allocations: 23.92 kB / 0.7693 GB, free: 5.465 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 0.000101/0.1714, allocations: 71.59 kB / 0.7693 GB, free: 5.395 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.0002812/0.1717, allocations: 187.2 kB / 0.7695 GB, free: 5.211 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 6.061e-06/0.1717, allocations: 8 kB / 0.7695 GB, free: 5.203 MB / 0.5606 GB Notification: Performance of FrontEnd: time 1.493e-06/0.1717, allocations: 0 / 0.7695 GB, free: 5.203 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 8.556e-06/0.1717, allocations: 0 / 0.7695 GB, free: 5.203 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: 19 * Number of variables: 19 Notification: Performance of Generate backend data structure: time 0.0009988/0.1727, allocations: 0.5118 MB / 0.77 GB, free: 4.637 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 4.166e-05/0.1728, allocations: 8.031 kB / 0.77 GB, free: 4.629 MB / 0.5606 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 4.861e-05/0.1728, allocations: 46.67 kB / 0.7701 GB, free: 4.574 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 6.078e-05/0.1729, allocations: 20.84 kB / 0.7701 GB, free: 4.555 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002683/0.1732, allocations: 232 kB / 0.7703 GB, free: 4.289 MB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.423e-05/0.1732, allocations: 8.375 kB / 0.7703 GB, free: 4.281 MB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 3.726e-05/0.1732, allocations: 12.38 kB / 0.7703 GB, free: 4.27 MB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003168/0.1736, allocations: 124 kB / 0.7705 GB, free: 4.145 MB / 0.5606 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.592e-05/0.1736, allocations: 0 / 0.7705 GB, free: 4.145 MB / 0.5606 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.66e-05/0.1736, allocations: 3.938 kB / 0.7705 GB, free: 4.141 MB / 0.5606 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.392e-06/0.1736, allocations: 4 kB / 0.7705 GB, free: 4.137 MB / 0.5606 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003207/0.174, allocations: 99.92 kB / 0.7706 GB, free: 4.039 MB / 0.5606 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0006784/0.1746, allocations: 420.5 kB / 0.771 GB, free: 3.578 MB / 0.5606 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0003589/0.175, allocations: 126.5 kB / 0.7711 GB, free: 3.445 MB / 0.5606 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001857/0.1752, allocations: 84.75 kB / 0.7712 GB, free: 3.359 MB / 0.5606 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006674/0.1759, allocations: 441.5 kB / 0.7716 GB, free: 2.836 MB / 0.5606 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003841/0.1763, allocations: 123.6 kB / 0.7717 GB, free: 2.703 MB / 0.5606 GB Notification: Performance of pre-optimization done (n=16): time 1.864e-06/0.1763, allocations: 0 / 0.7717 GB, free: 2.703 MB / 0.5606 GB Notification: Performance of matching and sorting (n=16): time 0.0006953/0.177, allocations: 239.1 kB / 0.7719 GB, free: 2.465 MB / 0.5606 GB Notification: Performance of inlineWhenForInitialization (initialization): time 4.686e-05/0.1771, allocations: 59.34 kB / 0.772 GB, free: 2.395 MB / 0.5606 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001762/0.1772, allocations: 184.1 kB / 0.7722 GB, free: 2.207 MB / 0.5606 GB Notification: Performance of collectPreVariables (initialization): time 2.359e-05/0.1773, allocations: 29.7 kB / 0.7722 GB, free: 2.172 MB / 0.5606 GB Notification: Performance of collectInitialEqns (initialization): time 8.852e-05/0.1774, allocations: 116 kB / 0.7723 GB, free: 2.055 MB / 0.5606 GB Notification: Performance of collectInitialBindings (initialization): time 5.681e-05/0.1774, allocations: 59.48 kB / 0.7724 GB, free: 1.996 MB / 0.5606 GB Notification: Performance of simplifyInitialFunctions (initialization): time 7.532e-05/0.1775, allocations: 41.69 kB / 0.7724 GB, free: 1.949 MB / 0.5606 GB Notification: Performance of setup shared object (initialization): time 0.0001231/0.1776, allocations: 334.8 kB / 0.7727 GB, free: 1.613 MB / 0.5606 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002078/0.1779, allocations: 76.66 kB / 0.7728 GB, free: 1.535 MB / 0.5606 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002039/0.1781, allocations: 87.73 kB / 0.7729 GB, free: 1.441 MB / 0.5606 GB Notification: Performance of analyzeInitialSystem (initialization): time 2.932/3.11, allocations: 378.8 MB / 1.143 GB, free: 284.9 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.038e-06/3.11, allocations: 0 / 1.143 GB, free: 284.9 MB / 0.8419 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0005053/3.111, allocations: 258.7 kB / 1.143 GB, free: 284.8 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 2.858e-05/3.111, allocations: 33.77 kB / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.284e-06/3.111, allocations: 4 kB / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.679e-05/3.111, allocations: 0 / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002266/3.111, allocations: 45.5 kB / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.585e-06/3.111, allocations: 0 / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002002/3.111, allocations: 18.66 kB / 1.143 GB, free: 284.7 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.959e-05/3.111, allocations: 11 kB / 1.143 GB, free: 284.6 MB / 0.8419 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.0001699/3.112, allocations: 153.5 kB / 1.143 GB, free: 284.5 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.487e-05/3.112, allocations: 15.05 kB / 1.143 GB, free: 284.5 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00053/3.112, allocations: 239.6 kB / 1.144 GB, free: 284.3 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.526e-06/3.112, allocations: 4 kB / 1.144 GB, free: 284.3 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.268e-06/3.112, allocations: 0 / 1.144 GB, free: 284.3 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.559e-06/3.112, allocations: 4 kB / 1.144 GB, free: 284.3 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.000169/3.112, allocations: 261.2 kB / 1.144 GB, free: 284.1 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.704e-06/3.112, allocations: 0 / 1.144 GB, free: 284.1 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002322/3.113, allocations: 38.78 kB / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.797e-06/3.113, allocations: 4 kB / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.772e-05/3.113, allocations: 3.5 kB / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.765e-06/3.113, allocations: 1.688 kB / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.343e-06/3.113, allocations: 0 / 1.144 GB, free: 284 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005821/3.113, allocations: 324.1 kB / 1.144 GB, free: 283.8 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 7.676e-05/3.113, allocations: 108.2 kB / 1.144 GB, free: 283.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.512e-05/3.113, allocations: 7.562 kB / 1.144 GB, free: 283.7 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001676/3.114, allocations: 11.86 kB / 1.144 GB, free: 283.6 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.718e-05/3.114, allocations: 20.73 kB / 1.144 GB, free: 283.6 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.314e-05/3.114, allocations: 9.562 kB / 1.144 GB, free: 283.6 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 7.661e-05/3.114, allocations: 130.5 kB / 1.144 GB, free: 283.5 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.41e-07/3.114, allocations: 0 / 1.144 GB, free: 283.5 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.0002719/3.114, allocations: 63.31 kB / 1.144 GB, free: 283.5 MB / 0.8419 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.000783/3.115, allocations: 0.8596 MB / 1.145 GB, free: 282.7 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.0004225/3.115, allocations: 228 kB / 1.146 GB, free: 282.5 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 2.304e-06/3.115, allocations: 0 / 1.146 GB, free: 282.5 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0001973/3.115, allocations: 91.8 kB / 1.146 GB, free: 282.4 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002718/3.116, allocations: 43.05 kB / 1.146 GB, free: 282.4 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002385/3.118, allocations: 2.304 MB / 1.148 GB, free: 280.1 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000102/3.118, allocations: 0.7164 MB / 1.149 GB, free: 279.4 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.0001233/3.118, allocations: 34.47 kB / 1.149 GB, free: 279.4 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.463e-05/3.118, allocations: 55.42 kB / 1.149 GB, free: 279.3 MB / 0.8419 GB Notification: Performance of SimCode: time 3.7e-07/3.118, allocations: 0 / 1.149 GB, free: 279.3 MB / 0.8419 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02034/3.139, allocations: 4.684 MB / 1.153 GB, free: 274.8 MB / 0.8419 GB Notification: Performance of buildModelFMU: Generate platform static: time 7.381/10.52, allocations: 9.594 kB / 1.153 GB, free: 274.8 MB / 0.8419 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)