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
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:
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 & 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]
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.
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.
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]
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]
setPlants;setMarkets;# Capacity of plant p in casesparamCapacity{pinPlants};# Demand at market m in casesparamDemand{minMarkets};# Distance in thousands of milesparamDistance{Plants,Markets};# Freight in dollars per case per thousand milesparamFreight;# Transport cost in thousands of dollars per caseparamTransportCost{pinPlants,minMarkets}:=Freight*Distance[p,m]/1000;# Shipment quantities in casesvarshipment{Plants,Markets}>=0;# Total transportation costs in thousands of dollarsminimizecost:sum{pinPlants,minMarkets}TransportCost[p,m]*shipment[p,m];# Observe supply limit at plant ps.t.supply{pinPlants}:sum{minMarkets}shipment[p,m]<=Capacity[p];# Satisfy demand at market ms.t.demand{minMarkets}:sum{pinPlants}shipment[p,m]>=Demand[m];data;setPlants:=seattlesan-diego;setMarkets:=new-yorkchicagotopeka;paramCapacity:=seattle350san-diego600;paramDemand:=new-york325chicago300topeka275;paramDistance:new-yorkchicagotopeka:=seattle2.51.71.8san-diego2.51.81.4;paramFreight:=90;
Solvers
Here is a partial list of solvers supported by AMPL:[16]