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: translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple") translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001282/0.001282, allocations: 112.8 kB / 16.41 MB, free: 6.016 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.001259/0.001259, allocations: 186.6 kB / 17.34 MB, free: 5.629 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.395/1.395, allocations: 222.9 MB / 241 MB, free: 15.15 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002521/0.002521, allocations: 290.4 kB / 291.5 MB, free: 14.43 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9977/0.9977, allocations: 169.2 MB / 0.499 GB, free: 4.414 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002803/0.002803, allocations: 95.84 kB / 0.6821 GB, free: 6.98 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4053/0.4081, allocations: 86.98 MB / 0.767 GB, free: 3.934 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple): time 0.003368/0.4114, allocations: 1.95 MB / 0.7689 GB, free: 1.969 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.00154/0.413, allocations: 0.866 MB / 0.7698 GB, free: 1.094 MB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 9.463e-05/0.4131, allocations: 7.938 kB / 0.7698 GB, free: 1.086 MB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0002267/0.4133, allocations: 47.67 kB / 0.7698 GB, free: 1.039 MB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 0.0001163/0.4134, allocations: 55.56 kB / 0.7699 GB, free: 0.9844 MB / 0.5294 GB Notification: Performance of NFTyping.typeClassSections: time 0.0003115/0.4137, allocations: 87.77 kB / 0.77 GB, free: 0.8984 MB / 0.5294 GB Notification: Performance of NFFlatten.flatten: time 0.0002871/0.414, allocations: 191.2 kB / 0.7701 GB, free: 0.7109 MB / 0.5294 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001001/0.4141, allocations: 21.53 kB / 0.7702 GB, free: 0.6914 MB / 0.5294 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0001622/0.4143, allocations: 87.64 kB / 0.7702 GB, free: 0.6055 MB / 0.5294 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0001367/0.4144, allocations: 75.67 kB / 0.7703 GB, free: 0.5312 MB / 0.5294 GB Notification: Performance of NFPackage.collectConstants: time 3.036e-05/0.4144, allocations: 11.98 kB / 0.7703 GB, free: 0.5195 MB / 0.5294 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001343/0.4146, allocations: 63.89 kB / 0.7704 GB, free: 468 kB / 0.5294 GB Notification: Performance of NFScalarize.scalarize: time 4.327e-05/0.4146, allocations: 27.86 kB / 0.7704 GB, free: 440 kB / 0.5294 GB Notification: Performance of NFVerifyModel.verify: time 8.967e-05/0.4147, allocations: 75.58 kB / 0.7705 GB, free: 364 kB / 0.5294 GB Notification: Performance of NFConvertDAE.convert: time 0.0002939/0.415, allocations: 192.9 kB / 0.7707 GB, free: 180 kB / 0.5294 GB Notification: Performance of FrontEnd - DAE generated: time 4.218e-06/0.415, allocations: 0 / 0.7707 GB, free: 180 kB / 0.5294 GB Notification: Performance of FrontEnd: time 1.453e-06/0.415, allocations: 0 / 0.7707 GB, free: 180 kB / 0.5294 GB Notification: Performance of Transformations before backend: time 6.242e-06/0.415, allocations: 4 kB / 0.7707 GB, free: 176 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.001116/0.4161, allocations: 0.5079 MB / 0.7712 GB, free: 15.61 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 4.038e-05/0.4162, allocations: 11.97 kB / 0.7712 GB, free: 15.6 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.035e-05/0.4162, allocations: 16.84 kB / 0.7712 GB, free: 15.58 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003328/0.4166, allocations: 244 kB / 0.7714 GB, free: 15.3 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.19e-05/0.4166, allocations: 12.38 kB / 0.7714 GB, free: 15.29 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 4.045e-05/0.4166, allocations: 8.375 kB / 0.7715 GB, free: 15.29 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003364/0.417, allocations: 121.8 kB / 0.7716 GB, free: 15.16 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.567e-05/0.417, allocations: 4 kB / 0.7716 GB, free: 15.16 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.924e-05/0.417, allocations: 4 kB / 0.7716 GB, free: 15.15 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.15e-06/0.417, allocations: 0 / 0.7716 GB, free: 15.15 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003383/0.4174, allocations: 103.9 kB / 0.7717 GB, free: 15.05 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007822/0.4181, allocations: 420.5 kB / 0.7721 GB, free: 14.59 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0003776/0.4185, allocations: 118.4 kB / 0.7722 GB, free: 14.46 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002054/0.4187, allocations: 68.81 kB / 0.7723 GB, free: 14.39 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.000752/0.4195, allocations: 457.4 kB / 0.7727 GB, free: 13.86 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004025/0.4199, allocations: 123.3 kB / 0.7728 GB, free: 13.72 MB / 0.545 GB Notification: Performance of pre-optimization done (n=16): time 1.723e-06/0.4199, allocations: 0 / 0.7728 GB, free: 13.72 MB / 0.545 GB Notification: Performance of matching and sorting (n=16): time 0.0007481/0.4206, allocations: 240.9 kB / 0.773 GB, free: 13.48 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.547e-05/0.4207, allocations: 51.41 kB / 0.7731 GB, free: 13.42 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002048/0.4209, allocations: 178.5 kB / 0.7733 GB, free: 13.24 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 4.012e-05/0.4209, allocations: 25.7 kB / 0.7733 GB, free: 13.21 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 9.989e-05/0.421, allocations: 116.1 kB / 0.7734 GB, free: 13.09 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 6.337e-05/0.4211, allocations: 55.48 kB / 0.7734 GB, free: 13.04 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 9.067e-05/0.4212, allocations: 45.69 kB / 0.7735 GB, free: 12.98 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.0001911/0.4214, allocations: 330.8 kB / 0.7738 GB, free: 12.65 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002167/0.4216, allocations: 72.8 kB / 0.7739 GB, free: 12.58 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000231/0.4218, allocations: 91.34 kB / 0.774 GB, free: 12.48 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 2.618/3.04, allocations: 378.8 MB / 1.144 GB, free: 9.5 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.106e-06/3.04, allocations: 4 kB / 1.144 GB, free: 9.496 MB / 0.7169 GB Notification: Performance of matching and sorting (n=23) (initialization): time 0.0004635/3.04, allocations: 247.2 kB / 1.144 GB, free: 9.309 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 2.697e-05/3.04, allocations: 33.7 kB / 1.144 GB, free: 9.27 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.43e-06/3.04, allocations: 2.812 kB / 1.144 GB, free: 9.27 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.783e-05/3.04, allocations: 7.469 kB / 1.144 GB, free: 9.266 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002224/3.04, allocations: 41.19 kB / 1.144 GB, free: 9.23 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.065e-06/3.04, allocations: 11.92 kB / 1.144 GB, free: 9.219 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001786/3.041, allocations: 23.2 kB / 1.144 GB, free: 9.207 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.859e-05/3.041, allocations: 7.984 kB / 1.144 GB, free: 9.199 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.0001706/3.041, allocations: 149.6 kB / 1.144 GB, free: 9.066 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.913e-05/3.041, allocations: 19.38 kB / 1.144 GB, free: 9.055 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005223/3.041, allocations: 240.5 kB / 1.145 GB, free: 8.852 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.489e-06/3.041, allocations: 4 kB / 1.145 GB, free: 8.848 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.777e-06/3.041, allocations: 0 / 1.145 GB, free: 8.848 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.839e-06/3.041, allocations: 3.984 kB / 1.145 GB, free: 8.844 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001785/3.042, allocations: 256.6 kB / 1.145 GB, free: 8.555 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.533e-06/3.042, allocations: 0 / 1.145 GB, free: 8.555 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002284/3.042, allocations: 43.98 kB / 1.145 GB, free: 8.512 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.645e-06/3.042, allocations: 0 / 1.145 GB, free: 8.512 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.762e-05/3.042, allocations: 11.98 kB / 1.145 GB, free: 8.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.834e-06/3.042, allocations: 0 / 1.145 GB, free: 8.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.032e-06/3.042, allocations: 0 / 1.145 GB, free: 8.5 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005566/3.042, allocations: 315.5 kB / 1.145 GB, free: 8.191 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 6.763e-05/3.042, allocations: 114.3 kB / 1.145 GB, free: 8.066 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 2.948e-05/3.042, allocations: 4 kB / 1.145 GB, free: 8.062 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001588/3.043, allocations: 11.98 kB / 1.145 GB, free: 8.051 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.822e-05/3.043, allocations: 19.97 kB / 1.145 GB, free: 8.031 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.195e-05/3.043, allocations: 6.188 kB / 1.145 GB, free: 8.027 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 7.476e-05/3.043, allocations: 138.2 kB / 1.146 GB, free: 7.895 MB / 0.7169 GB Notification: Performance of sort global known variables: time 9e-08/3.043, allocations: 0 / 1.146 GB, free: 7.895 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0002576/3.043, allocations: 61.42 kB / 1.146 GB, free: 7.84 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.0001327/3.043, allocations: 128.7 kB / 1.146 GB, free: 7.715 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.0004157/3.044, allocations: 215.2 kB / 1.146 GB, free: 7.492 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 1.804e-06/3.044, allocations: 0 / 1.146 GB, free: 7.492 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0001765/3.044, allocations: 75.89 kB / 1.146 GB, free: 7.418 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002583/3.044, allocations: 31.97 kB / 1.146 GB, free: 7.387 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0007293/3.045, allocations: 0.5422 MB / 1.147 GB, free: 6.836 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001131/3.045, allocations: 0.7203 MB / 1.147 GB, free: 6.09 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0001146/3.045, allocations: 33.53 kB / 1.147 GB, free: 6.055 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.286e-05/3.045, allocations: 27.42 kB / 1.147 GB, free: 6.027 MB / 0.7169 GB Notification: Performance of SimCode: time 4.41e-07/3.045, allocations: 0 / 1.147 GB, free: 6.027 MB / 0.7169 GB Notification: Performance of Templates: time 0.005238/3.05, allocations: 2.554 MB / 1.15 GB, free: 3.512 MB / 0.7169 GB make -j1 -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.makefile (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 & ./BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple -abortSlowSimulation -alarm=480 -s cvode -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatterySimple.pipe 2>&1)