Skip to main content

The AMPL Modeling Language: An Aid to Formulating and Solving Optimization Problems

  • Conference paper
Numerical Analysis and Optimization

Part of the book series: Springer Proceedings in Mathematics & Statistics ((PROMS,volume 134))

Abstract

Optimization problems arise in many contexts. Sometimes finding a good formulation takes considerable effort. A modeling language, such as AMPL, facilitates experimenting with formulations and simplifies using suitable solvers to solve the resulting optimization problems. AMPL lets one use notation close to familiar mathematical notation to state variables, objectives, and constraints and the sets and parameters that may be involved. AMPL does some problem transformations and makes relevant problem information available to solvers. The AMPL command language permits computing and displaying information about problem details and solutions returned by solvers. It also lets one modify problem formulations and solve sequences of problems. AMPL addresses both continuous and discrete optimization problems and offers some constraint-programming facilities for the latter. More generally, AMPL permits stating and solving problems with complementarity constraints. For continuous problems, AMPL makes first and second derivatives available via automatic differentiation. The freely available AMPL/solver interface library (ASL) facilitates interfacing with solvers. This paper gives an overview of AMPL and its interaction with solvers and discusses some problem transformations and implementation techniques. It also looks forward to possible enhancements to AMPL.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Aho, A.V., Weinberger, P.J., Kernighan, B.W.: Awk — a pattern scanning and processing language. Softw. Pract. Exp. 9, 267–279 (1979)

    Article  MATH  Google Scholar 

  2. Aho, A.V., Weinberger, P.J., Kernighan, B.W.: The AWK Programming Language. Addison-Wesley, Reading (1988)

    MATH  Google Scholar 

  3. Beale, E.M.L., Tomlin, J.A.: Special facilities in a general mathematical system for non-convex problems using ordered sets of variables. In: Lawrence, J. (ed.) Proceedings of the Fifth International Conference on Operational Research, pp. 447–454. Tavistock, London (1970)

    Google Scholar 

  4. Bisschop, J., Entriken, R.: AIMMS, The Modeling System. Paragon Decision Technology, Haarlem (1993)

    Google Scholar 

  5. Bisschop, J., Meeraus, A.: Selected aspects of a general algebraic modeling language. In: Iracki, K., Malanowski, K., Walukiewicz, S. (eds.) Optimization Techniques, Part 2. Lecture Notes in Control and Information Sciences, vol. 23, pp. 223–233. Springer, Berlin (1980)

    Google Scholar 

  6. Chinneck, J.W., Dravnieks, E.W.: Locating minimal infeasible constraint sets in linear programs. ORSA J. Comput. 3(2), 157–168 (1991)

    Article  MATH  Google Scholar 

  7. de Boor, C.: A Practical Guide to Splines. Applied Mathematical Sciences, vol. 27. Springer, New York (1978)

    Google Scholar 

  8. Dennis, J.E., Jr., Gay, D.M., Welsch, R.E.: An adaptive nonlinear least-squares algorithm. ACM Trans. Math. Softw. 7, 348–368 (1981)

    Article  MATH  Google Scholar 

  9. Ferris, M.C., Fourer, R., Gay, D.M.: Expressing complementarity problems in an algebraic modeling language and communicating them to solvers. SIAM J. Optim. 9(4), 991–1009 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  10. Fourer, R.: Modeling languages versus matrix generators for linear programming. ACM Trans. Math. Softw. 9(2), 143–183 (1983)

    Article  Google Scholar 

  11. Fourer, R., Gay, D.M.: Experience with a primal presolve algorithm. In: Hager, W.W., Hearn, D.W., Pardalos, P.M. (eds.) Large Scale Optimization: State of the Art, pp. 135–154. Kluwer Academic, Dordrecht (1994)

    Chapter  Google Scholar 

  12. Fourer, R., Gay, D.M.: Extending an algebraic modeling language to support constraint programming. INFORMS J. Comput. 14(4), 322–344 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  13. Fourer, R., Gay, D.M., Kernighan, B.W.: AMPL: A mathematical programming language. Technical Report Computing Science Technical Report No. 133, AT&T Bell Laboratories, Murray Hill, NJ, Jan 1987 (revised June 1989)

    Google Scholar 

  14. Fourer, R., Gay, D.M., Kernighan, B.W.: A modeling language for mathematical programming. Manag. Sci. 36(5), 519–554 (1990)

    Article  MATH  Google Scholar 

  15. Fourer, R., Gay, D.M., Kernighan, B.W.: AMPL: A Modeling Language for Mathematical Programming. The Scientific Press, South San Francisco, California (1993)

    Google Scholar 

  16. Fourer, R., Gay, D.M., Kernighan, B.W.: AMPL: A Modeling Language for Mathematical Programming. Brooks/Cole–Thomson Learning, Pacific Grove, CA (2003)

    Google Scholar 

  17. Gay, D.M.: Automatic differentiation of nonlinear ampl models. In: Griewank, A., Corliss, G.F. (eds.) Automatic Differentiation of Algorithms: Theory, Implementation, and Application, pp. 61–73. SIAM, Philadelphia (1991)

    Google Scholar 

  18. Gay, D.M.: More AD of nonlinear ampl models: computing hessian information and exploiting partial separability. In: Corliss, G.F. (ed.) Computational Differentiation: Applications, Techniques, and Tools. SIAM, Philadelphia (1996)

    Google Scholar 

  19. Gay, D.M.: Hooking your solver to AMPL. Technical Report Technical Report 97-4-06, Computing Sciences Research Center, Bell Laboratories, Murray Hill (1997)

    Google Scholar 

  20. Golub, G.H., Pereyra, V.: The differentiation of pseudo-inverses and nonlinear least-squares problems whose variables separate. SIAM J. Numer. Anal. 10, 413–432 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  21. Graham, R.L.: The largest small hexagon. J. Comb. Theory A 18, 165–170 (1975)

    Article  MATH  Google Scholar 

  22. Griewank, A.: On automatic differentiation. In: Iri, M., Tanabe, K. (eds.) Mathematical Programming, pp. 83–107. Kluwer Academic, Boston (1989)

    Google Scholar 

  23. Griewank, A., Walther, A.: Evaluating Derivatives. SIAM, Philadelphia (2008)

    Book  MATH  Google Scholar 

  24. Karmarkar, N.: A new polynomial-time algorithm for linear programming. Combinatorica 4, 373–395 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  25. Kedem, G.: Automatic differentiation of computer programs. ACM Trans. Math. Softw. 6(2), 150–165 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  26. Kernighan, B.W., Ritchie, D.M.: The C Programming Language. Prentice-Hall, Upper Saddle River (1978)

    Google Scholar 

  27. Kernighan, B.W., Ritchie, D.M.: The C Programming Language. Prentice-Hall, Upper Saddle River (1988)

    Google Scholar 

  28. Kristjansson, B.: MPL — Modelling System Quick Guide. Maximal Software, Reykjavik (1991)

    Google Scholar 

  29. Stroustrup, B.: The C++ Programming Language. Addison-Wesley, Reading (1986)

    MATH  Google Scholar 

  30. van Loon, J.: Irreducibly inconsistent systems of linear inequalities. Eur. J. Oper. Res. 8, 283–288 (1981)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to David M. Gay .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Gay, D.M. (2015). The AMPL Modeling Language: An Aid to Formulating and Solving Optimization Problems. In: Al-Baali, M., Grandinetti, L., Purnama, A. (eds) Numerical Analysis and Optimization. Springer Proceedings in Mathematics & Statistics, vol 134. Springer, Cham. https://doi.org/10.1007/978-3-319-17689-5_5

Download citation

Publish with us

Policies and ethics