pypsa.Network.investment_period_weightings#
- property Network.investment_period_weightings: DataFrame#
Weightings applied to each investment period during the optimization (LOPF).
Objective weightings are multiplied with all cost coefficients in the objective function of the respective investment period (e.g. to include a social discount rate). Years weightings denote the elapsed time until the subsequent investment period (e.g. used for global constraints CO2 emissions).
Examples
Create a network with investment periods: >>> n = pypsa.Network() >>> n.add(“Bus”, “bus”) # doctest: +SKIP >>> n.snapshots = pd.date_range(“2015-01-01”, freq=”h”, periods=2) >>> n.investment_periods = [1, 2]
>>> n.investment_period_weightings objective years period 1 1.0 1.0 2 1.0 1.0
Change the investment period weightings: >>> n.investment_period_weightings.objective = [5, 7] >>> n.investment_period_weightings.years = [1, 2] >>> n.investment_period_weightings
objective years
period 1 5 1 2 7 2