-
Notifications
You must be signed in to change notification settings - Fork 156
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
Enabling layout optimization for value #862
Conversation
floris/optimization/layout_optimization/layout_optimization_scipy.py
Outdated
Show resolved
Hide resolved
floris/optimization/layout_optimization/layout_optimization_pyoptsparse.py
Outdated
Show resolved
Hide resolved
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.
@ejsimley , this is nicely done and really elegant! I agree with deferring adding the example until after the examples refactor PR is in. Only comments:
- On the scipy reg test, my vote would be we just go ahead and fix it, I'm assuming this was just an oversight (but maybe @rafmudaf you remember differently?)
- I think I can write the two missing docstrings if you like (see comments)
@paulf81, thanks for working on the docstrings. For comment 1, I just updated the test results with the values I got locally. We'll see if the test passes here too. Hopefully we'll get some more input on those results, but I agree, probably fine to just fix it now. The small changes in the results could be relate to a dependency version. |
Enabling layout optimization for value
This PR adds the capability to perform layout optimization to maximize the expected value of the energy produced (e.g., the electricity market value), using the "value" array stored in a
WindData
object. In addition to the layout optimization enhancement, methods are also added to compute expected value and annual value production (AVP), and to allow value to be added to aWindData
object as a function of wind speed and/or direction. Note that the option to optimize for value was not added to the yaw optimization classes because optimizing for value would be equivalent to optimizing for energy - since yaw offsets are optimized for each wind condition independently, maximizing the value of the energy for a particular wind condition would be the same as maximizing the energy produced (assuming value is greater than or equal to zero).Specific enhancements include:
get_expected_farm_value
andget_farm_AVP
for getting the expected value produced by the wind farm and the annual value production, similar toget_expected_farm_power
andget_farm_AEP
.WindData
classes now include the methodassign_value_using_wd_ws_function
for assigning value using an arbitrary function and the methodassign_value_piecewise_linear
for specifying value using a piecewise linear function of wind speed. The piecewise linear approach was inspired by the mean electricity price vs. wind speed plots from Simley et al. "The value of wake steering wind farm flow control in US energy markets," Wind Energy Science, 2024. The default parameters are meant to approximate the curve for the SPP market region. TheWindRose
andWindTIRose
classes also have a function for plotting value vs. TI.LayoutOptimization
class now has an argumentuse_value
to determine whether the objective is maximum energy or value.get_farm_AEP
orget_farm_AVP
depending on the booleanuse_value
argument.get_expected_farm_value
,get_farm_AVP
, andLayoutOptimizationScipy
, for the case whenuse_value
is True.I have an example ready too, but was thinking I'd wait to add it to PR #843
As discussed with @paulf81 and @misi9170, I added the value-based layout optimization regression test to the existing "scipy_layout_opt_regression.py" file. However, we noticed that the tests in this file weren't getting run because the file name was missing the "_test" suffix. I renamed the file so it gets run now, but the original
test_scipy_layout_opt
test fails. I'll mark this as a draft PR until we resolve this. @bayc, are you familiar with this test? Do you think we should just update the baseline results (although they don't match perfectly, they are very close to the actual results that get computed), or was there a reason for removing this test from the regression test list maybe?