[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
a9dad3f34e
commit
4ff06046fc
@ -20,7 +20,9 @@ if config["enable"].get("prepare_links_p_nom", False):
|
|||||||
|
|
||||||
rule build_electricity_demand:
|
rule build_electricity_demand:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
countries=config_provider("countries"),
|
countries=config_provider("countries"),
|
||||||
load=config_provider("load"),
|
load=config_provider("load"),
|
||||||
input:
|
input:
|
||||||
@ -62,7 +64,9 @@ rule build_powerplants:
|
|||||||
rule base_network:
|
rule base_network:
|
||||||
params:
|
params:
|
||||||
countries=config_provider("countries"),
|
countries=config_provider("countries"),
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
lines=config_provider("lines"),
|
lines=config_provider("lines"),
|
||||||
links=config_provider("links"),
|
links=config_provider("links"),
|
||||||
transformers=config_provider("transformers"),
|
transformers=config_provider("transformers"),
|
||||||
@ -145,7 +149,10 @@ if config["enable"].get("build_cutout", False):
|
|||||||
|
|
||||||
rule build_cutout:
|
rule build_cutout:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k)
|
||||||
|
for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
cutouts=config_provider("atlite", "cutouts"),
|
cutouts=config_provider("atlite", "cutouts"),
|
||||||
input:
|
input:
|
||||||
regions_onshore=resources("regions_onshore.geojson"),
|
regions_onshore=resources("regions_onshore.geojson"),
|
||||||
@ -170,7 +177,9 @@ if config["enable"].get("build_natura_raster", False):
|
|||||||
rule build_natura_raster:
|
rule build_natura_raster:
|
||||||
input:
|
input:
|
||||||
natura=ancient("data/bundle/natura/Natura2000_end2015.shp"),
|
natura=ancient("data/bundle/natura/Natura2000_end2015.shp"),
|
||||||
cutouts=expand("cutouts/" + CDIR + "{cutouts}.nc", **config_provider("atlite")),
|
cutouts=expand(
|
||||||
|
"cutouts/" + CDIR + "{cutouts}.nc", **config_provider("atlite")
|
||||||
|
),
|
||||||
output:
|
output:
|
||||||
resources("natura.tiff"),
|
resources("natura.tiff"),
|
||||||
resources:
|
resources:
|
||||||
@ -250,7 +259,9 @@ rule determine_availability_matrix_MD_UA:
|
|||||||
# Optional input when having Ukraine (UA) or Moldova (MD) in the countries list
|
# Optional input when having Ukraine (UA) or Moldova (MD) in the countries list
|
||||||
if {"UA", "MD"}.intersection(set(config["countries"])):
|
if {"UA", "MD"}.intersection(set(config["countries"])):
|
||||||
opt = {
|
opt = {
|
||||||
"availability_matrix_MD_UA": resources("availability_matrix_MD-UA_{technology}.nc")
|
"availability_matrix_MD_UA": resources(
|
||||||
|
"availability_matrix_MD-UA_{technology}.nc"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
opt = {}
|
opt = {}
|
||||||
@ -258,7 +269,9 @@ else:
|
|||||||
|
|
||||||
rule build_renewable_profiles:
|
rule build_renewable_profiles:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
renewable=config_provider("renewable"),
|
renewable=config_provider("renewable"),
|
||||||
input:
|
input:
|
||||||
**opt,
|
**opt,
|
||||||
@ -339,7 +352,10 @@ rule build_hydro_profile:
|
|||||||
input:
|
input:
|
||||||
country_shapes=resources("country_shapes.geojson"),
|
country_shapes=resources("country_shapes.geojson"),
|
||||||
eia_hydro_generation="data/eia_hydro_annual_generation.csv",
|
eia_hydro_generation="data/eia_hydro_annual_generation.csv",
|
||||||
cutout=f"cutouts/" + CDIR + config_provider("renewable", "hydro", "cutout") + ".nc",
|
cutout=f"cutouts/"
|
||||||
|
+ CDIR
|
||||||
|
+ config_provider("renewable", "hydro", "cutout")
|
||||||
|
+ ".nc",
|
||||||
output:
|
output:
|
||||||
resources("profile_hydro.nc"),
|
resources("profile_hydro.nc"),
|
||||||
log:
|
log:
|
||||||
@ -356,7 +372,10 @@ if config["lines"]["dynamic_line_rating"]["activate"]:
|
|||||||
|
|
||||||
rule build_line_rating:
|
rule build_line_rating:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k)
|
||||||
|
for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
input:
|
input:
|
||||||
base_network=resources("networks/base.nc"),
|
base_network=resources("networks/base.nc"),
|
||||||
cutout="cutouts/"
|
cutout="cutouts/"
|
||||||
@ -542,9 +561,10 @@ rule prepare_network:
|
|||||||
params:
|
params:
|
||||||
snapshots={
|
snapshots={
|
||||||
"resolution": config_provider("snapshots", "resolution", default=False),
|
"resolution": config_provider("snapshots", "resolution", default=False),
|
||||||
"segmentation": config_provider("snapshots", "segmentation", default=False),
|
"segmentation": config_provider(
|
||||||
|
"snapshots", "segmentation", default=False
|
||||||
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
links=config_provider("links"),
|
links=config_provider("links"),
|
||||||
lines=config_provider("lines"),
|
lines=config_provider("lines"),
|
||||||
co2base=config_provider("electricity", "co2base"),
|
co2base=config_provider("electricity", "co2base"),
|
||||||
|
@ -126,7 +126,9 @@ rule cluster_gas_network:
|
|||||||
|
|
||||||
rule build_daily_heat_demand:
|
rule build_daily_heat_demand:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
input:
|
input:
|
||||||
pop_layout=resources("pop_layout_{scope}.nc"),
|
pop_layout=resources("pop_layout_{scope}.nc"),
|
||||||
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
||||||
@ -148,7 +150,9 @@ rule build_daily_heat_demand:
|
|||||||
|
|
||||||
rule build_hourly_heat_demand:
|
rule build_hourly_heat_demand:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
input:
|
input:
|
||||||
heat_profile="data/heat_load_profile_BDEW.csv",
|
heat_profile="data/heat_load_profile_BDEW.csv",
|
||||||
heat_demand=resources("daily_heat_demand_{scope}_elec_s{simpl}_{clusters}.nc"),
|
heat_demand=resources("daily_heat_demand_{scope}_elec_s{simpl}_{clusters}.nc"),
|
||||||
@ -169,7 +173,9 @@ rule build_hourly_heat_demand:
|
|||||||
|
|
||||||
rule build_temperature_profiles:
|
rule build_temperature_profiles:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
input:
|
input:
|
||||||
pop_layout=resources("pop_layout_{scope}.nc"),
|
pop_layout=resources("pop_layout_{scope}.nc"),
|
||||||
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
||||||
@ -221,7 +227,9 @@ rule build_cop_profiles:
|
|||||||
|
|
||||||
rule build_solar_thermal_profiles:
|
rule build_solar_thermal_profiles:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]}, # TODO use config_provider
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
}, # TODO use config_provider
|
||||||
solar_thermal=config_provider("solar_thermal"),
|
solar_thermal=config_provider("solar_thermal"),
|
||||||
input:
|
input:
|
||||||
pop_layout=resources("pop_layout_{scope}.nc"),
|
pop_layout=resources("pop_layout_{scope}.nc"),
|
||||||
@ -711,7 +719,9 @@ rule build_shipping_demand:
|
|||||||
|
|
||||||
rule build_transport_demand:
|
rule build_transport_demand:
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
sector=config_provider("sector"),
|
sector=config_provider("sector"),
|
||||||
input:
|
input:
|
||||||
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
||||||
@ -745,7 +755,9 @@ rule build_district_heat_share:
|
|||||||
district_heat_share=resources("district_heat_share.csv"),
|
district_heat_share=resources("district_heat_share.csv"),
|
||||||
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
||||||
output:
|
output:
|
||||||
district_heat_share=resources("district_heat_share_elec_s{simpl}_{clusters}_{planning_horizons}.csv"),
|
district_heat_share=resources(
|
||||||
|
"district_heat_share_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
||||||
|
),
|
||||||
threads: 1
|
threads: 1
|
||||||
resources:
|
resources:
|
||||||
mem_mb=1000,
|
mem_mb=1000,
|
||||||
@ -765,19 +777,29 @@ rule build_existing_heating_distribution:
|
|||||||
input:
|
input:
|
||||||
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
|
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
|
||||||
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
||||||
clustered_pop_energy_layout=resources("pop_weighted_energy_totals_s{simpl}_{clusters}.csv"),
|
clustered_pop_energy_layout=resources(
|
||||||
district_heat_share=resources("district_heat_share_elec_s{simpl}_{clusters}_{planning_horizons}.csv"),
|
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
|
||||||
|
),
|
||||||
|
district_heat_share=resources(
|
||||||
|
"district_heat_share_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
||||||
|
),
|
||||||
output:
|
output:
|
||||||
existing_heating_distribution=resources("existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.csv"),
|
existing_heating_distribution=resources(
|
||||||
|
"existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
||||||
|
),
|
||||||
wildcard_constraints:
|
wildcard_constraints:
|
||||||
planning_horizons=config_provider("scenario", "planning_horizons", 0), #only applies to baseyear
|
planning_horizons=config_provider("scenario", "planning_horizons", 0), #only applies to baseyear
|
||||||
threads: 1
|
threads: 1
|
||||||
resources:
|
resources:
|
||||||
mem_mb=2000,
|
mem_mb=2000,
|
||||||
log:
|
log:
|
||||||
logs("build_existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.log"),
|
logs(
|
||||||
|
"build_existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("build_existing_heating_distribution/elec_s{simpl}_{clusters}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"build_existing_heating_distribution/elec_s{simpl}_{clusters}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -885,9 +907,13 @@ rule prepare_sector_network:
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=2000,
|
mem_mb=2000,
|
||||||
log:
|
log:
|
||||||
logs("prepare_sector_network_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"),
|
logs(
|
||||||
|
"prepare_sector_network_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("prepare_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"prepare_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
|
@ -105,7 +105,9 @@ def memory(w):
|
|||||||
|
|
||||||
|
|
||||||
def input_custom_extra_functionality(w):
|
def input_custom_extra_functionality(w):
|
||||||
path = config_provider("solving", "options", "custom_extra_functionality", default=False)
|
path = config_provider(
|
||||||
|
"solving", "options", "custom_extra_functionality", default=False
|
||||||
|
)
|
||||||
if path:
|
if path:
|
||||||
return os.path.join(os.path.dirname(workflow.snakefile), path)
|
return os.path.join(os.path.dirname(workflow.snakefile), path)
|
||||||
return []
|
return []
|
||||||
|
@ -14,7 +14,9 @@ if config_provider("foresight") != "perfect":
|
|||||||
plotting=config_provider("plotting"),
|
plotting=config_provider("plotting"),
|
||||||
input:
|
input:
|
||||||
network=resources("networks/elec_s{simpl}_{clusters}.nc"),
|
network=resources("networks/elec_s{simpl}_{clusters}.nc"),
|
||||||
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
regions_onshore=resources(
|
||||||
|
"regions_onshore_elec_s{simpl}_{clusters}.geojson"
|
||||||
|
),
|
||||||
output:
|
output:
|
||||||
map=RESULTS + "maps/power-network-s{simpl}-{clusters}.pdf",
|
map=RESULTS + "maps/power-network-s{simpl}-{clusters}.pdf",
|
||||||
threads: 1
|
threads: 1
|
||||||
@ -41,9 +43,13 @@ if config_provider("foresight") != "perfect":
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=10000,
|
mem_mb=10000,
|
||||||
log:
|
log:
|
||||||
logs("plot_power_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log")
|
logs(
|
||||||
|
"plot_power_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("plot_power_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"plot_power_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -64,9 +70,13 @@ if config_provider("foresight") != "perfect":
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=10000,
|
mem_mb=10000,
|
||||||
log:
|
log:
|
||||||
logs("plot_hydrogen_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"),
|
logs(
|
||||||
|
"plot_hydrogen_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("plot_hydrogen_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"plot_hydrogen_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -86,9 +96,13 @@ if config_provider("foresight") != "perfect":
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=10000,
|
mem_mb=10000,
|
||||||
log:
|
log:
|
||||||
logs("plot_gas_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"),
|
logs(
|
||||||
|
"plot_gas_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("plot_gas_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"plot_gas_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -115,7 +129,9 @@ if config_provider("foresight") == "perfect":
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=10000,
|
mem_mb=10000,
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years_benchmark")
|
benchmarks(
|
||||||
|
"postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years_benchmark"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -142,7 +158,9 @@ rule make_summary:
|
|||||||
params:
|
params:
|
||||||
foresight=config_provider("foresight"),
|
foresight=config_provider("foresight"),
|
||||||
costs=config_provider("costs"),
|
costs=config_provider("costs"),
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
scenario=config_provider("scenario"),
|
scenario=config_provider("scenario"),
|
||||||
RDIR=RDIR,
|
RDIR=RDIR,
|
||||||
input:
|
input:
|
||||||
@ -159,7 +177,9 @@ rule make_summary:
|
|||||||
costs=(
|
costs=(
|
||||||
"data/costs_{}.csv".format(config_provider("costs", "year"))
|
"data/costs_{}.csv".format(config_provider("costs", "year"))
|
||||||
if config_provider("foresight") == "overnight"
|
if config_provider("foresight") == "overnight"
|
||||||
else "data/costs_{}.csv".format(config_provider("scenario", "planning_horizons", 0))
|
else "data/costs_{}.csv".format(
|
||||||
|
config_provider("scenario", "planning_horizons", 0)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
ac_plot=expand(
|
ac_plot=expand(
|
||||||
RESULTS + "maps/power-network-s{simpl}-{clusters}.pdf",
|
RESULTS + "maps/power-network-s{simpl}-{clusters}.pdf",
|
||||||
|
@ -45,9 +45,13 @@ rule solve_operations_network:
|
|||||||
network=RESULTS + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op.nc",
|
network=RESULTS + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op.nc",
|
||||||
log:
|
log:
|
||||||
solver=normpath(
|
solver=normpath(
|
||||||
logs("solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op_solver.log")
|
logs(
|
||||||
|
"solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op_solver.log"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
python=logs(
|
||||||
|
"solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op_python.log"
|
||||||
),
|
),
|
||||||
python=logs("solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op_python.log"),
|
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}")
|
benchmarks("solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}")
|
||||||
threads: 4
|
threads: 4
|
||||||
|
@ -36,9 +36,13 @@ rule add_existing_baseyear:
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=2000,
|
mem_mb=2000,
|
||||||
log:
|
log:
|
||||||
logs("add_existing_baseyear_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"),
|
logs(
|
||||||
|
"add_existing_baseyear_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("add_existing_baseyear/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"add_existing_baseyear/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -52,7 +56,9 @@ rule add_brownfield:
|
|||||||
"sector", "H2_retrofit_capacity_per_CH4"
|
"sector", "H2_retrofit_capacity_per_CH4"
|
||||||
),
|
),
|
||||||
threshold_capacity=config_provider("existing_capacities", " threshold_capacity"),
|
threshold_capacity=config_provider("existing_capacities", " threshold_capacity"),
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
carriers=config_provider("electricity", "renewable_carriers"),
|
carriers=config_provider("electricity", "renewable_carriers"),
|
||||||
input:
|
input:
|
||||||
**{
|
**{
|
||||||
@ -75,9 +81,13 @@ rule add_brownfield:
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=10000,
|
mem_mb=10000,
|
||||||
log:
|
log:
|
||||||
logs("add_brownfield_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"),
|
logs(
|
||||||
|
"add_brownfield_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("add_brownfield/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"add_brownfield/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -107,14 +117,20 @@ rule solve_sector_network_myopic:
|
|||||||
shadow:
|
shadow:
|
||||||
"shallow"
|
"shallow"
|
||||||
log:
|
log:
|
||||||
solver=logs("elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_solver.log"),
|
solver=logs(
|
||||||
python=logs("elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_python.log"),
|
"elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_solver.log"
|
||||||
|
),
|
||||||
|
python=logs(
|
||||||
|
"elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_python.log"
|
||||||
|
),
|
||||||
threads: solver_threads
|
threads: solver_threads
|
||||||
resources:
|
resources:
|
||||||
mem_mb=config_provider("solving", "mem"),
|
mem_mb=config_provider("solving", "mem"),
|
||||||
walltime=config_provider("solving", "walltime", default="12:00:00"),
|
walltime=config_provider("solving", "walltime", default="12:00:00"),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
|
@ -33,7 +33,9 @@ rule solve_sector_network:
|
|||||||
mem_mb=config_provider("solving", "mem"),
|
mem_mb=config_provider("solving", "mem"),
|
||||||
walltime=config_provider("solving", "walltime", default="12:00:00"),
|
walltime=config_provider("solving", "walltime", default="12:00:00"),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
|
@ -14,10 +14,14 @@ rule add_existing_baseyear:
|
|||||||
busmap_s=resources("busmap_elec_s{simpl}.csv"),
|
busmap_s=resources("busmap_elec_s{simpl}.csv"),
|
||||||
busmap=resources("busmap_elec_s{simpl}_{clusters}.csv"),
|
busmap=resources("busmap_elec_s{simpl}_{clusters}.csv"),
|
||||||
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
||||||
costs="data/costs_{}.csv".format(config_provider("scenario", "planning_horizons", 0)),
|
costs="data/costs_{}.csv".format(
|
||||||
|
config_provider("scenario", "planning_horizons", 0)
|
||||||
|
),
|
||||||
cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"),
|
cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"),
|
||||||
cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"),
|
cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"),
|
||||||
existing_heating_distribution=resources("existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.csv"),
|
existing_heating_distribution=resources(
|
||||||
|
"existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
||||||
|
),
|
||||||
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
|
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
|
||||||
existing_solar="data/existing_infrastructure/solar_capacity_IRENA.csv",
|
existing_solar="data/existing_infrastructure/solar_capacity_IRENA.csv",
|
||||||
existing_onwind="data/existing_infrastructure/onwind_capacity_IRENA.csv",
|
existing_onwind="data/existing_infrastructure/onwind_capacity_IRENA.csv",
|
||||||
@ -31,9 +35,13 @@ rule add_existing_baseyear:
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=2000,
|
mem_mb=2000,
|
||||||
log:
|
log:
|
||||||
logs("add_existing_baseyear_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"),
|
logs(
|
||||||
|
"add_existing_baseyear_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("add_existing_baseyear/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}")
|
benchmarks(
|
||||||
|
"add_existing_baseyear/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -61,9 +69,13 @@ rule prepare_perfect_foresight:
|
|||||||
resources:
|
resources:
|
||||||
mem_mb=10000,
|
mem_mb=10000,
|
||||||
log:
|
log:
|
||||||
logs("prepare_perfect_foresight{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}.log"),
|
logs(
|
||||||
|
"prepare_perfect_foresight{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}.log"
|
||||||
|
),
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("prepare_perfect_foresight{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}")
|
benchmarks(
|
||||||
|
"prepare_perfect_foresight{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -76,7 +88,9 @@ rule solve_sector_network_perfect:
|
|||||||
foresight=config_provider("foresight"),
|
foresight=config_provider("foresight"),
|
||||||
sector=config_provider("sector"),
|
sector=config_provider("sector"),
|
||||||
planning_horizons=config_provider("scenario", "planning_horizons"),
|
planning_horizons=config_provider("scenario", "planning_horizons"),
|
||||||
co2_sequestration_potential=config_provider("sector", "co2_sequestration_potential", 200),
|
co2_sequestration_potential=config_provider(
|
||||||
|
"sector", "co2_sequestration_potential", 200
|
||||||
|
),
|
||||||
custom_extra_functionality=input_custom_extra_functionality,
|
custom_extra_functionality=input_custom_extra_functionality,
|
||||||
input:
|
input:
|
||||||
network=RESULTS
|
network=RESULTS
|
||||||
@ -99,7 +113,9 @@ rule solve_sector_network_perfect:
|
|||||||
memory=RESULTS
|
memory=RESULTS
|
||||||
+ "logs/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years_memory.log",
|
+ "logs/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years_memory.log",
|
||||||
benchmark:
|
benchmark:
|
||||||
benchmarks("solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years}")
|
benchmarks(
|
||||||
|
"solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years}"
|
||||||
|
)
|
||||||
conda:
|
conda:
|
||||||
"../envs/environment.yaml"
|
"../envs/environment.yaml"
|
||||||
script:
|
script:
|
||||||
@ -110,13 +126,13 @@ rule make_summary_perfect:
|
|||||||
input:
|
input:
|
||||||
**{
|
**{
|
||||||
f"networks_{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}": RESULTS
|
f"networks_{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}": RESULTS
|
||||||
+ f"postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years.nc"
|
+ f"postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years.nc"
|
||||||
for simpl in config_provider("scenario", "simpl")
|
for simpl in config_provider("scenario", "simpl")
|
||||||
for clusters in config_provider("scenario", "clusters")
|
for clusters in config_provider("scenario", "clusters")
|
||||||
for opts in config_provider("scenario", "opts")
|
for opts in config_provider("scenario", "opts")
|
||||||
for sector_opts in config_provider("scenario", "sector_opts")
|
for sector_opts in config_provider("scenario", "sector_opts")
|
||||||
for ll in config_provider("scenario", "ll")
|
for ll in config_provider("scenario", "ll")
|
||||||
},
|
},
|
||||||
costs="data/costs_2020.csv",
|
costs="data/costs_2020.csv",
|
||||||
output:
|
output:
|
||||||
nodal_costs=RESULTS + "csvs/nodal_costs.csv",
|
nodal_costs=RESULTS + "csvs/nodal_costs.csv",
|
||||||
|
@ -17,7 +17,9 @@ rule build_electricity_production:
|
|||||||
The data is used for validation of the optimization results.
|
The data is used for validation of the optimization results.
|
||||||
"""
|
"""
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
countries=config_provider("countries"),
|
countries=config_provider("countries"),
|
||||||
output:
|
output:
|
||||||
resources("historical_electricity_production.csv"),
|
resources("historical_electricity_production.csv"),
|
||||||
@ -35,7 +37,9 @@ rule build_cross_border_flows:
|
|||||||
The data is used for validation of the optimization results.
|
The data is used for validation of the optimization results.
|
||||||
"""
|
"""
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
countries=config_provider("countries"),
|
countries=config_provider("countries"),
|
||||||
input:
|
input:
|
||||||
network=resources("networks/base.nc"),
|
network=resources("networks/base.nc"),
|
||||||
@ -55,7 +59,9 @@ rule build_electricity_prices:
|
|||||||
The data is used for validation of the optimization results.
|
The data is used for validation of the optimization results.
|
||||||
"""
|
"""
|
||||||
params:
|
params:
|
||||||
snapshots={k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]},
|
snapshots={
|
||||||
|
k: config_provider("snapshots", k) for k in ["start", "end", "inclusive"]
|
||||||
|
},
|
||||||
countries=config_provider("countries"),
|
countries=config_provider("countries"),
|
||||||
output:
|
output:
|
||||||
resources("historical_electricity_prices.csv"),
|
resources("historical_electricity_prices.csv"),
|
||||||
|
Loading…
Reference in New Issue
Block a user