Most of the codes provided by our group is written in GAMS algebraic modeling language (AML). The file has an extension of filename.gms. To run these codes, please perform the following:

  1. Download and install the General Algebraic Modeling System (GAMS) software from https://www.gams.com. Note that the free demo version has a limit of 300 constraints and variables, 2000 non-zero elements and 50 discrete variables.

  2. Create a new project in the directory containing the GAMS files and all the input file: File -> Project -> New project

  3. Run the code by using File -> Run or F9.

For more information about GAMS, please refer to their documentation.


Information for the Pennsylvania State University student

The Institute for CyberScience (ICS) Advanced CyberInfrastructure (ACI) central facility provides the full version of GAMS in the Lion-X system and Hammer. Please request an account with them at the ICS-ACI website.

  1. Access the cluster (e.g. hammer) remotely by using an SSH client (e.g. PuTTY) or alternately you may use the command-line interface (e.g. Terminal in Mac/Ubuntu or Cygwin in Windows): ssh username@hammer.rcc.psu.edu

  2. First check if the GAMS software is available by module avail gams. Then, load the GAMS software by using module load gams.

  3. To run any file with the .gms extension interactively, type gams filename.gms.

  4. To run the file in batch mode, you may submit a job to a PBS queue. First create a pbs script (e.g. myjob.pbs), then submit it to the queue using qsub myjob.pbs.

    
    # Example pbs script: myjob.pbs
    #------------------------------------
    #   Request 1 processors on 1 node
    #------------------------------------
    #PBS -l nodes=1:ppn=1
    
    #------------------------------------
    #   Request 6 hours of walltime
    #------------------------------------
    #PBS -l walltime=6:00:00
    
    #------------------------------------
    #   Request 1 gigabyte of memory per process
    #------------------------------------
    #PBS -l pmem=1gb
    
    #------------------------------------
    #   Request that regular output and terminal output go to the same file
    #------------------------------------
    #PBS -j oe
    
    #------------------------------------
    #  Receive email regarding the status of your job.
    #  "n" : no mail
    #  or
    #  "a" : send mail when job is aborted
    #  "b" : send mail when job begins
    #  "e" : send mail when job terminates
    #  The default is "a" if not specified.
    #  Specify the email address to which the
    #  message should be send via the -M option.
    #------------------------------------
    #PBS -m abe
    #PBS -M username@domain.com
    
    
    # change directory to the path of the file
    cd $HOME/work/path/to/file
    
    # load GAMS software
    module load gams
    
    # run GAMS suppressing the output
    gams filename.gms o /dev/null
                    

Back to Software