Skip to content

No new gas after cutoff year

This constraint prevents new gas generators from being built after a specified cutoff year. It's useful when modeling energy transitions with policy restrictions on fossil fuel infrastructure or exploring scenarios with early phase-outs of specific technologies.

Common use cases:

  • Modelling no-new-gas policies or fossil fuel phase-out commitments
  • Exploring the impact of technology bans on system costs and reliability
  • Testing energy security scenarios with restricted access to certain fuels

Note that in the code block below, n refers to the network object.

python
# Configure parameters
carrier_name = "gas"
cutoff_year = 2025

p_nom = n.model["Generator-p_nom"]
dim = "Generator-ext" 

# Get gas generators
is_target_carrier = n.generators.carrier == carrier_name
target_generators = n.generators[is_target_carrier].index

for gen in target_generators:
    build_year = n.generators.at[gen, "build_year"]
    if build_year > cutoff_year:
        n.model.add_constraints(
            p_nom.loc[{dim: [gen]}] == 0,
            name=f"{carrier_name}_no_build_{gen}_{build_year}"
        )
        
        # print statement for your logs
        print(f"Blocked new {carrier_name} build: {gen} (build_year {build_year})")

© Copyright 2025 Bayesian Energy