align cost fill values to pypsa-eur implementation
This commit is contained in:
parent
b30ff67458
commit
d27fee7e77
@ -579,9 +579,6 @@ costs:
|
||||
lifetime: 25
|
||||
"CO2 intensity": 0
|
||||
"discount rate": 0.07
|
||||
lifetime: 25 #default lifetime
|
||||
# From a Lion Hirth paper, also reflects average of Noothout et al 2016
|
||||
discountrate: 0.07
|
||||
# Marginal and capital costs can be overwritten
|
||||
# capital_cost:
|
||||
# onwind: 500
|
||||
|
@ -630,9 +630,8 @@ if __name__ == "__main__":
|
||||
Nyears = n.snapshot_weightings.generators.sum() / 8760.0
|
||||
costs = prepare_costs(
|
||||
snakemake.input.costs,
|
||||
snakemake.config["costs"]["discountrate"],
|
||||
snakemake.config["costs"],
|
||||
Nyears,
|
||||
snakemake.config["costs"]["lifetime"],
|
||||
)
|
||||
|
||||
grouping_years_power = snakemake.config["existing_capacities"][
|
||||
|
@ -693,9 +693,8 @@ if __name__ == "__main__":
|
||||
|
||||
costs_db = prepare_costs(
|
||||
snakemake.input.costs,
|
||||
snakemake.config["costs"]["discountrate"],
|
||||
snakemake.config["costs"],
|
||||
Nyears,
|
||||
snakemake.config["costs"]["lifetime"],
|
||||
)
|
||||
|
||||
df = make_summaries(networks_dict)
|
||||
|
@ -724,8 +724,7 @@ def cycling_shift(df, steps=1):
|
||||
return df
|
||||
|
||||
|
||||
# TODO checkout PyPSA-Eur script
|
||||
def prepare_costs(cost_file, discount_rate, Nyears, lifetime):
|
||||
def prepare_costs(cost_file, config, Nyears):
|
||||
# set all asset costs and other parameters
|
||||
costs = pd.read_csv(cost_file, index_col=[0, 1]).sort_index()
|
||||
|
||||
@ -736,18 +735,8 @@ def prepare_costs(cost_file, discount_rate, Nyears, lifetime):
|
||||
costs = (
|
||||
costs.loc[:, "value"].unstack(level=1).groupby("technology").sum(min_count=1)
|
||||
)
|
||||
costs = costs.fillna(
|
||||
{
|
||||
"CO2 intensity": 0,
|
||||
"FOM": 0,
|
||||
"VOM": 0,
|
||||
"discount rate": discount_rate,
|
||||
"efficiency": 1,
|
||||
"fuel": 0,
|
||||
"investment": 0,
|
||||
"lifetime": lifetime,
|
||||
}
|
||||
)
|
||||
|
||||
costs = costs.fillna(config["fill_values"])
|
||||
|
||||
annuity_factor = (
|
||||
lambda v: annuity(v["lifetime"], v["discount rate"]) + v["FOM"] / 100
|
||||
@ -3265,9 +3254,8 @@ if __name__ == "__main__":
|
||||
|
||||
costs = prepare_costs(
|
||||
snakemake.input.costs,
|
||||
snakemake.config["costs"]["discountrate"],
|
||||
snakemake.config["costs"],
|
||||
Nyears,
|
||||
snakemake.config["costs"]["lifetime"],
|
||||
)
|
||||
|
||||
pop_weighted_energy_totals = pd.read_csv(
|
||||
|
Loading…
Reference in New Issue
Block a user