2023-03-08 16:29:01 +00:00
|
|
|
# SPDX-FileCopyrightText: : 2023 The PyPSA-Eur Authors
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-03-08 16:46:14 +00:00
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
rule add_existing_baseyear:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
|
|
|
scenario=config["scenario"],
|
|
|
|
sector=config["sector"],
|
|
|
|
existing_capacities=config["existing_capacities"],
|
|
|
|
costs=config["costs"],
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
|
|
|
overrides="data/override_component_attrs",
|
|
|
|
network=RESULTS
|
|
|
|
+ "prenetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
powerplants=RESOURCES + "powerplants.csv",
|
|
|
|
busmap_s=RESOURCES + "busmap_elec_s{simpl}.csv",
|
|
|
|
busmap=RESOURCES + "busmap_elec_s{simpl}_{clusters}.csv",
|
|
|
|
clustered_pop_layout=RESOURCES + "pop_layout_elec_s{simpl}_{clusters}.csv",
|
|
|
|
costs="data/costs_{}.csv".format(config["scenario"]["planning_horizons"][0]),
|
|
|
|
cop_soil_total=RESOURCES + "cop_soil_total_elec_s{simpl}_{clusters}.nc",
|
|
|
|
cop_air_total=RESOURCES + "cop_air_total_elec_s{simpl}_{clusters}.nc",
|
|
|
|
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
|
|
|
|
existing_solar="data/existing_infrastructure/solar_capacity_IRENA.csv",
|
|
|
|
existing_onwind="data/existing_infrastructure/onwind_capacity_IRENA.csv",
|
|
|
|
existing_offwind="data/existing_infrastructure/offwind_capacity_IRENA.csv",
|
|
|
|
output:
|
|
|
|
RESULTS
|
|
|
|
+ "prenetworks-brownfield/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
wildcard_constraints:
|
|
|
|
planning_horizons=config["scenario"]["planning_horizons"][0], #only applies to baseyear
|
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-03-08 18:22:29 +00:00
|
|
|
LOGS
|
|
|
|
+ "add_existing_baseyear_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log",
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
|
|
|
(
|
2023-03-08 18:22:29 +00:00
|
|
|
BENCHMARKS
|
|
|
|
+ "add_existing_baseyear/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
2023-03-08 16:29:01 +00:00
|
|
|
)
|
2023-03-08 16:46:14 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:45:25 +00:00
|
|
|
"../scripts/add_existing_baseyear.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
2023-03-08 16:44:25 +00:00
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
rule add_brownfield:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
|
|
|
sector=config["sector"],
|
|
|
|
existing_capacities=config["existing_capacities"],
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
|
|
|
overrides="data/override_component_attrs",
|
|
|
|
network=RESULTS
|
|
|
|
+ "prenetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
network_p=solved_previous_horizon, #solved network at previous time step
|
|
|
|
costs="data/costs_{planning_horizons}.csv",
|
|
|
|
cop_soil_total=RESOURCES + "cop_soil_total_elec_s{simpl}_{clusters}.nc",
|
|
|
|
cop_air_total=RESOURCES + "cop_air_total_elec_s{simpl}_{clusters}.nc",
|
|
|
|
output:
|
|
|
|
RESULTS
|
|
|
|
+ "prenetworks-brownfield/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
threads: 4
|
|
|
|
resources:
|
|
|
|
mem_mb=10000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-03-08 18:22:29 +00:00
|
|
|
LOGS
|
|
|
|
+ "add_brownfield_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log",
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
|
|
|
(
|
2023-03-08 18:22:29 +00:00
|
|
|
BENCHMARKS
|
|
|
|
+ "add_brownfield/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
2023-03-08 16:29:01 +00:00
|
|
|
)
|
2023-03-08 16:46:14 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:45:25 +00:00
|
|
|
"../scripts/add_brownfield.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
2023-03-08 16:44:25 +00:00
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
ruleorder: add_existing_baseyear > add_brownfield
|
|
|
|
|
2023-03-08 16:44:25 +00:00
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
rule solve_sector_network_myopic:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
|
|
|
solving=config["solving"],
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
|
|
|
overrides="data/override_component_attrs",
|
|
|
|
network=RESULTS
|
|
|
|
+ "prenetworks-brownfield/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
costs="data/costs_{planning_horizons}.csv",
|
2023-04-21 09:05:18 +00:00
|
|
|
config=RESULTS + "config/config.yaml",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
|
|
|
RESULTS
|
|
|
|
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
shadow:
|
|
|
|
"shallow"
|
|
|
|
log:
|
|
|
|
solver=LOGS
|
|
|
|
+ "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: 4
|
|
|
|
resources:
|
|
|
|
mem_mb=config["solving"]["mem"],
|
|
|
|
benchmark:
|
|
|
|
(
|
2023-03-08 18:22:29 +00:00
|
|
|
BENCHMARKS
|
|
|
|
+ "solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
2023-03-08 16:29:01 +00:00
|
|
|
)
|
2023-03-08 16:46:14 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-09 21:51:56 +00:00
|
|
|
"../scripts/solve_network.py"
|