Improve agg_p_nom_minmax file management
This commit is contained in:
parent
ed83f1fb4a
commit
e90b37e6d7
@ -760,10 +760,7 @@ solving:
|
||||
agg_p_nom_limits:
|
||||
agg_offwind: false
|
||||
include_existing: false
|
||||
years:
|
||||
2030: data/agg_p_nom_minmax.csv
|
||||
2040: data/agg_p_nom_minmax.csv
|
||||
2050: data/agg_p_nom_minmax.csv
|
||||
file: data/agg_p_nom_minmax.csv
|
||||
|
||||
constraints:
|
||||
CCL: false
|
||||
|
@ -1,31 +1,32 @@
|
||||
country,carrier,min,max
|
||||
DE,onwind,0.1,
|
||||
DE,offwind-ac,0.1,
|
||||
DE,offwind-dc,0.1,
|
||||
DE,solar,0.2,
|
||||
LU,onwind,,
|
||||
LU,solar,,
|
||||
NL,onwind,,
|
||||
NL,offwind-ac,,
|
||||
NL,offwind-dc,,
|
||||
NL,solar,,
|
||||
GB,onwind,,
|
||||
GB,offwind-ac,,
|
||||
GB,offwind-dc,,
|
||||
GB,solar,,
|
||||
IE,onwind,,
|
||||
IE,offwind-ac,,
|
||||
IE,offwind-dc,,
|
||||
IE,solar,,
|
||||
FR,onwind,,
|
||||
FR,offwind-ac,,
|
||||
FR,offwind-dc,,
|
||||
FR,solar,,
|
||||
DK,onwind,,
|
||||
DK,offwind-ac,,
|
||||
DK,offwind-dc,,
|
||||
DK,solar,,
|
||||
BE,onwind,,
|
||||
BE,offwind-ac,,
|
||||
BE,offwind-dc,,
|
||||
BE,solar,,
|
||||
,,2030,2030,2040,2040,2050,2050
|
||||
country,carrier,min,max,min,max,min,max
|
||||
DE,onwind,0.1,,0.1,,0.1,
|
||||
DE,offwind-ac,0.1,,0.1,,0.1,
|
||||
DE,offwind-dc,0.1,,0.1,,0.1,
|
||||
DE,solar,0.2,,0.2,,0.2,
|
||||
LU,onwind,,,,,,
|
||||
LU,solar,,,,,,
|
||||
NL,onwind,,,,,,
|
||||
NL,offwind-ac,,,,,,
|
||||
NL,offwind-dc,,,,,,
|
||||
NL,solar,,,,,,
|
||||
GB,onwind,,,,,,
|
||||
GB,offwind-ac,,,,,,
|
||||
GB,offwind-dc,,,,,,
|
||||
GB,solar,,,,,,
|
||||
IE,onwind,,,,,,
|
||||
IE,offwind-ac,,,,,,
|
||||
IE,offwind-dc,,,,,,
|
||||
IE,solar,,,,,,
|
||||
FR,onwind,,,,,,
|
||||
FR,offwind-ac,,,,,,
|
||||
FR,offwind-dc,,,,,,
|
||||
FR,solar,,,,,,
|
||||
DK,onwind,,,,,,
|
||||
DK,offwind-ac,,,,,,
|
||||
DK,offwind-dc,,,,,,
|
||||
DK,solar,,,,,,
|
||||
BE,onwind,,,,,,
|
||||
BE,offwind-ac,,,,,,
|
||||
BE,offwind-dc,,,,,,
|
||||
BE,solar,,,,,,
|
|
@ -17,7 +17,7 @@ options,,,
|
||||
agg_p_nom_limits,,,Configure per carrier generator nominal capacity constraints for individual countries if ``'CCL'`` is in ``{opts}`` wildcard.
|
||||
-- agg_offwind,bool,"{'true','false'}",Aggregate together all the types of offwind when writing the constraint. Default is false.
|
||||
-- include_existing,bool,"{'true','false'}",Take existing capacities into account when writing the constraint. Default is false.
|
||||
-- years,-,Dictionary with planning horizons as key and path as value,Reference to ``.csv`` file for each planning horizon. Defaults to ``data/agg_p_nom_minmax.csv``.
|
||||
-- file,file,path,Reference to ``.csv`` file specifying per carrier generator nominal capacity constraints for individual countries and planning horizons. Defaults to ``data/agg_p_nom_minmax.csv``.
|
||||
constraints ,,,
|
||||
-- CCL,bool,"{'true','false'}",Add minimum and maximum levels of generator nominal capacity per carrier for individual countries. These can be specified in the file linked at ``electricity: agg_p_nom_limits`` in the configuration. File defaults to ``data/agg_p_nom_minmax.csv``.
|
||||
-- EQ,bool/string,"{'false',`n(c| )``; i.e. ``0.5``-``0.7c``}",Require each country or node to on average produce a minimal share of its total consumption itself. Example: ``EQ0.5c`` demands each country to produce on average at least 50% of its consumption; ``EQ0.5`` demands each node to produce on average at least 50% of its consumption.
|
||||
|
|
@ -422,8 +422,9 @@ def add_CCL_constraints(n, config):
|
||||
agg_p_nom_limits: data/agg_p_nom_minmax.csv
|
||||
"""
|
||||
agg_p_nom_minmax = pd.read_csv(
|
||||
config["solving"]["agg_p_nom_limits"]["years"][int(snakemake.wildcards.planning_horizons)], index_col=[0, 1]
|
||||
)
|
||||
config["solving"]["agg_p_nom_limits"]["file"],
|
||||
index_col=[0, 1], header=[0, 1]
|
||||
)[snakemake.wildcards.planning_horizons]
|
||||
logger.info("Adding generation capacity constraints per carrier and country")
|
||||
p_nom = n.model["Generator-p_nom"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user