How to get intermediate iterates for optimizers

Viewed 28

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

1 Answers

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.

Related