GenXProject / GenX.jl

GenX: a configurable power system capacity expansion model for studying low-carbon energy futures. More details at : https://genx.mit.edu
https://genxproject.github.io/GenX.jl/
GNU General Public License v2.0
270 stars 114 forks source link

Bug Fix for correct tracking of current investment stage by SDDP #627

Closed filippopecci closed 7 months ago

filippopecci commented 7 months ago

The value of mysetup["CurrStage"] is modified in run_genx_case_multistage! inside a for loop. The dictionary mysetupis then passed to function run_ddp as setup_d and the current stage value is used by function initialize_cost_to_go but it is not updated to match the current stage, and left set to the last stage as done by parent function run_genx_case_multistage!.

This commit fixes that and set the right current stage in setup_d before initializing the cost-to-go.