Hi, I wonder how I can linearize the following expression: $$z = \sum_{i=1}^{n} \max_{j=1,...,n} (y_{ij})$$ Thanks in advance. |
Hint: introduce a new variable \(x_j\) to represent the summand, linearize that in the usual way, and take \(z = \sum_{j=1}^n x_j\). It depends on how variable z relates to the objective function.
(11 Feb '16, 15:30)
monash
... and how does z relate to the objective? Is the solver trying to minimize z (in which case inequalities alone should work), or not (in which case you'll need a gaggle of binary variables)?
(11 Feb '16, 15:43)
Paul Rubin ♦♦
The solver is trying to minimize -Z .
(11 Feb '16, 15:53)
monash
|
I found the best possible strategy is to impose these constraints sets: $$x_i \geq \frac 1n \sum_{j=1}^{n} y_{ij}, \quad \forall i = 1,...,n$$ $$x_i \leq \sum_{j=1}^{n} y_{ij}, \quad \forall i = 1,...,n$$ and then: $$z = \sum_{i=1}^{n} x_i$$ |
Did you perhaps mean max instead of argmax?
@RobPratt: Yes actually, and I revised it. I represented it by the mathematical optimization notation.