-
Notifications
You must be signed in to change notification settings - Fork 9
WISDEM NSGA2 incorporation #158
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
base: develop
Are you sure you want to change the base?
Conversation
Merge develop changes into main
Update installation instructions
…re/outside_driver
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.
Pull request overview
This PR integrates the NSGA2 (Non-dominated Sorting Genetic Algorithm II) optimization driver from WISDEM into the ARD framework, enabling its use as an OpenMDAO driver for multi-objective optimization problems.
- Adds NSGA2Driver import and conditional instantiation in the driver setup logic
- Introduces a new visualization utility function for calculating plot ranges with configurable buffers
- Provides a new example configuration (example 06) demonstrating NSGA2 driver usage for onshore multifidelity optimization
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| ard/api/interface.py | Adds NSGA2Driver support with conditional instantiation based on driver name in configuration |
| ard/viz/utils.py | New utility function for calculating plot value ranges with percentage-based buffers |
| examples/06_onshore_multifidelity/inputs/windio.yaml | Configuration file defining wind plant site, boundaries, and turbine layout for example 06 |
| examples/06_onshore_multifidelity/inputs/ard_system.yaml | System configuration showcasing NSGA2 driver setup with optimization parameters, design variables, constraints, and objectives |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if name_driver == "NSGA2": | ||
| prob.driver = NSGA2Driver() |
Copilot
AI
Jan 2, 2026
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.
The NSGA2Driver integration lacks test coverage. Since there are existing tests for other drivers (e.g., test_multiobjective.py), consider adding tests to verify that the NSGA2 driver is correctly instantiated, accepts configuration options, and can be used in optimization scenarios.
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.
I think it would be worth adding an NSGA2 test, even with a generation termination, just to make sure everything stays working with NSGA2 inside Ard.
jaredthomas68
left a comment
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.
This looks pretty good. Just a few comments, mostly on the example.
| if name_driver == "NSGA2": | ||
| prob.driver = NSGA2Driver() |
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.
I think it would be worth adding an NSGA2 test, even with a generation termination, just to make sure everything stays working with NSGA2 inside Ard.
| "id": "b0732705", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Here, you should see each of the groups or components described as they are added to the `Ard` model and, occasionally, some options being turned on on them, like semi-total finite differencing on groups.\n", |
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.
This comment would be more clear if it started with "above" instead of "here"
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", |
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.
I think the case would be more interesting if the boundaries played some role, or were at least closer to the used area of the farm, non-blocking change
| "<Figure size 640x480 with 2 Axes>" | ||
| ] | ||
| }, | ||
| "metadata": {}, |
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.
I think a bunch of the processing and plotting code could be made into utility functions that would be pretty helpful in the future
| "output_type": "display_data" | ||
| } | ||
| ], | ||
| "source": [ |
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.
The plots are missing axis and colorbar labels, please add them
Bring in NSGA2 from the WISDEM and enable its use as an OpenMDAO driver.