# How to handle quadratic objectives with SDDP.jl?

**URL:** <https://discourse.julialang.org/t/how-to-handle-quadratic-objectives-with-sddp-jl/129589>\
**Category:** Optimization (Mathematical)\
**Tags:** package\
**Created:** [June 3, 2025, 8:46am UTC](https://discourse.julialang.org/t/how-to-handle-quadratic-objectives-with-sddp-jl/129589 "2025-06-03T08:46:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samuel_m/32/214365_2.png) [@Samuel\_M](https://discourse.julialang.org/u/Samuel_M)\
**Post date:** [June 3, 2025, 8:46am UTC](https://discourse.julialang.org/t/how-to-handle-quadratic-objectives-with-sddp-jl/129589/1 "2025-06-03T08:46:26Z")

</div>

Hello everybody.  
I have to solve a problem similar to an economicd dispatch or unit commitment and I have seen that a good alternative is the Stochastic Dual Dynamic Programming and I was thinking about using SDDP.jl.

However my objective to maximize is a quatratic objective, of the style (x-Param)^2 and the rest of constraints are linear  
My doubt is if SDDP.jl guarantees convergence for this kind of problems.

I think the problem is convex, but I am not sure.

Thank you very much and best regards

---

<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 3, 2025, 8:51am UTC](https://discourse.julialang.org/t/how-to-handle-quadratic-objectives-with-sddp-jl/129589/2 "2025-06-03T08:51:53Z")

</div>

Hi @Samuel_M welcome to the forum 🙂

If the problem is convex, yes.

If the problem is not convex, most probably not.

Note that `max x^2` is not convex.
