AMPL explained

AMPL
Designers:Robert Fourer
David Gay
Brian Kernighan
Bell Labs
Paradigm:Multi-paradigm

declarative, imperative

Developer:AMPL Optimization, Inc.
Latest Release Version:20230430
Influenced By:AWK, C
Influenced:Pyomo
Operating System:Cross-platform

Linux, macOS, Solaris, AIX, Windows

License:Proprietary (translator),
free and open-source (AMPL Solver Library)
Genre:Algebraic modeling language (AML)
File Ext:.mod, .dat, .run

AMPL (A Mathematical Programming Language) is an algebraic modeling language to describe and solve high-complexity problems for large-scale mathematical computing (e.g. 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, MOSEK, 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.

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

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:

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

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

Availability

AMPL is available for many popular 32 & 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.

YearHighlights
1985AMPL was designed and implemented
1990Paper describing the AMPL modeling language was published in Management Science[9]
1991AMPL supports nonlinear programming and automatic differentiation
1993Robert 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
1995Extensions for representing piecewise-linear and network structures
1995Scripting constructs
1997Enhanced support for nonlinear solvers
1998AMPL supports complementarity theory problems
2000Relational database and spreadsheet access
2002Support for constraint programming
2003AMPL 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.
2005AMPL Modeling Language Google group opened[11]
2008Kestrel: An AMPL Interface to the NEOS Server introduced
2012Robert 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]
2012AMPL book becomes freely available online[13]
2013A 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;

# Demand at market m in cases param Demand;

# Distance in thousands of miles param Distance;

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

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

# Shipment quantities in cases var shipment >= 0;

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

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

# Satisfy demand at market m s.t. demand: sum 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]

width=20%Solverwidth=80%Supported problem types
APOPTmixed integer nonlinear programming
Artelys Knitrolinear, quadratic and nonlinear programming
Bonminmixed integer nonlinear programming
BPMPDlinear and quadratic programming
COIN-OR CBCmixed integer programming
COIN-OR CLPlinear programming
CONOPTnonlinear programming
Couenne[17] mixed integer nonlinear programming (MINLP)
CPLEXlinear, quadratic, second-order cone and mixed integer programming
CPLEX CP Optimizer[18] constraint programming
FILTERnonlinear programming
FortMPlinear, quadratic and mixed integer programming
Gecode[19] constraint programming
IPOPTnonlinear programming
JaCoP[20] constraint programming
LGO[21] global and local nonlinear optimization
lp_solve[22] linear and mixed integer programming
MINOSlinear and nonlinear programming
MINTOmixed integer programming
MOSEKlinear, mixed integer linear, quadratic, mixed integer quadratic, quadratically constrained, conic and convex nonlinear programming
Octeract EngineAll types of optimisation problems without differential or integral terms, including discontinuous problems with and elementary functions.
SCIPmixed integer programming
SNOPTnonlinear programming
Sulum[23] linear and mixed integer programming
WORHPnonlinear programming
XAlinear and mixed integer programming
Xpresslinear and convex quadratic optimization and their mixed integer counterparts

See also

External links

Notes and References

  1. Book: Fourer . Robert . Gay . David M . Kernighan . Brian W . Robert Fourer . Brian Kernighan . AMPL: a modeling language for mathematical programming . 2003 . Duxbury Press/Brooks/Cole Publishing Company . USA . 978-0-534-38809-6.
  2. Web site: Position Available . 2011-07-29 . 11 September 2011 . https://web.archive.org/web/20110911191129/http://www.ampl.com/OPENINGS/2011July.html#Product . dead .
  3. Web site: About. 11 August 2015.
  4. Robert Fourer . Extending an Algebraic Modeling Language to Support Constraint Programming . INFORMS Journal on Computing . 14 . 4 . 322–344 . 2002 . 10.1287/ijoc.14.4.322.2825. Fourer . Robert . Gay . David M. . 10.1.1.8.9699 .
  5. Web site: Platforms. AMPL Optimizations Inc.. 1 November 2019. 14 May 2022. https://web.archive.org/web/20220514181833/https://ampl.com/products/platforms/. dead.
  6. Web site: NEOS Server for Optimization. 11 August 2015.
  7. Web site: Try AMPL!. 11 August 2015.
  8. Web site: AMPL Downloads. 11 August 2015. https://web.archive.org/web/20150526013237/http://www.ampl.com/DOWNLOADS/index.html. 26 May 2015. dead.
  9. Robert Fourer . Brian W. Kernighan . A Modeling Language for Mathematical Programming . Management Science . 36 . 5 . 519–554–83 . 1990 . 10.1287/mnsc.36.5.519. Fourer . Robert . Gay . David M. . Kernighan . Brian W. .
  10. Web site: ICS - INFORMS. INFORMS. 11 August 2015. 7 October 2006. https://web.archive.org/web/20061007164141/http://computing.society.informs.org/pdf/GreenbergHistory.pdf. dead.
  11. Web site: Google Groups.
  12. Web site: INFORMS Impact Prize. INFORMS. 11 August 2015. https://web.archive.org/web/20131022091250/https://www.informs.org/Blogs/E-News-Blog/INFORMS-Impact-Prize. 22 October 2013. dead.
  13. Web site: The AMPL Book: A comprehensive guide to building optimization models, for beginning or experienced users. 5 March 2021.
  14. Web site: Google Groups. 11 August 2015.
  15. Book: Dantzig, George . George Dantzig . 3. Formulating a Linear Programming Model . Linear Programming and Extensions . https://books.google.com/books?id=hUWPDAAAQBAJ&pg=PA32 . 2016 . 1963 . Princeton University Press . 978-1-4008-8417-9 . 32–62.
  16. Web site: Solvers - AMPL. 21 January 2018. 27 February 2014. https://web.archive.org/web/20140227083015/http://www.ampl.com/solvers.html. dead.
  17. Web site: Couenne . 2013-10-27 . dead . https://web.archive.org/web/20131029190415/https://projects.coin-or.org/Couenne . 2013-10-29 .
  18. Web site: mp/solvers/ilogcp at master · ampl/mp · GitHub. GitHub. 11 August 2015.
  19. Web site: mp/solvers/gecode at master · ampl/mp · GitHub. GitHub. 11 August 2015.
  20. Web site: mp/solvers/jacop at master · ampl/mp · GitHub. GitHub. 11 August 2015.
  21. Web site: LGO - AMPL. 11 August 2015.
  22. Web site: Using lpsolve from AMPL. 11 August 2015.
  23. Web site: mp/solvers/sulum at master · ampl/mp · GitHub. GitHub. 11 August 2015.
  24. Web site: GLPK official site. 17 September 2020.