Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

AMPL

From Wikipedia, the free encyclopedia
Algebraic modeling language

AMPL
ParadigmMulti-paradigm:declarative,imperative
Designed byRobert Fourer
David Gay
Brian Kernighan
Bell Labs
DeveloperAMPL Optimization, Inc.
First appeared1985; 41 years ago (1985)
Stable release
20250901 / 1 September 2025; 5 months ago (2025-09-01)
OSCross-platform:Linux,macOS,Solaris,AIX,Windows
LicenseProprietary (translator),
free and open-source (AMPL Solver Library)
Filename extensions.mod, .dat, .run
Websitewww.ampl.com
Influenced by
AWK,C
Influenced
JuMP,Pyomo

AMPL (A Mathematical Programming Language) is analgebraic modeling language to describe and solve high-complexity problems for large-scale mathematical computing (e.g. large-scale optimization andscheduling-type problems).[1]It was developed byRobert Fourer, David Gay, andBrian Kernighan atBell Laboratories.AMPL supports dozens ofsolvers, bothopen source andcommercial software, including CBC,CPLEX,FortMP,MOSEK,MINOS,IPOPT,SNOPT,KNITRO, and LGO. Problems are passed to solvers asnl 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 ofoptimization problems. This allows for a very concise and readable definition of problems in the domain ofoptimization. Many modern solvers available on theNEOS Server (formerly hosted at theArgonne National Laboratory, currently hosted at theUniversity of Wisconsin, Madison[3]) accept AMPL input. According to the NEOS statistics AMPL is the most popular format for representing mathematical programming problems.

Features

[edit]

AMPL features a mix ofdeclarative andimperative programming styles. Formulating optimization models occurs via declarative language elements such as sets, scalar and multidimensional parameters, decision variables, objectives andconstraints, which allow for concise description of most problems in the domain of mathematical optimization.

Procedures andcontrol flow statements are available in AMPL for

  • the exchange of data with external data sources such asspreadsheets,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-definednl interface.

Availability

[edit]

AMPL is available for many popular 32 & 64-bitoperating systems includingLinux,macOS,Solaris,AIX, andWindows.[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 also provides open-sourceAPIs that enable integration with general-purpose programming languages. Official APIs are available forPython, R, C++, C#, MATLAB and Java, allowing users to generate, update, and solve models programmatically.[9]

AMPL can be used from withinMicrosoft Excel via theSolverStudio 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.

AMPL/MP provides another open-source library to build linear, mixed-integer, andConstraint Programming solvers, replacing ASL for those not requiring automatic differentiation.[10]

Status history

[edit]

This table present significant steps in AMPL history.

YearHighlights
1985AMPL was designed and implemented[1]
1990Paper describing the AMPL modeling language was published inManagement Science[11]
1991AMPL supportsnonlinear programming andautomatic differentiation
1993Robert Fourer, David Gay andBrian Kernighan were awarded ORSA/CSTS Prize[12] by theOperations Research Society of America, for writings on the design of mathematical programming systems and the AMPL modeling language
1995Extensions for representingpiecewise-linear and network structures
1995Scripting constructs
1997Enhanced support for nonlinear solvers
1998AMPL supportscomplementarity theory problems
2000Relational database and spreadsheet access
2002Support for constraint programming[4]
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 fromLucent Technologies, Inc.
2005AMPL Modeling Language Google group opened[13]
2008Kestrel: An AMPL Interface to the NEOS Server introduced
2012Robert Fourer, David Gay, andBrian Kernighan were awarded the 2012 INFORMS Impact Prize as the originators of one of the most important algebraic modeling languages.[14]
2012AMPL book becomes freely available online[15]
2013A new cross-platformintegrated development environment (IDE) for AMPL becomes available[16]
2015New solver library MP.[10]
2017AMPL becomes available within different programming languages throughAPIs.[9]

A sample model

[edit]

A transportation problem fromGeorge 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.[17]

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

[edit]

Here is a partial list ofsolvers supported by AMPL:[18]

SolverSupported problem types
APOPTmixed integernonlinear programming
Artelys Knitrolinear, quadratic and nonlinear programming
Bonminmixed integernonlinear programming
BPMPDlinear andquadratic programming
COIN-OR CBCmixed integer programming
COIN-OR CLPlinear programming
CONOPTnonlinear programming
Couenne[19]mixed integer nonlinear programming (MINLP)
CPLEXlinear, quadratic,second-order cone and mixed integer programming
CPLEX CP Optimizer[20]constraint programming
FILTERnonlinear programming
FortMPlinear, quadratic and mixed integer programming
Gecode[21]constraint programming
IPOPTnonlinear programming
JaCoP[22]constraint programming
LGO[23]global and local nonlinear optimization
lp_solve[24]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 withmin andmax elementary functions.
SCIPmixed integer programming
SNOPTnonlinear programming
Sulum[25]linear and mixed integer programming
WORHPnonlinear programming
XAlinear and mixed integer programming
Xpresslinear and convexquadratic optimization and their mixed integer counterparts

See also

[edit]

References

[edit]
  1. ^abFourer, Robert; Gay, David M;Kernighan, Brian W (2003).AMPL: a modeling language for mathematical programming. USA: Duxbury Press/Brooks/Cole Publishing Company.ISBN 978-0-534-38809-6.
  2. ^"Position Available". Archived fromthe original on 11 September 2011. Retrieved29 July 2011.
  3. ^"About". Retrieved11 August 2015.
  4. ^abFourer, Robert; Gay, David M. (2002)."Extending an Algebraic Modeling Language to Support Constraint Programming".INFORMS Journal on Computing.14 (4):322–344.CiteSeerX 10.1.1.8.9699.doi:10.1287/ijoc.14.4.322.2825.
  5. ^"Platforms".AMPL Optimizations Inc. Archived fromthe original on 14 May 2022. Retrieved1 November 2019.
  6. ^"NEOS Server for Optimization". Retrieved11 August 2015.
  7. ^"Try AMPL!". Retrieved11 August 2015.
  8. ^"AMPL Downloads". Archived fromthe original on 26 May 2015. Retrieved11 August 2015.
  9. ^ab"AMPL APIs".AMPL Optimization. Retrieved11 September 2025.
  10. ^ab"AMPL/MP".AMPL Optimization. Retrieved11 September 2025.
  11. ^Fourer, Robert; Gay, David M.;Kernighan, Brian W. (1990)."A Modeling Language for Mathematical Programming"(PDF).Management Science.36 (5): 519–554–83.doi:10.1287/mnsc.36.5.519.
  12. ^INFORMS."ICS - INFORMS"(PDF). Archived fromthe original(PDF) on 7 October 2006. Retrieved11 August 2015.
  13. ^"Google Groups".
  14. ^INFORMS."INFORMS Impact Prize". Archived fromthe original on 22 October 2013. Retrieved11 August 2015.
  15. ^"The AMPL Book: A comprehensive guide to building optimization models, for beginning or experienced users". Retrieved5 March 2021.
  16. ^"Google Groups". Retrieved11 August 2015.
  17. ^Dantzig, George (2016) [1963]."3. Formulating a Linear Programming Model".Linear Programming and Extensions. Princeton University Press. pp. 32–62.ISBN 978-1-4008-8417-9.
  18. ^"Solvers - AMPL". Archived fromthe original on 27 February 2014. Retrieved21 January 2018.
  19. ^"Couenne". Archived fromthe original on 29 October 2013. Retrieved27 October 2013.
  20. ^"mp/solvers/ilogcp at master · ampl/mp · GitHub".GitHub. Retrieved11 August 2015.
  21. ^"mp/solvers/gecode at master · ampl/mp · GitHub".GitHub. Retrieved11 August 2015.
  22. ^"mp/solvers/jacop at master · ampl/mp · GitHub".GitHub. Retrieved11 August 2015.
  23. ^"LGO - AMPL". Retrieved11 August 2015.
  24. ^"Using lpsolve from AMPL". Retrieved11 August 2015.
  25. ^"mp/solvers/sulum at master · ampl/mp · GitHub".GitHub. Retrieved11 August 2015.
  26. ^"GLPK official site". Retrieved17 September 2020.

External links

[edit]
Data formats
Modeling tools
Solvers
LP,MILP
QP, MIQP
QCP, MIQCP
SOCP, MISOCP
SDP, MISDP
NLP, MINLP
GO
CP
Retrieved from "https://en.wikipedia.org/w/index.php?title=AMPL&oldid=1311009633"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp