how to reduce the summation value of binary variable to 1 , Integer Linear Programming

395 Views Asked by At

I have a binary set of variable Viu whose value can be either 0 or 1 , There can be multiple time when(ith value of Viu) V_1_A is assigned value 1

There is another integer Variable Xi which holds some value and is assigned to i when he is assigned the value of 1.....

For eg. when V_1_A is selected X_1=10;
My linear equation is V_1_A * X_1_ =10 i:e 1* 10=10

As mentioned above V_1 could get assigned to V_1_A and also V_1_B, I want that the summation of V_1 should not be 2 but should get reduced to 1 so that the value Xi be multiplied only although Vi is selected multiple times.

I am very new to ILP, please help

1

There are 1 best solutions below

3
On BEST ANSWER

I'll answer the question raised in one of the comments: how to get Z[i] to take the value 1 if a sum of V[i,...] variables is >= 1 and to take the value 0 if the sum of the V[i,...] is 0, assuming that V and Z are binary. You just need the following constraints:

  1. Z[i] <= sum of V[i,...] (which ensures that Z[i] is 0 when the sum is zero); and
  2. Z[i] >= V[i,...] for every V in the summation (which ensures that Z[i] is 1 if any V[i,...] that is part of the sum is 1.