handle gas pipeline retrofitting with lossy links
This commit is contained in:
parent
72e6c208ef
commit
80f9259bac
@ -774,9 +774,13 @@ def add_pipe_retrofit_constraint(n):
|
||||
"""
|
||||
Add constraint for retrofitting existing CH4 pipelines to H2 pipelines.
|
||||
"""
|
||||
gas_pipes_i = n.links.query("carrier == 'gas pipeline' and p_nom_extendable").index
|
||||
if "reversed" not in n.links.columns:
|
||||
n.links["reversed"] = False
|
||||
gas_pipes_i = n.links.query(
|
||||
"carrier == 'gas pipeline' and p_nom_extendable and ~reversed"
|
||||
).index
|
||||
h2_retrofitted_i = n.links.query(
|
||||
"carrier == 'H2 pipeline retrofitted' and p_nom_extendable"
|
||||
"carrier == 'H2 pipeline retrofitted' and p_nom_extendable and ~reversed"
|
||||
).index
|
||||
|
||||
if h2_retrofitted_i.empty or gas_pipes_i.empty:
|
||||
|
Loading…
Reference in New Issue
Block a user