Formatting models - my recommendations

Top  Previous  Next

Users have many options on how they could present a GAMS model.  Over more than 15 years of GAMS experience including the relative frequently event where I need to work with models that others have constructed I have arrived at a number of practices I try to follow.

In general I feel that it is in a modelers hands as to how much self-documentation a piece of GAMS code contains.  I do feel there are purposeful actions that can improve documentation and will explain a number of practices that could be followed here. The extent to which such practices are followed often determines how easy it is to reuse or repair a model at a later time or how easily a colleague (or in my case a consultant) can work with that code.

The main categories of actions that are possible are

Use longer names and descriptions
Include comments on procedures and nature and sources of data
Include as much raw data as possible as opposed to externally calculated data
Don't use an * as a set specification for input data
Use sets to aid in readability
Format files to improve model readability
Use some other possible conventions

Below I cover each of these.