# Nonlinear constraints in SDDP

Hi,
I have read the similar topics here:

But my case is a bit different.
I have a constraint with this formula:
gen <= efficiency*water_discharged
gen is a continuous control variable,
efficiency is a continuous state variable, and
water_discharged is the other continuous control variable.
As we can see this constraint is non-linear but all of the variables are continuous.
I know SDDP.jl can sometimes deal with non-linearity.
The other possibility is to linearize the constraint by defining binary state variables.

So, my question is that which one is preferable? Non-linear constraints with continuous variables vs Linear constraints with mixed of binary state variables and continuous controls in terms of optimality and running time?

SDDP.jl assumes that the problem is convex.

Non-linear constraints with continuous variables

This will make the problem non-convex, so you will end up with a suboptimal policy, and it can be very bad.

vs Linear constraints with mixed of binary state variables and continuous controls in terms of optimality and running time?

Integrality is also non-convex, so you will also end up with a suboptimal policy, but it’s usually better than the bilinearity.

The reason is that we can solve linear problems with binary variables to optimality. In general, we cannot do that for `x * y` (except if you use Gurobi, and even then it is hard).

So, my question is that which one is preferable?

From the perspective of SDDP, neither. We cannot solve this problem to optimality, so you should be very cautious and treat it as a reasonable heuristic.

Thank you.
I got it.