Separation of code function

Top  Previous  Next

The save and restart procedure easily allows one to substitute different data sets and maintain different pieces of code in different ways.  In particular, suppose the data were kept in a separate file with saves and restarts used for the model and report writing.  In turn, data specialists could maintain the data without disturbing the model or report writing code.  Such a separation is not unique to saves and restarts but is also exploitable when using include files.  We can also use a separate data file structure to maintain small data sets for large models.

Suppose we illustrate code function separation by substituting in a larger data set in the bat file and automatically rerun a bigger model.

 

GAMS trandatl      s=b1
GAMS tranmodlr=b1  s=b2
GAMS tranreptr=b2  s=b1
GAMS trandispr=b1

 

Here we changed the restart file names to show they can be whatever desired and to avoid file confusion.