Generator - Inputs
Generators represent power generation units that inject electrical energy into the network. Below are all input attributes that you can set for generator components.
Basic
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
type | string | n/a | n/a | No | static | Placeholder for generator type. Not yet implemented. |
carrier | string | n/a | n/a | Yes | static | Prime mover Carrier (e.g. coal, gas, wind, solar); required for global constraints on primary energy in optimization |
active | boolean | n/a | True | No | static | Whether this generator is active and should be included in network calculations. Set to False to temporarily disable the generator without deleting it. |
weight | float | n/a | 1 | No | static | Weighting factor used when aggregating or clustering multiple generators into representative units. Higher weights indicate generators that should be prioritized in clustering algorithms. |
Capacity
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
p_nom | float | MW | 0 | Yes | static | The maximum rated capacity of the generator in MW. This sets the upper limit for power output in all calculations. |
p_nom_mod | float | MW | 0 | No | static | The unit size for capacity expansion. When extending the nominal power (p_nom), it can only be increased in multiples of this module size. |
p_nom_extendable | boolean | n/a | False | No | static | Switch to allow the nominal power (p_nom) to be extended in optimization. |
p_nom_min | float | MW | 0 | No | static | If the nominal power (p_nom) is extendable in optimization, set its minimum value. |
p_nom_max | float | MW | inf | No | static | If the nominal power (p_nom) is extendable in optimization, set its maximum value (e.g. limited by technical potential). |
build_year | int | year | 0 | No | static | The year when the generator can be built or commissioned. Essential for multi-year capacity expansion planning models, which determine optimal investment timing and generator retirement schedules. |
lifetime | float | years | inf | No | static | The operational lifetime of the generator in years. Essential for multi-year capacity expansion planning models, which use this to determine when generators retire (build year + lifetime). Set to "inf" for generators that never retire. |
Power Limits
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
p_min_pu | float | per unit | 0 | No | static or timeseries | The minimum output for each snapshot per unit of the nominal power (p_nom) for the optimization (e.g. for variable renewable generators this can change due to weather conditions and compulsory feed-in; for conventional generators it represents a minimal dispatch). Note that if committable is False and p_min_pu > 0, this represents a must-run condition. |
p_max_pu | float | per unit | 1 | No | static or timeseries | The maximum output for each snapshot per unit of the nominal power (p_nom) for the optimization (e.g. for variable renewable generators this can change due to weather conditions; for conventional generators it represents a maximum dispatch). |
p_set | float | MW | 0 | No | static or timeseries | Fixed active power output that the generator must produce. Used when the generator output is predetermined rather than optimized. |
q_set | float | MVar | 0 | No | static or timeseries | Fixed reactive power output that the generator must produce. Used when the reactive power output is predetermined rather than optimized. |
sign | float | n/a | 1 | No | static | Power flow direction convention: 1 for generation (positive power flows into the network), -1 for consumption (positive power flows out of the network). |
Energy
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
e_sum_min | float | MWh | -inf | No | static | The minimum total energy that must be produced over the entire time period being optimized (the optimization horizon). |
e_sum_max | float | MWh | inf | No | static | The maximum total energy that can be produced over the entire time period being optimized (the optimization horizon). |
efficiency | float | per unit | 1 | No | static or timeseries | Ratio between primary energy and electrical energy, e.g. takes value 0.4 MWh_elec/MWh_thermal for gas. This is required for global constraints on primary energy in optimization. |
Unit Commitment
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
committable | boolean | n/a | False | No | static | Enable unit commitment, allowing the generator to be turned on or off with associated start-up and shutdown costs. Only available when the nominal power (p_nom) is not extendable. |
start_up_cost | float | currency | 0 | No | static | Cost to start up the generator. Only read if committable is True. |
shut_down_cost | float | currency | 0 | No | static | Cost to shut down the generator. Only read if committable is True. |
stand_by_cost | float | currency/h | 0 | No | static or timeseries | Stand-by cost for operating the generator at null power output. |
min_up_time | int | snapshots | 0 | No | static | Minimum number of snapshots for status to be 1. Only read if committable is True. |
min_down_time | int | snapshots | 0 | No | static | Minimum number of snapshots for status to be 0. Only read if committable is True. |
up_time_before | int | snapshots | 1 | No | static | Number of snapshots that the generator was online before network.snapshots start. Only read if committable is True and min_up_time is non-zero. |
down_time_before | int | snapshots | 0 | No | static | Number of snapshots that the generator was offline before network.snapshots start. Only read if committable is True and min_down_time is non-zero. |
Ramping
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
ramp_limit_up | float | per unit | 1 | No | static or timeseries | Maximum active power increase from one snapshot to the next, per unit of the nominal power (p_nom). Ignored if 1. |
ramp_limit_down | float | per unit | 1 | No | static or timeseries | Maximum active power decrease from one snapshot to the next, per unit of the nominal power (p_nom). Ignored if 1. |
ramp_limit_start_up | float | per unit | 1 | No | static | Maximum active power increase at start up, per unit of the nominal power (p_nom). Only read if committable is True. |
ramp_limit_shut_down | float | per unit | 1 | No | static | Maximum active power decrease at shut down, per unit of the nominal power (p_nom). Only read if committable is True. |
Costs
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
marginal_cost | float | currency/MWh | 0 | Yes | static or timeseries | The variable cost of producing one additional MWh of electricity. Used by the optimizer to determine the economic dispatch order of generators (lower cost generators are dispatched first). |
marginal_cost_quadratic | float | currency/MWh² | 0 | No | static or timeseries | Quadratic term for non-linear cost curves. When set, the total cost includes a quadratic component that increases with the square of output, modeling increasing marginal costs at higher generation levels. |
capital_cost | float | currency/MW | 0 | No | static | The cost per MW of adding new capacity. Includes investment costs (spread over the planning period) and fixed operations & maintenance costs. Only relevant when p_nom_extendable is True. |
Electrical
| Attribute | Data Type | Unit | Default | Required | Storage Type | Description |
|---|---|---|---|---|---|---|
control | string | n/a | PQ | No | static | Power flow control mode: "PQ" (fixed active and reactive power), "PV" (fixed active power and voltage magnitude), or "Slack" (balances system power, typically one per network). |

