Global Constraint
API Reference
GlobalConstraint
Bases: BaseComponent[Static]
Constraints in the optimisation problem that apply to multiple components at once.
PyPSA user guide for this component.
type: GlobalConstraintType = 'primary_energy'
Type of constraint (e.g. "primary energy", "tech_capacity_expansion_limit", "operational_limit", "transmission_volume_expansion_limit", "transmission_expansion_cost_limit").
investment_period: float | None = Field(default=None, ge=0.0)
Investment period for which the constraint is applied. If not specified, the constraint is applied to all investment periods together.
bus: str | None = Field(default=None, min_length=1)
Bus to which the global constraint applies. Only relevant for `type="tech_expansion_limit". If not specified, the constraint applies to all buses.
carrier_attribute: str = 'co2_emissions'
If the global constraint is connected with a carrier, name the associated carrier attribute. This must appear as a column in n.carriers.
sense: Literal['<=', '==', '>='] = '=='
Constraint sense; must be one of "<=", "==" or ">=".
constant: float = 0.0
Constant for right-hand-side of constraint for optimisation period. For a CO₂ constraint, this would be tonnes of CO₂.
GlobalConstraintOptimizationStaticResults
Bases: BaseStaticResults
mu: float = 0.0
Shadow price of global constraint.