Skip to content

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

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
typestringn/an/aNostaticPlaceholder for generator type. Not yet implemented.
carrierstringn/an/aYesstaticPrime mover Carrier (e.g. coal, gas, wind, solar); required for global constraints on primary energy in optimization
activebooleann/aTrueNostaticWhether this generator is active and should be included in network calculations. Set to False to temporarily disable the generator without deleting it.
weightfloatn/a1NostaticWeighting factor used when aggregating or clustering multiple generators into representative units. Higher weights indicate generators that should be prioritized in clustering algorithms.

Capacity

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
p_nomfloatMW0YesstaticThe maximum rated capacity of the generator in MW. This sets the upper limit for power output in all calculations.
p_nom_modfloatMW0NostaticThe 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_extendablebooleann/aFalseNostaticSwitch to allow the nominal power (p_nom) to be extended in optimization.
p_nom_minfloatMW0NostaticIf the nominal power (p_nom) is extendable in optimization, set its minimum value.
p_nom_maxfloatMWinfNostaticIf the nominal power (p_nom) is extendable in optimization, set its maximum value (e.g. limited by technical potential).
build_yearintyear0NostaticThe 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.
lifetimefloatyearsinfNostaticThe 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

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
p_min_pufloatper unit0Nostatic or timeseriesThe 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_pufloatper unit1Nostatic or timeseriesThe 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_setfloatMW0Nostatic or timeseriesFixed active power output that the generator must produce. Used when the generator output is predetermined rather than optimized.
q_setfloatMVar0Nostatic or timeseriesFixed reactive power output that the generator must produce. Used when the reactive power output is predetermined rather than optimized.
signfloatn/a1NostaticPower flow direction convention: 1 for generation (positive power flows into the network), -1 for consumption (positive power flows out of the network).

Energy

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
e_sum_minfloatMWh-infNostaticThe minimum total energy that must be produced over the entire time period being optimized (the optimization horizon).
e_sum_maxfloatMWhinfNostaticThe maximum total energy that can be produced over the entire time period being optimized (the optimization horizon).
efficiencyfloatper unit1Nostatic or timeseriesRatio 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

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
committablebooleann/aFalseNostaticEnable 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_costfloatcurrency0NostaticCost to start up the generator. Only read if committable is True.
shut_down_costfloatcurrency0NostaticCost to shut down the generator. Only read if committable is True.
stand_by_costfloatcurrency/h0Nostatic or timeseriesStand-by cost for operating the generator at null power output.
min_up_timeintsnapshots0NostaticMinimum number of snapshots for status to be 1. Only read if committable is True.
min_down_timeintsnapshots0NostaticMinimum number of snapshots for status to be 0. Only read if committable is True.
up_time_beforeintsnapshots1NostaticNumber 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_beforeintsnapshots0NostaticNumber 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

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
ramp_limit_upfloatper unit1Nostatic or timeseriesMaximum active power increase from one snapshot to the next, per unit of the nominal power (p_nom). Ignored if 1.
ramp_limit_downfloatper unit1Nostatic or timeseriesMaximum active power decrease from one snapshot to the next, per unit of the nominal power (p_nom). Ignored if 1.
ramp_limit_start_upfloatper unit1NostaticMaximum active power increase at start up, per unit of the nominal power (p_nom). Only read if committable is True.
ramp_limit_shut_downfloatper unit1NostaticMaximum active power decrease at shut down, per unit of the nominal power (p_nom). Only read if committable is True.

Costs

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
marginal_costfloatcurrency/MWh0Yesstatic or timeseriesThe 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_quadraticfloatcurrency/MWh²0Nostatic or timeseriesQuadratic 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_costfloatcurrency/MW0NostaticThe 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

AttributeData TypeUnitDefaultRequiredStorage TypeDescription
controlstringn/aPQNostaticPower 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).

© Copyright 2025 Bayesian Energy