Second-Order Optimality Measure in Matlab

535 Views Asked by At

Is there any code for the second-order optimality measure in constrained optimization in Matlab? More precisely, I am using fmincon, and I want to find the bordered Hessian matrix. Is there any way in Matlab to calculate the bordered Hessian matrix at the optimum point?

1

There are 1 best solutions below

8
On

fmincon does not currently do what you want. What you need can be computed as shown below.

hessian can be included as the last output argument in a call to fmincon. As documented at https://www.mathworks.com/help/optim/ug/hessian.html , the returned hessian is the Hessian of the Lagrangian at the "optimum" point.

The 2nd order optimum condition is that the Hessian of the Lagrangian projected into the nullspace of the Jacobian of active constraints is symmetric positive semidefinite (psd).

First find all the active linear and nonlinear constraints (i.e., all equalities and those inequalities (including bound constraints) satisfied with equality to within numerical tolerance). Then caclulate the Jacobian matrix of these active constraints, call it J. Then calculate a basis for the nullspace of J as Z = null(J) . The Hessian of the Lagrangian projected into the nullspace of the Jacobian of active constraints is then Z' * hessian * Z, which should be assessed for positive semidefiniteness. Note that if hessian (i.e., the Hessian of the Lagrangian) is psd, you can conclude that its projection into the nullspace of the Jacobian of active constraints must be psd, even without performing the projection; however, the projection might be psd when the unprojected hessian is not.