Skip to content

Fix depreciation of set_design_var - #734

Merged
ptrbortolotti merged 1 commit into
NLRWindSystems:developfrom
dzalkind:omdao_345
Jul 27, 2026
Merged

Fix depreciation of set_design_var#734
ptrbortolotti merged 1 commit into
NLRWindSystems:developfrom
dzalkind:omdao_345

Conversation

@dzalkind

Copy link
Copy Markdown
Contributor

Purpose

Fix OpenMDAO 3.45.0 compatibility: replace deprecated set_design_var with _set_design_var in NSGA2Driver.

The public set_design_var method was deprecated in OpenMDAO 3.40.0 and set to expire in version 3.45.0 (which is now in use). OpenMDAO's guidance directs driver subclasses to use the private _set_design_var instead, which is the sanctioned internal API for optimizers setting design variables in driver-scaled space.

This broke:

  • The iea22_raft_opt_driver.py example in WEIS (see WEIS CI job)
  • 4 of 6 tests in test_nsga2_driver.py

All built-in OpenMDAO drivers (pyoptsparse, pymoo, scipy, modopt) already use _set_design_vars / _set_design_var internally, so this aligns NSGA2Driver with the framework's current pattern.

Type of change

  • Bugfix (non-breaking change which fixes an issue)

Testing

All 6 tests in test_nsga2_driver.py now pass.

Checklist

  • [x ] I have run existing tests which pass locally with my changes
  • I have added new tests or examples that prove my fix is effective or that my feature works
  • I have added necessary documentation

@dzalkind
dzalkind requested a review from gbarter July 21, 2026 20:28

@cfrontin cfrontin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for the fix!

@ptrbortolotti
ptrbortolotti merged commit d743336 into NLRWindSystems:develop Jul 27, 2026
18 checks passed
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.

4 participants