# Tag Info

## Hot answers tagged mccormick

13

For a function $f:[0,1]^n\to\mathbb{R}$ of the form $f(x_1,\dots,x_n)=\sum_{ij\in E}a_{ij}x_ix_j$, where $E$ is the edge set of a graph $G$ on the vertex set $\{1,\dots,n\}$, the McCormick envelope gives the convex hull if and only if every cycle in $G$ has an even number of positive edges and an even number of odd edges (where an edge $ij$ is called ...

10

For real $x\in[l,u]$ and binary $b\in\{0,1\}$ the McCormick envelope gives you bounds on $w=xy$ \begin{align} lb & \leq w \leq ub,\\ ub+x-u& \leq w\leq x+lb-l. \end{align} By case analysis you can see that this is equal to $w=xb$, so you will indeed solve the problem.

7

The McCormick envelope is one possible approach. Another, if the domain of $y$ is not too large, is to use a type 1 Special Ordered Set. Assume that $y\in\lbrace 1,\dots,N\rbrace$. Replace $y$ with$$\sum_{j=1}^N j\cdot z_j$$where the $z_j$ are binary variables, and replace the equation $xy=q$ with$$x=\sum_{j=1}^N\frac{q}{j}z_j.$$Add the constraint\sum_{j=1}...

3

I agree that the e_z == 1 constraint belongs in the model. Your constraints y_bounds(k)*z[k] <= y_hat[k] && y_hat[k] <= y_bounds(k+1)*z[k] do not appear in the Valenzuela dissertation, though, and I suspect they are the source of your troubles. Note, for example, that if $M=10$ and $z[3] = 1$, you are forcing $x\in [0.3, 0.4]$ and $y\in [0.3,0.... 2 Define$\mu_i = \sqrt{\lambda_i}$and the problem is a convex quadratically constrained problem in$(b,\mu)\$

Only top voted, non community-wiki answers of a minimum length are eligible