reVX.plexos.base.PlexosNode
- class PlexosNode(sc_build, cf_fpath, res_gids=None, force_full_build=False, forecast_fpath=None, forecast_map=None, dset_tag=None)[source]
Bases:
object
Framework to build a gen profile at a single plexos node. The plexos node is defined as a power bus or some sort of plant that is intended to represent the aggregated power generation profile from one or more reV supply curve points that were mapped to the plexos node. Built capacity needs to be defined for each supply curve point that contributes to this node. Resource within each supply curve point is built in order of cf_mean.
- Parameters:
sc_build (pd.DataFrame) – Supply curve buildout table. Must only have rows that are built in this plexos node. Must have res_gids, gid_counts, gid_capacity, and built_capacity at each SC point. Note that the gen_gids column in the rev_sc is ignored and only the res_gids from rev_sc are mapped to the corresponding “gid” column in the cf_fpath meta data.
cf_fpath (str) – File path to capacity factor file (reV gen output) to get profiles from.
res_gids (list | np.ndarray, optional) – Resource GID’s available in cf_fpath, if None pull from cf_fpath, by default None
force_full_build (bool) – Flag to ensure the full requested buildout is built at each SC point. If True, the remainder of the requested build will always be built at the last resource gid in the sc point.
forecast_fpath (str | None, optional) – Forecasted capacity factor .h5 file path (reV results). If not None, the generation profiles are sourced from this file, by default None
forecast_map (np.ndarray | None, optional) – (n, 1) array of forecast meta data indices mapped to the generation meta indices where n is the number of generation points. None if no forecast data being considered, by default None
dset_tag (str) – Dataset tag to append to dataset names in cf profile file. e.g. If the cf profile file is a multi year file using dset_tag=”-2008” will enable us to select the corresponding datasets (cf_mean-2008, cf_profile-2008, etc)
Methods
Make an aggregated generation profile for a single plexos node.
run
(sc_build, cf_fpath[, res_gids, ...])Make an aggregated generation profile for a single plexos node.
- make_node_profile()[source]
Make an aggregated generation profile for a single plexos node.
- Returns:
profile (np.ndarray) – (t, ) array of generation in MW.
sc_gids (list) – List of supply curve point GID’s that were build for this node
res_gids (list) – List of resource GID’s that were built for this plexos node.
gen_gids (list) – List of generation GID’s that were built for this plexos node.
res_built (list) – List of built capacities at each resource GID for this plexos node.
- classmethod run(sc_build, cf_fpath, res_gids=None, force_full_build=False, forecast_fpath=None, forecast_map=None, dset_tag=None)[source]
Make an aggregated generation profile for a single plexos node.
- Parameters:
sc_build (pd.DataFrame) – Supply curve buildout table. Must only have rows that are built in this plexos node. Must have res_gids, gid_counts, gid_capacity, and built_capacity at each SC point. Note that the gen_gids column in the rev_sc is ignored and only the res_gids from rev_sc are mapped to the corresponding “gid” column in the cf_fpath meta data.
cf_fpath (str) – File path to capacity factor file (reV gen output) to get profiles from.
res_gids (list | np.ndarray, optional) – Resource GID’s available in cf_fpath, if None pull from cf_fpath, by default None
force_full_build (bool) – Flag to ensure the full requested buildout is built at each SC point. If True, the remainder of the requested build will always be built at the last resource gid in the sc point.
forecast_fpath (str | None, optional) – Forecasted capacity factor .h5 file path (reV results). If not None, the generation profiles are sourced from this file, by default None
forecast_map (np.ndarray | None, optional) – (n, 1) array of forecast meta data indices mapped to the generation meta indices where n is the number of generation points. None if no forecast data being considered, by default None
dset_tag (str) – Dataset tag to append to dataset names in cf profile file. e.g. If the cf profile file is a multi year file using dset_tag=”-2008” will enable us to select the corresponding datasets (cf_mean-2008, cf_profile-2008, etc)
- Returns:
profile (np.ndarray) – (t, ) array of generation in MW.
sc_gids (list) – List of supply curve point GID’s that were build for this node
res_gids (list) – List of resource GID’s that were built for this plexos node.
gen_gids (list) – List of generation GID’s that were built for this plexos node.
res_built (list) – List of built capacities at each resource GID for this plexos node.