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.0009775/0.0009775, allocations: 91.84 kB / 15.36 MB, free: 0.7383 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.00809/0.008091, allocations: 173.3 kB / 16.26 MB, free: 6.676 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.328/1.328, allocations: 223.3 MB / 240.3 MB, free: 5.309 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001713/0.001713, allocations: 266.6 kB / 291.7 MB, free: 1.844 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9558/0.9558, allocations: 169.5 MB / 0.5004 GB, free: 14.05 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0004589/0.000459, allocations: 17.14 kB / 0.5986 GB, free: 28.15 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1709/0.1714, allocations: 88.55 MB / 0.6851 GB, free: 15.07 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.002743/0.1742, allocations: 2.312 MB / 0.6874 GB, free: 12.74 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001733/0.1759, allocations: 1.073 MB / 0.6884 GB, free: 11.66 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001189/0.1761, allocations: 8.469 kB / 0.6884 GB, free: 11.66 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002552/0.1763, allocations: 73.98 kB / 0.6885 GB, free: 11.59 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002102/0.1765, allocations: 103.2 kB / 0.6886 GB, free: 11.48 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003572/0.1769, allocations: 153 kB / 0.6888 GB, free: 11.34 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004161/0.1773, allocations: 482.2 kB / 0.6892 GB, free: 10.86 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000128/0.1775, allocations: 51.36 kB / 0.6893 GB, free: 10.82 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002755/0.1778, allocations: 213.5 kB / 0.6895 GB, free: 10.61 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003242/0.1781, allocations: 203.1 kB / 0.6897 GB, free: 10.41 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 4.519e-05/0.1781, allocations: 16 kB / 0.6897 GB, free: 10.39 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001533/0.1783, allocations: 71.88 kB / 0.6897 GB, free: 10.32 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 7.216e-05/0.1784, allocations: 64.45 kB / 0.6898 GB, free: 10.26 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002552/0.1786, allocations: 196.7 kB / 0.69 GB, free: 10.06 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004187/0.1791, allocations: 392.2 kB / 0.6904 GB, free: 9.68 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.258e-06/0.1791, allocations: 0 / 0.6904 GB, free: 9.68 MB / 494.1 MB Notification: Performance of FrontEnd: time 1.813e-06/0.1791, allocations: 0 / 0.6904 GB, free: 9.68 MB / 494.1 MB Notification: Performance of Transformations before backend: time 5.6e-06/0.1791, allocations: 0 / 0.6904 GB, free: 9.68 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.001809/0.1809, allocations: 0.7584 MB / 0.6911 GB, free: 8.859 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.718e-05/0.181, allocations: 8.031 kB / 0.6911 GB, free: 8.852 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001183/0.1811, allocations: 40.47 kB / 0.6912 GB, free: 8.812 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004606/0.1816, allocations: 343.8 kB / 0.6915 GB, free: 8.441 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.646e-05/0.1816, allocations: 12.81 kB / 0.6915 GB, free: 8.43 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.635e-05/0.1817, allocations: 32.36 kB / 0.6915 GB, free: 8.398 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007731/0.1825, allocations: 349 kB / 0.6919 GB, free: 8.047 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.776e-05/0.1825, allocations: 4 kB / 0.6919 GB, free: 8.043 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.632e-05/0.1825, allocations: 4 kB / 0.6919 GB, free: 8.039 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.185e-06/0.1825, allocations: 4 kB / 0.6919 GB, free: 8.035 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008887/0.1834, allocations: 332.3 kB / 0.6922 GB, free: 7.711 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001271/0.1847, allocations: 0.7812 MB / 0.6929 GB, free: 6.875 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001091/0.1858, allocations: 421.5 kB / 0.6933 GB, free: 6.445 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005129/0.1863, allocations: 222.3 kB / 0.6936 GB, free: 6.223 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0006765/0.187, allocations: 457.4 kB / 0.694 GB, free: 5.684 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0008047/0.1878, allocations: 348.5 kB / 0.6943 GB, free: 5.324 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 2.404e-06/0.1879, allocations: 0 / 0.6943 GB, free: 5.324 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.001687/0.1895, allocations: 0.6587 MB / 0.695 GB, free: 4.66 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.001e-05/0.1896, allocations: 85.09 kB / 0.6951 GB, free: 4.559 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003021/0.1899, allocations: 308.5 kB / 0.6953 GB, free: 4.238 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 4.617e-05/0.19, allocations: 41.69 kB / 0.6954 GB, free: 4.191 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.000107/0.1901, allocations: 160.9 kB / 0.6955 GB, free: 4.031 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.000121/0.1902, allocations: 138 kB / 0.6957 GB, free: 3.895 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.112e-05/0.1903, allocations: 53.69 kB / 0.6957 GB, free: 3.836 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0001318/0.1904, allocations: 346.8 kB / 0.6961 GB, free: 3.488 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005193/0.191, allocations: 221.7 kB / 0.6963 GB, free: 3.27 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005295/0.1915, allocations: 262.4 kB / 0.6965 GB, free: 2.996 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 7.16/7.351, allocations: 1 GB / 1.697 GB, free: 148 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.082e-06/7.352, allocations: 0 / 1.697 GB, free: 148 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001317/7.353, allocations: 0.6739 MB / 1.698 GB, free: 147.5 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 4.216e-05/7.353, allocations: 92.53 kB / 1.698 GB, free: 147.4 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.854e-06/7.353, allocations: 4.562 kB / 1.698 GB, free: 147.4 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.141e-05/7.353, allocations: 4 kB / 1.698 GB, free: 147.4 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005327/7.353, allocations: 123.4 kB / 1.698 GB, free: 147.3 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.785e-06/7.353, allocations: 0 / 1.698 GB, free: 147.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004895/7.354, allocations: 79 kB / 1.698 GB, free: 147.2 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.176e-05/7.354, allocations: 23.92 kB / 1.698 GB, free: 147.2 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.0002714/7.354, allocations: 210.3 kB / 1.698 GB, free: 147.1 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.329e-05/7.354, allocations: 38.59 kB / 1.698 GB, free: 147.1 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001555/7.356, allocations: 0.659 MB / 1.699 GB, free: 146.6 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.561e-06/7.356, allocations: 8 kB / 1.699 GB, free: 146.5 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.821e-06/7.356, allocations: 3.938 kB / 1.699 GB, free: 146.5 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.333e-06/7.356, allocations: 3.984 kB / 1.699 GB, free: 146.5 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004224/7.356, allocations: 439.6 kB / 1.699 GB, free: 146.2 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.384e-06/7.356, allocations: 4 kB / 1.699 GB, free: 146.2 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005603/7.357, allocations: 115.7 kB / 1.699 GB, free: 146.1 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.967e-06/7.357, allocations: 0 / 1.699 GB, free: 146.1 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.422e-05/7.357, allocations: 19.48 kB / 1.699 GB, free: 146 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.006e-06/7.357, allocations: 0 / 1.699 GB, free: 146 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.947e-06/7.357, allocations: 7.938 kB / 1.699 GB, free: 146 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001703/7.359, allocations: 0.835 MB / 1.7 GB, free: 145.4 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001503/7.359, allocations: 164.5 kB / 1.7 GB, free: 145.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.582e-05/7.359, allocations: 11.94 kB / 1.7 GB, free: 145.3 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000427/7.359, allocations: 51.52 kB / 1.7 GB, free: 145.2 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001258/7.36, allocations: 55.23 kB / 1.7 GB, free: 145.2 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.109e-05/7.36, allocations: 19.61 kB / 1.7 GB, free: 145.2 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0001546/7.36, allocations: 214.6 kB / 1.701 GB, free: 145 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.6e-07/7.36, allocations: 4 kB / 1.701 GB, free: 145 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0003795/7.36, allocations: 110.4 kB / 1.701 GB, free: 144.9 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.0001704/7.36, allocations: 135.6 kB / 1.701 GB, free: 144.8 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.00112/7.361, allocations: 0.6682 MB / 1.701 GB, free: 144.2 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 2.224e-06/7.361, allocations: 0 / 1.701 GB, free: 144.2 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.0005332/7.362, allocations: 284.7 kB / 1.702 GB, free: 143.9 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004403/7.362, allocations: 67.16 kB / 1.702 GB, free: 143.8 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00154/7.364, allocations: 1.359 MB / 1.703 GB, free: 142.5 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001713/7.364, allocations: 0.8015 MB / 1.704 GB, free: 141.6 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0004013/7.365, allocations: 87.39 kB / 1.704 GB, free: 141.5 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001609/7.365, allocations: 47.42 kB / 1.704 GB, free: 141.5 MB / 0.7169 GB Notification: Performance of SimCode: time 3.21e-07/7.365, allocations: 0 / 1.704 GB, free: 141.5 MB / 0.7169 GB Notification: Performance of Templates: time 0.008526/7.373, allocations: 5.517 MB / 1.709 GB, free: 136.1 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)