Skip to content

Commit

Permalink
Merge pull request OpenMDAO#612 from xjjiang/level1_verbosity
Browse files Browse the repository at this point in the history
add verbosity to level 1 run
  • Loading branch information
jkirk5 authored Dec 5, 2024
2 parents 9e63e60 + 98f68c8 commit 7853dcc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions aviary/interface/methods_for_level1.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def run_level_1(
optimizer='SNOPT',
phase_info=None,
max_iter=50,
verbosity=1,
analysis_scheme=AnalysisScheme.COLLOCATION,
):
'''
Expand All @@ -131,6 +132,7 @@ def run_level_1(
# kwargs['optimizer'] = 'IPOPT'
# else:
kwargs['optimizer'] = optimizer
kwargs['verbosity'] = Verbosity(verbosity)

if isinstance(phase_info, str):
phase_info_path = get_path(phase_info)
Expand Down Expand Up @@ -185,6 +187,12 @@ def _setup_level1_parser(parser):
action="store_true",
help="Use shooting instead of collocation",
)
parser.add_argument(
"--verbosity",
type=int,
default=1,
help="verbosity settings: 0=quiet, 1=brief, 2=verbose, 3=debug",
choices=(0, 1, 2, 3))


def _exec_level1(args, user_args):
Expand All @@ -211,5 +219,6 @@ def _exec_level1(args, user_args):
optimizer=args.optimizer,
phase_info=args.phase_info,
max_iter=args.max_iter,
verbosity=args.verbosity,
analysis_scheme=analysis_scheme,
)

0 comments on commit 7853dcc

Please sign in to comment.