

[[Solvers]]
== Solver Notes ==

Pyomo includes interfaces to a variety of third-party solvers.
We do not attempt to document the installation of these
packages.  This chapter provides notes for how the user environment
needs to be configured so Pyomo can automatically detect and execute
these solvers.

=== ASL Solvers ===

The link:http://www.ampl.com/hooking.html[AMPL Solver Library] (ASL)
provides a general interface for reading an AMPL NL file.  Pyomo
provides a general interface for any solver that employs that ASL.
That is, Pyomo executes ASL solvers with the same command-line
syntax that is used by AMPL, and the SOL result files are read to
represent the solver results in Pyomo.  Pyomo can execute NL files
generated by AMPL or Pyomo's Pyomo modeling package.

See the link:http://www.ampl.com/solvers.html[AMPL web pages] for
a summary of the ASL solvers that are available.  Many of these
have commercial support, and there are a variety of mature open
source ASL solvers.


=== CBC ===

link:https://projects.coin-or.org/Cbc[CBC] is an open-source solver
for linear programs and mixed-integer linear programs.  CBC provides
a stand-alone binary executable.

See the link:https://projects.coin-or.org/Cbc[CBC wiki] for download
and installation instructions.  The directory containing the `cbc`
executable must be in the list of paths defined by the `PATH`
environment variable.


=== CPLEX ===

The
link:http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/[IBM
ILOG CPLEX Optimizer] includes commercial mathematical programming
solvers for linear programming, mixed integer programming, quadratic
programming, and quadratically constrained programming problems.

Pyomo has solver interfaces for the CPLEX command as well as the
CPLEX Python environment.  To use the CPLEX command, the directory
containing the `cplex` executable must be in the list of paths
defined by the PATH environment variable. There are a variety of
ways that the CPLEX Python environment can be used with Pyomo.
Perhaps the simplest is to install the CPLEX Python package.

For example, if the
CPLEX Python directory is `/usr/local/ilog/cplex/python`, then you
can install Pyomo with this package installed as follows:
[[shell]]
----
pyomo_install --venv=pyomo
cd /usr/local/ilog/cplex/python
pyomo_python setup.py develop
----
The last step installs CPLEX's Python package within Pyomo's virtual
environment in developer mode.

=== GLPK ===

The GLPK (GNU Linear Programming Kit) package is intended for solving
large-scale linear programming (LP), mixed integer programming
(MIP), and other related problems. It is a set of routines written
in ANSI C and organized in the form of a callable library.

See the link:http://www.gnu.org/software/glpk/[GLPK website] for
download and installation instructions.  The directory containing
the `glpsol` executable must be in the list of paths defined by the
PATH environment variable.


=== GUROBI ===

The link:http://www.gurobi.com/[Gurobi Optimizer] is a commercial
solver for linear programming (LP), quadratic programming (QP) and
mixed-integer programming (MILP and MIQP).

To use Gurobi with Pyomo, the directory containing the
`gurobi.sh` (Linux) or `gurobi.bat` (MS Windows) executable must
be in the list of paths defined by the PATH environment variable.


=== PICO ===

PICO is a solver for linear programming and mixed-integer linear
programming problems that can perform parallel optimization on
distributed memory machines.

PICO is a component of link:https://software.sandia.gov/trac/acro[Acro],
an open-source software project that integrates a variety of
optimization software packages, including both libraries developed
at Sandia National Laboratories as well as publicly available
third-party libraries.  Acro's
link:https://software.sandia.gov/trac/acro/wiki/GettingStarted[Getting
Started] wiki pages provides instructions for downloading and
installing Acro projects that include PICO.  The directory containing
the `PICO` executable must be in the list of paths defined by the
PATH environment variable;  typically this will be the `acro/bin`
directory.


// vim: set syntax=asciidoc:
