t_latestForecast(t) "t for the latest forecast that is available"
gnss_bound(grid, node, s, s) "Bound the samples so that the node state at the last interval of the first sample equals the state at the first interval of the second sample"
uss_bound(unit, s, s) "Bound the samples so that the unit online state at the last interval of the first sample equals the state at the first interval of the second sample"
s_parallel(s) "Samples which are treated as parallel"
s_active(s) "Samples with non-zero probability in the current model solve"
s_stochastic(s) "Samples used for stochastic programming"
ss(s, s) "Previous sample of sample"
s_prev(s) "Temporary set for previous sample"
longtermSamples(*, node, *) "Which grid/flow, node and timeseries/param have data for long-term scenarios"
s_scenario(s, scenario) "Which samples belong to which scenarios"
gn_scenarios(*, node, *) "Which grid/flow, node and timeseries/param have data for long-term scenarios"
* --- Sets used for the changing unit aggregation and efficiency approximations
uft(unit, f, t) "Active units on intervals, enables aggregation of units for later intervals"
// Is there any case where t_forecastLength should be larger than t_horizon? Could happen if one doesn't want to join forecasts at the end of the solve horizon.
// If not, add a check for currentForecastLength <= mSettings(mSolve, 't_horizon')
// and change the line below to 'tSolveLast = ord(tSolve) + mSettings(mSolve, 't_horizon');'
tSolveLast = ord(tSolve) + max(currentForecastLength, min(mSettings(mSolve, 't_horizon'), smax(s, msEnd(mSolve, s)))); // tSolveLast: the end of the current solve
tSolveLast = ord(tSolve) + mSettings(mSolve, 't_horizon'); // tSolveLast: the end of the current solve
Option clear = t_current;
t_current(t_full(t))
${ ord(t) >= tSolveFirst
...
...
@@ -201,7 +186,8 @@ loop(cc(counter),
option clear = tt;
tt(t_current(t))
${ord(t) >= tSolveFirst + tCounter
and ord(t) <= min(tSolveFirst + mInterval(mSolve, 'lastStepInIntervalBlock', counter),