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
262 stars 105 forks source link

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

Closed filippopecci closed 5 months ago

filippopecci commented 5 months ago

The value of mysetup["CurrStage"] is modified in run_genx_case_multistage! inside a for loop. The dictionary mysetup is 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.

codecov-commenter commented 5 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (32db8be) 0.07% compared to head (bf67d8b) 0.07%.

Files Patch % Lines
src/multi_stage/dual_dynamic_programming.jl 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #628 +/- ## ====================================== Coverage 0.07% 0.07% ====================================== Files 112 112 Lines 3937 3810 -127 ====================================== Hits 3 3 + Misses 3934 3807 -127 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.