StructDualDynProg.jl icon indicating copy to clipboard operation
StructDualDynProg.jl copied to clipboard

how to get a solution from state 2

Open Esnilg opened this issue 5 years ago • 1 comments

Hi blegat

I am taking up your code, and manage to implement an example with 5 stages and 10 scenarios. I already know how to have the root node solution, but if I want to have the solution for the other stages I don't know how to do it. Is there some way to save the cuts in stages?

best regards

Esnilg avatar Mar 19 '20 14:03 Esnilg

Continuing from https://github.com/JuliaStochOpt/StructDualDynProg.jl/issues/23#issuecomment-453050762, The solution for scenario 1 <= i <= 10 at stage 1 <= t <= 5 is obtained with

SOI.last_result(sol).paths.paths[t][i][2][1]

The root corresponds to t = 1 (first stage) and i = 1 (there is only one scenario at the root anyway).

blegat avatar Mar 20 '20 09:03 blegat