reVX.plexos.utilities.ProjectGidHandler

class ProjectGidHandler[source]

Bases: object

Class to handle project GIDs for a plexos project. Can be used to make gid superset project points for 5min data.

Methods

build_project_points(build_map[, fpath_out, ...])

Build a project points CSV from a set of rev/reeds build files.

get_resource_gids(sc_table, reeds_build[, ...])

Get resource gids from a single reeds supply curve build

static get_resource_gids(sc_table, reeds_build, wait=300, db_host='gds_edit.nrel.gov', db_user=None, db_pass=None, db_port=5432)[source]

Get resource gids from a single reeds supply curve build

Parameters:
  • sc_table (str | pd.DataFrame) – reV supply curve results (CSV file path or database.schema.name)

  • reeds_build (str | pd.DataFrame) – REEDS buildout file with

  • wait (int) – Integer seconds to wait for DB connection to become available before raising exception.

  • db_host (str) – Database host name.

  • db_user (str) – Your database user name.

  • db_pass (str) – Database password (None if your password is cached).

  • db_port (int) – Database port.

Returns:

gids (list) – Sorted list of unique integer resource gids build out.

classmethod build_project_points(build_map, fpath_out=None, config_tag='default', **db_kwargs)[source]

Build a project points CSV from a set of rev/reeds build files.

Parameters:
  • build_map (dict) – Mapping of buildout files/tables. Keys are filepaths to reeds buildout files, values are reV SC tables (can be db names).

  • fpath_out (str | None) – Output filepath to save project points file.

  • config_tag (str) – Config tab/label to write to the project points config column.

  • db_kwargs (dict) – Optional database kwargs.

Returns:

pp (pd.DataFrame) – Project points dataframe with gid and config columns..