You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As raised by @MiguelMarante in #1016, YawOptimizerSR (as well as other possibly other yaw optimization routines) do not correctly handle other controls being set, in particular, disable_turbines (which is a wrapper for near-zero power_setpoints).
The issue is that (several) local copies of the FlorisModel is made within the yaw optimizer, and the power_setpoints aren't copied over correctly.
How to reproduce
The following code demonstrates the problem (thanks to @MiguelMarante !)
importnumpyasnpfromflorisimportFlorisModelfromfloris.optimization.yaw_optimization.yaw_optimizer_srimportYawOptimizationSR# Create floris objectyaml_file='inputs/emgauss.yaml'fmodel=FlorisModel(yaml_file)
# Set wind conditionsfmodel.set(wind_directions=[270.]*2, wind_speeds=[8.]*2, turbulence_intensities=[.06]*2)
# Disable turbinesfmodel.set_operation_model('mixed')
fmodel.set(disable_turbines=np.array([[False, True, False], [True, False, False]]))
# Run optimization and print resultsyaw_opt=YawOptimizationSR(fmodel)
df_opt=yaw_opt.optimize()
print(df_opt.yaw_angles_opt)
The expected output is not totally clear; the disabled turbine's angle is not well defined (since it produces no thrust and no power, any yaw angle should be optimal). However, we might expect the middle turbine to have a yaw angle of 25 degrees for the second case.
Floris version
v4.1, v4.2
The text was updated successfully, but these errors were encountered:
Yaw optimization ignores provided power setpoints
As raised by @MiguelMarante in #1016,
YawOptimizerSR
(as well as other possibly other yaw optimization routines) do not correctly handle other controls being set, in particular,disable_turbines
(which is a wrapper for near-zeropower_setpoints
).The issue is that (several) local copies of the
FlorisModel
is made within the yaw optimizer, and thepower_setpoints
aren't copied over correctly.How to reproduce
The following code demonstrates the problem (thanks to @MiguelMarante !)
Relevant output
Output:
The expected output is not totally clear; the disabled turbine's angle is not well defined (since it produces no thrust and no power, any yaw angle should be optimal). However, we might expect the middle turbine to have a yaw angle of 25 degrees for the second case.
Floris version
v4.1, v4.2
The text was updated successfully, but these errors were encountered: