Skip to content

Wind Sector Management setting #56

@shasegawa-2211

Description

@shasegawa-2211

Hi, thank you to all the developers involved in foxes.
This session connect to previous discussion. discussion-9833586

I tried to calculate AEP by considering heterogeneous flow and wind sector management.
But when I set wind sector management it didn’t apply to the turbine I chose.

For example, even if I create rules with settings like those shown in this table, when I check the results, the WSM is applied not to the turbine specified by “tname” but inconsistently to turbines like WT10 or WT15. The combinations of wind speed and wind direction are correct.
"turbine" column in table is added after calculation by foxes automatically.

WSM setting table

tname WD_min WD_max WS_min WS_max MAXP turbine
0 WT01 170 191 3 15 500 0
1 WT01 250 290 9 99 0 0
2 WT01 340 50 0 99 0 0
3 WT02 70 110 3 99 0 1
4 WT02 250 290 9 99 6000 1

My code to input WSM setting

# WSM
rules = pd.read_csv(r"E:\foxes\sample\WSM_rules.csv", index_col=0)
mbook.turbine_models["sector_rules"] = foxes.models.turbine_models.SectorManagement(
    data_source=rules,
    col_tnames="tname",
    range_vars=[FV.WD, FV.REWS],
    target_vars=[FV.MAX_P],
    colmap={"REWS_min": "WS_min", "REWS_max": "WS_max"},
)

The structure of layout file I use

id name easting northing height
0 WT01 XXXXXX.9202 XXXXXXX.227 100
1 WT02 XXXXXX.4636 XXXXXXX.478 100
2 WT03 XXXXXX.3664 XXXXXXX.685 100
: : : : :
16 WT17 XXXXXX.9579 XXXXXXX.931 100

"MAXP" of farm_results

state WT01 WT02 WT03 WT04 WT08 WT09 WT10 WT11 WT12 WT14 WT15
2024/11/3 9:00 0
2024/11/3 10:50 0
2024/11/3 11:00 0
2024/11/3 17:50 0

Although WT08 and WT10 do not have WSM settings, they do have ”MAXP” value.

This "MAXP" table is output of this code.
print(pd.DataFrame(farm_results.to_dataframe()).pivot_table(index="state", columns="tname", values="MAXP").round(2).sort_index())

When I run the WSM sample exactly as-isWind sector management, it seems to work fine.

I uploded whole of my code(sorry for the messy code...)
foxes_out_max-p.csv
run_foxes_sample.ipynb

Please let me know if you find any mistakes in my code or any issues with the way I have combined things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions