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.001133/0.001133, allocations: 111.3 kB / 15.23 MB, free: 0.6406 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.001145/0.001146, allocations: 196.8 kB / 16.14 MB, free: 6.707 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.185/1.185, allocations: 222.9 MB / 239.8 MB, free: 4.566 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001909/0.001909, allocations: 271 kB / 290.2 MB, free: 2.188 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.8703/0.8703, allocations: 169.2 MB / 0.4977 GB, free: 14.18 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001512/0.001512, allocations: 90.81 kB / 0.5946 GB, free: 28.19 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.135/0.1365, allocations: 86.98 MB / 0.6795 GB, free: 1.098 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.002842/0.1394, allocations: 1.994 MB / 0.6815 GB, free: 15.1 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001193/0.1406, allocations: 0.8595 MB / 0.6823 GB, free: 14.23 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.133e-05/0.1407, allocations: 7.938 kB / 0.6823 GB, free: 14.23 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0001891/0.1408, allocations: 48.58 kB / 0.6824 GB, free: 14.18 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 8.87e-05/0.141, allocations: 40.3 kB / 0.6824 GB, free: 14.14 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002127/0.1412, allocations: 76.47 kB / 0.6825 GB, free: 14.07 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0001664/0.1413, allocations: 187.9 kB / 0.6827 GB, free: 13.88 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 8.313e-05/0.1414, allocations: 20.08 kB / 0.6827 GB, free: 13.87 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001219/0.1416, allocations: 79.58 kB / 0.6828 GB, free: 13.79 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001075/0.1417, allocations: 75.67 kB / 0.6828 GB, free: 13.71 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 2.317e-05/0.1417, allocations: 8 kB / 0.6828 GB, free: 13.71 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001183/0.1418, allocations: 55.95 kB / 0.6829 GB, free: 13.65 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 3.408e-05/0.1419, allocations: 27.84 kB / 0.6829 GB, free: 13.62 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 7.532e-05/0.142, allocations: 63.64 kB / 0.683 GB, free: 13.56 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002086/0.1422, allocations: 179.4 kB / 0.6832 GB, free: 13.39 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.659e-06/0.1422, allocations: 4 kB / 0.6832 GB, free: 13.38 MB / 494.1 MB Notification: Performance of FrontEnd: time 8.61e-07/0.1422, allocations: 0 / 0.6832 GB, free: 13.38 MB / 494.1 MB Notification: Performance of Transformations before backend: time 3.958e-06/0.1422, allocations: 0 / 0.6832 GB, free: 13.38 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: 19 * Number of variables: 19 Notification: Performance of Generate backend data structure: time 0.0008683/0.1431, allocations: 0.5018 MB / 0.6837 GB, free: 12.83 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.359e-05/0.1431, allocations: 8.031 kB / 0.6837 GB, free: 12.82 MB / 494.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 4.247e-05/0.1432, allocations: 46.67 kB / 0.6837 GB, free: 12.77 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.506e-05/0.1432, allocations: 16.75 kB / 0.6837 GB, free: 12.75 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002261/0.1434, allocations: 228 kB / 0.6839 GB, free: 12.49 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.242e-05/0.1435, allocations: 8.375 kB / 0.6839 GB, free: 12.48 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 2.969e-05/0.1435, allocations: 12.28 kB / 0.684 GB, free: 12.47 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002871/0.1438, allocations: 129.7 kB / 0.6841 GB, free: 12.34 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.116e-05/0.1438, allocations: 0 / 0.6841 GB, free: 12.34 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.803e-05/0.1438, allocations: 7.938 kB / 0.6841 GB, free: 12.33 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.209e-06/0.1438, allocations: 4 kB / 0.6841 GB, free: 12.32 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003041/0.1441, allocations: 99.91 kB / 0.6842 GB, free: 12.23 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.000587/0.1447, allocations: 408.5 kB / 0.6846 GB, free: 11.78 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003151/0.1451, allocations: 138.4 kB / 0.6847 GB, free: 11.63 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001746/0.1453, allocations: 80.69 kB / 0.6848 GB, free: 11.55 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0005973/0.1459, allocations: 449.5 kB / 0.6852 GB, free: 11.02 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002985/0.1462, allocations: 127.5 kB / 0.6853 GB, free: 10.88 MB / 494.1 MB Notification: Performance of pre-optimization done (n=16): time 1.453e-06/0.1462, allocations: 0 / 0.6853 GB, free: 10.88 MB / 494.1 MB Notification: Performance of matching and sorting (n=16): time 0.000666/0.1469, allocations: 227.6 kB / 0.6856 GB, free: 10.66 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.776e-05/0.1469, allocations: 63.34 kB / 0.6856 GB, free: 10.58 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001555/0.1471, allocations: 180.1 kB / 0.6858 GB, free: 10.4 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 2.498e-05/0.1471, allocations: 33.7 kB / 0.6858 GB, free: 10.36 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 6.257e-05/0.1472, allocations: 112 kB / 0.6859 GB, free: 10.25 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 4.542e-05/0.1472, allocations: 55.25 kB / 0.686 GB, free: 10.19 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.279e-05/0.1473, allocations: 37.7 kB / 0.686 GB, free: 10.15 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001089/0.1474, allocations: 330.8 kB / 0.6863 GB, free: 9.816 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001905/0.1476, allocations: 76.8 kB / 0.6864 GB, free: 9.738 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001896/0.1478, allocations: 88.56 kB / 0.6865 GB, free: 9.645 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 2.45/2.598, allocations: 378.8 MB / 1.056 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.497e-06/2.598, allocations: 0 / 1.056 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004872/2.598, allocations: 257.8 kB / 1.057 GB, free: 257.3 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 3.893e-05/2.598, allocations: 32.11 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.394e-06/2.598, allocations: 0 / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.912e-05/2.598, allocations: 3.75 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002268/2.598, allocations: 41.25 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.719e-06/2.598, allocations: 6.688 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000187/2.599, allocations: 24.91 kB / 1.057 GB, free: 257.2 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.993e-05/2.599, allocations: 6.938 kB / 1.057 GB, free: 257.2 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.6850000000000001 * 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.0002212/2.599, allocations: 157.1 kB / 1.057 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 4.065e-05/2.599, allocations: 18.84 kB / 1.057 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005465/2.6, allocations: 232 kB / 1.057 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.228e-06/2.6, allocations: 1.438 kB / 1.057 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.901e-06/2.6, allocations: 1.156 kB / 1.057 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.679e-06/2.6, allocations: 0.5625 kB / 1.057 GB, free: 257.1 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001982/2.6, allocations: 268.8 kB / 1.057 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.294e-06/2.6, allocations: 3.281 kB / 1.057 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002212/2.6, allocations: 42.72 kB / 1.057 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.337e-06/2.6, allocations: 0 / 1.057 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.989e-05/2.6, allocations: 4.875 kB / 1.057 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.605e-06/2.6, allocations: 1.406 kB / 1.057 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.252e-06/2.6, allocations: 1.938 kB / 1.057 GB, free: 256.9 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005819/2.601, allocations: 318.1 kB / 1.058 GB, free: 256.8 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 7.666e-05/2.601, allocations: 111.5 kB / 1.058 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.445e-05/2.601, allocations: 4.906 kB / 1.058 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001527/2.601, allocations: 12.98 kB / 1.058 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.706e-05/2.601, allocations: 16.05 kB / 1.058 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.806e-05/2.601, allocations: 13.75 kB / 1.058 GB, free: 256.7 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 8.448e-05/2.601, allocations: 128.7 kB / 1.058 GB, free: 256.6 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.4e-07/2.601, allocations: 0 / 1.058 GB, free: 256.6 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.000281/2.601, allocations: 58.67 kB / 1.058 GB, free: 256.6 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.0007714/2.602, allocations: 0.8682 MB / 1.059 GB, free: 256 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0003964/2.603, allocations: 224.2 kB / 1.059 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 2.155e-06/2.603, allocations: 0 / 1.059 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0001794/2.603, allocations: 87.61 kB / 1.059 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002659/2.603, allocations: 29.66 kB / 1.059 GB, free: 255.9 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002611/2.606, allocations: 2.345 MB / 1.062 GB, free: 254.5 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001112/2.606, allocations: 0.7292 MB / 1.062 GB, free: 253.8 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001472/2.606, allocations: 31 kB / 1.062 GB, free: 253.8 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.331e-05/2.606, allocations: 60.16 kB / 1.062 GB, free: 253.8 MB / 0.7169 GB Notification: Performance of SimCode: time 2.8e-07/2.606, allocations: 0 / 1.062 GB, free: 253.8 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 1.272/3.879, allocations: 4.36 MB / 1.067 GB, free: 252.6 MB / 0.7169 GB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0001579/3.879, allocations: 229.2 kB / 1.067 GB, free: 252.3 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate platform static: time 1.884/5.763, allocations: 0 / 1.067 GB, free: 252.3 MB / 0.7169 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 & /home/hudson/saved_omc/OMSimulator/install/bin/OMSimulator --tempDir=temp_BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatterySimple_fmu --startTime=0 --stopTime=3.1536e+07 --timeout=50 --tolerance=1e-06 BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatterySimple.fmu > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)