Performs the shifting operation which propagates the thermal load history towards the more distant aggregation cells, and then sets the current cell's value at 0. Additionally, this function also outputs the last filled load aggregation cell.
function shiftAggregationCells extends Modelica.Icons.Function; input Integer i "Number of aggregation cells"; input Modelica.Units.SI.HeatFlowRate QAgg_flow[i] "Vector of aggregated loads"; input Real rCel[i](each min = Modelica.Constants.small) "Aggregation cell widths"; input Modelica.Units.SI.Time nu[i] "Cell aggregation times"; input Modelica.Units.SI.Time curTim "Current simulation time"; output Integer curCel "Current occupied aggregation cell"; output Modelica.Units.SI.HeatFlowRate QAggShi_flow[i] "Shifted vector of aggregated loads"; end shiftAggregationCells;
min=Modelica.Constants.small
to rCel
so that a tool can infer that this quantity is non-zero.