# Tag Info

7

They are equivalent except when $x_{i,g}=x_{j,g}=0$, in which case the second linearization incorrectly contributes $-d_{ij}$ to the objective. Assuming $d_{ij} \ge 0$, I recommend a third linearization (relaxing $z$ and omitting two constraints from linearization 1): \begin{align} z_{ijg}&\ge x_{ig}+x_{jg}-1 \\ z_{ijg}&\ge 0 \end{align}

6

$\max(y,z)\le b$ is equivalent to \begin{align} y&\le b\\ z&\le b \end{align} The $\min$ constraint is similar.

3

You are not going to be able to add these logs and quadratic terms to the model via simple double-sided big-M constraints, as they generate non-convex use of convex quadratics and logs, and CVX does not support that. The use of the squared log is not possible either. I don't think it supports automatic modelling of nonconvex use of abs operator either. Most ...

6

You want to enforce $X(k) = 0 \implies R(k) = 0$ and $X(k) = 1 \implies R(k) \le G(k)$. You can use indicator constraints for that. Alternatively, a straightforward big-M formulation yields \begin{align} R(k) &\le M_1(k) X(k) \tag1 \\ R(k) - G(k) &\le M_2(k) (1 - X(k)) \tag2 \\ \end{align} A natural choice for $M_1(k)$ is a small constant upper ...

6

If I understand correctly, the following enforces your desired behavior: \begin{align} y_1 &= d_1 \\ y_2 &= d_2 \\ y_3 &= d_3 \\ y_4 &\ge d_1 + d_2 - 1\\ y_5 &\ge d_1 + d_2 + d_3 - 2\\ \end{align} If you also want to enforce $y_4 \implies (d_1 \land d_2)$ and $y_5 \implies (d_1 \land d_2 \land d_3)$, then include these additional ...

4

Suppose we know an upper bound $M$ for $y$ such that $|y| \leq M$, we can linearize this constraint as follows. First, we introduce a new variable $h \in \mathbb{R}$ with $h = b y$. Then we need to model that $h$ equals $y$ if $b = 1$ and equals $0$ if $b = 0$. For this purpose we add the following linear constraints:  \begin{align} h &\leq b M \tag{1} ...

Top 50 recent answers are included