AMPL

Paradigm| Multi-paradigm: declarative, imperative
Designed by| Robert Fourer
David Gay
Brian Kernighan
Bell Labs
Developer| AMPL Optimization, Inc.
First appeared| 1985; 37 years ago (1985)
Stable release|

20220323 / 23 March 2022; 4 months ago (2022-03-23)

OS| Cross-platform: Linux, macOS, Solaris, AIX, Windows
License| Proprietary (translator),
free and open-source (AMPL Solver Library)
Filename extensions| .mod, .dat, .run
Website| www.ampl.com
Influenced by
AWK, C
Influenced
Pyomo

AMPL (A Mathematical Programming Language) is an algebraic modeling language to describe and solve high-complexity problems for large-scale mathematical computing (i.e., large-scale optimization and scheduling-type problems).[1] It was developed by Robert Fourer, David Gay, and Brian Kernighan at Bell Laboratories. AMPL supports dozens of solvers, both open source and commercial software, including CBC, CPLEX, FortMP, MINOS, IPOPT, SNOPT, KNITRO, and LGO. Problems are passed to solvers as nl files. AMPL is used by more than 100 corporate clients, and by government agencies and academic institutions.[2]

One advantage of AMPL is the similarity of its syntax to the mathematical notation of optimization problems. This allows for a very concise and readable definition of problems in the domain of optimization. Many modern solvers available on the NEOS Server (formerly hosted at the Argonne National Laboratory, currently hosted at the University of Wisconsin, Madison[3]) accept AMPL input. According to the NEOS statistics AMPL is the most popular format for representing mathematical programming problems.

## Contents

* 1 Features
* 2 Availability
* 3 Status history
* 4 A sample model
* 5 Solvers
* 6 See also
* 7 References
* 8 External links

## Features

AMPL features a mix of declarative and imperative programming styles. Formulating optimization models occurs via declarative language elements such as sets, scalar and multidimensional parameters, decision variables, objectives and constraints, which allow for concise description of most problems in the domain of mathematical optimization.

Procedures and control flow statements are available in AMPL for

* the exchange of data with external data sources such as spreadsheets, databases, XML and text files
* data pre- and post-processing tasks around optimization models
* the construction of hybrid algorithms for problem types for which no direct efficient solvers are available.

To support re-use and simplify construction of large-scale optimization problems, AMPL allows separation of model and data.

AMPL supports a wide range of problem types, among them:

* Linear programming
* Quadratic programming
* Nonlinear programming
* Mixed-integer programming
* Mixed-integer quadratic programming with or without convex quadratic constraints
* Mixed-integer nonlinear programming
* Second-order cone programming
* Global optimization
* Semidefinite programming problems with bilinear matrix inequalities
* Complementarity theory problems (MPECs) in discrete or continuous variables
* Constraint programming[4]

AMPL invokes a solver in a separate process which has these advantages:

* User can interrupt the solution process at any time
* Solver errors do not affect the interpreter
* 32-bit version of AMPL can be used with a 64-bit solver and vice versa

Interaction with the solver is done through a well-defined nl interface.

## Availability

AMPL is available for many popular 32- and 64-bit operating systems including Linux, macOS, Solaris, AIX, and Windows.[5] The translator is proprietary software maintained by AMPL Optimization LLC. However, several online services exist, providing free modeling and solving facilities using AMPL.[6][7] A free student version with limited functionality and a free full-featured version for academic courses are also available.[8]

AMPL can be used from within Microsoft Excel via the SolverStudio Excel add-in.

The AMPL Solver Library (ASL), which allows reading nl files and provides the automatic differentiation, is open-source. It is used in many solvers to implement AMPL connection.

## Status history

This table present significant steps in AMPL history.

Year  | Highlights

|

1985  | AMPL was designed and implemented[1]
1990  | Paper describing the AMPL modeling language was published in Management Science[9]
1991  | AMPL supports nonlinear programming and automatic differentiation
1993  | Robert Fourer, David Gay and Brian Kernighan were awarded ORSA/CSTS Prize[10] by the Operations Research Society of America, for writings on the design of mathematical programming systems and the AMPL modeling language
1995  | Extensions for representing piecewise-linear and network structures
1995  | Scripting constructs
1997  | Enhanced support for nonlinear solvers
1998  | AMPL supports complementarity theory problems
2000  | Relational database and spreadsheet access
2002  | Support for constraint programming[4]
2003  | AMPL Optimization LLC was founded by the inventors of AMPL, Robert Fourer, David Gay, and Brian Kernighan. The new company took over the development and support of the AMPL modeling language from Lucent Technologies, Inc.
2005  | AMPL Modeling Language Google group opened[11]
2008  | Kestrel: An AMPL Interface to the NEOS Server introduced
2012  | Robert Fourer, David Gay, and Brian Kernighan were awarded the 2012 INFORMS Impact Prize as the originators of one of the most important algebraic modeling languages.[12]
2012  | AMPL book becomes freely available online[13]
2013  | A new cross-platform integrated development environment (IDE) for AMPL becomes available[14]

## A sample model

A transportation problem from George Dantzig is used to provide a sample AMPL model. This problem finds the least cost shipping schedule that meets requirements at markets and supplies at factories.[15]

set Plants;
set Markets;

# Capacity of plant p in cases
param Capacity{p in Plants};

# Demand at market m in cases
param Demand{m in Markets};

# Distance in thousands of miles
param Distance{Plants, Markets};

# Freight in dollars per case per thousand miles
param Freight;

# Transport cost in thousands of dollars per case
param TransportCost{p in Plants, m in Markets} :=
Freight * Distance[p, m] / 1000;

# Shipment quantities in cases
var shipment{Plants, Markets} >= 0;

# Total transportation costs in thousands of dollars
minimize cost:
sum{p in Plants, m in Markets} TransportCost[p, m] * shipment[p, m];

# Observe supply limit at plant p
s.t. supply{p in Plants}: sum{m in Markets} shipment[p, m] <= Capacity[p];

# Satisfy demand at market m
s.t. demand{m in Markets}: sum{p in Plants} shipment[p, m] >= Demand[m];

data;

set Plants := seattle san-diego;
set Markets := new-york chicago topeka;

param Capacity :=
seattle   350
san-diego 600;

param Demand :=
new-york 325
chicago  300
topeka   275;

param Distance : new-york chicago topeka :=
seattle        2.5      1.7     1.8
san-diego      2.5      1.8     1.4;

param Freight := 90;

## Solvers

Here is a partial list of solvers supported by AMPL:[16]

Solver  | Supported problem types

|

APOPT | mixed integer nonlinear programming
Artelys Knitro | linear, quadratic and nonlinear programming
Bonmin  | mixed integer nonlinear programming
BPMPD  | linear and quadratic programming
COIN-OR CBC  | mixed integer programming
COIN-OR CLP | linear programming
CONOPT  | nonlinear programming
Couenne[17] | mixed integer nonlinear programming (MINLP)
CPLEX | linear, quadratic, second-order cone and mixed integer programming
CPLEX CP Optimizer[18] | constraint programming
FILTER  | nonlinear programming
FortMP | linear, quadratic and mixed integer programming
Gecode[19] | constraint programming
IPOPT | nonlinear programming
JaCoP[20] | constraint programming
LGO[21] | global and local nonlinear optimization
lp_solve[22] | linear and mixed integer programming
MINOS | linear and nonlinear programming
MINTO | mixed integer programming
MOSEK | linear, mixed integer linear, quadratic, mixed integer quadratic, quadratically constrained, conic and convex nonlinear programming
Octeract Engine | All types of optimisation problems without differential or integral terms, including discontinuous problems with min and max elementary functions.
SCIP | mixed integer programming
SNOPT | nonlinear programming
Sulum[23] | linear and mixed integer programming
WORHP | nonlinear programming
XA  | linear and mixed integer programming
Xpress | linear and convex quadratic optimization and their mixed integer counterparts

## See also

* sol (format)
* GNU MathProg (previously known as GMPL) is a subset of AMPL supported by the GNU Linear Programming Kit[24]

## References

1. ↑ 1.0 1.1 Fourer, Robert; Gay, David M; Kernighan, Brian W (2003). AMPL: a modeling language for mathematical programming. USA: Duxbury Press/Brooks/Cole Publishing Company. ISBN 978-0-534-38809-6.
2. ↑ "Position Available". http://www.ampl.com/OPENINGS/2011July.html#Product.
3. ↑ "About". http://neos-guide.org/About/.
4. ↑ 4.0 4.1 Fourer, Robert; Gay, David M. (2002). "Extending an Algebraic Modeling Language to Support Constraint Programming". INFORMS Journal on Computing 14 (4): 322–344. doi:10.1287/ijoc.14.4.322.2825. http://joc.journal.informs.org/content/14/4/322.
5. ↑ "Platforms". https://ampl.com/products/platforms/.
6. ↑ "NEOS Server for Optimization". http://www.neos-server.org/neos/.
7. ↑ "Try AMPL!". http://www.ampl.com/TRYAMPL/.
8. ↑ "AMPL Downloads". http://www.ampl.com/DOWNLOADS/index.html.
9. ↑ Fourer, Robert; Gay, David M.; Kernighan, Brian W. (1990). "A Modeling Language for Mathematical Programming". Management Science 36 (5): 519–554–83. doi:10.1287/mnsc.36.5.519. http://www.ampl.com/REFS/amplmod.pdf.
10. ↑ INFORMS. "ICS - INFORMS". http://computing.society.informs.org/pdf/GreenbergHistory.pdf.
11. ↑ "Google Groups". https://groups.google.com/group/ampl.
12. ↑ INFORMS. "INFORMS Impact Prize". http://www.informs.org/Blogs/E-News-Blog/INFORMS-Impact-Prize.
13. ↑ "Freely downloadable - AMPL: A Modeling Language for Mathematical Programming". https://ampl.com/resources/the-ampl-book/.
14. ↑ "Google Groups". https://groups.google.com/forum/#!topic/ampl/y1FJcYZz-_Q.
15. ↑ Dantzig, George (2016). "3. Formulating a Linear Programming Model". Linear Programming and Extensions. Princeton University Press. pp. 32–62. ISBN 978-1-4008-8417-9. https://books.google.com/books?id=hUWPDAAAQBAJ&pg=PA32.
16. ↑ "Solvers - AMPL". http://www.ampl.com/solvers.html.
17. ↑ "Couenne". https://projects.coin-or.org/Couenne.
18. ↑ "mp/solvers/ilogcp at master · ampl/mp · GitHub". GitHub. https://github.com/ampl/mp/tree/master/solvers/ilogcp.
19. ↑ "mp/solvers/gecode at master · ampl/mp · GitHub". GitHub. https://github.com/ampl/mp/tree/master/solvers/gecode.
20. ↑ "mp/solvers/jacop at master · ampl/mp · GitHub". GitHub. https://github.com/ampl/mp/tree/master/solvers/jacop.
21. ↑ "LGO - AMPL". http://ampl.com/products/solvers/solvers-we-sell/lgo/.
22. ↑ "Using lpsolve from AMPL". http://www.ampl.com/SOLVERS/GUIDE.lpsolve.html.
23. ↑ "mp/solvers/sulum at master · ampl/mp · GitHub". GitHub. https://github.com/ampl/mp/tree/master/solvers/sulum.
24. ↑ "GLPK official site". https://www.gnu.org/software/glpk/.

## External links

* Prof. Fourer's home page at Northwestern University

* v
* t
* e

Mathematical optimization software

Data formats|

* Mathematica
* MPS
* nl
* sol

Modeling tools|

* AIMMS
* AMPL
* APMonitor
* ECLiPSe-CLP
* GEKKO
* GAMS
* GNU MathProg
* JuMP
* LINDO
* OPL
* Mathematica
* OptimJ
* PuLP
* Pyomo
* TOMLAB
* Xpress-Mosel
* ZIMPL

LP, MILP∗ solvers|

* APOPT∗
* Artelys Knitro∗
* BCP∗
* CLP
* CBC∗
* CPLEX∗
* FortMP∗
* GCG∗
* GLPK/GLPSOL∗
* Gurobi∗
* LINDO∗
* Lp_solve
* LOQO
* Mathematica
* MINOS
* MINTO∗
* MOSEK∗
* SCIP∗
* SoPlex
* SYMPHONY∗
* Xpress-Optimizer∗

QP, MIQP∗ solvers|

* APOPT∗
* Artelys Knitro∗
* CBC∗
* CLP
* CPLEX∗
* FortMP∗
* Gurobi∗
* IPOPT
* LINDO∗
* Mathematica
* MINOS
* MOSEK∗
* SCIP∗
* Xpress-Optimizer∗

QCP, MIQCP∗ solvers|

* APOPT∗
* Artelys Knitro∗
* CPLEX∗
* Gurobi∗
* IPOPT
* LINDO∗
* Mathematica
* MINOS
* MOSEK∗
* SCIP∗
* Xpress-Optimizer∗
* Xpress-SLP∗

SOCP, MISOCP∗ solvers|

* Artelys Knitro∗
* CPLEX∗
* Gurobi∗
* LINDO∗
* LOQO
* Mathematica
* MOSEK∗
* SCIP∗
* Xpress-Optimizer∗

SDP, MISDP∗ solvers|

* Mathematica
* MOSEK

NLP, MINLP∗ solvers|

* AOA∗
* APOPT∗
* Artelys Knitro∗
* BARON∗
* Couenne∗
* Galahad library
* IPOPT
* LINDO∗
* LOQO
* MIDACO∗
* MINOS
* NLPQLP
* NPSOL
* SCIP∗
* SNOPT∗
* WORHP
* Xpress-SLP∗

GO solvers|

* BARON
* Couenne∗
* Mathematica
* LINDO
* SCIP

CP solvers|

* Comet
* CPLEX CP Optimizer
* Gecode
* Mathematica
* JaCoP

Metaheuristic solvers|

* OptaPlanner

* List of optimization software
* Comparison of optimization software

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/AMPL. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:AMPL&oldid=3251891"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template