boolean enu = MAX.hasEnumeratedDomain();
for (int i = 0; i < VARS.length && !enu; i++) {
enu = VARS[i].hasEnumeratedDomain();
}
Propagator[] propagators = enu ?
new Propagator[]{new PropMax(VARS, MAX), new PropMax(VARS, MAX)} :
new Propagator[]{new PropMax(VARS, MAX)};
return new Constraint("Max", propagators);
}