Skip to content

Don't overwrite driver opt_settings specified by user#1148

Open
jkirk5 wants to merge 1 commit into
OpenMDAO:mainfrom
jkirk5:cleanup
Open

Don't overwrite driver opt_settings specified by user#1148
jkirk5 wants to merge 1 commit into
OpenMDAO:mainfrom
jkirk5:cleanup

Conversation

@jkirk5
Copy link
Copy Markdown
Contributor

@jkirk5 jkirk5 commented May 15, 2026

Summary

AviaryProblem.add_driver() no longer overwrites any settings in driver.opt_settings if they already exist (such as manually set by user beforehand)

Related Issues

Backwards incompatibilities

None

New Dependencies

None

driver.opt_settings['nlp_scaling_method'] = 'gradient-based'
driver.opt_settings['alpha_for_y'] = 'safer-min-dual-infeas'
driver.opt_settings['mu_strategy'] = 'monotone'
driver.opt_settings.setdefault('nlp_scaling_method', 'gradient-based')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These are the only defaults currently in OpenMDAO:

DEFAULT_OPT_SETTINGS['IPOPT'] = {
    'hessian_approximation': 'limited-memory',
    'nlp_scaling_method': 'user-scaling',
    'linear_solver': 'mumps'

I see we change nlp_scaling_method here in Aviary, and it is probably intentional, so we should probably just set it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Methods for Level 2 Overwrites Optimizer Settings

2 participants