add_electricity: Remove long-deprecated function attach_extendable_generators
This commit is contained in:
parent
823765b353
commit
bf07300010
@ -10,6 +10,8 @@ Release Notes
|
|||||||
Upcoming Release
|
Upcoming Release
|
||||||
================
|
================
|
||||||
|
|
||||||
|
* Remove long-deprecated function ``attach_extendable_generators`` in :mod:`add_electricity`.
|
||||||
|
|
||||||
* Upgrade techno-economic assumptions to ``technology-data`` v0.7.0.
|
* Upgrade techno-economic assumptions to ``technology-data`` v0.7.0.
|
||||||
|
|
||||||
* Bugfix: Correct technology keys for the electricity production plotting to work out the box.
|
* Bugfix: Correct technology keys for the electricity production plotting to work out the box.
|
||||||
|
@ -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:
|
def attach_OPSD_renewables(n: pypsa.Network, tech_map: Dict[str, List[str]]) -> None:
|
||||||
"""
|
"""
|
||||||
Attach renewable capacities from the OPSD dataset to the network.
|
Attach renewable capacities from the OPSD dataset to the network.
|
||||||
|
Loading…
Reference in New Issue
Block a user