add local gas input capacities (p_nom) and disable p_nom_extendable
This commit is contained in:
parent
12ef1302e6
commit
44ea5ef48a
@ -1124,13 +1124,19 @@ def add_storage_and_grids(n, costs):
|
||||
# production, LNG terminal, nor entry-point beyond system scope
|
||||
|
||||
fn = snakemake.input.gas_input_nodes
|
||||
gas_input_nodes = pd.read_csv(fn, index_col=0).index.unique()
|
||||
remove_i = n.generators[
|
||||
(n.generators.carrier=="gas") &
|
||||
~n.generators.bus.map(n.buses.location).isin(gas_input_nodes)
|
||||
].index
|
||||
gas_input_nodes = pd.read_csv(fn, index_col=0)
|
||||
|
||||
unique = gas_input_nodes.index.unique()
|
||||
gas_i = n.generators.carrier == 'gas'
|
||||
internal_i = ~n.generators.bus.map(n.buses.location).isin(unique)
|
||||
|
||||
remove_i = n.generators[gas_i & internal_i].index
|
||||
n.generators.drop(remove_i, inplace=True)
|
||||
|
||||
p_nom = gas_input_nodes.sum(axis=1).rename(lambda x: x + " gas")
|
||||
n.generators.loc[gas_i, "p_nom_extendable"] = False
|
||||
n.generators.loc[gas_i, "p_nom"] = p_nom
|
||||
|
||||
# add candidates for new gas pipelines to achieve full connectivity
|
||||
|
||||
G = nx.Graph()
|
||||
|
Loading…
Reference in New Issue
Block a user