Hellenica World

AMPL

AMPL, an acronym for "A Mathematical Programming Language", is an algebraic modeling language for describing and solving high-complexity problems for large-scale mathematical computation (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 does not solve problems directly; instead, it calls appropriate external solvers (such as CPLEX, FortMP, MINOS, IPOPT, SNOPT, KNITRO, and so on) to obtain solutions. Problems are passed to solvers as nl files.

One particular 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 [2] server hosted at the Argonne National Laboratory accept AMPL input. According to the NEOS statistics AMPL is the most popular format for representing mathematical programming problems.


Availability

AMPL is available for many popular 32- and 64-bit platforms including Linux, Mac OS X and Windows. It is a proprietary software currently maintained by AMPL Optimization LLC. However there exist several online services [2] [3] providing free modeling and solving facilities using AMPL. Also a free student version with limited functionality is available [4].

Optimization problems supported

AMPL handles 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
* Global optimization
* Semidefinite programming problems with bilinear matrix inequalities
* Complementarity problems (MPECs) in discrete or continuous variables


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.

Dantzig, G B, Chapter 3.3. In Linear Programming and Extensions. Princeton University Press, Princeton, New Jersey, 1963.

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;


References

1. ^ Fourer, Robert; David M. Gay, Brian W. Kernighan (2002). AMPL: A Modeling Language for Mathematical Programming. Duxbury Press. ISBN 978-0534388096.
2. ^ a b http://www-neos.mcs.anl.gov/neos/
3. ^ http://www.ampl.com/TRYAMPL/
4. ^ http://www.ampl.com/DOWNLOADS/index.html


See also

* APMonitor
* General Algebraic Modeling System (GAMS)
* MPS (format)
* nl (format)
* GLPK - free open source system based on a subset of AMPL


External links

* AMPL home page
* Prof. Fourer's home page at Northwestern University

Mathematics Software

Retrieved from "http://en.wikipedia.org/"
All text is available under the terms of the GNU Free Documentation License

Index

Scientific Library - Scientificlib.com
Scientificlib News