HOME

TheInfoList



OR:

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). It was developed by Robert Fourer, David Gay, and Brian Kernighan at Bell Laboratories. AMPL supports dozens of solvers, both
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
and commercial software, including CBC, CPLEX, FortMP,
MINOS In Greek mythology, Minos (; grc-gre, Μίνως, ) was a King of Crete, son of Zeus and Europa. Every nine years, he made King Aegeus pick seven young boys and seven young girls to be sent to Daedalus's creation, the labyrinth, to be eaten ...
, 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. 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 The NEOS Server is an Internet-based client-server application that provides free access to a library of optimization solvers. Its library of solvers includes more than 60 commercial, free and open source solvers, which can be applied to mathemati ...
(formerly hosted at the
Argonne National Laboratory Argonne National Laboratory is a science and engineering research United States Department of Energy National Labs, national laboratory operated by University of Chicago, UChicago Argonne LLC for the United States Department of Energy. The facil ...
, currently hosted at the University of Wisconsin, Madison) 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: *
Linear programming Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear function#As a polynomial function, li ...
* 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 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. The translator is proprietary software maintained by AMPL Optimization LLC. However, several online services exist, providing free modeling and solving facilities using AMPL. A free student version with limited functionality and a free full-featured version for academic courses are also available. 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.


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. 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 , m/ 1000; # Shipment quantities in cases var shipment >= 0; # Total transportation costs in thousands of dollars minimize cost: sum TransportCost , m* shipment , m # Observe supply limit at plant p s.t. supply: sum shipment , m<= Capacity # Satisfy demand at market m s.t. demand: sum shipment , m>= Demand 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:


See also

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


References


External links

*
Prof. Fourer's home page
at Northwestern University {{DEFAULTSORT:Ampl 1990 software Computer algebra systems Mathematical modeling Mathematical optimization software Numerical programming languages Scripting languages Text-oriented programming languages Programming languages created in 1985 Proprietary cross-platform software