(51a) Pynumero: Python Numerical Optimization | AIChE

(51a) Pynumero: Python Numerical Optimization


Rodriguez, J. S. - Presenter, Purdue University
Nicholson, B., Sandia National Laboratories
Laird, C. D., Sandia National Laboratories
Siirola, J., Sandia National Laboratories
Numerical optimization has proven to be an efficient tool for characterizing, designing, and operating chemical processes. Efficient optimization algorithms are typically complex code bases written in low-level compiled programming languages. However, this complexity also impedes development of new algorithms, requiring significant programming and software engineering expertise and a steep learning curve. This is especially true when developing decomposition approaches to solve large-scale structured problems in parallel.

To address and mitigate these challenges, we present PyNumero, a Python package for numerical optimization that provides a high-level programming framework for rapid development of nonlinear optimization algorithms. The package gives access to all high-level features of the Python programming language without making large sacrifices on computational performance. It combines the capabilities of the modeling language Pyomo with efficient libraries like the AMPL Solver Library (ASL), the Harwell Subroutine Library (HSL), the Message Passing Interface (MPI) and NumPy/SciPy. This combination makes PyNumero an excellent tool to develop numerical optimization algorithms that are interfaced with AMPL and Pyomo. Furthermore, PyNumero performs all linear algebra operations in compiled code, and is designed to avoid marshalling of data between the C and Python environments, allowing for high-level development of algorithms without a significant sacrifice in performance. We show that an implementation of the sequential quadratic programing algorithm in PyNumero has comparable solution times with the state of the art solver IPOPT when solving a dynamic optimization problem with 100K variables and constraints. The overhead from the python interface to ASL and HSL only increases the solution time by 10%.

In this presentation we describe the software design of PyNumero and demonstrate its capabilities through a series examples from different mathematical programming applications.