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.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
ACRO: ACRO optimization framework (2009). http://software.sandia.gov/acro
AIMMS: AIMMS home page (2008). http://www.aimms.com
AMPL: AMPL home page (2008). http://www.ampl.com/
Anbalagan, P., Vouk, M.: On reliability analysis of open source software—FEDORA. In: 19th International Symposium on Software Reliability Engineering (2008)
APLEpy: APLEpy: an open source algebraic programming language extension for Python (2005). http://aplepy.sourceforge.net/
Bertsimas D., Tsitsiklis J.N.: Introduction to Linear Optimization. Athena Scientific/Dynamic Ideas, Belmont (1997)
Birge J.R., Louveaux F.: Introduction to Stochastic Programming. Springer, Berlin (1997)
Bonmin: The Bonmin wiki page (2011). https://projects.coin-or.org/Bonmin
BSD: Open Source Initiative (OSI)—the BSD license (2009). http://www.opensource.org/licenses/bsd-license.php
COINOR: COIN-OR home page (2009). http://www.coin-or.org
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
COOPR: Coopr: A common optimization python repository (2009). http://software.sandia.gov/coopr
CUTEr: Cuter: A constrained and unconstrained testing environment, revisited (2011). http://www.hsl.rl.ac.uk/cuter-www/index.html
CVXOPT: CVXOPT home page (2008). http://abel.ee.ucla.edu/cvxopt
Dimitrov: Nedialki Dimitrov, naval postgraduate school. Personal Communication (2011)
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)
FLOPC++: FLOPC++ home page (2008).https://projects.coin-or.org/FlopC++
Fourer R., Gay D.M., Kernighan B.W.: AMPL: a mathematical programming language. Manag. Sci. 36, 519–554 (1990)
Fourer R., Gay D.M., Kernighan B.W.: AMPL: a Modeling Language for Mathematical Programming, 2nd edn. Brooks/Cole Thomson Learning, Pacific Grove (2003)
Fourer R., Ma J., Martin K.: Optimization services: a framework for distributed optimization. Oper. Res. 58(6), 1624–1636 (2010)
GAMS: GAMS home page (2008). http://www.gams.com
Geoffrion A.M.: An introduction to structured modeling. Manag. Sci. 33(5), 547–588 (1987)
GLPK: GLPK: GNU linear programming toolkit (2009). http://www.gnu.org/software/glpk/
GPL: GNU general public license (2009). http://www.gnu.org/licenses/gpl.html
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
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
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)
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)
Ipopt: The Ipopt wiki page (2011). https://projects.coin-or.org/Ipopt
Jones, E., Oliphant, T., Peterson, P., et al.: SciPy: open source scientific tools for Python (2009). http://www.scipy.org/
Kallrath J.: Modeling Languages in Mathematical Optimization. Kluwer, Dordrecht (2004)
Karabuk, S., Grant, F.H.: A common medium for programming operations-research models. In: Proceedings of the IEEE Software, pp. 39–47 (2007)
Marsten R.E.: The design of the XMP linear programming library. ACM Trans. Math. Softw. 7(4), 481–497 (1981)
Oliphant, T.E.: Python for scientific computing. Computing in Science and Engineering, pp. 10–20 (2007)
OpenOpt: OpenOpt home page (2008). http://scipy.org/scipy/scikits/wiki/OpenOpt
OptimJ: Ateji home page (2008). http://www.ateji.com
Ortools: Google OR tools—operations research tools developed at Google (2011). http://code.google.com/p/or-tools
Prechelt, L.: An empirical comparison of seven programming languages. Computer 33(10), 23–29 (2000). doi:10.1109/2.876288. ISSN: 0018-9162
Psyco: Psyco (2008). http://psyco.sourceforge.net/
PuLP: PuLP: a Python linear programming modeler (2008). http://130.216.209.237/engsci392/pulp/FrontPage
PyMathProg: PyMathProg home page (2009). http://pymprog.sourceforge.net/
PyPI: Python package index (2009). http://pypi.python.org/pypi
PYRO: PYRO: Python remote objects (2009). http://pyro.sourceforge.net
Python: Python programming language—official website (2009). http://python.org
PythonVSJava: Python & Java: a side-by-side comparison (2008). http://www.ferg.org/projects/python_java_side-by-side.html
PyUtilib: PyUtilib optimization framework (2009). http://software.sandia.gov/pyutilib
Roelofs, M., Bisschop, J.: AIMMS 3.9—The User’s Guide (2009). http://lulu.com
Sayfan, G.: Building your own plugin framework. Dr. Dobbs J. (2007)
Shapiro, A., Dentcheva, D., Ruszczynski, A.: Lectures on Stochastic Programming: Modeling and Theory. Society for Industrial and Applied Mathematics (2009)
Sage, W.S.: Open Source Mathematical Software (Version 2.10.2). The Sage Group (2008). http://www.sagemath.org
Szyperski C.: Component Software: Beyond Object-Oriented Programming. ACM Press, New York (1998)
TOMLAB: TOMLAB optimization environment (2008). http://www.tomopt.com/tomlab
Tratt L.: Dynamically typed languages. Adv. Comput. 77, 149–184 (2009)
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
YAML: The official YAML web site (2009). http://yaml.org/
Zhou Y., Davis J.: Open source software reliability model: an empirical approach. ACM SIGSOFT Softw. Eng. Notes 30, 1–6 (2005)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Hart, W.E., Watson, JP. & Woodruff, D.L. Pyomo: modeling and solving mathematical programs in Python. Math. Prog. Comp. 3, 219–260 (2011). https://doi.org/10.1007/s12532-011-0026-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12532-011-0026-8