[gecode-users] Reified max/min
Jonathan Mörndal
Jonathan.Morndal.7625 at student.uu.se
Wed Apr 18 17:04:22 CEST 2007
Hello all!
I would like to use a reified version of the max/min functions in
Gecode/J. As far as I can see there are none. Is this true, and if so,
are there any "quick fix"?
One idea I had was to model it as numerous inequalities and equalities
instead, but I guess the propagation will not be very good in that case.
Thanks in advance for any help!
/Jonathan
Clarification:
What I want to model exactly:
x_0 = min{x_i,...,x_j}
or
x_1 = min{x_k,...,x_l}
or
...
or
x_p = min{x_m,...,x_n}
My (probably pretty bad) solution would then be
((x_0 \leq x_i and ... and x_0 \leq x_j)
and
(x_0 = x_i or ... or x_0 = x_j))
or
((x_1 \leq x_k and ... and x_1 \leq x_l)
and
(x_1 = x_k or ... or x_1 = x_l))
or
...
or
((x_p \leq x_m and ... and x_p \leq x_n)
and
(x_p = x_m or ... or x_p = x_n))
More information about the gecode-users
mailing list