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: translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex") translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001341/0.001341, allocations: 115.3 kB / 15.34 MB, free: 0.5156 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.001143/0.001143, allocations: 191.1 kB / 16.25 MB, free: 6.637 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.314/1.314, allocations: 222.9 MB / 239.9 MB, free: 4.551 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002108/0.002108, allocations: 274.8 kB / 290.3 MB, free: 2.172 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9862/0.9862, allocations: 169.2 MB / 0.4978 GB, free: 14.1 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001692/0.001692, allocations: 92.2 kB / 0.5947 GB, free: 28.34 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1632/0.1649, allocations: 86.99 MB / 0.6796 GB, free: 1.102 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003453/0.1684, allocations: 2.672 MB / 0.6822 GB, free: 14.42 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001497/0.17, allocations: 1.067 MB / 0.6833 GB, free: 13.35 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.00012/0.1701, allocations: 11.94 kB / 0.6833 GB, free: 13.34 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002489/0.1703, allocations: 67.69 kB / 0.6833 GB, free: 13.27 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001982/0.1706, allocations: 107.2 kB / 0.6834 GB, free: 13.16 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003511/0.1709, allocations: 159.8 kB / 0.6836 GB, free: 13.01 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004324/0.1714, allocations: 0.506 MB / 0.6841 GB, free: 12.5 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001206/0.1715, allocations: 52.72 kB / 0.6841 GB, free: 12.45 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002533/0.1717, allocations: 231 kB / 0.6844 GB, free: 12.22 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002657/0.172, allocations: 223.1 kB / 0.6846 GB, free: 12 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 5.058e-05/0.1721, allocations: 28 kB / 0.6846 GB, free: 11.98 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001432/0.1722, allocations: 87.94 kB / 0.6847 GB, free: 11.89 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 7.341e-05/0.1723, allocations: 75.72 kB / 0.6848 GB, free: 11.82 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001558/0.1725, allocations: 187 kB / 0.6849 GB, free: 11.63 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0003716/0.1728, allocations: 410.6 kB / 0.6853 GB, free: 11.23 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.877e-06/0.1729, allocations: 0 / 0.6853 GB, free: 11.23 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.323e-06/0.1729, allocations: 0 / 0.6853 GB, free: 11.23 MB / 494.1 MB Notification: Performance of Transformations before backend: time 6.092e-06/0.1729, allocations: 0 / 0.6853 GB, free: 11.23 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: 49 * Number of variables: 49 Notification: Performance of Generate backend data structure: time 0.001768/0.1746, allocations: 0.807 MB / 0.6861 GB, free: 10.36 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.355e-05/0.1747, allocations: 12.03 kB / 0.6861 GB, free: 10.35 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.657e-05/0.1748, allocations: 40.47 kB / 0.6862 GB, free: 10.31 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003961/0.1752, allocations: 339.9 kB / 0.6865 GB, free: 9.941 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.131e-05/0.1752, allocations: 16.8 kB / 0.6865 GB, free: 9.926 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.834e-05/0.1753, allocations: 28.38 kB / 0.6865 GB, free: 9.898 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006866/0.176, allocations: 329 kB / 0.6868 GB, free: 9.566 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.931e-05/0.176, allocations: 4 kB / 0.6868 GB, free: 9.562 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.425e-05/0.176, allocations: 8 kB / 0.6869 GB, free: 9.555 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.132e-05/0.1761, allocations: 4 kB / 0.6869 GB, free: 9.551 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007993/0.1769, allocations: 298 kB / 0.6871 GB, free: 9.262 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001056/0.1779, allocations: 0.7772 MB / 0.6879 GB, free: 8.43 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001024/0.179, allocations: 392.1 kB / 0.6883 GB, free: 8.031 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004622/0.1794, allocations: 205.6 kB / 0.6885 GB, free: 7.824 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006899/0.1801, allocations: 457.4 kB / 0.6889 GB, free: 7.285 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007333/0.1809, allocations: 332.5 kB / 0.6892 GB, free: 6.941 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 1.743e-06/0.1809, allocations: 0 / 0.6892 GB, free: 6.941 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.001537/0.1824, allocations: 0.6054 MB / 0.6898 GB, free: 6.332 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.432e-05/0.1825, allocations: 93.05 kB / 0.6899 GB, free: 6.223 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002945/0.1828, allocations: 308.5 kB / 0.6902 GB, free: 5.902 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 5.43e-05/0.1829, allocations: 37.7 kB / 0.6902 GB, free: 5.859 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001121/0.183, allocations: 156.9 kB / 0.6904 GB, free: 5.703 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001203/0.1831, allocations: 142 kB / 0.6905 GB, free: 5.562 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001545/0.1833, allocations: 90.09 kB / 0.6906 GB, free: 5.469 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001468/0.1834, allocations: 350.8 kB / 0.6909 GB, free: 5.117 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004763/0.1839, allocations: 215.3 kB / 0.6911 GB, free: 4.902 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000485/0.1844, allocations: 242.4 kB / 0.6914 GB, free: 4.648 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 6.22/6.404, allocations: 0.866 GB / 1.557 GB, free: 34.2 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.993e-06/6.404, allocations: 0 / 1.557 GB, free: 34.2 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001245/6.405, allocations: 0.64 MB / 1.558 GB, free: 33.72 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 4.277e-05/6.406, allocations: 92.48 kB / 1.558 GB, free: 33.61 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.343e-06/6.406, allocations: 0 / 1.558 GB, free: 33.61 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.016e-05/6.406, allocations: 4 kB / 1.558 GB, free: 33.61 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000539/6.406, allocations: 115.5 kB / 1.558 GB, free: 33.5 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.028e-05/6.406, allocations: 4 kB / 1.558 GB, free: 33.5 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004863/6.407, allocations: 63.17 kB / 1.558 GB, free: 33.46 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.589e-05/6.407, allocations: 25.23 kB / 1.558 GB, free: 33.45 MB / 0.7169 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.6850000000000001 * 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.6850000000000001 * 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.0002924/6.407, allocations: 201.4 kB / 1.559 GB, free: 33.27 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.139e-05/6.407, allocations: 37.41 kB / 1.559 GB, free: 33.26 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001425/6.409, allocations: 0.6359 MB / 1.559 GB, free: 32.62 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.602e-06/6.409, allocations: 5.688 kB / 1.559 GB, free: 32.62 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.763e-06/6.409, allocations: 3.938 kB / 1.559 GB, free: 32.62 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.765e-06/6.409, allocations: 3.984 kB / 1.559 GB, free: 32.61 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003626/6.409, allocations: 441.9 kB / 1.56 GB, free: 32.16 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.577e-06/6.409, allocations: 0 / 1.56 GB, free: 32.16 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005424/6.409, allocations: 109.9 kB / 1.56 GB, free: 32.06 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 8.366e-06/6.41, allocations: 11.73 kB / 1.56 GB, free: 32.05 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.29e-05/6.41, allocations: 16 kB / 1.56 GB, free: 32.04 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.007e-06/6.41, allocations: 4 kB / 1.56 GB, free: 32.03 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.285e-06/6.41, allocations: 3.938 kB / 1.56 GB, free: 32.03 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00146/6.411, allocations: 0.7807 MB / 1.561 GB, free: 31.25 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001602/6.411, allocations: 160 kB / 1.561 GB, free: 31.09 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.945e-05/6.411, allocations: 15.98 kB / 1.561 GB, free: 31.07 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004192/6.412, allocations: 39.89 kB / 1.561 GB, free: 31.04 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001468/6.412, allocations: 59.88 kB / 1.561 GB, free: 30.98 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.212e-05/6.412, allocations: 19.98 kB / 1.561 GB, free: 30.96 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001535/6.412, allocations: 215.1 kB / 1.561 GB, free: 30.75 MB / 0.7169 GB Notification: Performance of sort global known variables: time 2.91e-07/6.412, allocations: 4 kB / 1.561 GB, free: 30.75 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.000392/6.412, allocations: 111.7 kB / 1.561 GB, free: 30.64 MB / 0.7169 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.0001884/6.413, allocations: 135.8 kB / 1.561 GB, free: 30.51 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.001153/6.414, allocations: 0.6692 MB / 1.562 GB, free: 29.81 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 2.875e-06/6.414, allocations: 0 / 1.562 GB, free: 29.81 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0005229/6.414, allocations: 256.7 kB / 1.562 GB, free: 29.56 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004401/6.415, allocations: 70.05 kB / 1.562 GB, free: 29.5 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001584/6.416, allocations: 1.231 MB / 1.563 GB, free: 28.3 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001831/6.417, allocations: 0.8061 MB / 1.564 GB, free: 27.46 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.000402/6.417, allocations: 86.59 kB / 1.564 GB, free: 27.38 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001603/6.417, allocations: 47.42 kB / 1.564 GB, free: 27.33 MB / 0.7169 GB Notification: Performance of SimCode: time 3.61e-07/6.417, allocations: 0 / 1.564 GB, free: 27.33 MB / 0.7169 GB Notification: Performance of Templates: time 0.009413/6.427, allocations: 5.864 MB / 1.57 GB, free: 21.57 MB / 0.7169 GB make -j1 -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.makefile (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 & ./BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex -abortSlowSimulation -alarm=480 -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)