Self-documenting nature

Top  Previous  Next

One important GAMS feature its self-documenting nature.  Modelers can use long variable, equation and index names as well as comments, data definitions etc., allowing a readable and fairly well documented problem description.  Model structure, assumptions, and any calculation procedures used in the report writing are documented as a byproduct of the modeling exercise in a self-contained file.  Comment statements can be inserted by placing an asterisk in column one, followed by text identifying data sources or particular assumptions being used (i.e., in some of the my models, comments identify data source publication and page).  Under such circumstances GAMS allows either the original author or others to alter the model structure and update data.

Consider for example the following example.  Can you figure out what context the example is from?

 

 LABOR(Farm)..

          PLOWLAB(Farm) * PLOW(Farm)

         + SUM( crop, PLNTLAB(Farm,Crop) *PLANT(Farm,Crop)

        + HARVLAB(Farm,Crop) * HARVEST(Farm,Crop) )

         =L=  LABORAVAIL(Farm);