Advertisement

Pyomo: modeling and solving mathematical programs in Python

  • William E. Hart
  • Jean-Paul Watson
  • David L. Woodruff
Full Length Paper

Abstract

We describe Pyomo, an open source software package for modeling and solving mathematical programs in Python. Pyomo can be used to define abstract and concrete problems, create problem instances, and solve these instances with standard open-source and commercial solvers. Pyomo provides a capability that is commonly associated with algebraic modeling languages such as AMPL, AIMMS, and GAMS. In contrast, Pyomo’s modeling objects are embedded within a full-featured high-level programming language with a rich set of supporting libraries. Pyomo leverages the capabilities of the Coopr software library, which together with Pyomo is part of IBM’s COIN-OR open-source initiative for operations research software. Coopr integrates Python packages for defining optimizers, modeling optimization applications, and managing computational experiments. Numerous examples illustrating advanced scripting applications are provided.

Keywords

Python Algebraic modeling language Optimization Open source optimization software 

Mathematics Subject Classification (2000)

90C99 93A30 97N80 

References

  1. 1.
    ACRO: ACRO optimization framework (2009). http://software.sandia.gov/acro
  2. 2.
    AIMMS: AIMMS home page (2008). http://www.aimms.com
  3. 3.
    AMPL: AMPL home page (2008). http://www.ampl.com/
  4. 4.
    Anbalagan, P., Vouk, M.: On reliability analysis of open source software—FEDORA. In: 19th International Symposium on Software Reliability Engineering (2008)Google Scholar
  5. 5.
    APLEpy: APLEpy: an open source algebraic programming language extension for Python (2005). http://aplepy.sourceforge.net/
  6. 6.
    Bertsimas D., Tsitsiklis J.N.: Introduction to Linear Optimization. Athena Scientific/Dynamic Ideas, Belmont (1997)Google Scholar
  7. 7.
    Birge J.R., Louveaux F.: Introduction to Stochastic Programming. Springer, Berlin (1997)zbMATHGoogle Scholar
  8. 8.
    Bonmin: The Bonmin wiki page (2011). https://projects.coin-or.org/Bonmin
  9. 9.
    BSD: Open Source Initiative (OSI)—the BSD license (2009). http://www.opensource.org/licenses/bsd-license.php
  10. 10.
    COINOR: COIN-OR home page (2009). http://www.coin-or.org
  11. 11.
    Forrester Consulting: Open source software’s expanding role in the enterprise (2007). http://www.unisys.com/eprise/main/admin/corporate/doc/Forrester_research-open_source_buying_behaviors.pdf
  12. 12.
    COOPR: Coopr: A common optimization python repository (2009). http://software.sandia.gov/coopr
  13. 13.
    CUTEr: Cuter: A constrained and unconstrained testing environment, revisited (2011). http://www.hsl.rl.ac.uk/cuter-www/index.html
  14. 14.
    CVXOPT: CVXOPT home page (2008). http://abel.ee.ucla.edu/cvxopt
  15. 15.
    Dimitrov: Nedialki Dimitrov, naval postgraduate school. Personal Communication (2011)Google Scholar
  16. 16.
    Dolan E.D., Fourer R., Goux J.-P., Munson T.S., Sarich J.: Kestrel: an interface from optimization modeling systems to the NEOS server. INFORMS J Comput 20(4), 525–538 (2008)MathSciNetCrossRefGoogle Scholar
  17. 17.
    FLOPC++: FLOPC++ home page (2008).https://projects.coin-or.org/FlopC++
  18. 18.
    Fourer R., Gay D.M., Kernighan B.W.: AMPL: a mathematical programming language. Manag. Sci. 36, 519–554 (1990)zbMATHCrossRefGoogle Scholar
  19. 19.
    Fourer R., Gay D.M., Kernighan B.W.: AMPL: a Modeling Language for Mathematical Programming, 2nd edn. Brooks/Cole Thomson Learning, Pacific Grove (2003)Google Scholar
  20. 20.
    Fourer R., Ma J., Martin K.: Optimization services: a framework for distributed optimization. Oper. Res. 58(6), 1624–1636 (2010)MathSciNetCrossRefGoogle Scholar
  21. 21.
    GAMS: GAMS home page (2008). http://www.gams.com
  22. 22.
    Geoffrion A.M.: An introduction to structured modeling. Manag. Sci. 33(5), 547–588 (1987)CrossRefGoogle Scholar
  23. 23.
    GLPK: GLPK: GNU linear programming toolkit (2009). http://www.gnu.org/software/glpk/
  24. 24.
    GPL: GNU general public license (2009). http://www.gnu.org/licenses/gpl.html
  25. 25.
    Hackebeil, G., Laird, C.: Global optimization for estimation of on/off seasonality in infectious disease spread using pyomo (2010). https://software.sandia.gov/trac/coopr/attachment/wiki/Pyomo/global_opt.pptx
  26. 26.
    Hart, W.E.: Python Optimization Modeling Objects (Pyomo). In: Chinneck, J.W., Kristjansson, B., Saltzman, M.J. (eds.) Operations Research and Cyber-Infrastructure (2009). doi: 10.1007/978-0-387-88843-9_1
  27. 27.
    Hart W.E., Phillips C.A., Berry J., Boman E.G. et al.: US Environmental Protection Agency uses operations research to reduce contamination risks in drinking water. INFORMS Interfaces 39, 57–68 (2009)Google Scholar
  28. 28.
    Hebrard, E., O’Mahony, E., O’Sullivan, B.: Constraint Programming and Combinatorial Optimisation in Numberjack. In: Lodi, A., Milano, M., Toth, P. (eds.) Proceedings of CPAIOR 2010, LNCS, vol. 6140. Springer, Berlin (2010)Google Scholar
  29. 29.
    Ipopt: The Ipopt wiki page (2011). https://projects.coin-or.org/IpoptGoogle Scholar
  30. 30.
    Jones, E., Oliphant, T., Peterson, P., et al.: SciPy: open source scientific tools for Python (2009). http://www.scipy.org/
  31. 31.
    Kallrath J.: Modeling Languages in Mathematical Optimization. Kluwer, Dordrecht (2004)zbMATHGoogle Scholar
  32. 32.
    Karabuk, S., Grant, F.H.: A common medium for programming operations-research models. In: Proceedings of the IEEE Software, pp. 39–47 (2007)Google Scholar
  33. 33.
    Marsten R.E.: The design of the XMP linear programming library. ACM Trans. Math. Softw. 7(4), 481–497 (1981)CrossRefGoogle Scholar
  34. 34.
    Oliphant, T.E.: Python for scientific computing. Computing in Science and Engineering, pp. 10–20 (2007)Google Scholar
  35. 35.
    OpenOpt: OpenOpt home page (2008). http://scipy.org/scipy/scikits/wiki/OpenOpt
  36. 36.
    OptimJ: Ateji home page (2008). http://www.ateji.com
  37. 37.
    Ortools: Google OR tools—operations research tools developed at Google (2011). http://code.google.com/p/or-tools
  38. 38.
    Prechelt, L.: An empirical comparison of seven programming languages. Computer 33(10), 23–29 (2000). doi: 10.1109/2.876288. ISSN: 0018-9162Google Scholar
  39. 39.
    Psyco: Psyco (2008). http://psyco.sourceforge.net/
  40. 40.
    PuLP: PuLP: a Python linear programming modeler (2008). http://130.216.209.237/engsci392/pulp/FrontPage
  41. 41.
    PyMathProg: PyMathProg home page (2009). http://pymprog.sourceforge.net/
  42. 42.
    PyPI: Python package index (2009). http://pypi.python.org/pypi
  43. 43.
    PYRO: PYRO: Python remote objects (2009). http://pyro.sourceforge.net
  44. 44.
    Python: Python programming language—official website (2009). http://python.org
  45. 45.
    PythonVSJava: Python & Java: a side-by-side comparison (2008). http://www.ferg.org/projects/python_java_side-by-side.html
  46. 46.
    PyUtilib: PyUtilib optimization framework (2009). http://software.sandia.gov/pyutilib
  47. 47.
    Roelofs, M., Bisschop, J.: AIMMS 3.9—The User’s Guide (2009). http://lulu.com
  48. 48.
    Sayfan, G.: Building your own plugin framework. Dr. Dobbs J. (2007)Google Scholar
  49. 49.
    Shapiro, A., Dentcheva, D., Ruszczynski, A.: Lectures on Stochastic Programming: Modeling and Theory. Society for Industrial and Applied Mathematics (2009)Google Scholar
  50. 50.
    Sage, W.S.: Open Source Mathematical Software (Version 2.10.2). The Sage Group (2008). http://www.sagemath.org
  51. 51.
    Szyperski C.: Component Software: Beyond Object-Oriented Programming. ACM Press, New York (1998)Google Scholar
  52. 52.
    TOMLAB: TOMLAB optimization environment (2008). http://www.tomopt.com/tomlab
  53. 53.
    Tratt L.: Dynamically typed languages. Adv. Comput. 77, 149–184 (2009)CrossRefGoogle Scholar
  54. 54.
    Watson, J.-P., Woodruff, D.L., Hart, W.E.: Pysp: modeling and solving stochastic programs in python (2010). https://software.sandia.gov/trac/coopr/attachment/wiki/PySP/pysp_jnl.pdf
  55. 55.
    YAML: The official YAML web site (2009). http://yaml.org/
  56. 56.
    Zhou Y., Davis J.: Open source software reliability model: an empirical approach. ACM SIGSOFT Softw. Eng. Notes 30, 1–6 (2005)CrossRefGoogle Scholar

Copyright information

© Springer and Mathematical Optimization Society 2011

Authors and Affiliations

  • William E. Hart
    • 1
  • Jean-Paul Watson
    • 2
  • David L. Woodruff
    • 3
  1. 1.Data Analysis and Informatics DepartmentSandia National LaboratoriesAlbuquerqueUSA
  2. 2.Discrete Math and Complex Systems DepartmentSandia National LaboratoriesAlbuquerqueUSA
  3. 3.Graduate School of ManagementUniversity of California DavisDavisUSA

Personalised recommendations