int: nSuccursales; int: nClients; set of int: B = 1..nSuccursales; set of int: C = 1..nClients; array[B,C] of int : coutService; array[B] of int : coutOuverture; var int: total; array[B,C] of var bool: x; array[B] of var bool: y; % Constraints constraint forall(b in B, c in C)(x[b,c] <= y[b]); constraint forall(c in C)(sum(b in B)(x[b,c]) == 1); constraint total = sum(b in B, c in C)(x[b,c] * coutService[b,c]) + sum(b in B)(y[b] * coutOuverture[b]); %constraint y[4] == 1; solve minimize total;