Skip to content

GeneratorΒΆ

The Generator components attach to a single bus and can feed in power. They convert energy from their carrier to the carrier of the bus to which they attach. They can be used to represent dispatchable conventional power plants, renewable generators with variable availability, supply of grid electricity or biomass from an external source. With inverted sign, they can also be used to represent withdrawal of power at a given price or elastic demands following a linear demand curve.

When to use Link instead?

Use the Link component if you have the fuel of the generator represented by a Bus and you want to model the conversion of that fuel to electricity, e.g. a gas-fired power plant with a gas bus.

attribute type unit default description status
name string nan nan Unique name Input (required)
bus string nan nan Name of bus to which generator is attached Input (required)
control string nan PQ P,Q,V control strategy for power flow, must be "PQ", "PV" or "Slack". Only relevant for "AC" and "DC" buses. Input (optional)
type string nan nan Placeholder for generator type. Not implemented. Input (optional)
p_nom float MW 0 Nominal power for limits on p in optimization. Ignored if p_nom_extendable=True. Input (optional)
p_nom_mod float MW 0 Nominal power of the generator module (e.g. fixed unit size of a nuclear power plant). Introduces integer variables if set. Input (optional)
p_nom_extendable boolean nan False Switch to allow capacity p_nom to be extended in optimization. Input (optional)
p_nom_min float MW 0 If p_nom is extendable in optimization, set its minimum value. Input (optional)
p_nom_max float MW inf If p_nom is extendable in optimization, set its maximum value (e.g. limited by technical potential). Input (optional)
p_nom_set float MW nan If p_nom is extendable in optimization, set its value. Input (optional)
p_min_pu static or series per unit 0. The minimum output for each snapshot per unit of p_nom for the optimization (e.g. a minimal dispatch level for conventional power plants). Note that if committable=False and p_min_pu>0, this represents a must-run condition. Input (optional)
p_max_pu static or series per unit 1 The maximum output for each snapshot per unit of p_nom for the optimization (e.g. changing availability of renewable generators due to weather conditions or a de-rating of conventional power plants). Input (optional)
p_set static or series MW nan Active power set point (for optimisation and power flow) Input (optional)
p_init static MW nan Active power used as a starting point for limiting the ramp in the very first snapshot (for optimisation) Input (optional)
e_sum_min float MWh -inf The minimum total energy produced during a single optimization horizon. Input (optional)
e_sum_max float MWh inf The maximum total energy produced during a single optimization horizon. Input (optional)
q_set static or series MVar 0. Reactive power set point (for power flow) Input (optional)
sign float nan 1 Sign denoting the orientation of the dispatch variable (e.g. positive for generation, negative for consumption). Input (optional)
carrier string nan nan Prime mover energy carrier (e.g. coal, gas, wind, solar); required for global constraints on primary energy in optimisation Input (optional)
marginal_cost static or series currency/MWh 0. Marginal cost of production of 1 MWh. Input (optional)
marginal_cost_quadratic static or series currency/MWh 0. Quadratic marginal cost of production of 1 MWh. Input (optional)
active boolean nan True Whether to consider the component in optimization or not Input (optional)
build_year int year 0 Build year of the generator. Input (optional)
lifetime float years inf Lifetime of the generator. Input (optional)
capital_cost float currency/MW 0 Fixed period costs of extending p_nom by 1 MW (e.g. annuitized investment costs). Used directly in optimization unless overnight_cost is specified. Input (optional)
overnight_cost float currency/MW nan Overnight (upfront) investment cost per MW. If specified, PyPSA calculates annuity using discount_rate and lifetime. Takes precedence over capital_cost. Input (optional)
discount_rate float per unit nan Discount rate for annuity calculation when using overnight_cost. Supports 0% rate (simple depreciation). Input (optional)
fom_cost float currency/MW 0 Fixed period operation and maintenance costs per MW, added to annuitized investment cost. Input (optional)
efficiency static or series per unit 1 Ratio output and primary energy carrier input (e.g. 0.4 MWhelec/MWhfuel). This is required for global constraints on primary energy in optimization. Input (optional)
committable boolean nan False Apply unit commitment constraints. Input (optional)
start_up_cost float currency 0 Cost to start up the generator. Only used if committable=True. Input (optional)
shut_down_cost float currency 0 Cost to shut down the generator. Only used if committable=True. Input (optional)
stand_by_cost static or series currency/h 0. Stand-by cost for running the generator. This cost is incurred whenever the status is 1 (including when the dispatch decision is zero). Input (optional)
min_up_time int snapshots 0 Minimum number of snapshots for status to be 1. Only used if committable=True. Does not consider snapshot weightings. Input (optional)
min_down_time int snapshots 0 Minimum number of snapshots for status to be 0. Only used if committable=True. Does not consider snapshot weightings. Input (optional)
up_time_before int snapshots 1 Number of snapshots that the generator was online before n.snapshots start. Only used if committable=True and min_up_time>0. Does not consider snapshot weightings. Input (optional)
down_time_before int snapshots 0 Number of snapshots that the generator was offline before n.snapshots start. Only used if committable=True and min_down_time>0. Does not consider snapshot weightings. Input (optional)
ramp_limit_up static or series per unit nan Maximum active power increase from one snapshot to the next, per unit of the nominal power. Ignored if NaN. Does not consider snapshot weightings. Input (optional)
ramp_limit_down static or series per unit nan Maximum active power decrease from one snapshot to the next, per unit of the nominal power. Ignored if NaN. Does not consider snapshot weightings. Input (optional)
ramp_limit_start_up float per unit nan Maximum active power increase at start up, per unit of the nominal power. Only used if committable=True. Ignored if NaN. Input (optional)
ramp_limit_shut_down float per unit nan Maximum active power decrease at shut down, per unit of the nominal power. Only used if committable=True. Ignored if NaN. Input (optional)
weight float nan 1 Weighting of a generator. Only used for network clustering. Input (optional)
p series MW 0. Active power at bus (positive if net generation) Output
q series MVar 0. Reactive power (positive if net generation) Output
p_nom_opt float MW 0. Optimised nominal capacity. Output
status series nan 1 Status in the snapshot (1 is on, 0 is off). Only returned if committable=True. Output
start_up series nan 1. Whether the unit was started in the snapshot (1 is yes, 0 is no). Only returned if committable=True. Output
shut_down series nan 1. Whether the unit was shut down in the snapshot (1 is yes, 0 is no). Only returned if committable=True. Output
mu_upper series currency/MWh nan Shadow price of upper p_nom limit Output
mu_lower series currency/MWh nan Shadow price of lower p_nom limit Output
mu_p_set series currency/MWh nan Shadow price of fixed power generation p_set Output
mu_ramp_limit_up series currency/MWh nan Shadow price of upper ramp up limit Output
mu_ramp_limit_down series currency/MWh nan Shadow price of lower ramp down limit Output