# Question about SDDP.jl

**URL:** <https://discourse.julialang.org/t/question-about-sddp-jl/137741>\
**Category:** Optimization (Mathematical)\
**Tags:** sddp\
**Created:** [June 22, 2026, 2:39pm UTC](https://discourse.julialang.org/t/question-about-sddp-jl/137741 "2026-06-22T14:39:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david-hri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/david-hri/32/222119_2.png) [@david-hri](https://discourse.julialang.org/u/david-hri)\
**Post date:** [June 22, 2026, 2:39pm UTC](https://discourse.julialang.org/t/question-about-sddp-jl/137741/1 "2026-06-22T14:39:23Z")

</div>

Hello,

I am new to SDDP.jl, so my question may be naive.

I currently have a working SDDP model in which the generation profits are computed using a fixed hydraulic head effect (so the efficiency does not depend on the reservoir volume).

I would now like these profits to depend on the hydraulic head, which itself is a function of the volume stored in the reservoir. My idea was to recompute the profits at each stage using the incoming storage (`V.in`), since this storage corresponds to the volume resulting from the decision taken at the previous stage.

Concretely, this would look something like:

function create\_ucd\_profitsSDDP(model, ep::EtudeParameters, pdt::Int, scenario::Int)

```
(; T, lac_index) = get_time_step_dimensions(ep, pdt)

model\[:ucd_profits\] = Dict(

    u => \[

        \[
            ucd_profit( get_ucd(ep, u), ep, pdt, scenario,g,t, V\[lac_index\].in,) for t ∈ T \]

        for g ∈ groups(get_ucd(ep, u))

    \]

    for u ∈ ucd_energetic_range(ep)

)

return nothing

```

end

```

However, this does not work because `V[lac_index].in` is a `JuMP.VariableRef` and not a `Float64`. The functions used to compute efficiencies and profits expect numerical values, not decision variables.

My questions are therefore the following:

\* Is it possible in SDDP.jl to access the numerical value of `V.in` during the construction or update of a subproblem?

\* Or does the SDDP framework completely prevent this kind of dependence of the objective coefficients on the value of the state variable?

\* If this is not possible directly, what would be the recommended approach to model an efficiency that depends on the storage level (and therefore a hydraulic head that depends on reservoir volume)?

What confuses me is that when I inspect the LPs exported during a simulation, I see lines such as:

> Bounds  
> V\_1\_\_in = 0  
> V\_1\_\_out free  
> V\_2\_\_in = 53.2514  
> V\_2\_\_out free

This gives me the impression that at some point `V.in` does have a numerical value. I do not understand at which stage of the algorithm this value becomes available, nor whether it is possible to use it to update the profits.

I could approximate the hydraulic head effect with additional piecewise-linear constraints, but the function ucd\_profits is complex and this would make the model considerably larger, so I am wondering whether there is a more direct approach in SDDP.jl. Note that I assume that the hydraulic head effect remains constant during a given transition step and only depends on V.in

Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [June 22, 2026, 11:35pm UTC](https://discourse.julialang.org/t/question-about-sddp-jl/137741/2 "2026-06-22T23:35:14Z")

</div>

Hi @david-hri!

> Is it possible in [SDDP.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/SDDP) to access the numerical value of `V.in` during the construction or update of a subproblem?

Nope.

> Or does the SDDP framework completely prevent this kind of dependence of the objective coefficients on the value of the state variable?

Correct. We make the incoming state variables a JuMP decision variable so that you cannot write problems with a numeric dependence on the incoming values.

> If this is not possible directly, what would be the recommended approach to model an efficiency that depends on the storage level (and therefore a hydraulic head that depends on reservoir volume)?

The underlying problem is that doing so makes the problem non-convex, and one of the assumptions behind SDDP is that the value functions are convex.

There are a few options.

1. Write a non-convex nonlinear subproblem, for example, by adding a bilinear quadratic term:

2. The second approach is to model it using some binary variables. See [Approximating nonlinear functions · JuMP](https://jump.dev/JuMP.jl/stable/tutorials/linear/piecewise_linear). There are various papers in the literature that investigate different models for modelling head effects. SDDP.jl supports binary variables in the subproblems, and there are various settings you can enable ([How to add integrality · SDDP.jl](https://sddp.dev/stable/guides/add_integrality)). But the downside is that the resulting policy is not guaranteed to be optimal. The value function is, however, a valid bound on the optimal solution, so you can compare the lower bound against the simulated policy (which will use the integer variables) to see if the policy is acceptable to you. This still may be better or worse than your fixed head model.

---

<div class="post-metadata">

**Author:** ![david-hri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/david-hri/32/222119_2.png) [@david-hri](https://discourse.julialang.org/u/david-hri)\
**Post date:** [June 26, 2026, 8:15am UTC](https://discourse.julialang.org/t/question-about-sddp-jl/137741/3 "2026-06-26T08:15:57Z")

</div>

Thanks, that was very helpful!

Indeed, I was aware that this would introduce non-convexities, but we wanted to understand how SDDP.jl could handle this type of problem.

My reasoning was that `V.in` comes from the solution of the previous stage, so I thought it might be possible to treat it as a fixed value rather than a decision variable and thus avoid introducing binary variables.

Thank you very much for your explanation. I’ll stick with my previous formulation then.

David
