I am not sure if this is the right place to post this question, please point me to the correct forum if I posted in a wrong place.


I have an optimization problem like this



```
Min sum(yi)
st  sum on j(wij) <= cyi for all i in N
    sum on i(xij) = 1 for all j in N
    wij = wjxij for all i, j in N
    Lij = Ljxij for all i, j in N
    Dij = Lij + wij for all i, j in N
    (Lij - Dik)(Lik - Dij) <= 0 for all i, j, k in N
    Aj <= Lj for all j in N
    Lj <= Aj + Qj for all j in N
    xij = 0 or 1 for all i, j in N
    yi = 0 or 1 for all i in N
    Wj, Lj, Qj and c are constant
    N = 10000

```

What can I do to transform this problem into a convex optimization problem? Or to a linear Integer programming problem? Because I only know algorithms to solve problems in those two categories. 


In the problem, the only constraint that is not convex is this one



```
(Lij - Dik)(Lik - Dij) <= 0 for all i, j, k in N

```

Are there any common ways to transform this constraint into some convex constraints? 


I think implicit enumeration could be a solution to this, but other than that, what can i do?



How do I solve this integer programming problem with non convex constraints?
The nonlinear constraint
$$(L\_{ij} - D\_{ik})(L\_{ik} - D\_{ij}) \le 0$$
is a disjunction:
$$\left(L\_{ij} - D\_{ik} \ge 0 \wedge L\_{ik} - D\_{ij} \le 0\right) \bigvee \left(L\_{ij} - D\_{ik} \le 0 \wedge L\_{ik} - D\_{ij} \ge 0\right).$$
Introduce a binary variable $z\_{ijk}$ that enforces at least one side of the disjunction. We want:
\begin{align}
z\_{ijk} = 1 &\implies (L\_{ij} - D\_{ik} \ge 0 \wedge L\_{ik} - D\_{ij} \le 0)\\
z\_{ijk} = 0 &\implies (L\_{ij} - D\_{ik} \le 0 \wedge L\_{ik} - D\_{ij} \ge 0).
\end{align}
The following linear "big-M" constraints do the job:
\begin{align}
D\_{ik} - L\_{ij} &\le (L\_k + W\_k) (1 - z\_{ijk})\\
L\_{ik} - D\_{ij} &\le L\_k (1 - z\_{ijk})\\
L\_{ij} - D\_{ik} &\le L\_j z\_{ijk}\\
D\_{ij} - L\_{ik} &\le (L\_j + W\_j) z\_{ijk}
\end{align}


