odow / SDDP.jl

Stochastic Dual Dynamic Programming in Julia
https://sddp.dev
Other
289 stars 60 forks source link

Defining by nature "control" variables as "state" variable on the scenario tree #645

Closed bitanalui closed 12 months ago

bitanalui commented 1 year ago

I am solving a Multistage Stochastic Optimization problem, for dynamic cascade reservoir optimization. To incorporate non-anticipativity, release (control variable) needs to be decided prior to the realization of inflows at t, that is nodes belong to period t-1 . It is suggested to treat release as state variable. Is this implementation correct?

@variable(subproblem, release[r=1:6] >= Cascade_system[r].release_min, SDDP.State, initial_value = Cascade_system[r].release_initial)

and then it appears in the following constraint:

@constraints(subproblem,begin storage_equa[r = 1:6], storage[r].out == storage[r].in + (inflow[r] + sum(release[j].inA[r,j] for j=1:r))1.9835 end)

release[j].in is the release at node that belongs to period t-1.

odow commented 1 year ago

Without the full details, hard to offer advice. But seems correct.

See https://odow.github.io/SDDP.jl/stable/guides/access_previous_variables/#Access-a-decision-from-N-stages-ago

One thing you need to be careful of is that stage t is feasible for any release that might be chosen in stage t-1.

bitanalui commented 1 year ago

Hello Oscar, Thank you, by full details do you mean the complete model? Here I am attaching a complete model with a small input file. With the balance constraint as formulated with release[j].in we face infeasibility issue. ControlvsStateVariable.zip

odow commented 12 months ago

Closing because it seems like @bitanalui and @bolbolim are the same people, and because the infeasibility is likely the same as #646.

Let's keep the discussion to a single post please.

bitanalui commented 12 months ago

Hi Oscar, we are not the same people, but we are trying to address and solve two issues of one model.

Thank you!