|
AMPL has a publicly documented interface that you can use to make your
own link to any solver you are developing. The interface works
through files; AMPL writes a ".nl" problem file to be read by
your solver, and your solver writes a ".sol" solution file to
be read back by AMPL. The file format has equivalent binary and ASCII
versions. It offers the flexibility needed to support a wide variety
of solvers, yet is designed to afford very efficient reading and
writing.
The AMPL interface is described and illustrated in Hooking Your Solver to AMPL, a
guide that you can view or download in html,
PDF or gzipped-postscript form. (Paper copies are also available by
request to info@ampl.com.) You can also download standard
interface routines (in the C programming language) for reading and
writing the AMPL file formats, along with a variety of examples:
- All sample
files cited in the "Hooking" report, and related sample input and
output files.
- Source code, makefiles and instructions for compiling AMPL/solver
links to MINOS, CPLEX, OSL and many other solvers.
- Source for nlc,
a program that converts AMPL ".nl" problem files to C or
Fortran 77.
Optional tar files containing the complete AMPL
interface source or complete source for particular solver drivers
may be obtained from the
netlib AMPL directory. Individual netlib files at the netlib site are gzip-compressed
to speed downloading (but may be harder to view directly with your web
browser).
See Solvers that Work with AMPL for a detailed
list of solvers that have already been hooked to AMPL.
Enhanced support for nonlinear solvers
Effective April 1997, the AMPL interface to nonlinear solvers has been
extended in two significant respects:
- Automatic recognition of partial separability. A nonlinear
function can be recognized as a sum of terms that each depend on only a
few variables (possibly after a linear change of variables).
- Computation of Hessians. Elements of the matrix of 2nd
derivatives can be computed in a range of forms. Partial separability
can be exploited to speed the computations.
New utilities also simplify linking with solvers of all kinds.
Compatibility is maintained, however. Drivers previously written to
use older versions of the interface routines will require only minor
changes to remain usable with the new versions.
All of these features are documented in the latest versions of "Hooking Your Solver to AMPL." An
overview and discussion of the implementation are also provided in two
related technical reports by David Gay:
Comments or questions?
Write to info@ampl.com
or use our comment form.
Return to the AMPL home page.
LAST MODIFIED 31 AUGUST 2008 BY dmg.
|