Initially, I had the below objective function

$\max \sum_{u=1}^{U}\sum_{c=1}^{C}x_{u,c}d_{u,c}$

where $x_{u,c}$ are optimization variables

I modelled this in CPLEX as

   IloExpr  objFun (env); 
    for(int u = 0; u < U; u++){
          for(int c = 0; c < C; c++){
         objFun += x[u][c]* d[u][c];
    model.add(IloMaximize(env, objFun));  

Now, I have a slightly different objective

$\text{maximize} \min_{u} \sum_{c=1}^{C}x_{u,c}d_{u,c}$

Now how can I model this?


2 Answers 2


You can model this as a maxmin problem by introducing an auxiliary variable $\theta$:

\begin{align} \max&\quad\theta &\\ \text{s.t.}&\quad\theta \leq \sum_{c=1}^C x_{uc}d_{uc} & \forall u=1,\dots,U \end{align}

For future reference, if in contrast you had a minmax objective instead of a maxmin objective, you could apply the same trick: \begin{align} \min&\quad\theta &\\ \text{s.t.}&\quad\theta \geq \sum_{c=1}^C x_{uc}d_{uc} & \forall u=1,\dots,U \end{align}

  • 2
    $\begingroup$ Darn, Joris, you beat me by 27 seconds! $\endgroup$
    – prubin
    Commented Mar 25, 2021 at 18:20

Maximize an auxiliary variable $z$ subject to the constraints $z\le \sum_{c=1}^C d_{u,c}x_{u,c}\ \forall u$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.