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.000931/0.0009311, allocations: 86.56 kB / 15.06 MB, free: 1.09 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.0009887/0.0009887, allocations: 168.7 kB / 15.95 MB, free: 204 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.32/1.32, allocations: 223.3 MB / 240 MB, free: 5.312 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001795/0.001795, allocations: 285.7 kB / 291.4 MB, free: 1.855 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9502/0.9502, allocations: 169.5 MB / 0.5 GB, free: 14.22 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.000435/0.000435, allocations: 16.09 kB / 0.598 GB, free: 28.27 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1851/0.1856, allocations: 88.54 MB / 0.6845 GB, free: 15.47 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.002425/0.1881, allocations: 2.224 MB / 0.6866 GB, free: 13.23 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001432/0.1895, allocations: 1.015 MB / 0.6876 GB, free: 12.21 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001156/0.1896, allocations: 14.75 kB / 0.6877 GB, free: 12.2 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0001877/0.1898, allocations: 55.59 kB / 0.6877 GB, free: 12.15 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001844/0.19, allocations: 103.2 kB / 0.6878 GB, free: 12.05 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003254/0.1904, allocations: 137.2 kB / 0.6879 GB, free: 11.91 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0003753/0.1907, allocations: 442.3 kB / 0.6884 GB, free: 11.48 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001334/0.1909, allocations: 50.38 kB / 0.6884 GB, free: 11.43 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002631/0.1912, allocations: 209.2 kB / 0.6886 GB, free: 11.23 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002716/0.1914, allocations: 199.2 kB / 0.6888 GB, free: 11.04 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 4.325e-05/0.1915, allocations: 16.62 kB / 0.6888 GB, free: 11.02 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001354/0.1916, allocations: 65.3 kB / 0.6889 GB, free: 10.96 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 6.593e-05/0.1917, allocations: 59.72 kB / 0.6889 GB, free: 10.9 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 8.139e-05/0.1918, allocations: 89.52 kB / 0.689 GB, free: 10.8 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002806/0.1921, allocations: 283.4 kB / 0.6893 GB, free: 10.53 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.558e-06/0.1921, allocations: 0.6562 kB / 0.6893 GB, free: 10.53 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.874e-06/0.1921, allocations: 3.562 kB / 0.6893 GB, free: 10.53 MB / 494.1 MB Notification: Performance of Transformations before backend: time 5.801e-06/0.1921, allocations: 0 / 0.6893 GB, free: 10.53 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.001508/0.1936, allocations: 0.7583 MB / 0.69 GB, free: 9.707 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.102e-05/0.1937, allocations: 8.031 kB / 0.69 GB, free: 9.699 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.44e-05/0.1938, allocations: 53.44 kB / 0.6901 GB, free: 9.648 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003774/0.1941, allocations: 326.8 kB / 0.6904 GB, free: 9.289 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.371e-05/0.1942, allocations: 16.44 kB / 0.6904 GB, free: 9.273 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.173e-05/0.1942, allocations: 20 kB / 0.6904 GB, free: 9.254 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000692/0.1949, allocations: 344.7 kB / 0.6908 GB, free: 8.906 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.463e-05/0.195, allocations: 0 / 0.6908 GB, free: 8.906 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.312e-05/0.195, allocations: 15.98 kB / 0.6908 GB, free: 8.891 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.994e-06/0.195, allocations: 4 kB / 0.6908 GB, free: 8.887 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000801/0.1958, allocations: 328.4 kB / 0.6911 GB, free: 8.566 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001025/0.1968, allocations: 0.7813 MB / 0.6919 GB, free: 7.73 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0009927/0.1979, allocations: 422 kB / 0.6923 GB, free: 7.301 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004601/0.1983, allocations: 226.7 kB / 0.6925 GB, free: 7.074 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0005795/0.1989, allocations: 453.6 kB / 0.6929 GB, free: 6.539 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006773/0.1996, allocations: 344.8 kB / 0.6932 GB, free: 6.184 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 1.613e-06/0.1996, allocations: 0 / 0.6932 GB, free: 6.184 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.00149/0.2011, allocations: 0.6509 MB / 0.6939 GB, free: 5.527 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.333e-05/0.2012, allocations: 93.05 kB / 0.694 GB, free: 5.418 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002783/0.2015, allocations: 304.5 kB / 0.6943 GB, free: 5.105 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 3.974e-05/0.2015, allocations: 37.7 kB / 0.6943 GB, free: 5.062 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.000106/0.2016, allocations: 160.9 kB / 0.6944 GB, free: 4.902 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001109/0.2017, allocations: 142 kB / 0.6946 GB, free: 4.762 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.938e-05/0.2018, allocations: 12 kB / 0.6946 GB, free: 4.75 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001149/0.2019, allocations: 346.8 kB / 0.6949 GB, free: 4.402 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004939/0.2024, allocations: 217.7 kB / 0.6951 GB, free: 4.188 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004923/0.2029, allocations: 258.5 kB / 0.6954 GB, free: 3.922 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005206/0.2034, allocations: 294.7 kB / 0.6957 GB, free: 3.617 MB / 494.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.538e-06/0.2035, allocations: 3.953 kB / 0.6957 GB, free: 3.613 MB / 494.1 MB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001258/0.2047, allocations: 0.6741 MB / 0.6963 GB, free: 2.918 MB / 494.1 MB Notification: Performance of prepare postOptimizeDAE: time 5.758e-05/0.2048, allocations: 89.11 kB / 0.6964 GB, free: 2.812 MB / 494.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.764e-06/0.2048, allocations: 4 kB / 0.6964 GB, free: 2.809 MB / 494.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.33e-05/0.2048, allocations: 0 / 0.6964 GB, free: 2.809 MB / 494.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005523/0.2054, allocations: 123.8 kB / 0.6965 GB, free: 2.688 MB / 494.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.516e-06/0.2054, allocations: 128 / 0.6965 GB, free: 2.688 MB / 494.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004267/0.2058, allocations: 79.58 kB / 0.6966 GB, free: 2.609 MB / 494.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.659e-05/0.2059, allocations: 19.98 kB / 0.6966 GB, free: 2.59 MB / 494.1 MB Warning: Assuming fixed start value for the following 8 variables: battery_1C.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_C20.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_C20.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to 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_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_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 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 Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 6 * Number of states: 0 () * Number of discrete variables: 15 ($whenCondition3,$whenCondition2,$PRE.gain.T_start,gain.T_start,$PRE.gain.count,gain.count,$PRE.load_1C.T_start,load_1C.T_start,$PRE.load_1C.count,load_1C.count,$whenCondition1,$PRE.load_C20.T_start,load_C20.T_start,$PRE.load_C20.count,load_C20.count) * 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 (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002695/0.2062, allocations: 208.3 kB / 0.6968 GB, free: 2.387 MB / 494.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.86e-05/0.2062, allocations: 47.42 kB / 0.6969 GB, free: 2.34 MB / 494.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001586/0.2078, allocations: 0.6619 MB / 0.6975 GB, free: 1.676 MB / 494.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.182e-06/0.2078, allocations: 4 kB / 0.6975 GB, free: 1.672 MB / 494.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.668e-06/0.2078, allocations: 0 / 0.6975 GB, free: 1.672 MB / 494.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.948e-06/0.2079, allocations: 7.984 kB / 0.6975 GB, free: 1.664 MB / 494.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004286/0.2083, allocations: 445 kB / 0.6979 GB, free: 1.18 MB / 494.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.184e-06/0.2083, allocations: 3.938 kB / 0.6979 GB, free: 1.176 MB / 494.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005759/0.2089, allocations: 115.8 kB / 0.6981 GB, free: 1.062 MB / 494.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 6.873e-06/0.2089, allocations: 4 kB / 0.6981 GB, free: 1.059 MB / 494.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.999e-05/0.2089, allocations: 19.98 kB / 0.6981 GB, free: 1.039 MB / 494.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.179e-06/0.209, allocations: 7.938 kB / 0.6981 GB, free: 1.031 MB / 494.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.172e-06/0.209, allocations: 4 kB / 0.6981 GB, free: 1.027 MB / 494.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001621/0.2106, allocations: 0.8209 MB / 0.6989 GB, free: 184 kB / 494.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001666/0.2108, allocations: 164.3 kB / 0.6991 GB, free: 0 / 494.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.321e-05/0.2109, allocations: 20.09 kB / 0.6991 GB, free: 15.98 MB / 0.4981 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003823/0.2112, allocations: 39.97 kB / 0.6991 GB, free: 15.94 MB / 0.4981 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001334/0.2114, allocations: 63.91 kB / 0.6992 GB, free: 15.88 MB / 0.4981 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.553e-05/0.2114, allocations: 15.98 kB / 0.6992 GB, free: 15.86 MB / 0.4981 GB Notification: Performance of sorting global known variables: time 0.0001872/0.2116, allocations: 211.1 kB / 0.6994 GB, free: 15.66 MB / 0.4981 GB Notification: Performance of sort global known variables: time 1.6e-07/0.2116, allocations: 0 / 0.6994 GB, free: 15.66 MB / 0.4981 GB Notification: Performance of remove unused functions: time 0.0003675/0.212, allocations: 116 kB / 0.6995 GB, free: 15.54 MB / 0.4981 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 (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0001982/0.2122, allocations: 131.1 kB / 0.6996 GB, free: 15.41 MB / 0.4981 GB Notification: Performance of simCode: created initialization part: time 0.001173/0.2134, allocations: 0.672 MB / 0.7003 GB, free: 14.7 MB / 0.4981 GB Notification: Performance of simCode: created event and clocks part: time 1.894e-06/0.2134, allocations: 0 / 0.7003 GB, free: 14.7 MB / 0.4981 GB Notification: Performance of simCode: created simulation system equations: time 0.0005688/0.214, allocations: 280 kB / 0.7005 GB, free: 14.43 MB / 0.4981 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004253/0.2144, allocations: 73.39 kB / 0.7006 GB, free: 14.36 MB / 0.4981 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001816/0.2162, allocations: 1.31 MB / 0.7019 GB, free: 13.02 MB / 0.4981 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002957/0.2166, allocations: 0.8015 MB / 0.7027 GB, free: 12.19 MB / 0.4981 GB Notification: Performance of simCode: alias equations: time 0.000405/0.217, allocations: 83.45 kB / 0.7028 GB, free: 12.11 MB / 0.4981 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001654/0.2171, allocations: 51.41 kB / 0.7028 GB, free: 12.05 MB / 0.4981 GB Notification: Performance of SimCode: time 2.1e-07/0.2171, allocations: 0 / 0.7028 GB, free: 12.05 MB / 0.4981 GB Notification: Performance of Templates: time 0.009783/0.2269, allocations: 5.352 MB / 0.708 GB, free: 6.762 MB / 0.4981 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)