GAMS: Modeling and Optimization Software

The General Algebraic Modeling System (GAMS release 2.25) is a software system designed for modeling linear, nonlinear and mixed integer optimization problems. The system, available on Strauss and Mahler, is especially useful for large complex models. GAMS allows you to model problems in a highly compact and natural way. After formulating the model, you can easily invoke several solvers to determine the solution to the problem. GAMS also provides an easy-to-use report writer to display the results of the solver in a useful format. At the University of Delaware, you can use any of three solvers:

  • BDMLP: a built-in linear programming solver
     
  • MINOS: the widely-used Modular In-core Nonlinear Optimization System

  • ZOOM: an integrated Zero-One Optimization Method and XMP implementation for solving mixed-integer problems.

How to Run GAMS

  1. Construct a GAMS model by typing the GAMS commands into a file having the filename extension ".gms". For example, a transportation model might be stored in a file named transport.gms. The library of online sample models is described in a subsequent section.
  2. To run GAMS on this model, type:

    gams filename

    where "filename" is replaced by the name of the file without the .gms extension. For the transport.gms example, type:

    gams transport

  3. The output file will have the extension ".lst". For the transport.gms example, the output file is named transport.lst.

    (The "gams" command is stored in the directory /opt/bin.)

The GAMS Sample Model Library

The GAMS documentation describes approximately 100 models that serve as examples of simple and complex linear, nonlinear, and mixed integer formulations. These are stored online and can be copied and modified if you know either the name or the reference number of the model. For example, there is a blending problem known by the name "blend" and the reference number 47, in the GAMS printed documentation. To copy this model to your current working directory, type either of the following:

gamslib blend

or

gamslib 47

(The "gamslib" command is stored in the directory "/opt/bin".)

Additional Documentation

  1. The online documentation is in the directory /opt/lib/gams/doc.

    • gamsinfo is a general introduction to the package.
       
    • gams.doc is a complete description of the commands and optional keywords that can be used on the command line or in the command file.
       
    • gamsparm.doc is a list of GAMS parameters that can be used on the GAMS command line or included in the GAMSPARM.TXT file to customize the default values for GAMS.
       
  2. To obtain online help, type:

    gams -h
     
  3. Before using the "man gams" command to view the man pages, you must first add the following command to your .localenv file.

    setenv MANPATH ${MANPATH}:/opt/lib/gams/doc/man

    The .localenv file is a special configuration file (dotfile) like .cshrc and .login that is stored in your home directory.
     
  4. The manual for the package is "GAMS: A User's Guide", by A. Brooke and A. Meeraus. It is available from the University Bookstore and the Client Support & Services Reference Library (in the RDMS Lab, Smith Hall).