Correctly carry over time-varying data between investment periods
Previously, time-varying data in each "next" investment period was set to the default values, implying capacity factors of 1 for renewable generators for example.
This commit is contained in:
parent
25a24f5552
commit
de384c7cf6
@ -199,8 +199,13 @@ def concat_networks(years):
|
|||||||
pnl[k].loc[pnl_year.index, pnl_year.columns] = pnl_year
|
pnl[k].loc[pnl_year.index, pnl_year.columns] = pnl_year
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# this is to avoid adding multiple times assets with
|
# For components that aren't new, we just extend
|
||||||
# infinite lifetime as ror
|
# time-varying data from the previous investment
|
||||||
|
# period.
|
||||||
|
if i > 0:
|
||||||
|
pnl[k].loc[(year,)] = pnl[k].loc[(years[i - 1],)].values
|
||||||
|
|
||||||
|
# Now, add time-varying data for new components.
|
||||||
cols = pnl_year.columns.difference(pnl[k].columns)
|
cols = pnl_year.columns.difference(pnl[k].columns)
|
||||||
pnl[k] = pd.concat([pnl[k], pnl_year[cols]], axis=1)
|
pnl[k] = pd.concat([pnl[k], pnl_year[cols]], axis=1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user