powersimdata.input.converter package

Subpackages

Submodules

powersimdata.input.converter.csv_to_grid module

class powersimdata.input.converter.csv_to_grid.FromCSV[source]

Bases: AbstractGrid

Grid Builder for grid model enclosed in CSV files.

powersimdata.input.converter.helpers module

powersimdata.input.converter.helpers.add_coord_to_grid_data_frames(grid)[source]

Adds longitude and latitude information to bus, plant and branch data frames of grid instance.

Parameters:

grid (powersimdata.input.grid.Grid) – grid instance.

powersimdata.input.converter.helpers.add_interconnect_to_grid_data_frames(grid)[source]

Adds interconnect name to bus, branch, plant and dcline data frames of grid instance.

Parameters:

grid (powersimdata.input.grid.Grid) – grid instance.

powersimdata.input.converter.helpers.add_zone_to_grid_data_frames(grid)[source]

Adds zone name/id to plant and branch data frames of grid instance.

Parameters:

grid (powersimdata.input.grid.Grid) – grid instance.

powersimdata.input.converter.pypsa_to_grid module

class powersimdata.input.converter.pypsa_to_grid.FromPyPSA(network, add_pypsa_cols=True)[source]

Bases: AbstractGrid

Grid builder for PyPSA network object.

Parameters:
  • network (pypsa.Network) – PyPSA network to read in.

  • add_pypsa_cols (bool) – PyPSA data frames with renamed columns appended to Grid object data frames.

build()[source]

PyPSA Network reader.

powersimdata.input.converter.pypsa_to_profiles module

powersimdata.input.converter.pypsa_to_profiles.get_pypsa_demand_profile(network)[source]

Return demand profile enclosed in a PyPSA network.

Parameters:

network (pypsa.Network) – the Network object.

Returns:

(pandas.DataFrame) – demand profile.

Raises:

TypeError – if network is not a pypsa.components.Network object.

powersimdata.input.converter.pypsa_to_profiles.get_pypsa_gen_profile(network, profile2carrier)[source]

Return hydro, solar or wind profile enclosed in a PyPSA network.

Parameters:
  • network (pypsa.Network) – the Network object.

  • profile2carrier (dict) – a dictionary mapping profile type to carrier type. ‘hydro’, ‘solar’ and ‘wind’ are valid keys. Values is a corresponding set of carriers as found in the Network object.

Returns:

(dict) – keys are the same ones than in profile2carrier. Values are profiles as data frame.

Raises:
  • TypeError – if network is not a pypsa.components.Network object. if profile2carrier is not a dict. if values of profile2carrier are not an iterable.

  • ValueError – if keys of profile2carrier are invalid.

Module contents