[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
0a789a22dc
commit
0bac08934a
@ -12,7 +12,7 @@ Upcoming Release
|
|||||||
|
|
||||||
* New configuration option ``everywhere_powerplants`` to build conventional powerplants everywhere, irrespective of existing powerplants locations, in the network (https://github.com/PyPSA/pypsa-eur/pull/850).
|
* New configuration option ``everywhere_powerplants`` to build conventional powerplants everywhere, irrespective of existing powerplants locations, in the network (https://github.com/PyPSA/pypsa-eur/pull/850).
|
||||||
|
|
||||||
* Remove option for wave energy as technology data is not maintained.
|
* Remove option for wave energy as technology data is not maintained.
|
||||||
|
|
||||||
|
|
||||||
PyPSA-Eur 0.9.0 (5th January 2024)
|
PyPSA-Eur 0.9.0 (5th January 2024)
|
||||||
|
@ -796,8 +796,8 @@ def add_pipe_retrofit_constraint(n):
|
|||||||
|
|
||||||
|
|
||||||
def add_co2_atmosphere_constraint(n, snapshots):
|
def add_co2_atmosphere_constraint(n, snapshots):
|
||||||
glcs = n.global_constraints[n.global_constraints.type=="co2_atmosphere"]
|
glcs = n.global_constraints[n.global_constraints.type == "co2_atmosphere"]
|
||||||
|
|
||||||
if glcs.empty:
|
if glcs.empty:
|
||||||
return
|
return
|
||||||
for name, glc in glcs.iterrows():
|
for name, glc in glcs.iterrows():
|
||||||
@ -812,11 +812,12 @@ def add_co2_atmosphere_constraint(n, snapshots):
|
|||||||
stores = n.stores.query("carrier in @emissions.index and not e_cyclic")
|
stores = n.stores.query("carrier in @emissions.index and not e_cyclic")
|
||||||
if not stores.empty:
|
if not stores.empty:
|
||||||
last_i = snapshots[-1]
|
last_i = snapshots[-1]
|
||||||
lhs = n.model["Store-e"].loc[last_i, stores.index]
|
lhs = n.model["Store-e"].loc[last_i, stores.index]
|
||||||
rhs = glc.constant
|
rhs = glc.constant
|
||||||
|
|
||||||
n.model.add_constraints(lhs <= rhs, name=f"GlobalConstraint-{name}")
|
n.model.add_constraints(lhs <= rhs, name=f"GlobalConstraint-{name}")
|
||||||
|
|
||||||
|
|
||||||
def extra_functionality(n, snapshots):
|
def extra_functionality(n, snapshots):
|
||||||
"""
|
"""
|
||||||
Collects supplementary constraints which will be passed to
|
Collects supplementary constraints which will be passed to
|
||||||
|
Loading…
Reference in New Issue
Block a user