GAMSDirect

(class from pyomo.solvers.plugins.solvers.GAMS)

class pyomo.solvers.plugins.solvers.GAMS.GAMSDirect(**kwds)[source]

Bases: _GAMSSolver

A generic python interface to GAMS solvers.

Visit Python API page on gams.com for installation help.

__init__(**kwds)

Methods

__init__(**kwds)

available([exception_flag])

True if the solver is available.

default_variable_value()

license_is_valid()

set_options(istr)

solve(*args, **kwds)

Solve a model via the GAMS Python API.

version()

Returns a 4-tuple describing the solver executable version.

warm_start_capable()

True is the solver can accept a warm-start solution.

Member Documentation

available(exception_flag=True)[source]

True if the solver is available.

solve(*args, **kwds)[source]

Solve a model via the GAMS Python API.

Keyword Arguments:
  • tee=False (bool) – Output GAMS log to stdout.

  • logfile=None (str) – Filename to output GAMS log to a file.

  • load_solutions=True (bool) – Load solution into model. If False, the results object will contain the solution data.

  • keepfiles=False (bool) – Keep temporary files. Equivalent of DebugLevel.KeepFiles. Summary of temp files can be found in _gams_py_gjo0.pf

  • tmpdir=None (str) – Specify directory path for storing temporary files. A directory will be created if one of this name doesn’t exist. By default uses the system default temporary path.

  • report_timing=False (bool) – Print timing reports for presolve, solver, postsolve, etc.

  • io_options (dict) – Options that get passed to the writer. See writer in pyomo.repn.plugins.gams_writer for details. Updated with any other keywords passed to solve method.

version()

Returns a 4-tuple describing the solver executable version.

warm_start_capable()

True is the solver can accept a warm-start solution.