-
Notifications
You must be signed in to change notification settings - Fork 76
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
Methods for level 2 revamp part 1. #651
Methods for level 2 revamp part 1. #651
Conversation
…thods_for_level_2 __init__() and load_inputs() functions. Enums was updated to have a custom input for the problem builder, elements inside load_inpus() were rearranged to simplify the number of additional functions per builder to be only 2. These consist of an initial guesses and defaults function, and a default location to check for phase_info if none is provided.
fix_initial=fix_initial, fix_duration=fix_duration, units=time_units, | ||
duration_bounds=user_options.get_val("duration_bounds", time_units), | ||
duration_ref=user_options.get_val("duration_ref", time_units), | ||
initial_ref=initial_ref, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we not applying the initial_bounds that the user supplied here??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is potentially an oversight. We should treat initial_bounds just like initial_ref -- none unless mpi.
…gine_deck() when no deck is supplied into each of the 3 different builders.
…roblem_builders. left all objective calcs in m4l2 because even if your running shooting, they could be useful and don\t have a large computational cost
…nto builders2, removed extra line
…ing probably isnt quite right in there. alternative_mission was calling mass_methods based on ODE, but add_post_mission_systems was calling based on mass_method!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional sugestions:
Change name to ProblemConfigurator (suggested file names, two_dof_problem_configurator.py
, energy_problem_configurator.py
)
Create a base class for the configurators to define the interface
aviary/core/AviaryGroup.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been naming all of our files with snake case so far, so let's keep these consistent as well
aviary/core/__init__.py
Outdated
@@ -0,0 +1 @@ | |||
__version__ = "0.9.7-dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy/paste from old file? This should be blank right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. This was definitely accidental.
Latest updates fixed the naming of the new classes, bringing them in line with standards. Also added a base class. |
Mission.Design.RANGE, units='NM') | ||
self.builder.initial_guesses(self) | ||
# This function sets all the following defaults if they were not already set | ||
# self.engine_builders, self.mass_method, self.pre_mission_info, self_post_mission_info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like mass_method is not dealt with in here after all, we deal with it further up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I have removed it.
height energy phases. | ||
""" | ||
|
||
def initial_guesses(self, prob): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have both initial_guesses()
(Set any initial guesses for variables in the aviary problem) and add_guesses()
(Adds the initial guesses for each variable of a given phase to the problem.). I'm wondering if we can consolidate? I'm sure that the reason we have two is because we setup guesses in two places in M4L2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is kind of weird, and something we didn't really notice until we pulled the code out. I think untangling all of these strands is going to be difficult, but will result in more maintainable code.
Summary
mission_method
.This is a first pass at some refactoring that will allow for more customization.
Related Issues
Backwards incompatibilities
None
New Dependencies
None