3
$\begingroup$

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));  
    objFun.end();

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?

$\endgroup$

2 Answers 2

9
$\begingroup$

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}

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

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

$\endgroup$

Your Answer

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

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