2025 AIChE Annual Meeting

(593g) Optimization Abstraction Layer for Acausal/Equation-Oriented Models in Julia

Authors

Dimitri Alston - Presenter, University of Connecticut
Nirvaan Vyas, University of Connecticut
Pengfei Xu, University of Connecticut
Matthew Stuber, University of Connecticut
Engineering design and operations tasks rely on the modeling and simulation of physical systems. Accurate models allow engineers to predict system behavior under various conditions and explore scenarios that may be impractical or impossible to safely test physically. By modeling and simulating systems before building them, engineers can identify potential issues to reduce the risks of unexpected failures and optimize designs to lower costs and improve operational efficiency. These modeling efforts are enhanced by using acausal modeling---often referred to as equation-oriented modeling---tools, which allow engineers to construct basic unit operations models as components without explicit declaration of independent and dependent variables and then combine them to build arbitrarily complex systems models. Significant efforts have gone into the development of acausal/equation-oriented modeling languages across diverse disciplines from aerospace engineering to chemical engineering.

Modelica [1], IDAES [2], and ModelingToolkit [3] are popular, state-of-the-art tools used for constructing acausal models, each specializing in different aspects of system modeling. Modelica is primarily focused on model simulation and does not offer built-in optimization support without integration with external tools [1]. IDAES, built on the Pyomo framework [4], facilitates the direct integration of equation-oriented modeling and process optimization [2]. Being written in Python provides easy extensibility and access to a vast library of data management tools. ModelingToolkit is primarily used for scientific computing involving differential-algebraic equations and machine learning applications, provides preprocessing tools for structural analysis and automatic dimensionality reduction, and is part of a larger ecosystem written in Julia [3]. A critical component of design and operations tasks is the use of optimization-based decision-making tools to improve novel designs and operational efficiency. While all three packages can interface with optimization solvers to varying degrees, support is limited for dynamical systems, and none offer direct support for a general-purpose deterministic global optimizer.

This work is driven by the need for deterministic global optimization tools to be applied to complex engineering models. Physics-based models of process systems are typically nonconvex, and in many applications, guaranteed global optimality of solutions can be critical for economic viability, safety, and other reasons. For such systems models, using a deterministic global optimizer, such as BARON [5], EAGO [6], or MAiNGO [7] is necessary. Engineers using Modelica or IDAES can leverage the capabilities of solvers compatible with Pyomo [1, 2, 4] with some restrictions, but ModelingToolkit users are limited to solvers compatible with Optimization.jl [8]. Since no deterministic global optimizers are integrated into Optimization.jl [8], global solutions can only be furnished by translating models into an algebraic modeling language such as JuMP [9]. To address the current shortcomings in Julia, we propose an open-source abstraction layer that automatically translates dynamic and steady-state equation-oriented/acausal systems models developed in ModelingToolkit to optimization models in the JuMP modeling language. This connection is vital because while algebraic modeling languages such as JuMP are flexible and readily support large-scale optimization [2], they are not designed to construct these process models needed for detailed modeling and simulation.

In this talk, we will show how our abstraction layer enables us to construct nonlinear, nonconvex models using ModelingToolkit, automatically analyze and simplify the resulting system of equations, transform it into a standard JuMP model, and solve it to global optimality using EAGO. We demonstrate that this is accomplished without requiring any additional modifications to the optimizer. Due to this flexibility, our abstraction layer enables users to seamlessly integrate ModelingToolkit models into JuMP models and exploit the benefits of both tools in a unified software stack for simulation and optimization of process systems. Furthermore, users can leverage the capabilities of the open-source EAGO solver for deterministic global optimization or use another favorite solver that is compatible with JuMP.

1. Modelica Association, 2023. Modelica. URL: https://www.modelica.org/.

2. Lee, A., Ghouse, J.H., Eslick, J.C., Laird, C.D., Siirola, J.D., Zamarripa, M.A., Gunter, D., Shinn, J.H., Dowling, A.W., Bhattacharyya, D., Biegler, L.T., Burgard, A.P., and Miller, D.C. The IDAES process modeling framework and model library—Flexibility for process simulation and optimization. Journal of Advanced Manufacturing and Processing. Wiley Online Library. 3(3): e10095 (2021). DOI:10.1002/amp2.10095

3. Ma, Y., Gowda, S., Anantharaman, R., Laughman, C., Shah, V., and Rackauckas, C. ModelingToolkit: A composable graph transformation system for equation-based modeling (2021).

4. Hart, W.E., Laird, C.D., Watson, J.P., Woodruff, D.L., Hackebeil, G.A., Nicholson, B.L., and Siirola, J.D. Pyomo — Optimization Modeling in Python. Springer. (2017). ISBN: 978-3-319-58821-6.

5. Sahinidis, N.V. BARON: A general purpose global optimization software package, Journal of Global 8: 201-205 (1996). DOI: 10.1007/bf00138693.

6. Wilhelm, M.E. and Stuber, M.D. EAGO.jl: easy advanced global optimization in Julia.
Optimization Methods and Software. 37(2): 425-450 (2022). DOI: 10.1080/10556788.2020.1786566

7. Bongartz, D., Najman, J., Sass, S., & Mitsos, A. MAiNGO - McCormick-based Algorithm for mixed-integer Nonlinear Global Optimization. Process Systems Engineering (AVT.SVT), RWTH Aachen University (2018). URL: https://lirias.kuleuven.be/retrieve/754260

8. Dixit, V.K., and Rackauckas, C. Optimization.jl: A Unified Optimization Package (v3.12.1). Zenodo. (2023). DOI: 10.5281/zenodo.7738525

9. Lubin, M., Dowson, O., Garcia, J.D., Huchette, J., Legat, B., and Vielma, J.P. JuMP 1.0: Recent improvements to a modeling language for mathematical optimization. Mathematical Programming Computation, 15: 581-589 (2023). DOI: 10.1007/s12532-023-00239-3.