AMPL
   HOME

TheInfoList



OR:

AMPL (A Mathematical Programming Language) is an
algebraic modeling language Algebraic modeling languages (AML) are high-level computer programming languages for describing and solving high complexity problems for large scale mathematical computation (i.e. large scale optimization type problems). One particular advantage of ...
to describe and solve high-complexity problems for large-scale mathematical computing (e.g. large-scale optimization and scheduling-type problems). It was developed by
Robert Fourer Robert Fourer (born September 2, 1950) is a scientist working in the area of operations research and management science. He is currently President of AMPL Optimization, Inc and is Professor Emeritus of Industrial Engineering and Management Science ...
, David Gay, and
Brian Kernighan Brian Wilson Kernighan (; born January 30, 1942) is a Canadian computer scientist. He worked at Bell Labs and contributed to the development of Unix alongside Unix creators Ken Thompson and Dennis Ritchie. Kernighan's name became widely known ...
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. One advantage of AMPL is the similarity of its syntax to the mathematical notation of
optimization Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criteria, from some set of available alternatives. It is generally divided into two subfiel ...
problems. This allows for a very concise and readable definition of problems in the domain of
optimization Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criteria, from some set of available alternatives. It is generally divided into two subfiel ...
. 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 Solver, optimization solvers. Its library of solvers includes more than 60 commercial, free and open source solvers, which can be applied to mat ...
(formerly hosted at the
Argonne National Laboratory Argonne National Laboratory is a Federally funded research and development centers, federally funded research and development center in Lemont, Illinois, Lemont, Illinois, United States. Founded in 1946, the laboratory is owned by the United Sta ...
, 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,
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
s,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
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 and objective are represented by linear function#As a polynomia ...
* 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 & 64-bit
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s including
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
,
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
, 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 Microsoft Excel is a spreadsheet editor developed by Microsoft for Microsoft Windows, Windows, macOS, Android (operating system), Android, iOS and iPadOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a ...
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 Northwestern University (NU) is a Private university, private research university in Evanston, Illinois, United States. Established in 1851 to serve the historic Northwest Territory, it is the oldest University charter, chartered university in ...
{{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