prepare_costs: use default lifetime from config.yaml
Rather than hard-coding 25 years.
This commit is contained in:
parent
7cfce2e324
commit
17bf0dfbb1
@ -130,7 +130,6 @@ sector:
|
||||
'gas_distribution_grid_cost_factor' : 1.0 #multiplies cost in data/costs.csv
|
||||
|
||||
costs:
|
||||
year: 2030
|
||||
lifetime: 25 #default lifetime
|
||||
# From a Lion Hirth paper, also reflects average of Noothout et al 2016
|
||||
discountrate: 0.07
|
||||
|
@ -442,7 +442,8 @@ if __name__ == "__main__":
|
||||
costs = prepare_costs(snakemake.input.costs,
|
||||
snakemake.config['costs']['USD2013_to_EUR2013'],
|
||||
snakemake.config['costs']['discountrate'],
|
||||
Nyears)
|
||||
Nyears,
|
||||
snakemake.config['costs']['lifetime'])
|
||||
|
||||
grouping_years=snakemake.config['existing_capacities']['grouping_years']
|
||||
add_power_capacities_installed_before_baseyear(n, grouping_years, costs, baseyear)
|
||||
|
@ -592,7 +592,8 @@ if __name__ == "__main__":
|
||||
costs_db = prepare_costs(snakemake.input.costs,
|
||||
snakemake.config['costs']['USD2013_to_EUR2013'],
|
||||
snakemake.config['costs']['discountrate'],
|
||||
Nyears)
|
||||
Nyears,
|
||||
snakemake.config['costs']['lifetime'])
|
||||
|
||||
df = make_summaries(networks_dict)
|
||||
|
||||
|
@ -540,7 +540,7 @@ def prepare_data(network):
|
||||
|
||||
|
||||
|
||||
def prepare_costs(cost_file, USD_to_EUR, discount_rate, Nyears):
|
||||
def prepare_costs(cost_file, USD_to_EUR, discount_rate, Nyears, lifetime):
|
||||
|
||||
#set all asset costs and other parameters
|
||||
costs = pd.read_csv(cost_file,index_col=list(range(2))).sort_index()
|
||||
@ -558,7 +558,7 @@ def prepare_costs(cost_file, USD_to_EUR, discount_rate, Nyears):
|
||||
"efficiency" : 1,
|
||||
"fuel" : 0,
|
||||
"investment" : 0,
|
||||
"lifetime" : 25
|
||||
"lifetime" : lifetime
|
||||
})
|
||||
|
||||
costs["fixed"] = [(annuity(v["lifetime"],v["discount rate"])+v["FOM"]/100.)*v["investment"]*Nyears for i,v in costs.iterrows()]
|
||||
@ -1834,7 +1834,8 @@ if __name__ == "__main__":
|
||||
costs = prepare_costs(snakemake.input.costs,
|
||||
snakemake.config['costs']['USD2013_to_EUR2013'],
|
||||
snakemake.config['costs']['discountrate'],
|
||||
Nyears)
|
||||
Nyears,
|
||||
snakemake.config['costs']['lifetime'])
|
||||
|
||||
remove_elec_base_techs(n)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user