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

Multi mission opt #529

Open
wants to merge 145 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
c24d4a6
cannonball multi mission exampls
jsonirobots Jul 24, 2024
e1c7721
pseudocode for multi mission aviary example
jsonirobots Jul 24, 2024
a2b70c0
checkpoint
jsonirobots Jul 24, 2024
079313b
checkpt
jsonirobots Jul 24, 2024
232e98a
checkpt
jsonirobots Jul 24, 2024
4c96f15
checkpt
jsonirobots Jul 24, 2024
6ab89ad
checkpt
jsonirobots Jul 24, 2024
9b64e70
added c5 mission variants csvs and phaseinfos
jsonirobots Jul 24, 2024
16034f4
multiple missions optimize, but no affect on results yet
jsonirobots Jul 24, 2024
754ab91
removed indepedentvarcomp to handle common inputs
jsonirobots Jul 25, 2024
9c284ba
attempt to import multiple missions as dymos trajectories for multi m…
jsonirobots Jul 25, 2024
f651838
Merge branch 'main' of https://github.com/OpenMDAO/Aviary into multi_…
jsonirobots Jul 25, 2024
aebe4d2
aviary style cannonball problem
jsonirobots Jul 26, 2024
a634ee3
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Jul 26, 2024
4abb769
working cannonball model with trajectory/pre mission copying
jsonirobots Jul 26, 2024
de3598e
updated next steps for multimission
jsonirobots Jul 29, 2024
4ffdbca
checkpt
jsonirobots Jul 29, 2024
d724b29
Merge branch 'main' of https://github.com/jsonirobots/Aviary into mul…
jsonirobots Jul 30, 2024
9bc6c30
checkpt on min time to climb example
jsonirobots Jul 30, 2024
6a32d97
renamed files, added copy model cannonball example
jsonirobots Jul 31, 2024
8c11e98
renamed single mission file
jsonirobots Jul 31, 2024
c2065d5
added N2s for all examples
jsonirobots Jul 31, 2024
abcf2bf
fixed randomness issues with min time climb, increasing num of segments
jsonirobots Jul 31, 2024
2322184
updated methods for level 2 with initial vals able to use set val on …
jsonirobots Jul 31, 2024
d358843
cehckpt
jsonirobots Jul 31, 2024
c3c3004
restructured files
jsonirobots Aug 1, 2024
09e22c0
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Aug 1, 2024
cf1fcfd
checkpt
jsonirobots Aug 1, 2024
9053df3
reasonable multi mission for min time to climb, plot helper for min t…
jsonirobots Aug 1, 2024
5a6acb0
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Aug 1, 2024
531c41f
added comparison func to multi min time climb to compare with singula…
jsonirobots Aug 2, 2024
cff9d90
added weight comparison to min time to climb example
jsonirobots Aug 2, 2024
8ddd879
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Aug 2, 2024
fe80d84
Merge branch 'multi_mission_opt' of https://github.com/jsonirobots/Av…
jsonirobots Aug 2, 2024
6cb7800
easier phase infos
jsonirobots Aug 5, 2024
2b1a834
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Aug 6, 2024
63a69c9
added simple single aviary runfile
jsonirobots Aug 6, 2024
19fd974
updated objective to use Aviary's fuel obj
jsonirobots Aug 6, 2024
b1d227e
comparable outputs for multi mission and single missions
jsonirobots Aug 6, 2024
40aeca1
0/1 unknown results but need to save
ehariton Aug 6, 2024
d5d92b1
updated to use problem type alternate for gtow constraints
jsonirobots Aug 6, 2024
468f39b
remove scaling from flight_phase_builder b/c not needed
ehariton Aug 6, 2024
ec63557
modification to mission.summary.range and mission.design.range to mak…
ehariton Aug 6, 2024
f4d9b20
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Aug 6, 2024
a222642
merge
jsonirobots Aug 6, 2024
e527922
tried to apply fix for actual_range connection for 2DOF collocation
ehariton Aug 6, 2024
1bf30d8
Merge branch 'multi_mission_opt' of https://github.com/ehariton/om-Av…
jsonirobots Aug 6, 2024
52a8d43
Merge branch 'multi_mission_opt' of https://github.com/jsonirobots/Av…
jsonirobots Aug 6, 2024
8ffc2fc
successful optimization
jsonirobots Aug 6, 2024
a41243e
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Aug 7, 2024
369d478
added plotting for multi mission
jsonirobots Aug 7, 2024
e4ebccf
Merge branch 'multi_mission_opt' of https://github.com/jsonirobots/Av…
jsonirobots Aug 7, 2024
3c094f9
updated plot functions to be a multi mission method
jsonirobots Aug 7, 2024
8dd0fa1
Merge branch 'OpenMDAO:main' into multi_mission_opt
jsonirobots Aug 7, 2024
7be2476
updated output printing, added easy option to optimize all altitudes/…
jsonirobots Aug 7, 2024
3a8caa4
Merge branch 'multi_mission_opt' of https://github.com/jsonirobots/Av…
jsonirobots Aug 7, 2024
320e0a6
renamed a file, added a comment
ehariton Aug 8, 2024
7eaf8c5
merged in jatins latest edits
ehariton Aug 12, 2024
d85b692
added min and max range to get_design_range
ehariton Aug 12, 2024
1f73bb1
added some comments. Opt running fine
ehariton Aug 12, 2024
2a508f6
moved c5 example files
ehariton Aug 16, 2024
8a299a6
working example where user must specify TOUCHDOWN_MASS or LANDING_TO_…
ehariton Aug 26, 2024
d8d28d2
small changes to takeoff_to_landing mass ratios input handling
ehariton Sep 4, 2024
47de110
created FwFm multi mission, added design vars for crew passengers, ne…
ehariton Sep 5, 2024
e0044d2
no longer having nan errors on run_multimission_example.py, but dymos…
ehariton Sep 5, 2024
d8bfcab
FwFm example running, but dymos error at end
ehariton Sep 5, 2024
b6c99c1
removed comments
ehariton Sep 5, 2024
38cbb5e
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Sep 5, 2024
70b6c4b
disabled make plots
ehariton Sep 5, 2024
721d427
added list_vars() to show all outputs from final case
ehariton Sep 5, 2024
3b60925
major changes to update Aircraft.CrewPayload.Design.NUM_PASSENGERS in…
ehariton Sep 5, 2024
31abe1e
added a few more printed outputs at end of mission
ehariton Sep 6, 2024
7c86741
fixed phase_info assignments
ehariton Sep 6, 2024
d79f3d6
removed c5 and FwFm multi mission examples files, replaced with large…
ehariton Sep 11, 2024
6ccc97f
removed more c5 folders
ehariton Sep 11, 2024
1cb3a9e
removed FwFm.csv changes
ehariton Sep 11, 2024
deab1d6
Connected mass of first flight phase to gross_mass
kaushikponnapalli Sep 11, 2024
e16273c
removed additional unneeded files
ehariton Sep 11, 2024
052acc9
moved createN2 into run_multimission example temporarily
ehariton Sep 11, 2024
2c77bf0
removed deck obsoluted since c5 examples were also removed
ehariton Sep 11, 2024
5240e66
Merge branch 'fix_initial_bug' of github.com:kaushikponnapalli/Aviary…
ehariton Sep 11, 2024
8aa0938
updates to preprocessor to ensure that proper checks are being run on…
ehariton Sep 18, 2024
6664fda
big updates to preprocessor, but checks there still failing because …
ehariton Sep 20, 2024
dcbab17
preprocessor.py modified to work even if user inputs 0 value for num_…
ehariton Sep 20, 2024
97ad874
fixing conflicts with main
ehariton Sep 23, 2024
c031aba
Modified pre processor with Chris Bennett to correctly capture and re…
ehariton Sep 23, 2024
663dd10
added shortening of preprocessor call to methods for level 2
ehariton Sep 23, 2024
31f08d2
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Sep 24, 2024
ec003b3
upd preprocessor INFO messages, added design. values into all FLOPS t…
ehariton Sep 24, 2024
61ceb38
added warning messages to target_range selection, fixed errors in Tes…
ehariton Sep 24, 2024
ee7783b
changed num_pax to design.num_pax for several tests. converter_config…
ehariton Sep 24, 2024
aa8e6ce
still trying to track down OEM_winfuel_mass issues
ehariton Sep 26, 2024
265a598
assumed all old flops and leaps names with conflicts between design v…
ehariton Sep 26, 2024
8fbce59
test_mass_summation.py working after CrewPayload.NUM_PAX added back i…
ehariton Sep 26, 2024
2107ea5
added Design.NUM_PASSENGERS for many test_mass_summation.py tests
ehariton Sep 26, 2024
ab89254
fortran_to_aviary fixes
ehariton Sep 26, 2024
38ba193
fortran to aviary fixes
ehariton Sep 26, 2024
b3357a0
resolved test_fortran_to_aviary alphabetical ordering required in .csv
ehariton Sep 26, 2024
62bceea
pep8
ehariton Sep 26, 2024
1444b7d
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Sep 26, 2024
6af83b6
pep8 2!
ehariton Sep 26, 2024
8312d5e
better error messages in preprocessor.py
ehariton Sep 26, 2024
dfd19e8
upd GwGm.csv to have design.num_pax because some tests using this fil…
ehariton Sep 26, 2024
a5dc791
added design.pax values to all .csv in test_aircraft
ehariton Sep 26, 2024
dc50de6
added mission.Summary.Range assignment to 2DOF execution path (not 2D…
ehariton Sep 27, 2024
6badde0
merge with main complete and running
ehariton Oct 7, 2024
a7df3fe
changed target range on test_bench_GwGm_shooting to correctly reflect…
ehariton Oct 7, 2024
661b01e
restored link_{first_flight_phase_name}_mass.lhs:mass in methods for …
ehariton Oct 8, 2024
afc3abf
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Oct 10, 2024
20b109f
Merge branch 'battery' of github.com:jkirk5/om-Aviary into multi_miss…
ehariton Oct 10, 2024
9a74233
Merge branch 'battery' of github.com:jkirk5/om-Aviary into HEAD
ehariton Oct 10, 2024
329aa43
moved HE mass connections to post_mission
ehariton Oct 10, 2024
debc6f2
removed target_range warnings because unnecessary in cases where goal…
ehariton Oct 10, 2024
6ae3b46
removed duplicate code
ehariton Oct 10, 2024
a293692
Merge branch 'multi_mission_opt' of github.com:ehariton/om-Aviary int…
ehariton Oct 10, 2024
b0cf08f
added comments back into methods for level2
ehariton Oct 10, 2024
865df7a
resolved merge issues
ehariton Oct 10, 2024
83b3137
language and comments changes
ehariton Oct 11, 2024
c32b57b
removed unneeded print statement
ehariton Oct 11, 2024
92080a9
comments changes
ehariton Oct 11, 2024
cb88006
reverted two files related to battery that should not have been chang…
ehariton Oct 11, 2024
3c29bbe
first cut at docs and examples for multi-mission
ehariton Oct 15, 2024
bbe99a8
merge conflicts resolved
ehariton Oct 17, 2024
f89276e
added ProblemType.MULTI_MISSION, and modified multi-mission problem t…
ehariton Oct 17, 2024
3352e69
Merge branch 'main' into multi_mission_opt
ehariton Oct 28, 2024
78a2320
Correctly connected inputs to objectiv from group0 and group1. Change…
ehariton Oct 29, 2024
a745cf5
completed changes from 1st round of reviews except for changing detec…
ehariton Oct 29, 2024
0059954
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Oct 29, 2024
734d941
Merge branch 'multi_mission_opt' of github.com:ehariton/om-Aviary int…
ehariton Oct 29, 2024
48b6a05
small tweak to verbosity code call
ehariton Oct 29, 2024
096e77e
fixed settings verbosity and removed proprocess_options() from N3CC m…
ehariton Oct 29, 2024
e9c0406
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Oct 29, 2024
631c4b4
fixed preprocess_options inports for multiple N3CC related tests. rem…
ehariton Oct 30, 2024
1021d63
glue updates and variable_meta_data spaces removed
ehariton Oct 30, 2024
98ccb21
added more glue, removed printing of span and area and Design.Fuel_ma…
ehariton Oct 30, 2024
bf5a284
added preprocess_options to N3CC examples in docs. typo in glue fixed…
ehariton Oct 30, 2024
4b24874
updated toc.yml with multi_missions references
ehariton Oct 30, 2024
9a598c5
consolidated naming for multi_mission and updated references
ehariton Oct 30, 2024
2377136
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Oct 30, 2024
522e1c5
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Nov 4, 2024
65b4778
set verbosity, removed checks on keys because they are already set by…
ehariton Nov 4, 2024
6ad6148
added in warning suppression for openmdao
ehariton Nov 4, 2024
8a7a1d9
updated objective to Mission.Summary.FUEL_BURNED and still got good r…
ehariton Nov 4, 2024
a94e0e0
Merge branch 'main' of github.com:OpenMDAO/om-Aviary into multi_missi…
ehariton Nov 4, 2024
ae0915a
reverted setting default_values of passenger counts because some sub-…
ehariton Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions aviary/docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ parts:
- file: user_guide/features/overriding
- file: user_guide/FLOPS_based_detailed_takeoff_and_landing
- file: user_guide/reserve_missions
- file: user_guide/multi_mission
- file: user_guide/off_design_missions
- file: user_guide/SGM_capabilities
- file: user_guide/troubleshooting
Expand All @@ -57,6 +58,7 @@ parts:
- file: examples/coupled_aircraft_mission_optimization
- file: examples/additional_flight_phases
- file: examples/reserve_missions
- file: examples/multi_mission
- file: examples/off_design_example
- file: examples/OAS_subsystem
- file: examples/level_2_detailed_takeoff_and_landing
Expand Down
Binary file added aviary/docs/examples/images/multi_mission.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
165 changes: 165 additions & 0 deletions aviary/docs/examples/multi_mission.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,25 @@
"execution_count": null,
"id": "5fe75e1d",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mRunning cells with 'base (Python 3.12.5)' requires the ipykernel package.\n",
"\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
"\u001b[1;31mCommand: 'conda install -n base ipykernel --update-deps --force-reinstall'"
]
}
],
"source": [
"from aviary.api import Dynamic, Mission\n",
"\n",
"import aviary.api as av\n",
"\n",
"from aviary.models.N3CC.N3CC_data import inputs\n",
"from aviary.utils.preprocessors import preprocess_options\n",
"\n",
"aviary_options = inputs.deepcopy()\n",
"\n",
Expand Down Expand Up @@ -82,6 +94,7 @@
"# We also need propulsion analysis for takeoff and landing. No additional configuration\n",
"# is needed for this builder\n",
"engine = av.build_engine_deck(aviary_options)\n",
"preprocess_options(aviary_options, engine_models=engine)\n",
"prop_builder = av.CorePropulsionBuilder(engine_models=engine)"
]
},
Expand Down Expand Up @@ -633,7 +646,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -647,7 +660,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
83 changes: 83 additions & 0 deletions aviary/docs/user_guide/multi_mission.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mRunning cells with 'base (Python 3.12.5)' requires the ipykernel package.\n",
"\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
"\u001b[1;31mCommand: 'conda install -n base ipykernel --update-deps --force-reinstall'"
]
}
],
"source": [
"# Testing Cell\n",
"\n",
"from aviary.docs.tests.utils import glue_variable\n",
"from aviary.api import Aircraft, AviaryProblem\n",
"\n",
"glue_variable(f'{Aircraft.CrewPayload.Design.NUM_PASSENGERS=}'.split('=')[0], md_code=True)\n",
"glue_variable(f'{Aircraft.CrewPayload.NUM_PASSENGERS=}'.split('=')[0], md_code=True)\n",
"\n",
"glue_variable('capi',AviaryProblem.check_and_preprocess_inputs.__name__+'()',md_code=True)\n",
"glue_variable(f'{Aircraft.CrewPayload.NUM_BUSINESS_CLASS=}'.split('=')[0], md_code=True)\n",
"glue_variable(f'{Aircraft.CrewPayload.NUM_FIRST_CLASS=}'.split('=')[0], md_code=True)\n",
"glue_variable(f'{Aircraft.CrewPayload.NUM_TOURIST_CLASS=}'.split('=')[0], md_code=True)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multi-Mission Optimization\n",
"\n",
"## Overview\n",
"\n",
"Multi-missions adds the capability to optimize an aircraft design considering two or more missions that the aircraft will perform. This is in contrast to designing an aircraft for a single mission, and hopefully helps to represent the conditions the aircraft will be flying in better. In the example provided, a large single aisle passenger aircraft is designed based on a mission with every seat filled, and a second 'deadhead' mission where there are no passengers. A weighting is provided by the user to determine how often the missions are full of passengers vs. how often the flights are empty. A cargo example could be constructed where one mission is designed for maximum range and a second mission designed for maximum payload. \n",
"\n",
"To impact the structure of aviaryproblems as little as possible, after instantiation of the pre-mission, mission, and post-mission systems, the connections between those systems are created. Then those groups are then copied over into a regular openmdao problem. This enables the use all the basic aviary connection and checking functions with minimal modification. \n",
"\n",
"The objective function is based on combining the fuel-burn values from both missions and the optimizers objective is to minimize the weighted fuel-burn. Other objectives, like max range, have not been tested yet.\n",
"\n",
"## Design vs. As-Flown\n",
"To support the need to design an aircraft with a certain number of seats, but then possibly fly missions with unfilled seats, a distinction in the metadata was introduced between {glue:md}`Aircraft.CrewPayload.Design.NUM_PASSENGERS` and {glue:md}`Aircraft.CrewPayload.NUM_PASSENGERS`. The individual passenger classes ({glue:md}`Aircraft.CrewPayload.NUM_FIRST_CLASS`, {glue:md}`Aircraft.CrewPayload.NUM_BUSINESS_CLASS`, {glue:md}`Aircraft.CrewPayload.NUM_TOURIST_CLASS`) also have these distinctions. The Design values represent how many seats are available in the aircraft. Whereas the non-design values represent an as-flow value of how many passengers are on a particular flight. \n",
"\n",
"A number of checks exist in {glue:md}`capi` to help the user in the case that incomplete as-flow or design passenger information is provided. This was done to provide backward compatability for older aircraft models.\n",
"\n",
"## Example\n",
"An example of a multi-mission as well as Setup, Theory, and Results, is presented in [Multi-Mission Examples](../examples/multi_mission)."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "base",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading
Loading