OpenMDAO / dymos

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

Make `t_duration` and `t_initial` valid targets for parameters in a trajectory. #415

Closed Kenneth-T-Moore closed 4 years ago

Kenneth-T-Moore commented 4 years ago

Summary of Issue

Make t_duration and t_initial valid targets for parameters.

Issue Type

Description

Before the recent refactors, this was possible with trajectory.connect because of the indepvarcomp. The proper way now is to make them reachable as targets inside the trajectory.add_parameter method. We should be able to accomplish this by modifying get_parameter_connections for the various transcriptions.

Example

Environment

Operating System: <i.e. OS X 10.14.6, Windows 10, Ubuntu 16.04> Python environment: <i.e. Anaconda Python 3.7.1> Packages: <versions of Dymos, OpenMDAO, and other pertinent Python packages. You can just paste the output of pip freeze here.>

robfalck commented 4 years ago

Closing, as this causes more issues than it's worth. The correct way to handle this is to set input_initial or input_duration to True in the time options and issue connections manually if so desired. In fact, t_initial and t_duration are, in a way, already parameters...static values which affect the entirety of the phase. Recasting them as parameters really only obfuscates things.