Closed ran1988 closed 3 months ago
PR #672 fixes this
Thank you, @ran1988, for opening this issue. To perform an optimization with periods of different length, you need to edit the StageLengths
parameter of the multi_stage_settings.yml
:
StageLengths: [10,10,10] # Length of each model stage (years)
The implementation of the discount factor calculation included in the initialize_cost_to_go function works with periods of different length, and we updated the docstring to reflect the code. Please let us know if this addresses your question.
Thank you for your attention and efforts! I have performed a optimization with the updated initialize_cost_togo function, but it still didn't solve the problem. The revised code is : "DF = \frac{1}{(1+WACC)^{L{p}*(p-1)}}" If a [5,5,5,10] investment period setting is applied, then the DF for the fourth stage is 1/(1+wacc)^30. It should be 1/(1+wacc)^15, isn't it?
The latest update works! Thanks!
https://github.com/GenXProject/GenX.jl/blob/5100d174b17357cd054a4234dcfeeaeadea58e1a/src/multi_stage/dual_dynamic_programming.jl#L580 I have reviewed the calculation method for the discount factor and noticed that it assumes equal lengths for each investment period. If I want to perform an optimization with [5,5,5,10] investment periods, what should I do?