air_temperature= "resources/temp_air_total_{network}_s{simpl}_{clusters}.nc", tax_w="data/retro/electricity_taxes_eu.csv", construction_index= "data/retro/comparative_level_investment.csv", floor_area_missing="data/retro/floor_area_missing.csv", clustered_pop_layout= "resources/pop_layout_elec_s{simpl}_{clusters}.csv", cost_germany="data/retro/retro_cost_germany.csv", window_assumptions="data/retro/window_assumptions.csv"), output=dict( retro_cost="resources/retro_cost_elec_s{simpl}_{clusters}.csv", floor_area="resources/floor_area_elec_s{simpl}_{clusters}.csv") ) with open('config.yaml', encoding='utf8') as f: snakemake.config = yaml.safe_load(f) # ******** config ********************************************************* retro_opts = snakemake.config["sector"]["retrofitting"] interest_rate = retro_opts["interest_rate"] annualise_cost = retro_opts[ "annualise_cost"] # annualise the investment costs tax_weighting = retro_opts[ "tax_weighting"] # weight costs depending on taxes in countries construction_index = retro_opts[ "construction_index"] # weight costs depending on labour/material costs per ct # mapping missing countries by neighbours map_for_missings = { "AL": ["BG", "RO", "GR"],
if __name__ == "__main__": # Detect running outside of snakemake and mock snakemake for testing if 'snakemake' not in globals(): from vresutils.snakemake import MockSnakemake, Dict snakemake = MockSnakemake( wildcards=dict(assumptions='wind1100-sola750-nucl4000', policy="OCGT", parameter="101"), #input=dict(network="networks/{network}_s{simpl}_{clusters}_lv{lv}_{opts}.nc"), #output=["results/networks/s{simpl}_{clusters}_lv{lv}_{opts}-test.nc"], #log=dict(gurobi="logs/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_gurobi-test.log", # python="logs/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_python-test.log") ) import yaml with open('config.yaml') as f: snakemake.config = yaml.load(f) #change to cbc or glpk for open-source solvers solver_name = snakemake.config["solver"]["name"] #1 is hourly, 3 is 3-hourly frequency = snakemake.config["frequency"] if "storage" in snakemake.wildcards.policy: add_hydrogen = True add_battery = True else: add_hydrogen = False add_battery = False if "battery" in snakemake.wildcards.policy: