Rolling of samples
Potential bug to be checked and fixed: It seems that in 3b_periodicLoop.gms, samples sometimes move with the rolling horizon and sometimes they don't. In 3b_periodicLoop.gms, sft is determined as follows:
// Loop over defined samples
loop(msf(mSolve, s, f)$msStart(mSolve, s),
sft(s, ft(f, t))${ord(t) > msStart(mSolve, s)
and ord(t) <= msEnd(mSolve, s)
} = yes;
);
whereas mst_start and mst_end are determined as follows:
// Sample start and end intervals
mst_start(mst(mSolve, s, t))$[ord(t) - t_solveFirst = msStart(mSolve, s)] = yes;
loop(ms(mSolve, s),
loop(t_active(t)$[ord(t) - t_solveFirst = msEnd(mSolve, s)],
mst_end(mSolve, s, t + dt(t)) = yes;
);
);
// If the last interval of a sample is in mft_lastSteps, the method above does not work
mst_end(mst(mSolve, s, t))${sum(f_solve, mft_lastSteps(mSolve, f_solve, t))} = yes;
There can also be problems when using multi-sample models with a rolling horizon (#200 (closed)).