Topic
  • 2 replies
  • Latest Post - ‏2012-12-09T10:37:48Z by SystemAdmin
SystemAdmin
SystemAdmin
1883 Posts

Pinned topic Simple question - How to get the minimum of two variables?

‏2012-12-08T18:35:36Z |
Hi all,

I'm new to linear programming&Cplex, so bare with me. At the moment, I can't figure out how to set a parameter (R[i][k] in this case) the minimum of two other terms (parameter B[i] and (T[i]*(sum ( j in Items )r[i][j]*z[j][k])).

The corresponding constraint in my model:

//Constraints
subject to {
forall (i in Customers , k in Products )
constraint5:
R[i][k]==min((T[i]*(sum ( j in Items )r[i][j]*z[j][k])),B[i]);

where min() is not working.

Any help would be greatly appreciated!
Updated on 2012-12-09T10:37:48Z at 2012-12-09T10:37:48Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Simple question - How to get the minimum of two variables?

    ‏2012-12-09T08:54:55Z  
    Try minl

    Regards,
    Zahar
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Simple question - How to get the minimum of two variables?

    ‏2012-12-09T10:37:48Z  
    Thanks a lot!