} // end of execute
// TEST
static void test1(String args[]) throws Exception
{
Constrainer C = new Constrainer("Test");
IntExp x = C.addIntVar(0,10,"x",IntVar.DOMAIN_DEFAULT);
IntExp y = C.addIntVar(2,10,"y",IntVar.DOMAIN_DEFAULT);
IntExp z = C.addIntVar(0,10,"z",IntVar.DOMAIN_DEFAULT);
int size = 3;
IntExpArray vars = new IntExpArray(C, size);
vars.set(x, 0);
vars.set(y, 1);
vars.set(z, 2);
Constraint constraintAllDiff2 = new ConstraintAllDiff2(vars);
constraintAllDiff2.execute();
//IntExp cost = C.addIntVar(0,20,"cost");
//Constraint sum = new ConstraintAddVector(vars,cost);
//sum.execute();
IntExp cost = C.sum(vars); cost.name("cost");
//x.lessOrEqual(y).execute();
x.mul(2).sub(cost).more(y).execute();
C.traceChoicePoints(vars);
//C.displayOnBacktrack(vars);
C.traceFailures(vars);
IntValueSelector value_selector = new IntValueSelectorMin();
IntVarSelector var_selector = new IntVarSelectorMinSize(vars);
Goal print = new GoalAnd(new GoalPrint(vars),new GoalPrintObject(C,cost));
Goal solution = new GoalAnd(print,
new GoalGenerate(vars,var_selector,value_selector),
print);
//if (!C.execute(new GoalMinimize(solution,cost)))
if (!C.execute(solution))
System.out.println("No solutions");
System.out.println(x + " " + y + " " + " " + z + cost);
}