Solved

# maximization argument in a minimisation objective Value

• 2 replies
• 67 views

Hi All,

I would like to write the following equation in my objective variable in AIMMS.

I cannot manage to insert a correct notation for the max argument that works. I want to pick the v with the highest value for Zkpv, and minimize this value. My current objective (without the max argument) variable looks like this at the moment.

Kind Regards

@samlobo , this is a minimax objective which has been discussed in section 6.2 of the AIMMS modelling guide. Based on my understanding of your question,

Declare a variable as

`max_OrderInTry(k, p)`

with a constraint, forall (k, p, v)

`max_OrderInTray(k, p) >= OrderInTray(k, p, v)`

Now your objective function can be:

`Min sum[(k,p), MultiPlicity(k) * max_OrderInTray(k, p)]`

max_OrderInTray(k, p) will be greater than OrderInTray(k, p, v) across all v and because you are including this term in the minimization objective, it will be equal to the maximum value in OrderInTray(k, p, v).

### 2 replies

Userlevel 5
+5

@samlobo , this is a minimax objective which has been discussed in section 6.2 of the AIMMS modelling guide. Based on my understanding of your question,

Declare a variable as

`max_OrderInTry(k, p)`

with a constraint, forall (k, p, v)

`max_OrderInTray(k, p) >= OrderInTray(k, p, v)`

Now your objective function can be:

`Min sum[(k,p), MultiPlicity(k) * max_OrderInTray(k, p)]`

max_OrderInTray(k, p) will be greater than OrderInTray(k, p, v) across all v and because you are including this term in the minimization objective, it will be equal to the maximum value in OrderInTray(k, p, v).

@mohansx

Thank you very much for your time and effort to explain it so clearly to me.

I just implemented your suggested changes, and it works like charm.