OpenMDAO / dymos

Open Source Optimization of Dynamic Multidisciplinary Systems
Apache License 2.0
212 stars 67 forks source link

Bokeh Timeseries Plots fail if the time variable is renamed. #1051

Open robfalck opened 8 months ago

robfalck commented 8 months ago

Description

Running run_problem with make_plots=True will fail if any phase has a renamed time variable and the name 'time' is not otherwise present.

The ways to fix this are:

  1. (preferred) Calculate time and include it in the timeseries. This is preferable when there are multiple phases in a single trajectory and only some of them rename the time variable.

  2. Use introspection to detect a time variable name in the trajectory (Either the first one, or perhaps the most commonly used name).

Example

The test test_results_gauss_lobatto_renamed_time in the min time climb tests will demonstrate this problem if the corresponding call to run_problem uses make_plots=True.

Dymos Version

1.10.1-dev

Relevant environment information

No response