(216d) Why Doesn't My NLP Converge? – Debugging Nonlinear Programs with an Intermediate Callback | AIChE

(216d) Why Doesn't My NLP Converge? – Debugging Nonlinear Programs with an Intermediate Callback

Authors 

Parker, R. - Presenter, Carnegie Mellon University
Dowling, A., University of Notre Dame
Allan, D. A., University of Wisconsin Madison
Nonlinear optimization is a powerful decision-support tool in chemical engineering and a critical component of many process control algorithms. However, while nonlinear local optimization algorithms have global convergence proofs, solvers can fail to converge in practice for a variety of reasons including poor conditioning, degeneracy, cycling, and local infeasibility. In such cases, the reasons for non-convergence can be difficult to identify, especially if a higher level algebraic modeling environment such as AMPL, GAMS, Pyomo, or JuMP is used to communicate with the solver and if the solver’s internal data structures are not available in the user’s programming environment. Tighter integration of the modeling language and solver can help identify causes of failure by allowing investigation of a solver’s internal data structures with potentially model-specific debugging routines. In particular, the intermediate callback provided by the nonlinear optimization solver Ipopt can be used to investigate the primal-dual iterates and infeasibilities during the iterations of a solve. If derivative information of the optimization problem is available, Jacobian and Hessian matrices may be investigated as well. In a full-featured programming language like Python or Julia, linear algebra and graph theory packages are available, allowing sophisticated analysis of the state of the optimization problem at every iteration.

This presentation demonstrates the use of Ipopt’s intermediate callback in conjunction with matrix factorizations and graph-based decompositions to diagnose sources of ill-conditioning and degeneracy in nonlinear optimization problems. We use singular value decomposition and the degeneracy-locating integer program of [1] as well as Dulmage-Mendelsohn and block triangular decompositions of the variable-constraint incidence matrix, as in [3]. These approaches are demonstrated on nonlinear optimization problems from the IDAES modeling framework [2] using the CyIpopt interface to access the intermediate callback and PyNumero [4] for complete derivative information. We present insights that can be gained from these analyses as well as software tools to facilitate these debugging procedures.

References:

[1] Dowling and Biegler. "Degeneracy Hunter: An algorithm for determining irreducible sets of degenerate constraints in mathematical programs". 2015.

[2] Lee et al. "The IDAES process modeling framework and model library--Flexibility for process simulation and optimization". 2021.

[3] Parker et al. "An application of the Dulmage-Mendelsohn partition for the analysis of a discretized dynamic chemical looping reactor model". 2023.

[4] Rodriguez et al. "Scalable parallel nonlinear optimization with PyNumero and Parapint". 2023.