Skip to content

Commit

Permalink
Fixed tracking of current stage in setup dictionary in dual_dynamic_p…
Browse files Browse the repository at this point in the history
…rogramming.jl(#530)

The current stage value is currently modified in case_runners.jl and erroneously left set to the last stage.
  • Loading branch information
filippopecci authored Aug 21, 2023
1 parent 4faa35f commit d51683a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/multi_stage/dual_dynamic_programming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d51683a

Please sign in to comment.