Skip to content

Phases now have simulate_options #610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 25, 2021
Merged

Conversation

robfalck
Copy link
Contributor

Summary

Phases now have simulate_options, which currently consists of the method, atol, rtol, first_step, and max_step options used by scipy.integrate.solve_ivp.

The user may set these options through the options dictionary interface:

phase.simulate_options['method'] = 'RK23'
phase.simulate_options['atol'] = 1.0E-4

or through the new set_simulate_options method that allows setting multiple values at once:

phase.set_simulate_options(method='RK23', atol=1.0E-4)

This allows phases to each have their own appropriate solve_ivp settings when using simulate from the trajectory level, or when using the dymos.run_problem interface with simulate=True.

Once the new documentation is up, this capability will be added to the new documentation.

Related Issues

Status

  • Ready for merge

Backwards incompatibilities

  • Some users reported problems with the default tolerances. The scipy.integrate.solve_ivp default values for atol and rtol are now the defaults for simulate.
  • There are some changes to the arguments some methods within phase, notably get_simulation_phase. Most users should not see any difference since these methods are internal (and should probably be underscored in the future to convey that fact).

New Dependencies

None

… changing multiple options quickly.

Default atol and rtol for solve_ivp are now the scipy.integrate.solve_ivp results! (backwards incompatible)
Changed the order of some arguments in some API methods (phase.get_simulation_phase), but users are unlikely to encounter this.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 96.624% when pulling 2d0a4b0 on robfalck:simulate_options into 66af426 on OpenMDAO:master.

@robfalck robfalck merged commit 3ec4a8f into OpenMDAO:master Jun 25, 2021
@robfalck robfalck deleted the simulate_options branch August 25, 2022 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give user access to simulate/solve_ivp options from run_problem interface.
3 participants