diff --git a/doc/release_notes.rst b/doc/release_notes.rst index bf9860c6..685f8502 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,6 +10,8 @@ Release Notes Upcoming Release ================ +* Remove long-deprecated function ``attach_extendable_generators`` in :mod:`add_electricity`. + * Upgrade techno-economic assumptions to ``technology-data`` v0.7.0. * Bugfix: Correct technology keys for the electricity production plotting to work out the box. diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 9fd7e4a5..ab97dcd0 100755 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -662,77 +662,6 @@ def attach_hydro(n, costs, ppl, profile_hydro, hydro_capacities, carriers, **par ) -def attach_extendable_generators(n, costs, ppl, carriers): - logger.warning( - "The function `attach_extendable_generators` is deprecated in v0.5.0." - ) - add_missing_carriers(n, carriers) - add_co2_emissions(n, costs, carriers) - - for tech in carriers: - if tech.startswith("OCGT"): - ocgt = ( - ppl.query("carrier in ['OCGT', 'CCGT']") - .groupby("bus", as_index=False) - .first() - ) - n.madd( - "Generator", - ocgt.index, - suffix=" OCGT", - bus=ocgt["bus"], - carrier=tech, - p_nom_extendable=True, - p_nom=0.0, - capital_cost=costs.at["OCGT", "capital_cost"], - marginal_cost=costs.at["OCGT", "marginal_cost"], - efficiency=costs.at["OCGT", "efficiency"], - ) - - elif tech.startswith("CCGT"): - ccgt = ( - ppl.query("carrier in ['OCGT', 'CCGT']") - .groupby("bus", as_index=False) - .first() - ) - n.madd( - "Generator", - ccgt.index, - suffix=" CCGT", - bus=ccgt["bus"], - carrier=tech, - p_nom_extendable=True, - p_nom=0.0, - capital_cost=costs.at["CCGT", "capital_cost"], - marginal_cost=costs.at["CCGT", "marginal_cost"], - efficiency=costs.at["CCGT", "efficiency"], - ) - - elif tech.startswith("nuclear"): - nuclear = ( - ppl.query("carrier == 'nuclear'").groupby("bus", as_index=False).first() - ) - n.madd( - "Generator", - nuclear.index, - suffix=" nuclear", - bus=nuclear["bus"], - carrier=tech, - p_nom_extendable=True, - p_nom=0.0, - capital_cost=costs.at["nuclear", "capital_cost"], - marginal_cost=costs.at["nuclear", "marginal_cost"], - efficiency=costs.at["nuclear", "efficiency"], - ) - - else: - raise NotImplementedError( - "Adding extendable generators for carrier " - "'{tech}' is not implemented, yet. " - "Only OCGT, CCGT and nuclear are allowed at the moment." - ) - - def attach_OPSD_renewables(n: pypsa.Network, tech_map: Dict[str, List[str]]) -> None: """ Attach renewable capacities from the OPSD dataset to the network.