Allow disabling rules prepare_links_p_nom and build_powerplants

Both rules have difficult to install dependencies and the correct output is
already included in the git repository.
This commit is contained in:
Jonas Hörsch 2018-08-13 14:09:20 +02:00
parent f97bc401e2
commit a3ee75a2a7
2 changed files with 18 additions and 12 deletions

View File

@ -17,12 +17,21 @@ rule solve_all_elec_networks:
expand("results/networks/elec_s{simpl}_{clusters}_lv{lv}_{opts}.nc", expand("results/networks/elec_s{simpl}_{clusters}_lv{lv}_{opts}.nc",
**config['scenario']) **config['scenario'])
rule prepare_links_p_nom: if config['enable']['prepare_links_p_nom']:
rule prepare_links_p_nom:
output: 'data/links_p_nom.csv' output: 'data/links_p_nom.csv'
threads: 1 threads: 1
resources: mem_mb=500 resources: mem_mb=500
script: 'scripts/prepare_links_p_nom.py' script: 'scripts/prepare_links_p_nom.py'
if config['enable']['powerplantmatching']:
rule build_powerplants:
input: base_network="networks/base.nc"
output: "resources/powerplants.csv"
threads: 1
resources: mem_mb=500
script: "scripts/build_powerplants.py"
rule base_network: rule base_network:
input: input:
eg_buses='data/entsoegridkit/buses.csv', eg_buses='data/entsoegridkit/buses.csv',
@ -59,13 +68,6 @@ rule build_shapes:
resources: mem_mb=500 resources: mem_mb=500
script: "scripts/build_shapes.py" script: "scripts/build_shapes.py"
rule build_powerplants:
input: base_network="networks/base.nc"
output: "resources/powerplants.csv"
threads: 1
resources: mem_mb=500
script: "scripts/build_powerplants.py"
rule build_bus_regions: rule build_bus_regions:
input: input:
country_shapes='resources/country_shapes.geojson', country_shapes='resources/country_shapes.geojson',

View File

@ -16,6 +16,10 @@ snapshots:
end: "2014-01-01" end: "2014-01-01"
closed: 'left' # end is not inclusive closed: 'left' # end is not inclusive
enable:
powerplantmatching: false
prepare_links_p_nom: false
electricity: electricity:
voltages: [220., 300., 380.] voltages: [220., 300., 380.]
co2limit: 7.75e+7 # 0.05 * 3.1e9*0.5 co2limit: 7.75e+7 # 0.05 * 3.1e9*0.5