

[[Solvers]]
== Solver Notes ==

Coopr 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 Coopr 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.  Coopr
provides a general interface for any solver that employs that ASL.
That is, Coopr 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 Coopr.  Coopr can execute NL files
generated by AMPL or Coopr'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 is
written in C+\+, and it provides a stand-alone 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.

Coopr 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 Coopr.
Perhaps the simplest is to specify the CPLEX Python directory when
installing Coopr with the `coopr_install`.  For example, if the
CPLEX Python directory is `/usr/local/ilog/cplex/python`, then you
can install Coopr with this package installed as follows:
[[shell]]
----
coopr_install --add-package=/usr/local/ilog/cplex/python coopr
----


=== 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).

Although Gurobi Optimizer supports a Python environment, Coopr only
interfaces with the Gurobi command.   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:
