Multimission v2#842
Conversation
… fuel_burn as str inputs
… easy access later
…th om.group in that case. In all single-mission cases it is still AviaryGroup()
…inputs() and into load_inputs() / add_aviary_group()
| # Update the reference to the newly merged meta_data. | ||
| group.meta_data = self.meta_data | ||
|
|
||
| def add_aviary_group(self, name: str, aircraft: AviaryValues, mission: dict, verbosity=None): |
There was a problem hiding this comment.
Could you add engine_builders and meta_data arguments here and pass them to load_inputs so we can bring in custom meta data and engine builders?
There was a problem hiding this comment.
engine_builders has been added. meta_data can be loaded with add AviaryProblem.
|
This will clean-up our multimission code quite a bit, thank you! I'm trying to adopt this change in our code, still getting some errors but will let you know how it works. This is not directly relevant, but I think |
…ne and meta data inputs to add_aviary_group, 1449 passed 50 skipped 0 failed checks
Summary
Multi-mission enables a user to input one or more aircraft definitions (aviary_inputs) and a matching number of mission definitions (phase_info) to create a composite objective function who's weighting is specified by the user. In this PR we completely revamp the multi-mission capabilities of Aviary which were previously broken by an OpenMDAO release. As part of this PR, a number of examples were cleaned up / shortened for decrease verbosity and to make use of some of the new methods created in the PR.
General Changes that could affect all users:
prob.AviaryGroup. Most all of the original functions contained in methods_for_level2 have been forwarded down into AviaryGroup(). This allows us to set values, link phases, and create subsystems in individually on each group without interfering with the other groups.build_model()method combines calls toadd_pre_mission_systems(),add_phases(),add_post_mission_systems(),link_phases()that are often used by the user without modification. The individual supporting methods can still be accessed at level 2 if the user needs to add more detail to those inputs.setup()will now automatically callset_initial_guesses()This will allow users to removeset_initial_guesses()from their code making things less verbose.add_composite_objective()andadd_composite_objective_adv(). These methods can be used with any mission type.Mission.Summary.FINAL_MASSandMission.Summary.FINAL_TIMEwere added to the variable meta data to enable users to reference the last point in the mission phase without usingloc=-1calls. This allows users easy access to information from the last mission phase run in dymos. If you are adding custom ExecComp() at the end of your mission i.e. to do taxi-to-gate without a dymos phase, these values will not reflect that and you will need to update them for your specific implementation.meta_dataas an input. This allows the user to first combine all different meta data they have usingav.merge_hierarchiesand then to input that into the AviaryProblem.Multi-mission specific changes
ProbelmType = MultiMissionseparate aviary problems will now be instantiated inprob.model.AviaryGroup0,prob.model.AviaryGroup1etc.add_aviary_group(),promote_inputs(),add_design_var_default(), andset_design_range().add_composite_objective()andadd_composite_objective_adv()to quickly specify composite objectives such as fuel from mission 1 + payload capacity from mission 2.add_aviary_group()will not accept .csv files. If the user needs to start from an aircraft defined by a .csv, we recommend examininglarge_single_aisle_2_FLOPS_data.pyfor an example of how the .csv needs to be converted. An automated converter will be supplied in the future. You may be able to useparse_inputs()to achieve this before an official converter is supplied by the dev team.Related Issues
Backwards incompatibilities
None
New Dependencies
None