|
Circular or Equilibrium Leads and Lags: ++ / -- |
Top Previous Next |
|
Some problems involve sets defined over time covering quarters or months. Often when operating with such sets one may wish to define carryover relationships where the year wraps around in an equilibrium fashion and beginning storage in January equals ending storage in December. These operators only work with ordered sets. Examples: The GAMS equilibrium lead and lag features for set referencing are used as follows (dynindex.gms)
Stockbal3(t).. endstock(t--1)=e=beginstock(t);
Where the --1 notation references the previous time period to the current one and wraps to the last element when on the first element, or equivalently
Stockbal4(t).. endstock(t)=e=beginstock(t++1); Notes:
|