def fill_in(serie): """Return the investments needed to reach the capacity objectives. Approximately because cast as integer """ capacity_2015 = capacity_past.cumsum().loc[2015, serie.name] a = (serie[2020] - capacity_2015) / 15 b = (serie[2025] - serie[2020]) / 15 c = (serie[2030] - serie[2025]) / 15 return pd.Series(name=serie.name, data=[ a, 2 * a, 3 * a, 4 * a, 5 * a, b, 2 * b, 3 * b, 4 * b, 5 * b, c, 2 * c, 3 * c, 4 * c, 5 * c ], index=range(2016, 2031), dtype="int64")
#%% Compares PDP7A cap_2015_implicit = capacities_PDP7A.loc[2030] - capacity_total_plan cap_2015_implicit.dropna(inplace=True) comparison = pd.DataFrame( [capacity_2015_EVN, cap_2015_implicit], index=["Total from EVN report", "Implicit in PDP7A decision"]) capacity_closed = pd.Series(comparison.iloc[0] - comparison.iloc[1], name="Diff ?Closed capacity?") comparison = comparison.append(capacity_closed) capacity_old = pd.Series(capacity_past.cumsum().loc[1980], name="Installed before 1980") comparison = comparison.append(capacity_old) show("Coherence of 2015 Generation capacity numbers") show(comparison[fuels]) show(""" Some coal, gas, oil and hydro capacities listed in the EVN report historical table are not accounted for in the PDP7A current capacity total The order of magnitude corresponds to capacities installed before 1985, which in all probability are already closed or will be before 2030. Gas capacity in EVN report includes the Tu Duc and Can Tho oil-fired gas turbines (264 MW) """)