I have the following problem: \(\max xg\) s.t. 1) \(\min(1,x/(x\mathbf{1}/y\mathbf{1}) > a\) 2) \(x \leq yM\) 3) \(x \geq ym\) 4) \(x\mathbf{1} = 1\) where \(x\) is a \(1 \times n\) vector with real numbers that we are trying to solve for, \(y\) is a \(1 \times n\) vector with binaries (unknown and to be solved simultaneously with x), \(a\) and \(g\) are \(1 \times n\) vectors with with constant real numbers and \(\mathbf{1}\) is a unit vector such that the expression \(x\mathbf{1}\) represents the sum of all \(x\)s and \((x\mathbf{1}/y\mathbf{1})\) represents the average \(x\). Is there any way I can linearize constraint 1) above (and especially the \(x/(x\mathbf{1}/y\mathbf{1})\) expression?)? Thanks 
I will first make some assumptions (correct me if any are wrong):
Now for the answer: Let's start with the expression \(\sum_j x_j / \sum_j y_j\). Consider your constraint 4). Here you have restricted the elements in \(x\) to sum to 1. This means that \(\sum_{j} x_{j} / \sum_{j} y_{j}=1/ \sum_{j} y_{j}\) which eventually means that $$x_j / (\sum_{j'} x_{j'} / \sum_{j'} y_{j'}) = x_j / (1/ \sum_{j'} y_{j'}) = x_j \sum_{j'}y_{j'}$$ Now we just need to express the quadratic term \(x_jy_{j'}\) for each pair \((j,j')\). I assume that nonnegativity holds for all variables. For this we introduce the new variable \(z_{j,j'}=x_jy_{j'}\). This is done by the following constraints $$z_{j,j'} \le My_{j'} \forall j,j'$$ $$z_{j,j'} \le x_j \forall j,j'$$ $$z_{j,j'} \ge x_j  M(1  y_{j'}) \forall j,j'$$ Together with these constraints in the model constraint 1) can be replaced by the following $$\sum_{j'}z_{j,j'} \ge a_j \forall j$$ Now there may be some better/easier formulation, but that's just my quick and dirty solution. answered 10 Dec '13, 09:08 NielsChrist... Note that the expression \(z_{j,j'}=x_jy_{j'}\) is not actually added to the model. The value of \(z_{j,j'}\) is calculated by the three constraints I give right under the introduction of \(z_{j,j'}\).
(10 Dec '13, 09:33)
NielsChrist...
Yep, screwed this up  sorry for that.
(10 Dec '13, 14:34)
fbahr ♦
Thanks. This is very helpful. However, I kinda cheated when trying to simplify the problem. Let me restate: \(\max~ xg\) s.t. 1) \(f(\mathbf{\min}(\vec{\mathbf{1}},\frac{\mathbf{x}}{\frac{x\vec{1}}{y\vec{1}}})) \ge a\) 2) \(\mathbf{x} \le \mathbf{y}M\) 3) \(\mathbf{x} \ge \mathbf{y}m\) 4) \(\mathbf{x} \vec{\mathbf{1}} = 1\) 5) \(x_i \ge 0 ~~\forall ~i \in \{1,2,...,m\}\) 6) \(x_i \le 0 ~~\forall ~i \in \{m+1,m+2,...,n\}\) where as before: i) \(\mathbf{x}\) is a 1×n vector with real numbers that we are trying to solve for, ii) \(\mathbf{y}\) is a 1×n vector with binaries (unknown and to be solved simultaneously with \(\mathbf{x}\)), iii) \(\mathbf{a}\) and \(\mathbf{g}\) are 1×n vectors with with constant real numbers iv) \(\vec{\mathbf{1}}\) is a unit vector such that the expression \(\mathbf{x}\vec{\mathbf{1}}\) represents the sum of all \(\mathbf{x}\)s and \(\frac{x\vec{1}}{y\vec{1}}\) represents the average \(\mathbf{x}\) and v) \(f(\mathbf{r}) = \sum_{i=1}^n h(r_i)\) with \[ h(r_i) \left\{ \begin{array}{rl} 0 & \text{if } r_i <0,\ \alpha_1r_i+b_1 &\text{if } l_1 \le r_i < u_1,\\ \alpha_2r_i+b_2 &\text{if } l_2 \le r_i \le u_2,\\ .. \\ \alpha_nr_i+b_n &\text{if } l_{n1} \le r_i < u_n,\\ \beta &\text{if } r_i \geq u_n,\\ \end{array} \right. \] Thanks
(11 Dec '13, 02:59)
tatsi

Can you explain constraint 1? Particularly, how are you taking the min of two vectors...elementwise?
yes. It will be elementwise. Thanks for taking a look at this.
If that's the case, there's no need to take the min. For each i, if 1>a_i then the constraint is unnecessary. Otherwise, add the constraint x_i>a_i(x1/y1). You will also need to get rid of the strict inequality...use >= instead?