For SNOPT, or any other optimizer,
How do I get the intermediate iterate values?
For example, the gradient values
And the values of the Lagrangian multipliers
For SNOPT, or any other optimizer,
How do I get the intermediate iterate values?
For example, the gradient values
And the values of the Lagrangian multipliers
You can try AddVisualizationCallback function in MathematicalProgram, and inside this callback function you can compute and print the gradient. Sorry the name is misleading (it can be used not just for visualization, but actually any callback).
Unfortunately this callback function doesn't return the Lagrangian multipliers.