pyoptsparse
pyoptsparse copied to clipboard
Improve printing of optimization and solution objects
Description
The current str() implementation can be improved:
- objective value should not be initialized to zero. Instead should be
Noneand a placeholder text should be shown - same for constraint values
- same with Lagrange multipliers
-
optProbvariable values are wrong after optimization- also check that the initial values are correct
- should have a description of what
statusis expected to show
Related to this issue, see #255 . I think we need to refactor the way the Optimization instance is updated so that when printing the solution at the end, functions and variables are consistent.
This should be an alternative to check History.getValues(callCounters='last') when e.g. history is not turned on.