GAMS/PYOMO allows users to solve GAMS models using solvers within the PYOMO modeling system. The GAMS/PYOMO link comes free with any GAMS system. Users must have a licensed PYOMO system installed and have the PYOMO executable in their path.

To run GAMS/PYOMO, just specify the solver as pyomo. For example, if we wish to solve the trnsport.gms model, we would run

>> gams trnsport.gms lp=pyomo

For other GAMS solvers, options can be passed on via solver option files. GAMS/PYOMO specific options are described in the section GAMS/PYOMO Options.

By default, GAMS/PYOMO tries to map the status from the Pyomo run into the GAMS solve- and model status.

GAMS external equations and extrinsic functions cannot be used with GAMS/PYOMO.


GAMS searches for an PYOMO executable using the following hierarchy:

  • Via the options PyomoPath and RunPyomo within a GAMS/PYOMO solver option file.
  • An pyomopath.txt file located in the GAMS system directory specifying the path of the PYOMO executable.
  • The system path.

For example, GAMS will first search for the PYOMO executable within the pyomo.opt file, if specified. If not found, it will search within the GAMS system directory for a file called pyomopath.txt specifying the PYOMO directory. If pyomopath.txt is still not found GAMS will try the system path.

If no PYOMO executable is found, the user will see a message similar to

PYOMO Link       24.5.1 r50798 Released Jun 23, 2015 VS8 x86 32bit/MS Windows

--- Using Pyomo solver bonmin
--- No PyomoPath option or "pyomopath.txt" file found
--- System PATH will be used

There may also be an output indicating that PYOMO was not found, either because it was not installed or because it was not found in the system path.


General options

Option Description Default
NEOS Use Pyomo solver manager NEOS to submit jobs to NEOS 0
Option Verbatim Pyomo options
PyomoPath Path to Pyomo System files
RunPyomo Name of Pyomo executable
Solver Name of Pyomo solver bonmin
TolNone Tolerance to interpret status none 1e-12

Other options

Option Description Default
DotMod Pyomo input file name

The Option specifier is used to specify desired PYOMO options within the PYOMO modeling system. For example, if a user wishes to run PYOMO/CBC with the options threads=4 scaling=off then the user creates a file called pyomo.opt with the entry

option "thread=4 scaling=off";