Skip to content

Commit

Permalink
Fix type hints; default for n_wind_condition_splits; remove mistakenl…
Browse files Browse the repository at this point in the history
…y committed yaw optimization function.
  • Loading branch information
misi9170 committed Sep 9, 2024
1 parent e22bbf4 commit 733bb4e
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions floris/parallel_floris_model_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class ParallelFlorisModel(FlorisModel):

def __init__(
self,
configuration: dict | str | Path | FlorisModel,
configuration: dict | str | Path,
interface: str | None = "multiprocessing",
max_workers: int = -1,
n_wind_condition_splits: int = 1,
n_wind_condition_splits: int = -1,
return_turbine_powers_only: bool = False,
print_timings: bool = False
):
Expand Down Expand Up @@ -278,32 +278,3 @@ def _parallel_run_powers_only(fmodel_dict, set_kwargs) -> np.ndarray:
fmodel.set(**set_kwargs)
fmodel.run()
return fmodel.get_turbine_powers()

def _optimize_yaw_angles_serial(
fmodel_information,
minimum_yaw_angle,
maximum_yaw_angle,
yaw_angles_baseline,
x0,
Ny_passes,
turbine_weights,
exclude_downstream_turbines,
verify_convergence,
print_progress,
):
fmodel_opt = FlorisModel(fmodel_information)
yaw_opt = YawOptimizationSR(
fmodel=fmodel_opt,
minimum_yaw_angle=minimum_yaw_angle,
maximum_yaw_angle=maximum_yaw_angle,
yaw_angles_baseline=yaw_angles_baseline,
x0=x0,
Ny_passes=Ny_passes,
turbine_weights=turbine_weights,
exclude_downstream_turbines=exclude_downstream_turbines,
verify_convergence=verify_convergence,
)

# Perform optimization but silence print statements to avoid cluttering
df_opt = yaw_opt.optimize(print_progress=print_progress)
return df_opt

0 comments on commit 733bb4e

Please sign in to comment.