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]: Update geometric yaw optimizer layout when called during layout optimization #706

Merged
merged 6 commits into from Oct 4, 2023

Conversation

misi9170
Copy link
Collaborator

@misi9170 misi9170 commented Sep 1, 2023

This pull request fixes a bug that I missed when I created #621. When the geometric yaw code is called from within a layout optimization, the layout should be updated with each call, but this was not happening---instead, the yaw angles for the initial layout were being given.

This fixes the bug. One artifact of the fix is that any child optimization class of LayoutOptimizationBase that calls _get_geoyaw_angles() with self.enable_geometric_yaw = True is required to have attributes self.x and self.y (representing the $x$ and $y$ locations of the turbines). This is already the case for LayoutOptimizationScipy and LayoutOptimizationPyOptSparse.

The difference (although slight) can be observed by running example 16c.

Ready for review and merge.

@misi9170 misi9170 marked this pull request as draft September 1, 2023 19:17
@misi9170 misi9170 marked this pull request as ready for review September 1, 2023 20:06
@misi9170 misi9170 marked this pull request as draft September 1, 2023 20:23
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.

Tanks @misi9170, this looks good to me. I pulled it down and ran 16c successfully.

@misi9170 misi9170 added this to the v3.5 milestone Sep 26, 2023
@misi9170 misi9170 added the bug Something isn't working label Sep 26, 2023
@misi9170 misi9170 marked this pull request as ready for review October 3, 2023 15:50
@rafmudaf rafmudaf merged commit 05b900c into NREL:develop Oct 4, 2023
5 checks passed
@rafmudaf rafmudaf mentioned this pull request Oct 26, 2023
4 tasks
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.tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants