Skip to main content
1 of 5
Georgios
  • 1.2k
  • 6
  • 21

Formulation of a constraint in a MIP for an element in different Sets

I have an element e $\in Y_i$. Each set $Y_i$ has different attributes.

$G_1$ is a set of sets.

And the following holds: $ Y_i\in\ G_1 $

Example:

$e=5$ and sets $Y_2$={5,2,7}; $Y_{40}$={5,100,7}; ...; $Y_t$={300,400,2,5}

$ \{G_1=\{Y_2, Y_{40},..., Y_t\}$

In the end, I want to write a sum over a decision variable, that sums all variables found in the different sets.

This should look likes this -> $\sum\limits^{G_1}_{Y_i \ni e}x_e(Y_i)$

x is a binary decision variable.

With my knowledge, I do not see how a solver could work like this.

I am formulating the problem like this, and avoid using the sets as indices in order to minimize the decision variables that will be set to zero. Of course, in this case, an additional parameter would be needed that would state that a combination is impossible (0 value) and possible (1).

Is there a way to formulate such a thing?

Georgios
  • 1.2k
  • 6
  • 21