-
Notifications
You must be signed in to change notification settings - Fork 67
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
Refactored the Radau transcription to avoid the use of StateIndependentsComp #1117
base: master
Are you sure you want to change the base?
Conversation
…ons as Radau. Original Radau transcription can be accessed as RadauDeprecated, but will remain until the new one is thoroughly vetted. RadauNew removes the need for the StateIndependentsComp which used a complicated hybrid IVC/implicit/explicit component implementation. RadauNew uses the same structure as the Birkhoff transcription, where initial and final values of states in the phase are double-specified...once in the array of state values, and once as initial_states:{name} or final_states:{name}. This provides a better source/target when linking phases together. An important restriction of the new radau implementation is that it no longer supports compressed transcription. Continuity constraints are implemented between segments for state and control values.
…rently. Added scarring for t_final_targets that will not work until until that feature is added to dymos.
…DE using t_final_targets.
@@ -66,7 +66,7 @@ def brachistochrone_min_time(transcription='gauss-lobatto', num_segments=8, tran | |||
# Minimize time at the end of the phase | |||
phase.add_objective('time', loc='final', scaler=10) | |||
|
|||
p.model.linear_solver = om.DirectSolver() | |||
p.model.linear_solver = om.DirectSolver(assemble_jac=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this test have problems with assembled-jac now?
@@ -9,7 +10,7 @@ | |||
OPT, OPTIMIZER = set_pyoptsparse_opt('SNOPT', fallback=True) | |||
|
|||
|
|||
@use_tempdirs | |||
# @use_tempdirs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to uncomment here and other places.
@@ -1,5 +1,6 @@ | |||
from .analytic.analytic import Analytic | |||
from .explicit_shooting import ExplicitShooting | |||
from .pseudospectral.gauss_lobatto import GaussLobatto | |||
from .pseudospectral.radau_pseudospectral import Radau | |||
from .pseudospectral.radau_pseudospectral import Radau as RadauDeprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be better to rename the module to radau_deprecated, just to alleviate confusion when viewing the file in the future. Then radau_new can become radau_pseudospectral. Otherwise, kind of mixing paradigms here.
|
||
def configure_timeseries_outputs(self, phase): | ||
""" | ||
Create connections from time series to all post-introspection sources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, "to time series" and "from all post-introspection sources"
""" | ||
Declare group options. | ||
""" | ||
self.options.declare('grid_data', types=GridData, desc='Container object for grid info.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also be recordable=False?
|
||
class RadauDefectComp(om.ExplicitComponent): | ||
""" | ||
Class definiton for the Collocationcomp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propagate rename through the docstring. -> RadauDefectComp
I think inclusion of initial and final defect are also new and should be mentioned?
…auNew now working with uncompressed transcription
…using compressed transcription.
The original Radau transcription can be accessed as RadauDeprecated, but will remain until the new one is thoroughly vetted.
RadauNew removes the need for the StateIndependentsComp which used a complicated hybrid IVC/implicit/explicit component implementation. RadauNew uses the same structure as the Birkhoff transcription, where initial and final values of states in the phase are double-specified...once in the array of state values, and once as initial_states:{name} or final_states:{name}. This provides a better source/target when linking phases together.
An important restriction of the new radau implementation is that it no longer supports compressed transcription. Continuity constraints are implemented between segments for state and control values.
Summary
Summary of PR.
Related Issues
Backwards incompatibilities
None
New Dependencies
None