# pyomo.dae: a modeling and automatic discretization framework for optimization with differential and algebraic equations

- 72 Downloads

## Abstract

We describe pyomo.dae, an open source Python-based modeling framework that enables high-level abstract specification of optimization problems with differential and algebraic equations. The pyomo.dae framework is integrated with the Pyomo open source algebraic modeling language, and is available at http://www.pyomo.org. One key feature of pyomo.dae is that it does not restrict users to standard, predefined forms of differential equations, providing a high degree of modeling flexibility and the ability to express constraints that cannot be easily specified in other modeling frameworks. Other key features of pyomo.dae are the ability to specify optimization problems with high-order differential equations and partial differential equations, defined on restricted domain types, and the ability to automatically transform high-level abstract models into finite-dimensional algebraic problems that can be solved with off-the-shelf solvers. Moreover, pyomo.dae users can leverage existing capabilities of Pyomo to embed differential equation models within stochastic and integer programming models and mathematical programs with equilibrium constraint formulations. Collectively, these features enable the exploration of new modeling concepts, discretization schemes, and the benchmarking of state-of-the-art optimization solvers.

## Keywords

Dynamic optimization Mathematical modeling Algebraic modeling language DAE constrained optimization PDE constrained optimization## Mathematics Subject Classification

49M37 68N15 90-04 93A30 90C90## Notes

### Acknowledgements

We thank Carl D. Laird for useful technical discussions and for providing the disease transmission model. Victor M. Zavala acknowledges funding from the U.S. Department of Energy Early Career program. The research was supported in part by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Applied Mathematics program under contract number KJ0401000 through the Project “Multifaceted Mathematics for Complex Energy Systems”. Sandia is a multi-program laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under Contract DE-AC04-94-AL85000.

## References

- 1.Åkesson, J., Årzén, K.E., Gäfvert, M., Bergdahl, T., Tummescheit, H.: Modeling and optimization with Optimica and JModelica.org languages and tools for solving large-scale dynamic optimization problems. Comput. Chem. Eng.
**34**(11), 1737–1749 (2010)CrossRefGoogle Scholar - 2.Andersson, J.: A General-purpose Software Framework for Dynamic Optimization. PhD thesis, Arenberg Doctoral School, KU Leuven, Department of Electrical Engineering (ESAT/SCD) and Optimization in Engineering Center, Kasteelpark Arenberg 10, 3001-Heverlee, Belgium (2013)Google Scholar
- 3.Ascher, U.M., Mattheij, R.M., Russell, R.D.: Numerical Solution of Boundary Value Problems for Ordinary Differential Equations, vol. 13. SIAM, Philadelphia (1994)MATHGoogle Scholar
- 4.Ascher, U.M., Petzold, L.R.: Computer Methods for Ordinary Differential Equations and Differential-algebraic Equations, vol. 61. SIAM, Philadelphia (1998)CrossRefMATHGoogle Scholar
- 5.Betts, J.T.: Sparse Optimization Suite (SOS). Applied Mathematical Analysis, LLC (2013)Google Scholar
- 6.Betts, J.T., Huffman, W.P.: Sparse optimal control software SOCS MEA-LR-085, Boeing Information and Support Services, The Boeing Company, PO Box. Math. Eng. Anal. Tech. Doc.
**3707, 98**, 124–2207 (1997)Google Scholar - 7.Biegler, L.T.: Nonlinear Programming: Concepts, Algorithms, and Applications to Chemical Processes. SIAM, Philadelphia (2010)CrossRefMATHGoogle Scholar
- 8.Bock, H.G., Plitt, K.J.: A multiple shooting algorithm for direct solution of optimal control problems. In: Proceedings of the IFAC World Congress (1984)Google Scholar
- 9.Brenan, K.E., Campbell, S.L., Petzold, L.R.: Numerical Solution of Initial-value Problems in Differential-Algebraic Equations, vol. 14. SIAM, Philadelphia (1996)MATHGoogle Scholar
- 10.Butcher, J.: Numerical Methods for Ordinary Differential Equations. Wiley (2003). https://books.google.com/books?id=nYuDWkxhDGUC
- 11.Corporation, G.D.: General Algebraic Modeling System (GAMS) Release 24.2.1. Washington, DC, USA (2013). http://www.gams.com/
- 12.Fourer, R., Gay, D., Kernighan, B.: AMPL: A Modeling Language for Mathematical Programming. Scientific Press (1993). https://books.google.com/books?id=8vJQAAAAMAAJ
- 13.Frasch, J.: Parallel Algorithms for Optimization of Dynamic Systems in Real-Time. Ph.D. thesis, KU Leuven (2014)Google Scholar
- 14.Hart, W., Laird, C., Watson, J., Woodruff, D.: Pyomo-optimization Modeling in Python, vol. 67. Springer, Berlin (2012)CrossRefMATHGoogle Scholar
- 15.Hart, W., Watson, J., Woodruff, D.: Pyomo: modeling and solving mathematical programs in Python. Math. Program. Comput.
**3**(3), 219–260 (2011)MathSciNetCrossRefGoogle Scholar - 16.Hendengren, J.: APMonitor Modeling Language (2014). http://APMonitor.com
- 17.Hindmarsh, A.C., Brown, P.N., Grant, K.E., Lee, S.L., Serban, R., Shumaker, D.E., Woodward, C.S.: SUNDIALS: suite of nonlinear and differential/algebraic equation solvers. ACM Trans. Math. Softw.
**31**(3), 363–396 (2005). https://doi.org/10.1145/1089014.1089020 MathSciNetCrossRefMATHGoogle Scholar - 18.Houska, B., Ferreau, H., Diehl, M.: ACADO toolkit—an open source framework for automatic control and dynamic optimization. Opt. Control Appl. Methods
**32**(3), 298–312 (2011)MathSciNetCrossRefMATHGoogle Scholar - 19.Hultberg, T.: FlopC++ an algebraic modeling language embedded in C. In: Waldmann, K.-H. (ed.)Operations Research Proceedings 2006, ser. Operations Research Proceedings, pp. 187–190. Springer, Berlin (2006)Google Scholar
- 20.Jacobson, D., Lele, M.: A transformation technique for optimal control problems with a state variable inequality constraint. IEEE Trans. Autom. Control
**14**(5), 457–464 (1969). https://doi.org/10.1109/TAC.1969.1099283 CrossRefGoogle Scholar - 21.Kraft, D.: On converting optimal control problems into nonlinear programming problems. In: Schittkowski, K. (ed.) Computational Mathematical Programming, pp. 261–280. Springer, Berlin (1985)Google Scholar
- 22.Leyffer, S., Kirches, C.: TACO–a toolkit for AMPL control optimization. Math. Program. Comput.
**5**(3), 227–265 (2013)MathSciNetCrossRefMATHGoogle Scholar - 23.Lubin, M., Dunning, I.: Computing in operations research using julia. INFORMS J. Comput.
**27**(2), 238–248 (2015). https://doi.org/10.1287/ijoc.2014.0623 MathSciNetCrossRefMATHGoogle Scholar - 24.MATLAB: MATLAB Function Reference, chap. pdepe, pp. 6386–6397. The MathWorks Incorporated (2015)Google Scholar
- 25.Mitchell, S., O’Sullivan, M., Dunning, I.: PuLP: A Linear Programming Toolkit for Python (2011)Google Scholar
- 26.Patterson, M.A., Rao, A.V.: GPOPS-II: A MATLAB software for solving multiple-phase optimal control problems using hp-adaptive Gaussian quadrature collocation methods and sparse nonlinear programming. ACM Trans. Math. Softw.
**41**(1), 1:1–1:37 (2014). https://doi.org/10.1145/2558904 MathSciNetCrossRefMATHGoogle Scholar - 27.Process Systems Enterprise: gPROMS (1997–2014). www.psenterprise.com/gproms
- 28.Rutquist, P., Edvall, M.: PROPT—Matlab Optimal Control Software. Tomlab Optimization Inc (2010)Google Scholar
- 29.Santamara, F.L., Gmez, J.M.: Framework in PYOMO for the assessment and implementation of (as)nmpc controllers. Comput. Chem. Eng.
**92**, 93–111 (2016). https://doi.org/10.1016/j.compchemeng.2016.05.005. http://www.sciencedirect.com/science/article/pii/S0098135416301533 - 30.Sargent, R., Sullivan, G.: The development of an efficient optimal control package. In: Stoer, J. (ed.) Optimization Techniques, Proceedings of the 8th IFIP Conference on Optimization Techniques Würzburg, September 5–9, 1977 pp. 158–168. Springer, Berlin (1978)Google Scholar
- 31.Word, D.P.: Nonlinear Programming Approaches for Efficient Large-Scale Parameter Estimation with Applications in Epidemiology. PhD thesis, Texas A&M University, Department of Chemical Engineering, College Station, TX (2013)Google Scholar
- 32.Word, D.P., Kang, J., Akesson, J., Laird, C.D.: Efficient parallel solution of large-scale nonlinear dynamic optimization problems. Comput. Optim. Appl.
**59**(3), 667–688 (2014)MathSciNetCrossRefMATHGoogle Scholar - 33.Zavala, V.M.: Stochastic optimal control model for natural gas networks. Comput. Chem. Eng.
**64**, 103–113 (2014). https://doi.org/10.1016/j.compchemeng.2014.02.002. http://www.sciencedirect.com/science/article/pii/S0098135414000349 - 34.Zavala, V.M., Laird, C.D., Biegler, L.T.: Interior-point decomposition approaches for parallel solution of large-scale nonlinear parameter estimation problems. Chem. Eng. Sci.
**63**(19), 4834–4845 (2008)CrossRefGoogle Scholar