Skip to content

Multi mission opt #529

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

Merged
merged 153 commits into from
Dec 2, 2024
Merged

Multi mission opt #529

merged 153 commits into from
Dec 2, 2024

Conversation

ehariton
Copy link
Contributor

@ehariton ehariton commented Sep 11, 2024

Summary

The Goal was to create a large_single_aisle example of a multi-mission monolithic optimization to allow an aircraft to be optimized for two missions, a mission where the aircraft was full of passengers, and one where the aircraft had no passengers. The implementation contains two pre-mission, missions, and post-mission analysis followed by summing the objective functions from both analysis into a single objective.

A number of updates to the way that aircraft are described were needed to make this PR work because there was previously no notion of "Design" passenger quantities vs. "As-flown" passenger quantities. In order to make a mission that could simulate both full and empty passenger seats, a clear division was created between these two values:

New Design Terms Added:
Design.NUM_PASSENGERS
Design.NUM_BUSINESS_CLASS
Design.NUM_TOURIST_CLASS
Design.NUM_FIRST_CLASS
Mission.Design.RANGE vs. target_range

Weights for all subsystems in pre-mission are sized based on the Design.pax values. This required a number of updates throughout different subsystems. For example, the weight of the air conditioning system should not be affected by the number of passengers on the plane. Rather it is affected by how many passengers the plane was designed for. That is because we don't remove the air conditioning if there are fewer people on the plane!

A number of checks had to be added to help users if they never specified Design.pax values. Those tests, run in preprocessor.py, will assist the user in filling out Design.pax values if they are not included in the csv files, enabling backwards compatibility.

Tested with FLOPS weights and mission models.

The N3CC_data.py configuration file has been revised. This file previously called preprocess_options(). This would trigger whenever import get_flops_inputs was called causing aviary to be unable to detect what aviary_values had been set by the user and what had been left blank. preprocess_options() fills in those blank areas. Removing this call from N3CC_data.py exposed that in many of the N3CC related tests, preprocess_options() was never called so it had to be added.

All the aircraft .csv definitions were changed from specifying the as-flow passenger values to Design.pax values. This was required to make checks for the FLOPS and GASP converters work successfully. Those converters translate INGASP.PAX and 'aircraft.outputs.L0_crew_and_payload.passenger_count' to Aircraft.CrewPayload.Design.NUM_PASSENGERS, reflecting GASP and FLOPS intent to set design passengers not as-flown passengers. There are no equivalents for historical_names for as-flown passengers so those are left blank.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

jsonirobots and others added 30 commits July 23, 2024 22:00
Optimizer = 'SLSQP' # SLSQP or SNOPT


class MultiMissionProblem(om.Problem):
Copy link
Member

Choose a reason for hiding this comment

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

class MultiMissionProblem could live in aviary/interface eventually.

Copy link
Contributor Author

@ehariton ehariton Nov 12, 2024

Choose a reason for hiding this comment

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

I agree with you, but it would probably need more polish like exposing all the design variables so the user can set those without modifying MultiMissionProblem()

@@ -381,14 +391,16 @@ def load_inputs(self, aviary_inputs, phase_info=None, engine_builders=None, meta
aviary_inputs.set_val(Mission.Summary.GROSS_MASS,
val=self.initialization_guesses['actual_takeoff_mass'], units='lbm')
if 'target_range' in self.post_mission_info:
aviary_inputs.set_val(Mission.Design.RANGE, wrapped_convert_units(
aviary_inputs.set_val(Mission.Summary.RANGE, wrapped_convert_units(
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 this is the fix for the multiengine tests regressions!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah you must set this to target_range because that is how far we are actually flying. Whereas design.Range is really just for sizing subsystems, weights, and max mission range.

@@ -473,16 +486,20 @@ def check_and_preprocess_inputs(self):
if (self.analysis_scheme is AnalysisScheme.COLLOCATION) and (self.mission_method is EquationsOfMotion.TWO_DEGREES_OF_FREEDOM):
try:
# if the user provided an option, use it
analytic = self.phase_info[phase_name]["user_options"]['analytic']
analytic = self.phase_info[phase_name]["user_options"][
Copy link
Member

Choose a reason for hiding this comment

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

auto-pep sure makes some weird choices.

@cmbenne3 cmbenne3 mentioned this pull request Nov 11, 2024
@jkirk5 jkirk5 added this pull request to the merge queue Dec 2, 2024
Merged via the queue into OpenMDAO:main with commit ebd00f5 Dec 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants