|
Leads and Lags: + / - |
Top Previous Next |
|
Some problems involve sets defined over time covering years or quarters or months. Often when operating with such sets one may wish to define carryover relationships. For example, suppose beginning storage in a quarter equals ending storage in a previous quarter. These operators only work with ordered sets. GAMS lead and lag features for set referencing are used as follows (dynindex.gms)
Stockbal(t).. endstock(t-1)=e=beginstock(t);
Where the -1 notation references the previous time period to the current one, or equivalently
Stockbal2(t).. endstock(t)=e=beginstock(t+1); Notes:
|