ProgressiveHedging.jl - Decision Variables

Hello!

I’m starting to use ProgressiveHedging.jl and testing it in a two-stage problem.

However, both the first and second stages variables in my case present different dimensions. For example, I have 6 first-stage decision variables, 3 of which are 2-dimensional arrays, and the other 3 are 4-dimensional arrays.

How should I create the dictionary for JuMPSubproblem, in this case?

Thank you!

1 Like

I haven’t used ProgressiveHedging.jl.

Do you have the code that you’re currently trying?

From the example here, Basic Example · ProgressiveHedging.jl, it looks like you need stage1 and stage2 to be vectors of JuMP variables.

So create your first-stage as-is, and then use something like (I haven’t tested this):

model = Model()
@variable(model, x[1:2, 1:2])
@variable(model, y[1:2, 1:2, 1:2, 1:2])
stage1 = vcat(vec(x), vec(y))

You might also consider SDDP.jl;

Thank you very much, @odow! Your suggestion worked fine!

1 Like