Key AMPL Features

Modeling language

Modeling environment

The AMPL book

Solvers that work with AMPL

AMPL is a comprehensive and powerful algebraic modeling language for linear and nonlinear optimization problems, in discrete or continuous variables.

Developed at Bell Laboratories, AMPL lets you use common notation and familiar concepts to formulate optimization models and examine solutions, while the computer manages communication with an appropriate solver.

AMPL's flexibility and convenience render it ideal for rapid prototyping and model development, while its speed and control options make it an especially efficient choice for repeated production runs.

Key modeling language features

  • Broad support for sets and set operators. AMPL models can use sets of pairs, triples, and longer tuples; collections of sets indexed over sets; unordered, ordered, and circular sets of objects; and sets of numbers.

  • General and natural syntax for arithmetic, logical, and conditional expressions; familiar conventions for summations and other iterated operators.

  • Nonlinear programming features such as initial primal and dual values, user-defined functions, fast automatic differentiation, and automatic elimination of "defined" variables.

  • Convenient alternative notations including node and arc declarations for network problems, a special syntax for piecewise-linear functions, and columnwise specification of linear coefficients.

Key modeling environment features

  • Interactive command environment with batch processing options. Powerful display commands let you view any model component or expression, browsing on-screen or writing to a file, using automatic formatting or your own preferences.

  • Looping and if-then-else commands. Executable scripts in the AMPL command language can be written to solve sequences of related problems, for sensitivity analysis, decomposition and other iterative schemes.

  • Separation of model and data. AMPL models remain concise even as sets and data tables grow. Models may incorporate many kinds of conditions for validity of the data.

The AMPL book

AMPL: A Modeling Language for Mathematical Programming, by Robert Fourer, David M. Gay and Brian W. Kernighan, is a comprehensive guide to the AMPL modeling language suitable for users at any level. A tutorial on formulations in linear programming is followed by chapters covering network, nonlinear, and integer programming in AMPL — all with extensive examples.

All chapters of the AMPL book are available for download from our site. Additionally it is possible to obtain bound copies from Amazon.com and other online booksellers.

Solvers that work with AMPL

AMPL's open interface makes possible a wide variety of solver connections. The following high-quality professional solvers are available directly from us:

  • For linear and convex quadratic programming:

    • Continuous: CPLEX, Gurobi, MINOS, Xpress
    • Integer: CPLEX, Gurobi, Xpress

  • For nonlinear programming:

    • Continuous: CONOPT, KNITRO, MINOS, SNOPT
    • Integer: KNITRO

Many other AMPL-enabled solvers are available directly from their developers. See the
AMPL solver page for contact information and web links regarding all available solvers.

If you are involved in algorithm development, consider also hooking your own solver to AMPL.

Comments or questions?
Write to info@ampl.com or use our comment form.

Return to the AMPL home page.