reV.supply_curve.competitive_wind_farms.CompetitiveWindFarms
- class CompetitiveWindFarms(wind_dirs, sc_points, n_dirs=2, offshore=False)[source]
Bases:
object
Handle competitive wind farm exclusion during supply curve sorting
- Parameters:
wind_dirs (pandas.DataFrame | str) – path to .csv or reVX.wind_dirs.wind_dirs.WindDirs output with the neighboring supply curve point gids and power-rose value at each cardinal direction
sc_points (pandas.DataFrame | str) – Supply curve point summary table
n_dirs (int, optional) – Number of prominent directions to use, by default 2
offshore (bool) – Flag as to whether offshore farms should be included during CompetitiveWindFarms
Methods
check_sc_gid
(sc_gid)Check to see if sc_gid is valid, if so return associated sc_point_gids
exclude_sc_point_gid
(sc_point_gid)Exclude supply curve point gid, return False if gid is not present in list of available gids to avoid key errors elsewhere
map_downwind
(sc_point_gid)Map given sc_point_gid to downwind neighbors
map_sc_gid_to_sc_point_gid
(sc_gid)Map given sc_gid to equivalent sc_point_gid
map_sc_point_gid_to_sc_gid
(sc_point_gid)Map given sc_point_gid to equivalent sc_gid(s)
map_upwind
(sc_point_gid)Map given sc_point_gid to upwind neighbors
remove_noncompetitive_farm
(sc_points[, ...])Remove neighboring sc points for given number of prominent wind directions
run
(wind_dirs, sc_points[, n_dirs, ...])Exclude given number of neighboring Supply Point gids based on most prominent wind directions
Attributes
Supply curve point boolean mask, used for efficient exclusion False == excluded sc_point_gid
Un-masked sc_gids
Un-masked sc_point_gids
- property mask
Supply curve point boolean mask, used for efficient exclusion False == excluded sc_point_gid
- Returns:
ndarray
- property sc_point_gids
Un-masked sc_point_gids
- Returns:
ndarray
- property sc_gids
Un-masked sc_gids
- Returns:
ndarray
- map_sc_point_gid_to_sc_gid(sc_point_gid)[source]
Map given sc_point_gid to equivalent sc_gid(s)
- Parameters:
sc_point_gid (int) – Supply curve point gid to map to equivalent supply curve gid(s)
- Returns:
int | list – Equivalent supply curve gid(s)
- map_sc_gid_to_sc_point_gid(sc_gid)[source]
Map given sc_gid to equivalent sc_point_gid
- Parameters:
sc_gid (int) – Supply curve gid to map to equivalent supply point curve gid
- Returns:
int – Equivalent supply point curve gid
- check_sc_gid(sc_gid)[source]
Check to see if sc_gid is valid, if so return associated sc_point_gids
- Parameters:
sc_gid (int) – Supply curve gid to map to equivalent supply point curve gid
- Returns:
int | None – Equivalent supply point curve gid or None if sc_gid is invalid (offshore)
- map_upwind(sc_point_gid)[source]
Map given sc_point_gid to upwind neighbors
- Parameters:
sc_point_gid (int) – Supply point curve gid to get upwind neighbors
- Returns:
int | list – upwind neighborings
- map_downwind(sc_point_gid)[source]
Map given sc_point_gid to downwind neighbors
- Parameters:
sc_point_gid (int) – Supply point curve gid to get downwind neighbors
- Returns:
int | list – downwind neighborings
- exclude_sc_point_gid(sc_point_gid)[source]
Exclude supply curve point gid, return False if gid is not present in list of available gids to avoid key errors elsewhere
- Parameters:
sc_point_gid (int) – supply curve point gid to mask
- Returns:
bool – Flag if gid is valid and was masked
- remove_noncompetitive_farm(sc_points, sort_on='total_lcoe', downwind=False)[source]
Remove neighboring sc points for given number of prominent wind directions
- Parameters:
sc_points (pandas.DataFrame | str) – Supply curve point summary table
sort_on (str, optional) – column to sort on before excluding neighbors, by default ‘total_lcoe’
downwind (bool, optional) – Flag to remove downwind neighbors as well as upwind neighbors, by default False
- Returns:
sc_points (pandas.DataFrame) – Updated supply curve points after removing non-competative wind farms
- classmethod run(wind_dirs, sc_points, n_dirs=2, offshore=False, sort_on='total_lcoe', downwind=False, out_fpath=None)[source]
Exclude given number of neighboring Supply Point gids based on most prominent wind directions
- Parameters:
wind_dirs (pandas.DataFrame | str) – path to .csv or reVX.wind_dirs.wind_dirs.WindDirs output with the neighboring supply curve point gids and power-rose value at each cardinal direction
sc_points (pandas.DataFrame | str) – Supply curve point summary table
n_dirs (int, optional) – Number of prominent directions to use, by default 2
offshore (bool) – Flag as to whether offshore farms should be included during CompetitiveWindFarms
sort_on (str, optional) – column to sort on before excluding neighbors, by default ‘total_lcoe’
downwind (bool, optional) – Flag to remove downwind neighbors as well as upwind neighbors, by default False
out_fpath (str, optional) – Path to .csv file to save updated sc_points to, by default None
- Returns:
sc_points (pandas.DataFrame) – Updated supply curve points after removing non-competative wind farms