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

Verbosity cleanup and reduced warnings/printouts #636

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a524869
Updated printout control using verbosity
Dec 20, 2024
834f677
fix warnings appearing in tests
Dec 20, 2024
2c494bf
added backup for failed benchmark tests due to mpi failure
Dec 20, 2024
c3e394f
Merge remote-tracking branch 'remotes/origin/main' into cleanup
Dec 20, 2024
c7f3072
fixed missing variable & updated associated tests
Dec 20, 2024
7102ba6
mass variable naming updates
Dec 23, 2024
bcc5bcd
test bench cleanup
Dec 23, 2024
546e2ca
verbosity updates
Dec 23, 2024
745c921
updates for turboprop
Dec 23, 2024
79fb3b9
adjustments to turboprop bench
Dec 23, 2024
fda0b55
update optimizer printouts for SLSQP
Dec 26, 2024
c8e2529
variable desc cleanup
Dec 26, 2024
c846ad8
more test verbosity updates
Dec 26, 2024
7304904
fixed default verbosity for preprocessors when not provided when user
Dec 26, 2024
78fad60
another round of test verbosity updates/fixes
Dec 26, 2024
32d38d8
Update aviary/interface/methods_for_level2.py
jkirk5 Dec 26, 2024
4567556
better comments in L2
Dec 26, 2024
ba8d89d
suppress multimission bench plot
Dec 26, 2024
8e5d288
Merge branch 'cleanup' of https://github.com/jkirk5/om-Aviary into cl…
Dec 26, 2024
c3e49af
cleaner verbosity comments for L2
Dec 26, 2024
b21d704
more verbosity fixes for tests
Dec 26, 2024
3dec4d1
formatting fixes
Dec 27, 2024
6c3b9e3
fixes for doc glue checks
Dec 27, 2024
935a023
fix invalid char warning for regex
Dec 27, 2024
e1bad53
doc updates
Dec 27, 2024
844dab7
formatting fix
Dec 30, 2024
70e4127
properly incremented version number
Dec 31, 2024
8b02f1a
mach -> Mach in comments/docstrings
Dec 31, 2024
11b14f0
Merge remote-tracking branch 'remotes/origin/main' into cleanup
Dec 31, 2024
a319a15
add skip for OAS test if ambiance not installed
Jan 14, 2025
bd9caa0
Merge remote-tracking branch 'remotes/origin/main' into cleanup
Jan 14, 2025
952e499
minor cleanup
Jan 17, 2025
d8ccd5d
CI fixes
Jan 22, 2025
129ea20
removed docs artifact file (it should be generated while building the…
Jan 22, 2025
e27ab1c
Merge branch 'main' into cleanup
Jan 23, 2025
f42cab0
Merge branch 'main' into cleanup
jkirk5 Jan 23, 2025
a66c80d
Merge remote-tracking branch 'remotes/origin/units' into cleanup
Jan 23, 2025
0b1ccf3
Merge branch 'cleanup' of https://github.com/jkirk5/om-Aviary into cl…
Jan 23, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ dmypy.json

# Test and spec generated
reports/
aviary/reports/
*.out
*.png
*.sql
Expand Down
39 changes: 27 additions & 12 deletions aviary/interface/methods_for_level1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@
from aviary.utils.functions import get_path


def run_aviary(aircraft_filename, phase_info, optimizer=None,
analysis_scheme=AnalysisScheme.COLLOCATION, objective_type=None,
record_filename='problem_history.db', restart_filename=None, max_iter=50,
run_driver=True, make_plots=True, phase_info_parameterization=None,
optimization_history_filename=None, verbosity=Verbosity.BRIEF):
def run_aviary(
aircraft_data,
phase_info,
optimizer=None,
analysis_scheme=AnalysisScheme.COLLOCATION,
objective_type=None,
record_filename='problem_history.db',
restart_filename=None,
max_iter=50,
run_driver=True,
make_plots=True,
phase_info_parameterization=None,
optimization_history_filename=None,
verbosity=None,
):
"""
Run the Aviary optimization problem for a specified aircraft configuration and mission.

Expand All @@ -26,8 +36,9 @@ def run_aviary(aircraft_filename, phase_info, optimizer=None,

Parameters
----------
aircraft_filename : str
Filename from which to load the aircraft and options data.
aircraft_data: str, Path, AviaryValues
Filename from which to load the aircraft and options data, either as a string or
Path object, or an AviaryValues object containing that information.
phase_info : dict
Information about the phases of the mission.
optimizer : str
Expand All @@ -52,8 +63,9 @@ def run_aviary(aircraft_filename, phase_info, optimizer=None,
optimization_history_filename : str or Path
The name of the database file where the driver iterations are to be recorded. The
default is None.
verbosity : Verbosity or int
verbosity : Verbosity or int, optional
Sets level of information outputted to the terminal during model execution.
If provided, overwrites verbosity specified in aircraft_filename.

Returns
-------
Expand All @@ -66,15 +78,18 @@ def run_aviary(aircraft_filename, phase_info, optimizer=None,
It raises warnings or errors if there are clashing user inputs.
Users can modify or add methods to alter the Aviary problem's behavior.
"""
# compatibility with being passed int for verbosity
verbosity = Verbosity(verbosity)
# If loading from a file, use filename as problem name. Else, use OpenMDAO default
if isinstance(aircraft_data, (str, Path)):
name = Path(aircraft_data).stem
else:
name = None

# Build problem
prob = AviaryProblem(analysis_scheme, name=Path(aircraft_filename).stem)
prob = AviaryProblem(analysis_scheme, name=name, verbosity=verbosity)

# Load aircraft and options data from user
# Allow for user overrides here
prob.load_inputs(aircraft_filename, phase_info, verbosity=verbosity)
prob.load_inputs(aircraft_data, phase_info, verbosity=verbosity)

# Preprocess inputs
prob.check_and_preprocess_inputs()
Expand Down
Loading
Loading