-
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
Timeseries Expressions #846
Conversation
… is an expression
…its input variables
…es output is an expression. If it is, then the output name option is used instead of the name
…ensured no white spaces are left in variable names
…n the explicit shooting transcription
…apalli/dymos into timeseries_expr
…apalli/dymos into timeseries_expr
|
||
class TimeseriesOutputGroup(om.Group): | ||
def initialize(self): | ||
self.options.declare('timeseries_output_comp', types=TimeseriesOutputCompBase, |
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.
adding option recordable=False
will silence a lot of the warnings showing up on CI.
@@ -276,9 +281,10 @@ def setup_timeseries_outputs(self, phase): | |||
output_subset=options['subset'], | |||
time_units=phase.time_options['units']) | |||
|
|||
phase.add_subsystem(name, subsys=timeseries_comp) | |||
timeseries_group = TimeseriesOutputGroup(has_expr=has_expr, timeseries_output_comp=timeseries_comp) | |||
phase.add_subsystem(name, subsys=timeseries_group) |
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.
use argument promotes_inputs=['*'], promotes_outputs=['*']
here so that things can be addressed as timeseries.foo
rather than timeseries.timeseries_comp.foo
elsewhere in the code. That should make the contents of the timeseries group irrelevant to the user.
As long as you do this promotion for both the enclosed exec comp and the enclosed TimeseriesComp, connections will not have to change and any common inputs between the two components will be implicitly connected.
…pass keyword arguments to the enclosed ExecComp.
…ik_timeseries_expr
More test and timeseries expression keyword arguments
… avoid mangling absolute shape and relative shape
I'm going to merge this in and deal with the latest jaxlib issue after. |
Summary
Added capability to add custom expressions as outputs to the timeseries.
Related Issues
Backwards incompatibilities
Minor changes to how timeseries outputs are called.
Where previously
p.model.phase0.timeseries.get_io_metadata(iotypes=('input', 'output'), get_remote=True)
would return a dict keyed bystates:foo
, nowp.model.phase0.timeseries.timeseries_comp.get_io_metadata(iotypes=('input', 'output'), get_remote=True)
must be called.Similarly, when using
output_dict = dict(p.model.list_outputs())
, the resulting dict is keyed bytraj.phases.phase0.timeseries.timeseries_comp.foo
instead oftraj.phases.phase0.timeseries.foo
An alternative is to call
get_promoted_vars(p.model, io_types='output')
. This will yield a dict keyed bytraj.phase0.timeseries.foo
New Dependencies
None