From bf67d8bacd4ce76b130e35baa44a5d8e1b624dbd Mon Sep 17 00:00:00 2001 From: Filippo Pecci Date: Mon, 21 Aug 2023 11:13:30 -0400 Subject: [PATCH] Fixed tracking of current stage in setup dictionary in dual_dynamic_programming.jl. This value is modified in case_runners.jl and left set to the last stage --- src/multi_stage/dual_dynamic_programming.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/multi_stage/dual_dynamic_programming.jl b/src/multi_stage/dual_dynamic_programming.jl index f1a09c67de..867859bfa1 100644 --- a/src/multi_stage/dual_dynamic_programming.jl +++ b/src/multi_stage/dual_dynamic_programming.jl @@ -82,6 +82,7 @@ function run_ddp(models_d::Dict, setup::Dict, inputs_d::Dict) # Step a.i) Initialize cost-to-go function for t = 1:num_stages for t in 1:num_stages + settings_d["CurStage"] = t; models_d[t] = initialize_cost_to_go(settings_d, models_d[t], inputs_d[t]) end