Simultaneously constructs both the nu
vector, which is the
aggregation time of each cell, and the rCel
vector, which
is the temporal size of each cell normalized with the time resolution of load
aggregation tLoaAgg
.
function aggregationCellTimes extends Modelica.Icons.Function; input Integer i "Size of time vector"; input Real lvlBas "Base for growth between each level, e.g. 2"; input Integer nCel "Number of cells of same size per level"; input Modelica.Units.SI.Time tLoaAgg(final min = Modelica.Constants.small) "Time resolution of load aggregation"; input Modelica.Units.SI.Time timFin "Total simulation max length"; output Modelica.Units.SI.Time nu[i] "Time vector nu of size i"; output Real rCel[i](each unit = "1") "Cell width vector of size i"; end aggregationCellTimes;
min=Modelica.Constants.small
to tLoaAgg
so that a tool can infer that this quantity is non-zero.