reVX.handlers.sc_points.SupplyCurvePoints
- class SupplyCurvePoints(sc_table, gen_fpath, max_workers=None, points_per_worker=400, offshore=False)[source]
Bases:
object
Class to handle Supply Curve points and their meta
- Parameters:
sc_table (str | pandas.DataFrame) – Supply Curve table .csv or pre-loaded pandas DataFrame
gen_fpath (str | pandas.DataFrame) – Path to reV multi-year-mean .h5 (preferred), generation .h5, or pre-extracted .csv or pandas DataFrame with “cf_mean” column.
max_workers (int, optional) – Number of workers to use for point creation, 1 == serial, > 1 == parallel, None == parallel using all available cpus, by default None
points_per_worker (int, optional) – Number of points to create on each worker, by default 400
Methods
check_sc_gid
(sc_gid)Check to see if sc_gid is still available :Parameters: sc_gid (int) -- Supply curve point gid to check
get_capacity
(sc_gid, capacity)Extract capacity from given Supply Curve point
Attributes
Supply curve point capacities
Bool mask of available points
Supply curve point gids
Supply curve points
Supply curve table
- property sc_points
Supply curve points
- Returns:
dictionary
- property sc_table
Supply curve table
- Returns:
dictionary
- property sc_gids
Supply curve point gids
- Returns:
list
- property capacity
Supply curve point capacities
- Returns:
ndarray
- property mask
Bool mask of available points
- Returns:
ndarray
- check_sc_gid(sc_gid)[source]
Check to see if sc_gid is still available :Parameters: sc_gid (int) – Supply curve point gid to check
- Returns:
bool – Supply curve point availability
- get_capacity(sc_gid, capacity)[source]
Extract capacity from given Supply Curve point
- Parameters:
capacity (float) – Capacity to extract from Supply Curve point
- Returns:
sc_point (pd.Series | None) – A summary of the resource gids being allocated along with the gid_counts built at each resource gid. None if sc_gid doesnt have the available capacity. e.g. if 202 MW of built capacity is requested:
sc_gid | 1 res_gids | [258265, 258267] gid_counts | [773.0, 7] cf_means | [0.126, 0.124] build_capacity | 202