Add lifetime to solar-rooftop

Rooftop-solar generators are missing the lifetime attribute when they are added.

This avoids that they are saved as brownfield capacities installed in a previous timestep when running myopic optimization. 
I.e, they are not captured in the following line
5b9f64354f/scripts/add_existing_baseyear.py (L31)
This commit is contained in:
martavp 2021-08-24 18:58:42 +02:00 committed by GitHub
parent 5b9f64354f
commit 203a7f3df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -770,7 +770,8 @@ def insert_electricity_distribution_grid(n, costs):
marginal_cost=n.generators.loc[solar, 'marginal_cost'],
capital_cost=costs.at['solar-rooftop', 'fixed'],
efficiency=n.generators.loc[solar, 'efficiency'],
p_max_pu=n.generators_t.p_max_pu[solar]
p_max_pu=n.generators_t.p_max_pu[solar],
lifetime=costs.at['solar-rooftop', 'lifetime']
)
n.add("Carrier", "home battery")