@Test(groups = "1s", timeOut = 60000) public void test1() { Model model = ProblemMaker.makeNQueenWithBinaryConstraints(8); IntVar[] qs = (IntVar[]) model.getHook("vars"); Solver solver = model.getSolver(); EventRecorder ee = new EventRecorder(solver); LazyImplications aGI = (LazyImplications) ee.getGI().get(); solver.setEventObserver(ee); while (solver.solve()) { for (IntVar q : qs) { int i = aGI.rootEntries.get(q).p; IntIterableRangeSet set = aGI.entries[i].d; Assert.assertTrue(set.contains(q.getValue())); Assert.assertEquals(set.size(), 1); } } }
@Override public int size() { return size.get(); }
LazyImplications extends Implications { @Override public int size() { return size.get(); } }
LazyImplications extends Implications { @Override public int size() { return size.get(); } LazyImplications(Model model); }
LazyImplications extends Implications { @Override public int size() { return size.get(); } LazyImplications(Model model); @Override void init(Model model); @Override void reset(); @Override void tagDecisionLevel(); @Override void undoLastEvent(); @Override void pushEvent(IntVar var, ICause cause, IntEventType evt, int one, int two, int three); @Override int size(); @Override void collectNodesFromConflict(ContradictionException cft, ValueSortedMap<IntVar> front); @Override void predecessorsOf(int p, ValueSortedMap<IntVar> front); void findPredecessor(ValueSortedMap<IntVar> front, IntVar vi, int p); @Override ICause getCauseAt(int idx); @Override int getEventMaskAt(int idx); @Override IntVar getIntVarAt(int idx); @Override int getValueAt(int idx); @Override int getDecisionLevelAt(int idx); @Override IntIterableRangeSet getDomainAt(int idx); @Override int getPredecessorOf(int idx); @Override IntIterableRangeSet getRootDomain(IntVar var); @Override void copyComplementSet(IntVar var, IntIterableRangeSet set, IntIterableRangeSet dest); }
LazyImplications extends Implications { @Override public int size() { return size.get(); } LazyImplications(Model model); @Override void init(Model model); @Override void reset(); @Override void tagDecisionLevel(); @Override void undoLastEvent(); @Override void pushEvent(IntVar var, ICause cause, IntEventType evt, int one, int two, int three); @Override int size(); @Override void collectNodesFromConflict(ContradictionException cft, ValueSortedMap<IntVar> front); @Override void predecessorsOf(int p, ValueSortedMap<IntVar> front); void findPredecessor(ValueSortedMap<IntVar> front, IntVar vi, int p); @Override ICause getCauseAt(int idx); @Override int getEventMaskAt(int idx); @Override IntVar getIntVarAt(int idx); @Override int getValueAt(int idx); @Override int getDecisionLevelAt(int idx); @Override IntIterableRangeSet getDomainAt(int idx); @Override int getPredecessorOf(int idx); @Override IntIterableRangeSet getRootDomain(IntVar var); @Override void copyComplementSet(IntVar var, IntIterableRangeSet set, IntIterableRangeSet dest);  }