final IntVar X = VariableFactory.enumerated("X", 1, 2, solver);
final IntVar Y = VariableFactory.enumerated("Y", 1, 2, solver);
final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);
solver.post(new Constraint("Conditionnal",
new PropConditionnal(new IntVar[]{X, Y, Z},
new Constraint[]{IntConstraintFactory.arithm(X, "=", Y), IntConstraintFactory.arithm(Y, "=", Z)},
new Constraint[]{}) {
@Override
public ESat checkCondition() {
int nbNode = (int) solver.getMeasures().getNodeCount();