revert commented lines
This commit is contained in:
parent
b2e8efea19
commit
9cee4384bb
@ -63,18 +63,18 @@ def _add_land_use_constraint(n):
|
||||
existing.index += " " + carrier + "-" + snakemake.wildcards.planning_horizons
|
||||
n.generators.loc[existing.index, "p_nom_max"] -= existing
|
||||
|
||||
# # check if existing capacities are larger than technical potential
|
||||
# existing_large = n.generators[
|
||||
# n.generators["p_nom_min"] > n.generators["p_nom_max"]
|
||||
# ].index
|
||||
# if len(existing_large):
|
||||
# logger.warning(
|
||||
# f"Existing capacities larger than technical potential for {existing_large},\
|
||||
# adjust technical potential to existing capacities"
|
||||
# )
|
||||
# n.generators.loc[existing_large, "p_nom_max"] = n.generators.loc[
|
||||
# existing_large, "p_nom_min"
|
||||
# ]
|
||||
# check if existing capacities are larger than technical potential
|
||||
existing_large = n.generators[
|
||||
n.generators["p_nom_min"] > n.generators["p_nom_max"]
|
||||
].index
|
||||
if len(existing_large):
|
||||
logger.warning(
|
||||
f"Existing capacities larger than technical potential for {existing_large},\
|
||||
adjust technical potential to existing capacities"
|
||||
)
|
||||
n.generators.loc[existing_large, "p_nom_max"] = n.generators.loc[
|
||||
existing_large, "p_nom_min"
|
||||
]
|
||||
|
||||
n.generators.p_nom_max.clip(lower=0, inplace=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user