reV.supply_curve.supply_curve.SupplyCurve

class SupplyCurve(sc_points, trans_table, sc_features=None, sc_capacity_col='capacity_ac_mw')[source]

Bases: object

ReV LCOT calculation and SupplyCurve sorting class.

reV supply curve computes the transmission costs associated with each supply curve point output by reV supply curve aggregation. Transmission costs can either be computed competitively (where total capacity remaining on the transmission grid is tracked and updated after each new connection) or non-competitively (where the cheapest connections for each supply curve point are allowed regardless of the remaining transmission grid capacity). In both cases, the permutation of transmission costs between supply curve points and transmission grid features should be computed using the reVX Least Cost Transmission Paths utility.

Parameters:
  • sc_points (str | pandas.DataFrame) – Path to CSV or JSON or DataFrame containing supply curve point summary. Can also be a filepath to a reV bespoke HDF5 output file where the meta dataset has the same format as the supply curve aggregation output.

    Note

    If executing reV from the command line, this input can also be "PIPELINE" to parse the output of the previous pipeline step and use it as input to this call. However, note that duplicate executions of any preceding commands within the pipeline may invalidate this parsing, meaning the sc_points input will have to be specified manually.

  • trans_table (str | pandas.DataFrame | list) – Path to CSV or JSON or DataFrame containing supply curve transmission mapping. This can also be a list of transmission tables with different line voltage (capacity) ratings. See the reVX Least Cost Transmission Paths utility to generate these input tables.

  • sc_features (str | pandas.DataFrame, optional) – Path to CSV or JSON or DataFrame containing additional supply curve features (e.g. transmission multipliers, regions, etc.). These features will be merged to the sc_points input table on ALL columns that both have in common. If None, no extra supply curve features are added. By default, None.

  • sc_capacity_col (str, optional) – Name of capacity column in trans_sc_table. The values in this column determine the size of transmission lines built. The transmission capital costs per MW and the reinforcement costs per MW will be returned in terms of these capacity values. Note that if this column != “capacity”, then “capacity” must also be included in trans_sc_table since those values match the “mean_cf” data (which is used to calculate LCOT and Total LCOE). This input can be used to, e.g., size transmission lines based on solar AC capacity ( sc_capacity_col="capacity_ac"). By default, "capacity".

Examples

Standard outputs in addition to the values provided in sc_points, produced by reV.supply_curve.sc_aggregation.SupplyCurveAggregation:

  • transmission_multiplierint | float

    Transmission cost multiplier that scales the line cost but not the tie-in cost in the calculation of LCOT.

  • trans_gidint

    Unique transmission feature identifier that each supply curve point was connected to.

  • trans_capacityfloat

    Total capacity (not available capacity) of the transmission feature that each supply curve point was connected to. Default units are MW.

  • trans_typestr

    Tranmission feature type that each supply curve point was connected to (e.g. Transline, Substation).

  • trans_cap_cost_per_mwfloat

    Capital cost of connecting each supply curve point to their respective transmission feature. This value includes line cost with transmission_multiplier and the tie-in cost. Default units are $/MW.

  • dist_kmfloat

    Distance in km from supply curve point to transmission connection.

  • lcotfloat

    Levelized cost of connecting to transmission ($/MWh).

  • total_lcoefloat

    Total LCOE of each supply curve point (mean_lcoe + lcot) ($/MWh).

  • total_lcoe_frictionfloat

    Total LCOE of each supply curve point considering the LCOE friction scalar from the aggregation step (mean_lcoe_friction + lcot) ($/MWh).

Methods

add_sum_cols(table, sum_cols)

Add a summation column to table.

compute_total_lcoe(fcr[, ...])

Compute LCOT and total LCOE for all sc point to transmission feature connections

full_sort(fcr[, transmission_costs, ...])

run full supply curve sorting

run(out_fpath, fixed_charge_rate[, simple, ...])

Run Supply Curve Transmission calculations.

simple_sort(fcr[, transmission_costs, ...])

Run simple supply curve sorting that does not take into account available capacity

compute_total_lcoe(fcr, transmission_costs=None, avail_cap_frac=1, line_limited=False, connectable=True, max_workers=None, consider_friction=True)[source]

Compute LCOT and total LCOE for all sc point to transmission feature connections

Parameters:
  • fcr (float) – Fixed charge rate, used to compute LCOT

  • transmission_costs (str | dict, optional) – Transmission feature costs to use with TransmissionFeatures handler: line_tie_in_cost, line_cost, station_tie_in_cost, center_tie_in_cost, sink_tie_in_cost, by default None

  • avail_cap_frac (int, optional) – Fraction of transmissions features capacity ‘ac_cap’ to make available for connection to supply curve points, by default 1

  • line_limited (bool, optional) – Flag to have substation connection is limited by maximum capacity of the attached lines, legacy method, by default False

  • connectable (bool, optional) – Flag to only compute tranmission capital cost if transmission feature has enough available capacity, by default True

  • max_workers (int | NoneType, optional) – Number of workers to use to compute lcot, if > 1 run in parallel. None uses all available cpu’s. by default None

  • consider_friction (bool, optional) – Flag to consider friction layer on LCOE when “mean_lcoe_friction” is in the sc points input, by default True

static add_sum_cols(table, sum_cols)[source]

Add a summation column to table.

Parameters:
  • table (pd.DataFrame) – Supply curve table.

  • sum_cols (dict) – Mapping of new column label(s) to multiple column labels to sum. Example: sum_col={‘total_cap_cost’: [‘cap_cost1’, ‘cap_cost2’]} Which would add a new ‘total_cap_cost’ column which would be the sum of ‘cap_cost1’ and ‘cap_cost2’ if they are present in table.

Returns:

table (pd.DataFrame) – Supply curve table with additional summation columns.

full_sort(fcr, transmission_costs=None, avail_cap_frac=1, line_limited=False, connectable=True, max_workers=None, consider_friction=True, sort_on=None, columns=(<SupplyCurveField.TRANS_GID: 'trans_gid'>, <SupplyCurveField.TRANS_CAPACITY: 'trans_capacity'>, <SupplyCurveField.TRANS_TYPE: 'trans_type'>, <SupplyCurveField.TOTAL_TRANS_CAP_COST_PER_MW: 'cost_total_trans_usd_per_mw'>, <SupplyCurveField.DIST_SPUR_KM: 'dist_spur_km'>, <SupplyCurveField.LCOT: 'lcot_usd_per_mwh'>, <SupplyCurveField.TOTAL_LCOE: 'lcoe_all_in_usd_per_mwh'>), wind_dirs=None, n_dirs=2, downwind=False, offshore_compete=False)[source]

run full supply curve sorting

Parameters:
  • fcr (float) – Fixed charge rate, used to compute LCOT

  • transmission_costs (str | dict, optional) – Transmission feature costs to use with TransmissionFeatures handler: line_tie_in_cost, line_cost, station_tie_in_cost, center_tie_in_cost, sink_tie_in_cost, by default None

  • avail_cap_frac (int, optional) – Fraction of transmissions features capacity ‘ac_cap’ to make available for connection to supply curve points, by default 1

  • line_limited (bool, optional) – Flag to have substation connection is limited by maximum capacity of the attached lines, legacy method, by default False

  • connectable (bool, optional) – Flag to only compute tranmission capital cost if transmission feature has enough available capacity, by default True

  • max_workers (int | NoneType, optional) – Number of workers to use to compute lcot, if > 1 run in parallel. None uses all available cpu’s. by default None

  • consider_friction (bool, optional) – Flag to consider friction layer on LCOE when “mean_lcoe_friction” is in the sc points input, by default True

  • sort_on (str, optional) – Column label to sort the Supply Curve table on. This affects the build priority - connections with the lowest value in this column will be built first, by default None, which will use total LCOE without any reinforcement costs as the sort value.

  • columns (list | tuple, optional) – Columns to preserve in output connections dataframe, by default (‘trans_gid’, ‘trans_capacity’, ‘trans_type’, ‘trans_cap_cost_per_mw’, ‘dist_km’, ‘lcot’, ‘total_lcoe’)

  • wind_dirs (pandas.DataFrame | str, optional) – path to .csv or reVX.wind_dirs.wind_dirs.WindDirs output with the neighboring supply curve point gids and power-rose value at each cardinal direction, by default None

  • n_dirs (int, optional) – Number of prominent directions to use, by default 2

  • downwind (bool, optional) – Flag to remove downwind neighbors as well as upwind neighbors, by default False

  • offshore_compete (bool, default) – Flag as to whether offshore farms should be included during CompetitiveWindFarms, by default False

Returns:

supply_curve (pandas.DataFrame) – Updated sc_points table with transmission connections, LCOT and LCOE+LCOT based on full supply curve connections

simple_sort(fcr, transmission_costs=None, avail_cap_frac=1, max_workers=None, consider_friction=True, sort_on=None, columns=('trans_gid', 'trans_type', 'count_num_parallel_trans', 'dist_spur_km', 'cost_total_trans_usd_per_mw', 'lcot_usd_per_mwh', 'lcoe_all_in_usd_per_mwh', 'dist_export_km', 'dist_reinforcement_km', 'cost_spur_usd_per_mw', 'cost_poi_usd_per_mw', 'cost_export_usd_per_mw', 'cost_reinforcement_usd_per_mw', 'latitude_poi', 'longitude_poi', 'latitude_reinforcement_poi', 'longitude_reinforcement_poi'), wind_dirs=None, n_dirs=2, downwind=False, offshore_compete=False)[source]

Run simple supply curve sorting that does not take into account available capacity

Parameters:
  • fcr (float) – Fixed charge rate, used to compute LCOT

  • transmission_costs (str | dict, optional) – Transmission feature costs to use with TransmissionFeatures handler: line_tie_in_cost, line_cost, station_tie_in_cost, center_tie_in_cost, sink_tie_in_cost, by default None

  • avail_cap_frac (int, optional) – Fraction of transmissions features capacity ‘ac_cap’ to make available for connection to supply curve points, by default 1

  • line_limited (bool, optional) – Flag to have substation connection is limited by maximum capacity of the attached lines, legacy method, by default False

  • connectable (bool, optional) – Flag to only compute tranmission capital cost if transmission feature has enough available capacity, by default True

  • max_workers (int | NoneType, optional) – Number of workers to use to compute lcot, if > 1 run in parallel. None uses all available cpu’s. by default None

  • consider_friction (bool, optional) – Flag to consider friction layer on LCOE when “mean_lcoe_friction” is in the sc points input, by default True

  • sort_on (str, optional) – Column label to sort the Supply Curve table on. This affects the build priority - connections with the lowest value in this column will be built first, by default None, which will use total LCOE without any reinforcement costs as the sort value.

  • columns (list | tuple, optional) – Columns to preserve in output connections dataframe. By default, DEFAULT_COLUMNS.

  • wind_dirs (pandas.DataFrame | str, optional) – path to .csv or reVX.wind_dirs.wind_dirs.WindDirs output with the neighboring supply curve point gids and power-rose value at each cardinal direction, by default None

  • n_dirs (int, optional) – Number of prominent directions to use, by default 2

  • downwind (bool, optional) – Flag to remove downwind neighbors as well as upwind neighbors

  • offshore_compete (bool, default) – Flag as to whether offshore farms should be included during CompetitiveWindFarms, by default False

Returns:

supply_curve (pandas.DataFrame) – Updated sc_points table with transmission connections, LCOT and LCOE+LCOT based on simple supply curve connections

run(out_fpath, fixed_charge_rate, simple=True, avail_cap_frac=1, line_limited=False, transmission_costs=None, consider_friction=True, sort_on=None, columns=('trans_gid', 'trans_type', 'count_num_parallel_trans', 'dist_spur_km', 'cost_total_trans_usd_per_mw', 'lcot_usd_per_mwh', 'lcoe_all_in_usd_per_mwh', 'dist_export_km', 'dist_reinforcement_km', 'cost_spur_usd_per_mw', 'cost_poi_usd_per_mw', 'cost_export_usd_per_mw', 'cost_reinforcement_usd_per_mw', 'latitude_poi', 'longitude_poi', 'latitude_reinforcement_poi', 'longitude_reinforcement_poi'), max_workers=None, competition=None)[source]

Run Supply Curve Transmission calculations.

Run full supply curve taking into account available capacity of tranmission features when making connections.

Parameters:
  • out_fpath (str) – Full path to output CSV file. Does not need to include file ending - it will be added automatically if missing.

  • fixed_charge_rate (float) – Fixed charge rate, (in decimal form: 5% = 0.05). This value is used to compute LCOT.

  • simple (bool, optional) – Option to run the simple sort (does not keep track of capacity available on the existing transmission grid). If False, a full transmission sort (where connections are limited based on available transmission capacity) is run. Note that the full transmission sort requires the avail_cap_frac and line_limited inputs. By default, True.

  • avail_cap_frac (int, optional) – This input has no effect if simple=True. Fraction of transmissions features capacity ac_cap to make available for connection to supply curve points. By default, 1.

  • line_limited (bool, optional) – This input has no effect if simple=True. Flag to have substation connection limited by maximum capacity of the attached lines. This is a legacy method. By default, False.

  • transmission_costs (str | dict, optional) – Dictionary of transmission feature costs or path to JSON file containing a dictionary of transmission feature costs. These costs are used to compute transmission capital cost if the input transmission tables do not have a "trans_cap_cost" column (this input is ignored otherwise). The dictionary must include:

    • line_tie_in_cost

    • line_cost

    • station_tie_in_cost

    • center_tie_in_cost

    • sink_tie_in_cost

    By default, None.

  • consider_friction (bool, optional) – Flag to add a new "total_lcoe_friction" column to the supply curve output that contains the sum of the computed "total_lcoe" value and the input "mean_lcoe_friction" values. If "mean_lcoe_friction" is not in the sc_points input, this option is ignored. By default, True.

  • sort_on (str, optional) – Column label to sort the supply curve table on. This affects the build priority when doing a “full” sort - connections with the lowest value in this column will be built first. For a “simple” sort, only connections with the lowest value in this column will be considered. If None, the sort is performed on the total LCOE without any reinforcement costs added (this is typically what you want - it avoids unrealistically long spur-line connections). By default None.

  • columns (list | tuple, optional) – Columns to preserve in output supply curve dataframe. By default, DEFAULT_COLUMNS.

  • max_workers (int, optional) – Number of workers to use to compute LCOT. If > 1, computation is run in parallel. If None, computation uses all available CPU’s. By default, None.

  • competition (dict, optional) – Optional dictionary of arguments for competitive wind farm exclusions, which removes supply curve points upwind (and optionally downwind) of the lowest LCOE supply curves. If None, no competition is applied. Otherwise, this dictionary can have up to four keys:

    • wind_dirs (required) : A path to a CSV file or reVX ProminentWindDirections output with the neighboring supply curve point gids and power-rose values at each cardinal direction.

    • n_dirs (optional) : An integer representing the number of prominent directions to use during wind farm competition. By default, 2.

    • downwind (optional) : A flag indicating that downwind neighbors should be removed in addition to upwind neighbors during wind farm competition. By default, False.

    • offshore_compete (optional) : A flag indicating that offshore farms should be included during wind farm competition. By default, False.

    By default None.

Returns:

str – Path to output supply curve.