odow / SDDP.jl

A JuMP extension for Stochastic Dual Dynamic Programming
https://sddp.dev
Other
309 stars 61 forks source link

Two uncorrelated uncertainties #649

Closed hghayoom closed 1 year ago

hghayoom commented 1 year ago

Hi Oscar, I have a model that has two uncertainties. these uncertainties are not correlated. Therefore I do not want to define them in one unique parametrize like what you did in your paper :

SDDP.parameterize(sp, Ω) do ω
                p′, p = SDDP.objective_state(sp)
                @stageobjective(sp, 1_000 * sum(spill) - p′ * generation)

Or what you did in this example

you essentially say thatwhen inflow is 0 then fuel_multiplier = 1.5. I want to have this example but inflow and fuel_multiplier are not correlated. I may have also multiple uncorrelated variables Inflow of 0 can happen with all of multipliers 1.5, 1 , 0.75.

Ω = [
        (inflow = 0.0, fuel_multiplier = 1.5),
        (inflow = 50.0, fuel_multiplier = 1.0),
        (inflow = 100.0, fuel_multiplier = 0.75),
    ]

If I define two SDDP.parameterize detected. I get an error for:

Exception has occurred: ErrorException Duplicate calls to SDDP.parameterize detected.

I appreciate it if you can help me with that.

odow commented 1 year ago

Therefore I do not want to define them in one unique parametrize

You cannot call parameterize more than once. You must generate the Cartesian product of your uncertainties and call parameterize once.

See https://odow.github.io/SDDP.jl/stable/guides/add_multidimensional_noise/

hghayoom commented 1 year ago

Thank you, Oscar. You are always helpful and responsive, I appreciate it.

odow commented 1 year ago

No problem :smile:

odow commented 1 year ago

Closing because this seems resolved. Please re-open if you have further questions.