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

[BUGFIX] Dimension update in LayoutOptimizationBase #1067

Merged
merged 4 commits into from
Feb 21, 2025

Conversation

misi9170
Copy link
Collaborator

@misi9170 misi9170 commented Feb 19, 2025

As described in #1033 , there was a section of code that was missed in the dimension reduction from 5D to 4D as part of the release of Floris v4. The missed code is very much an edge case, where the minimum yaw angle is set to be a stricly positive number (and vice versa, if the maximum yaw angle is set to be strictly negative).

This PR updates that section of code, and also adds an integration test that tests for these unusual situations.

Test results, if applicable

  • Existing tests pass.
  • New tests added (yaw_optimization_integration_test.py) fail without changes to YawOptimizationBase (with an "axis out of bounds" error due to indexing a non-existent dimension 3---see screenshot below).
  • New tests pass with changes to YawOptimizationBase.

Notes

  1. Since this is such an edge bug, I don't think we need to target main and release a patch. This can simply be bundled into the next minor release of FLORIS.
  2. I'm also using this PR as an opportunity to fix a typo in the axis labels of one of the yaw optimization examples.

Screenshot of failing integration test prior to fixing dimensions:
image

@misi9170 misi9170 added bug Something isn't working floris.optimization v4 Focus of FLORIS v4 labels Feb 19, 2025
@misi9170 misi9170 requested a review from paulf81 February 19, 2025 16:26
Copy link
Collaborator

@paulf81 paulf81 left a comment

Choose a reason for hiding this comment

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

Looks good, reviewed the change and agree the new test covers the condition. All pass on my end.

@misi9170 misi9170 merged commit fd1b36d into NREL:develop Feb 21, 2025
11 checks passed
@misi9170 misi9170 deleted the bugfix/layout-opt-dims branch February 21, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working floris.optimization v4 Focus of FLORIS v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants