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