|
| Libra wrote:
> Dear all,
>
> I've a modeling problem that i wish to submit to your experience.
> Briefly, I've a constraint which could be expressed in two different ways:
>
> 1) X2 > X1 + sum(m){Ym * Tm}
> sum(m) {Ym} = 1
>
> where:
> X1 and X2 are integer variables
> Ym is an array of boolean variables
> Tm is an array of constants
> m belongs to (1,2,...,M)
>
>
> 2) X2 > X1 + Tm
> m = X_m
>
> where:
> X1, X2 and X_m are integer variables (X_m belongs to (1,2....,M))
> Tm is an array of constants
> therefore the index m is an integer that belongs to (1,2....,M)
>
> The question is: from a theoretical point of view, which is the better
> formulation?
> I mean, in the case 1) I only have two integer variables + M binary
> variables, that is with a small domain, while in the case 2) I only have
> three variables but with a wider domain for X_m.
>
> I hope it is all clear.
> TIA
>
> Libra
I'd usually go for the smaller representation, if I've got access to a
reasonably good constraint solver that does good constraint reduction
and propagation of domains, ranges and values through constraints
Tim
www.chippingtonderrick.co.uk
|
|