Skip to content
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

Subclassed phases #276

Merged
merged 28 commits into from
Feb 12, 2020
Merged

Subclassed phases #276

merged 28 commits into from
Feb 12, 2020

Conversation

robfalck
Copy link
Contributor

@robfalck robfalck commented Feb 11, 2020

Summary

  • Removes deprecated ODEOptions.
  • Version bumped to 0.15.0 due to removed deprecations.
  • The cannonball example for the docs now uses a subclassed phase which allows us to couple the phase to a specific ODE class and provide default options (units, targets, rate sources) for the states associated with that ODE.
  • Refactor of Phase so that user_*_options and *_options no longer need be be rectified at setup time by finalize_options.
  • add_state, add_control, add_polynomial_control, add_design_parameter, and add_input_parameter now have corresponding setup_state, setup_control, setup_polynomial_control, setup_design_parameter, and setup_input_parameter methods. The add methods will explicitly add the named variable to the appropriate container, while the setup methods will raise if asked to set the options of a non-existing variable.

Related Issues

Due to some limitations we currently do not allow optimal control variables to be added during setup. Instead it can be done during initialize. However the intent of #259 was to allow for the subclassing of Phases to reduce the amount of option inputs that need to be repeated, and this meets that need.

Status

  • Ready for merge

Backwards incompatibilities

The previously-deprecated ODEOptions no longer exists.

New Dependencies

None

…ecessary and have been removed.

The finalize_variables method of Phase is also now unnecessary and has been removed.
…trol, add_design_parameter, add_input_parameter, and add_polynomial_control method.
@coveralls
Copy link

coveralls commented Feb 12, 2020

Coverage Status

Coverage decreased (-0.7%) to 94.12% when pulling 0865690 on robfalck:subclassed_phases into 51cb73c on OpenMDAO:master.

@robfalck robfalck merged commit 9877139 into OpenMDAO:master Feb 12, 2020
@robfalck robfalck deleted the subclassed_phases branch September 10, 2020 13:46
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.

Allow add_state to be called in the setup method of Phase
2 participants