Skip to content
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

removed duplicate code and clarified error message on duration bounds #608

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ehariton
Copy link
Contributor

Summary

Modifying the phase_info is one of the easiest ways to break a problem. In the long-term, we should limit interactions with phase_info to graphical-based tool for level1 and level2 users. However, for level3 users, we must rebuild phase_info to be more intuitive, systematic, and less error-prone.

Proposed Changes with this PR:

  1. New naming scheme for all elements inside of phase info. The current naming scheme was built piecemeal as additional states and controls were added to the problem. As such the naming convention of items here is inconsistent. For example, 'optimize_mach', 'mach_bounds', initial_mach, final_mach, and fix_initial all modify some aspect of the mach state. They should all start with mach. And items like fix_initial which modify both mach and altitude should be split into two items. Proposed changes would be that all of these names would start with mach_X_modifier, thus we would have mach_optimize, mach_initial, mach_bounds, mach_initial_fix.
  2. There is no concise list of what options need to be called for the different ODE methods. Some methods require more inputs than others. To solve this, each ODE method must check phase_info for the minimum required list of inputs in check_phase_info.py. Additionally, each ODE method should list it's required inputs in the docs (https://openmdao.github.io/Aviary/getting_started/input_csv_phase_info.html).
  3. Range vs. Distance and Time vs. Duration, are actually the same item in different reference frames. Distance is measured relative to the start of the phase and range is measured relative to the start of the mission. Duration is measured relative to the start of the phase and time is measured relative to the start of the mission. Having two words for the same thing is a bit confusing. Also, it gets even worse when trying to get the user to set these values and something like initial_guesses[time`] is in (absolute,relative) units. Right now there is not descriptions for the user on the docs page telling them the differences between these items and describing the absolute vs. relative nature of the values that must be set for any of them.
  4. You cannot set ref values for all states in the phase info, only some of them (like time).
  5. Understanding all the boundary conditions / path constraints etc is complicated, but can easily be taught with wires, pegs, and a chalkboard. We need a youtube video walkthrough on what all these different elements mean and how to use them.

Related Issues

Backwards incompatibilities

None

New Dependencies

None

self.phase_info[phase_name]['user_options']['duration_bounds'], 's')
guesses["time"] = ([np.mean(initial_bounds[0]), np.mean(
duration_bounds[0])], 's')

# if time not in initial guesses, set it to the average of the initial_bounds and the duration_bounds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the second block of code is the one that should be removed. The first one adds "time" to the guesses, so the second block will neve execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

phase_info checks and documentation
2 participants