# SDDP: how to use Juniper.jl for optimizer

**URL:** <https://discourse.julialang.org/t/sddp-how-to-use-juniper-jl-for-optimizer/82719>\
**Category:** Optimization (Mathematical)\
**Created:** [June 14, 2022, 2:00am UTC](https://discourse.julialang.org/t/sddp-how-to-use-juniper-jl-for-optimizer/82719 "2022-06-14T02:00:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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 14, 2022, 3:42am UTC](https://discourse.julialang.org/t/sddp-how-to-use-juniper-jl-for-optimizer/82719/4 "2022-06-14T03:42:48Z")

</div>

You might want to revisit the theory behind SDDP.jl: [Introductory theory · SDDP.jl](https://odow.github.io/SDDP.jl/stable/tutorial/theory/21_theory_intro/)

It approximates **convex** functions, so things like `1 / level.in` and `sqrt(level.in)` or nonlinear equality constraints will **not** work.

SDDP.jl lets you formulate nonlinear models, because in some cases you can formulates and solve convex nonlinear problems, but if you write a non-convex constraint, SDDP.jl will give you a suboptimal answer. If you don’t have integer variables, try solving it with Ipopt, but there is no guarantees on what could go wrong. If you do have integer variables, consider a different solution technique.

As a side note: dealing with head effects in hydro-thermal scheduling is an open question in the literature. A few different solutions have been proposed, but no SDDP-type algorithms adequately deal with the non-convexities. In general, you could consider training on a convex approximation, but then simulate with the non-convexities, but explaining how to do this is quite complicated and probably outside the scope of this forum. It’d be a research/engineering paper in and of itself.

---

_[View the full topic](https://discourse.julialang.org/t/sddp-how-to-use-juniper-jl-for-optimizer/82719)._
