-
Notifications
You must be signed in to change notification settings - Fork 69
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
Verbosity cleanup and reduced warnings/printouts #636
base: main
Are you sure you want to change the base?
Changes from 29 commits
a524869
834f677
2c494bf
c3e394f
c7f3072
7102ba6
bcc5bcd
546e2ca
745c921
79fb3b9
fda0b55
c8e2529
c846ad8
7304904
78fad60
32d38d8
4567556
ba8d89d
8e5d288
c3e49af
b21d704
3dec4d1
6c3b9e3
935a023
e1bad53
844dab7
70e4127
8b02f1a
11b14f0
a319a15
bd9caa0
952e499
d8ccd5d
129ea20
e27ab1c
f42cab0
a66c80d
0b1ccf3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,8 @@ dmypy.json | |
|
||
# Test and spec generated | ||
reports/ | ||
aviary/reports/ | ||
*.openmdao_out | ||
*.out | ||
*.png | ||
*.sql | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.9.4-dev" | ||
__version__ = "0.9.6" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
phase_info = {'pre_mission': {'include_takeoff': True, 'optimize_mass': True}, 'climb_1': {'subsystem_options': {'core_aerodynamics': {'method': 'computed'}}, 'user_options': {'optimize_mach': True, 'optimize_altitude': True, 'polynomial_control_order': [1, 2], 'use_polynomial_control': True, 'num_segments': [1], 'order': 1, 'solve_for_distance': True, 'initial_mach': (1, None), 'final_mach': (2, None), 'mach_bounds': ( | ||
(0.98, 2.02), None), 'initial_altitude': (1, None), 'final_altitude': (2, None), 'altitude_bounds': ((0.0, 502), None), 'throttle_enforcement': 'path_constraint', 'fix_initial': True, 'constrain_final': True, 'fix_duration': False, 'initial_bounds': ((0.0, 0.0), None), 'duration_bounds': ((0.5, 1.5), None)}, 'initial_guesses': {'time': ([1, 1], None)}}, 'post_mission': {'include_landing': True, 'constrain_range': True, 'target_range': (514.5, None)}} | ||
phase_info = { | ||
'pre_mission': { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is proving to be a problem. I think we need it for some glue stuff, but it is auto-generated, so always has to be fixed every time we run the docs. |
||
'include_takeoff': True, 'optimize_mass': True}, 'climb_1': { | ||
'subsystem_options': { | ||
'core_aerodynamics': { | ||
'method': 'computed'}}, 'user_options': { | ||
'optimize_mach': True, 'optimize_altitude': True, 'polynomial_control_order': [ | ||
1, 2], 'use_polynomial_control': True, 'num_segments': [1], 'order': 1, 'solve_for_distance': True, 'initial_mach': ( | ||
1, None), 'final_mach': ( | ||
2, None), 'mach_bounds': ( | ||
(0.98, 2.02), None), 'initial_altitude': ( | ||
1, None), 'final_altitude': ( | ||
2, None), 'altitude_bounds': ( | ||
(0.0, 502), None), 'throttle_enforcement': 'path_constraint', 'fix_initial': True, 'constrain_final': True, 'fix_duration': False, 'initial_bounds': ( | ||
(0.0, 0.0), None), 'duration_bounds': ( | ||
(0.5, 1.5), None)}, 'initial_guesses': { | ||
'time': ( | ||
[ | ||
1, 1], None)}}, 'post_mission': { | ||
'include_landing': True, 'constrain_range': True, 'target_range': ( | ||
514.5, None)}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,9 +113,9 @@ | |
"\n", | ||
"- `-o ––outdir`: Use specified directory to write output. The default is the current directory.\n", | ||
"\n", | ||
"- `--optimizer`: Name of optimizer. Choices are: `SNOPT`, `IPOPT`, `SLSQP`, and `None`. The default is `SNOPT`. If optimizer is `None`, it will be set to `IPOPT` or `SNOPT` depending on the analysis scheme. The optimization objective is fuel burn for level 1 runs. The objective is\n", | ||
" - `mission:objectives:fuel` if `mission_method` is `GASP` \n", | ||
" - `fuel_burned` if `mission_method` is `FLOPS`.\n", | ||
"- `--optimizer`: Name of optimizer. Choices are: `SNOPT`, `IPOPT`, `SLSQP`. The default is `IPOPT`. The optimization objective is fuel burn for level 1 runs. The objective is\n", | ||
" - `mission:objectives:fuel` if `mission_method` is `TWO_DEGREES_OF_FREEDOM` \n", | ||
" - `fuel_burned` if `mission_method` is `HEIGHT_ENERGY`.\n", | ||
"\n", | ||
"- `--phase_info`: Path to phase info file. If not provided, it is `default_phase_info/gasp.py` if Mission origin is `2DOF` and `default_phase_info/flops.py` for `simple`.\n", | ||
"\n", | ||
|
@@ -223,50 +223,9 @@ | |
"\n", | ||
"To find information about a variable (e.g. description, data type, etc.), users should read the [Variable Metadata Doc](../user_guide/variable_metadata).\n", | ||
"\n", | ||
"There are special rules for the mapping from the input file variable names to the metadata. For example, variable `aircraft:wing:aspect_ratio` in `aircraft_for_bench_GwGm.csv` is mapped to `Aircraft.Wing.ASPECT_RATIO` in `aviary/variable_info/variable_meta_data.py`. So, the first part (e.g., `aircraft` or `mission`) is mapped to the same word but with the first letter capitalized (e.g., `Aircraft` or `Mission`). The third word is all caps (e.g., `ASPECT_RATIO`). The middle part (e.g., `wing`) is a little more complicated. In most cases, this part capitalizes the first letter (e.g., `Wing`). The following words have special mappings:\n", | ||
"Variable names may be differently within the code from how they are formatted inside OpenMDAO components and in input files and outputs. For example, variable `aircraft:wing:aspect_ratio` in `aircraft_for_bench_GwGm.csv` is mapped to `Aircraft.Wing.ASPECT_RATIO` in `aviary/variable_info/variable_meta_data.py`. This is because OpenMDAO requires variable names to be strings, but for developer convenience those strings are mapped to Python classes and attributes. The top-level and sub-categories have capitalized first letters, and the final variable name is always in all-caps. For more information on Aviary's variable hierarchy, see the [Variable Hierarchy doc](../user_guide/variable_hierarchy.ipynb).\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wording : "may be differently..." --> "may appear differently..." |
||
"\n", | ||
"- `air_conditioning -> AirConditioning`\n", | ||
"- `anti_icing -> AntiIcing`\n", | ||
"- `blended_wing_body -> BWB`\n", | ||
"- `crew_and_payload -> CrewPayload`\n", | ||
"- `horizontal_tail -> HorizontalTail`\n", | ||
"- `landing_gear -> LandingGear`\n", | ||
"- `tail_boom -> TailBoom`\n", | ||
"- `vertical_tail -> VerticalTail`\n", | ||
"\n", | ||
"This can be summarized as to capitalize the leading letter and to capitalize the first letter after special character “`_`”.\n", | ||
"\n", | ||
"File `aviary/variable_info/variables.py` is a variable hierarchy that is for a single mission. Each mission gets a copy of this hierarchy. Below is a snippet of this file:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "f57d6c96", | ||
"metadata": { | ||
"tags": [ | ||
"remove-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import aviary.api as av\n", | ||
"\n", | ||
"# Get the path of variables.py within the aviary package\n", | ||
"file_path = av.get_path('variable_info/variables.py')\n", | ||
"\n", | ||
"# Read and print the first 15 lines of the file\n", | ||
"with open(file_path, 'r') as file:\n", | ||
" for i in range(18):\n", | ||
" print(file.readline().strip('\\n'))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "b597474e", | ||
"metadata": {}, | ||
"source": [ | ||
"Aviary variables are always set to default values before the input file is read in. Then Aviary will update the values based on the user-provided `.csv` input file. If you want to set different values, you can set them in the `.csv` input file." | ||
"Aviary variables that are not defined in the `.csv` input file are set to their default values, as described in the variable metadata." | ||
] | ||
}, | ||
{ | ||
|
@@ -329,14 +288,14 @@ | |
"\n", | ||
"This [`fortran_to_aviary`](../user_guide/aviary_commands) tool converts FORTRAN namelists into Aviary's csv based format using the mappings found in the `historical_name` section of the [variable_meta_data](../user_guide/variable_metadata). The resulting csv is automatically sorted into three sections:\n", | ||
"1. **Input Values:**\n", | ||
" Any FORTRAN variables that were mapped to input variables in Aviary components\n", | ||
" Any FORTRAN variables that were mapped to input variables in the variable metadata, converted to their equivalent Aviary names\n", | ||
"2. **Initial Guesses:**\n", | ||
" Some variables are only used as initial guesses for the trajectory.\n", | ||
" These are displayed separately from the Input Values because they will not be passed directly to components\n", | ||
"3. **Unconverted Values:**\n", | ||
" If the fortran_to_aviary converter can't find an Aviary variable that matches the FORTRAN variable, it is added to the end of the csv file.\n", | ||
" We recommend that you check this section after converting a namelist to ensure that there aren't any variables you expected to be converted here.\n", | ||
" Many of these unconverted variables represent features or options that are not used in Aviary and can be safely ignored. Variables related to mission definition are important, but Aviary defines mission profiles in a significantly different way. Currently, the user must build a new [mission definition file](../examples/simple_mission_example) that recreates the mission.\n", | ||
" Many of these unconverted variables represent features or options that are not used in Aviary and can be ignored. Variables related to mission definition are important, but Aviary defines mission profiles in a significantly different way. Currently, the user must build a new [mission definition file](../examples/simple_mission_example) that recreates the mission.\n", | ||
" Aviary will ignore unconverted variables when loading the csv, so you can safely leave them.\n" | ||
] | ||
}, | ||
|
@@ -764,7 +723,7 @@ | |
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"display_name": "aviary", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
|
@@ -778,7 +737,7 @@ | |
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.13" | ||
"version": "3.12.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
|
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.
Just want to make sure you know about the
openmdao clean
command, for cleaning up all of these directories.https://openmdao.org/newdocs/versions/latest/other_useful_docs/om_command.html#openmdao-clean