Solver solver = new Solver();
IntVar a = VF.enumerated("a", -2, 2, solver);
// SMF.log(solver, true, true);
solver.set(
new ObjectiveStrategy(a,OptimizationPolicy.TOP_DOWN),
ISF.minDom_LB(a));
SMF.restartAfterEachSolution(solver);
NogoodStoreFromSolutions ng = new NogoodStoreFromSolutions(new IntVar[]{a});
solver.post(ng);
solver.plugMonitor(ng);