Redo investment-year-dependent exogenous retrofitting parameter
Specify as dictionary, use get_parameter to get correct value. Also remove old parameter "space_heating_fraction" since this is superceded by the new exogenous retro code.
This commit is contained in:
parent
2b72aeb43c
commit
1ea31f0e57
@ -278,7 +278,6 @@ rule build_industrial_demand:
|
||||
resources: mem_mb=1000
|
||||
script: 'scripts/build_industrial_demand.py'
|
||||
|
||||
if config['sector']['retrofitting'].get('retro_endogen', True):
|
||||
rule build_retro_cost:
|
||||
input:
|
||||
building_stock="data/retro/data_building_stock.csv",
|
||||
|
@ -100,11 +100,14 @@ sector:
|
||||
'transport_internal_combustion_efficiency': 0.3
|
||||
'shipping_average_efficiency' : 0.4 #For conversion of fuel oil to propulsion in 2011
|
||||
'time_dep_hp_cop' : True
|
||||
'space_heating_fraction' : 1.0 #fraction of space heating active
|
||||
'retrofitting' :
|
||||
'retro_exogen': False # space heat demand savings exogenously
|
||||
'dE': 0.4 # reduction of space heat demand (applied before losses in DH)
|
||||
'retro_endogen': True # co-optimise space heat savings
|
||||
'retro_exogen': True # space heat demand savings exogenously
|
||||
'dE': # reduction of space heat demand (applied before losses in DH)
|
||||
2020 : 0.
|
||||
2030 : 0.15
|
||||
2040 : 0.3
|
||||
2050 : 0.4
|
||||
'retro_endogen': False # co-optimise space heat savings
|
||||
'cost_factor' : 1.0
|
||||
'interest_rate': 0.04 # for investment in building components
|
||||
'annualise_cost': True # annualise the investment costs
|
||||
|
@ -114,13 +114,6 @@ def update_wind_solar_costs(n,costs):
|
||||
n.generators.loc[n.generators.carrier==tech,'capital_cost'] = capital_cost.rename(index=lambda node: node + ' ' + tech)
|
||||
|
||||
|
||||
def retro_exogen(demand, dE):
|
||||
"""
|
||||
reduces space heat demand exogenously
|
||||
demand: current space heat demand
|
||||
dE: energy savings
|
||||
"""
|
||||
return demand * (1-dE)
|
||||
def add_carrier_buses(n, carriers):
|
||||
"""
|
||||
Add buses to connect e.g. coal, nuclear and oil plants
|
||||
@ -436,12 +429,10 @@ def prepare_data(network):
|
||||
|
||||
if use == "space":
|
||||
heat_demand_shape = daily_space_heat_demand*intraday_year_profile
|
||||
factor = options['space_heating_fraction']
|
||||
else:
|
||||
heat_demand_shape = intraday_year_profile
|
||||
factor = 1.
|
||||
|
||||
heat_demand["{} {}".format(sector,use)] = factor*(heat_demand_shape/heat_demand_shape.sum()).multiply(nodal_energy_totals["total {} {}".format(sector,use)])*1e6
|
||||
heat_demand["{} {}".format(sector,use)] = (heat_demand_shape/heat_demand_shape.sum()).multiply(nodal_energy_totals["total {} {}".format(sector,use)])*1e6
|
||||
electric_heat_supply["{} {}".format(sector,use)] = (heat_demand_shape/heat_demand_shape.sum()).multiply(nodal_energy_totals["electricity {} {}".format(sector,use)])*1e6
|
||||
|
||||
heat_demand = pd.concat(heat_demand,axis=1)
|
||||
@ -458,7 +449,7 @@ def prepare_data(network):
|
||||
|
||||
## Get overall demand curve for all vehicles
|
||||
|
||||
traffic = pd.read_csv(snakemake.input.traffic_data + "KFZ__count",
|
||||
traffic = pd.read_csv(os.path.join(snakemake.input.traffic_data,"KFZ__count"),
|
||||
skiprows=2)["count"]
|
||||
|
||||
#Generate profiles
|
||||
@ -513,7 +504,7 @@ def prepare_data(network):
|
||||
|
||||
## derive plugged-in availability for PKW's (cars)
|
||||
|
||||
traffic = pd.read_csv(snakemake.input.traffic_data + "Pkw__count",
|
||||
traffic = pd.read_csv(os.path.join(snakemake.input.traffic_data,"Pkw__count"),
|
||||
skiprows=2)["count"]
|
||||
|
||||
avail_max = 0.95
|
||||
@ -1087,14 +1078,11 @@ def add_heat(network):
|
||||
|
||||
# building retrofitting, exogenously reduce space heat demand
|
||||
if options["retrofitting"]["retro_exogen"]:
|
||||
dE = options["retrofitting"]["dE"]
|
||||
if snakemake.config["foresight"]=='myopic':
|
||||
year = int(snakemake.wildcards.planning_horizons[-4:])
|
||||
dE = dE[snakemake.config["scenario"]["planning_horizons"].index(year)]
|
||||
dE = get_parameter(options["retrofitting"]["dE"])
|
||||
print("retrofitting exogenously, assumed space heat reduction of ",
|
||||
dE)
|
||||
for sector in sectors:
|
||||
heat_demand[sector + " space"] = heat_demand[sector + " space"].apply(lambda x: retro_exogen(x, dE))
|
||||
heat_demand[sector + " space"] = (1-dE)*heat_demand[sector + " space"]
|
||||
|
||||
heat_systems = ["residential rural", "services rural",
|
||||
"residential urban decentral","services urban decentral",
|
||||
@ -1934,11 +1922,6 @@ if __name__ == "__main__":
|
||||
add_storage(n)
|
||||
|
||||
for o in opts:
|
||||
if "space" in o:
|
||||
limit = o[o.find("space")+5:]
|
||||
limit = float(limit.replace("p",".").replace("m","-"))
|
||||
print(o,limit)
|
||||
options['space_heating_fraction'] = limit
|
||||
if o[:4] == "wave":
|
||||
wave_cost_factor = float(o[4:].replace("p",".").replace("m","-"))
|
||||
print("Including wave generators with cost factor of", wave_cost_factor)
|
||||
|
Loading…
Reference in New Issue
Block a user