Skip to content

[Bugfix]: Update geometric yaw optimizer layout when called during layout optimization#706

Merged
rafmudaf merged 6 commits intoNatLabRockies:developfrom
misi9170:bugfix/geoyaw-layout-opt
Oct 4, 2023
Merged

[Bugfix]: Update geometric yaw optimizer layout when called during layout optimization#706
rafmudaf merged 6 commits intoNatLabRockies:developfrom
misi9170:bugfix/geoyaw-layout-opt

Conversation

@misi9170
Copy link
Copy Markdown
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 requested review from paulf81 and rafmudaf September 1, 2023 20:06
@misi9170 misi9170 marked this pull request as draft September 1, 2023 20:23
Copy link
Copy Markdown
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 NatLabRockies:develop Oct 4, 2023
@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.

3 participants