# How can I express this max-min in CPLEX?

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];
}
}
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?

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}
Maximize an auxiliary variable $$z$$ subject to the constraints $$z\le \sum_{c=1}^C d_{u,c}x_{u,c}\ \forall u$$.