Reputation: 518
I'm trying to do trajectory optimisation in Dymos (a library built atop OpenMDAO), but I'm not getting the convergence properties I'm expecting and I'd like to inspect the intermediate solutions of the solver in order to debug.
Is there a way, in OpenMDAO, to access the design variables as the solver is running, so that intermediate values can be printed or plotted? I believe this is theoretically possible as other libraries seem to provide this functionality for IPOPT (see the bottom of this page: https://cyipopt.readthedocs.io/en/stable/tutorial.html#scipy-compatible-interface), but I can't work out how to do this (or see any documentation) in OpenMDAO.
Upvotes: 0
Views: 68
Reputation: 2704
One solution would be to enable the Driver's "debug_print" option. This will print the design variables at every iteration:
Another option would be to add a recorder to the driver, so that the design variables, constraints, and objectives are recorded at each iteration. There are also options to enable the recording of other inputs and outputs in the model.
Upvotes: 1