OpenMDAO / dymos

Open Source Optimization of Dynamic Multidisciplinary Systems
Apache License 2.0
208 stars 66 forks source link

Updated parameter introspection and traj parameters #964

Closed robfalck closed 1 year ago

robfalck commented 1 year ago

Summary

Trajectory parameters now pull introspection data from constituent phases even under MPI. Phase parameters now allow for a mixture of static and dynamic targets.

Deprecated static_target in favor of static_targets which is a set of those targets which are static.**

Previously option static_target was an all-or-nothing setting for a parameter. Now option static_targets is a set of targets to which the connection is treated as a static one (not sized with the number of nodes in the phase. Dymos will use introspection to attempt to determine which targets are static. static_targets may still be provided as an "all-or-nothing" True or False option.

Changes to internal method _get_targets_metadata

The method now returns a dictionary keyed by target path and associated with metadata (shape, units, value, tags) of the given target.

Added new introspection method _get_common_metadata

This method will accept targets and a metadata key, and then return the value of the given metadata key if it is shared across all targets. This is useful when trying to infer the units or shape of a parameter.

Changes to ODEEvaluationGroup

Under the ExplicitShooting transcription, ODEEvaluationGroup is required to perform its own introspection since its configure method occurs before that of the parent phase. This group is now passed copies of the time, state, control, and parameter options dictionaries of the parent phase, so that results of its introspection will not conflict with those of the parent phase.

Related Issues

Backwards incompatibilities

None

New Dependencies

None

coveralls commented 1 year ago

Coverage Status

coverage: 92.674% (+0.1%) from 92.569% when pulling 103b9c27ba91d93fc5be9821689a59148035efc5 on robfalck:traj_params_update into 1aca42a4fedcca6e493c5516fadc2d78e4709797 on OpenMDAO:master.