powersimdata.design.transmission package

Subpackages

Submodules

powersimdata.design.transmission.mwmiles module

powersimdata.design.transmission.mwmiles.calculate_mw_miles(scenario, exclude_branches=None)[source]

Given a Scenario object, calculate the number of upgraded lines and transformers, and the total upgrade quantity (in MW and MW-miles). Currently only supports change tables that specify branches’ id, not zone name. Currently lumps Transformer and TransformerWinding upgrades together.

Parameters:
Returns:

(dict) – Upgrades to the branches.

powersimdata.design.transmission.statelines module

powersimdata.design.transmission.statelines.classify_interstate_intrastate(scenario)[source]

Classifies branches in a change_table as interstate or intrastate.

Parameters:

scenario (powersimdata.scenario.scenario.Scenario) – scenario instance.

Returns:

(dict) – keys are ‘interstate’, ‘intrastate’. Values are list of branch ids.

powersimdata.design.transmission.substations module

powersimdata.design.transmission.substations.calculate_substation_capacity(grid)[source]

For each substation in a grid, calculate the total substation transmission capacity (in a transport model, ignoring power flow).

Parameters:

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

Returns:

(pandas.Series) – index is substation IDs, value are total transmission capacity (MW).

powersimdata.design.transmission.upgrade module

powersimdata.design.transmission.upgrade.get_branches_by_area(grid, area_names, method='either')[source]

Given a set of area names, select branches which are in one or more of these areas.

Parameters:
  • grid (powersimdata.input.grid.Grid) – Grid to query for topology.

  • area_names (list/set/tuple) – an iterable of area names, used to look up zone names.

  • method (str) – whether to include branches which span zones. Options: - ‘internal’: only select branches which are to/from the same area. - ‘bridging’: only select branches which connect area to another. - ‘either’: select branches if either end is in area. Equivalent to ‘internal’ + ‘bridging’.

Returns:

(set) – a set of branch IDs.

Raises:
  • TypeError – if area_names not a list/set/tuple, or method not a str.

  • ValueError – if not all elements of area_names are strings, if method is not one of the recognized methods.

powersimdata.design.transmission.upgrade.scale_congested_mesh_branches(change_table, ref_scenario, upgrade_n=100, allow_list=None, deny_list=None, congestion_metric='quantile', cost_metric='branches', quantile=None, increment=1)[source]

Use a reference scenario to detect congested mesh branches (based on values of the shadow price of congestion), and increase the capacity of a subset of them. Branches are ranked by a ratio of (congestion metric) / (cost metric), and the top N branches are selected for upgrading, where N is specified by upgraade_n, with each upgraded by their base capacity multiplied by increment.

Parameters:
  • change_table (powersimdata.input.change_table.ChangeTable) – ChangeTable object.

  • ref_scenario (powersimdata.scenario.scenario.Scenario) – the reference scenario to be used in bootstrapping the branch scaling factors.

  • upgrade_n (int) – the number of branches to upgrade.

  • allow_list (list/set/tuple/None) – only select from these branch IDs.

  • deny_list (list/set/tuple/None) – never select any of these branch IDs.

  • congestion_metric (str) – numerator method: ‘quantile’ or ‘mean’.

  • cost_metric (str) – denominator method: ‘branches’, ‘cost’, ‘MW’, or ‘MWmiles’.

  • quantile (float) – if congestion_metric == ‘quantile’, this is the quantile to use to judge branch congestion (otherwise it is unused). If None, a default value of 0.95 is used, i.e. we evaluate the shadow price for the worst 5% of hours.

  • increment (float/int) – branch increment, relative to original capacity.

Returns:

(None) – the change_table is modified in-place.

Raises:

ValueError – if ref_scenario is not in analyze state.

powersimdata.design.transmission.upgrade.scale_renewable_stubs(change_table, fuzz=1, inplace=True, verbose=False)[source]

Identify renewable gens behind ‘stub’ branches, scale up branch capacity (via change_table entries) to match generator capacity.

Parameters:
  • change_table (powersimdata.input.change_table.ChangeTable) – ChangeTable object.

  • fuzz (float/int) – adds just a little extra capacity to avoid binding.

  • inplace (bool) – if True, modify ct inplace and return None. If False, copy ct and return modified copy.

  • verbose (bool) – if True, print info for each unscaled plant.

Returns:

(None/dict) – if inplace is True, return modified ct dict.

powersimdata.design.transmission.zones module

powersimdata.design.transmission.zones.calculate_interzone_capacity(grid)[source]

For each zone in a grid, calculate the aggreagte zone transmission capacity (in a transport model, ignoring power flow).

Parameters:

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

Returns:

(pandas.Series) – index is zone IDs, values are total transmission capacity (MW).

Module contents