Allow add_state
to be called in the setup method of Phase
#259
Labels
enhancement
New feature or request
add_state
to be called in the setup method of Phase
#259
Recent updates to OpenMDAO allow inputs/outputs to be specified in configure.
Because of this, we can now in theory associate state variables to be integrated with an ODE system. However, since we want to maintain ODE's as pure OpenMDAO systems with no special Dymos features, we can achieve similar benefits by using a subclassed Phase.
Given an ODE class MyODE, we can implement a Phase that always uses that given ODE as:
Then we can instantiate MyPhase and avoid having to repeat the target, rate source, and possibly units information each time we declare MyPhase. This removes the current DRY principle issue in Dymos where states need to be added with target/source information even though this is generally can be set once and never changed again.
The text was updated successfully, but these errors were encountered: