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.
The value of
mysetup["CurrStage"]
is modified inrun_genx_case_multistage!
inside a for loop. The dictionarymysetup
is then passed to functionrun_ddp
assetup_d
and the current stage value is used by functioninitialize_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.