powersimdata.input.changes package

Subpackages

Submodules

powersimdata.input.changes.bus module

powersimdata.input.changes.bus.add_bus(obj, info)[source]

Sets parameters of new bus(es) in change table.

Parameters:
  • obj (powersimdata.input.change_table.ChangeTable) – change table

  • info (list) – each entry is a dictionary. The dictionary gathers the information needed to create a new bus. Required keys: “lat”, “lon”, [“zone_id” XOR “zone_name”]. Optional key: “Pd”, “baseKV”.

Raises:
  • TypeError – if info is not a list.

  • ValueError – if any new bus doesn’t have appropriate keys/values.

powersimdata.input.changes.bus.remove_bus(obj, info)[source]

Remove one or more buses.

Parameters:
Raises:

ValueError – if info contains one or more entries not present in the bus table index.

powersimdata.input.changes.demand_flex module

powersimdata.input.changes.demand_flex.add_demand_flexibility(obj, info)[source]

Adds demand flexibility to the system.

Parameters:
  • obj (powersimdata.input.change_table.ChangeTable) – change table

  • info (dict) – Each key refers to a different component required to parameterize the demand flexibility model. Each value associated with the keys corresponds to the profile version of the profile in question. Required keys: “demand_flexibility_up”, “demand_flexibility_dn”. Optional keys: “demand_flexibility_duration”, “demand_flexibility_cost_up”, “demand_flexibility_cost_dn”.

Raises:
  • TypeError – if info is not a dict

  • ValueError – if duration is not a positive int, or if no profile is found

powersimdata.input.changes.electrification module

class powersimdata.input.changes.electrification.AreaScaling(info)[source]

Bases: object

Map end uses to adoption rates of each technology

Parameters:

info (dict) – a mapping from end use (str) to scale factors (dict)

Raises:

ValueError – if info is not a dict, or any keys are not strings

end_uses: Dict[str, ScaleFactors]
value()[source]
class powersimdata.input.changes.electrification.ElectrifiedDemand(obj, info)[source]

Bases: object

Container object for specifying zone or grid level adoption of any technologies for a given class of electrification

Parameters:
grid_info: AreaScaling
value()[source]
zone_info: Dict[str, AreaScaling]
class powersimdata.input.changes.electrification.ScaleFactors(sf)[source]

Bases: object

Map technology to adoption rate

Parameters:

sf (dict) – a dictionary mapping tech to adoption rate

sf: Dict[str, float]
value()[source]
powersimdata.input.changes.electrification.add_electrification(obj, kind, info)[source]

Add electrification profiles

Parameters:
  • obj (powersimdata.input.change_table.ChangeTable) – change table

  • kind (str) – the kind of demand, e.g. building

  • info (dict) – Keys are ‘grid’ and ‘zone’, to specify the scale factors in the given area. For grid scaling, the value is a dict, which maps a str representing the end use to a dict, which maps a str to float. This dict is referred to as scale_factors here. The values in scale_factors must be nonnegative and sum to at most 1. For zone scaling, the value is also a dict, mapping zone names (str) to a dict which mirrors the structure used for grid scaling

powersimdata.input.changes.helpers module

powersimdata.input.changes.helpers.ordinal(n)[source]

Translate a 0-based index into a 1-based ordinal, e.g. 0 -> 1st, 1 -> 2nd, etc.

Parameters:

n (int) – the index to be translated.

Returns:

(str) – Ordinal.

powersimdata.input.changes.plant module

powersimdata.input.changes.plant.add_plant(obj, info)[source]

Sets parameters of new generator(s) in change table.

Parameters:
  • obj (powersimdata.input.change_table.ChangeTable) – change table

  • info (list) – each entry is a dictionary. The dictionary gathers the information needed to create a new generator. Required keys: “bus_id”, “Pmax”, “type”. Optional keys: “c0”, “c1”, “c2”, “Pmin”. “c0”, “c1”, and “c2” are the coefficients for the cost curve, representing the fixed cost ($/hour), linear cost ($/MWh), and quadratic cost ($/MW^2·h). These are optional for hydro, solar, and wind, and required for other types.

Raises:
  • TypeError – if info is not a list.

  • ValueError – if any of the new plants to be added have bad values.

powersimdata.input.changes.plant.remove_plant(obj, info)[source]

Remove one or more plants.

Parameters:
Raises:

ValueError – if info contains one or more entries not present in the plant table index.

powersimdata.input.changes.plant.scale_plant_pmin(obj, resource, zone_name=None, plant_id=None)[source]

Sets plant cost scaling factor in change table.

Parameters:
  • obj (powersimdata.input.change_table.ChangeTable) – change table

  • resource (str) – type of generator to consider.

  • zone_name (dict) – load zones. The key(s) is (are) the name of the load zone(s) and the associated value is the scaling factor for the minimum generation for all generators fueled by specified resource in the load zone.

  • plant_id (dict) – identification numbers of plants. The key(s) is (are) the id of the plant(s) and the associated value is the scaling factor for the minimum generation of the generator.

powersimdata.input.changes.storage module

powersimdata.input.changes.storage.add_storage_capacity(obj, info)[source]

Sets storage parameters in change table.

Parameters:
  • obj (powersimdata.input.change_table.ChangeTable) – change table

  • info (list) – each entry is a dictionary. The dictionary gathers the information needed to create a new storage device. Required keys: “bus_id”, “capacity”. “capacity” denotes the symmetric input and output power limits (MW). Optional keys: “duration”, “min_stor”, “max_stor”, “energy_value”, “InEff”, “OutEff”, “LossFactor”, “terminal_min”, “terminal_max”. “duration” denotes the energy to power ratio (hours). “min_stor” denotes the minimum energy limit (unitless), e.g. 0.05 = 5%. “max_stor” denotes the maximum energy limit (unitless), e.g. 0.95 = 95%. “energy_value” denotes the value of stored energy at interval end ($/MWh). “InEff” denotes the input efficiency (unitless), e.g. 0.95 = 95%. “OutEff” denotes the output efficiency (unitless), e.g. 0.95 = 95%. “LossFactor” denotes the per-hour relative losses, e.g. 0.01 means that 1% of the current state of charge is lost per hour). “terminal_min” denotes the minimum state of charge at interval end, e.g. 0.5 means that the storage must end the interval with at least 50%. “terminal_max” denotes the maximum state of charge at interval end, e.g. 0.9 means that the storage must end the interval with no more than 90%.

Raises:
  • TypeError – if info is not a list.

  • ValueError – if any of the new storages to be added have bad values.

Module contents