@Test(groups = "1s", timeOut = 60000) public void testPostUnpostPost1() { Model m = new Model(); IntVar v = m.intVar(1, 3); IntVar w = m.intVar(0, 2); Constraint c1 = m.arithm(v, ">", w); c1.post(); while (m.getSolver().solve()) ; Assert.assertEquals(m.getSolver().getMeasures().getSolutionCount(), 6); m.getSolver().reset(); m.unpost(c1); while (m.getSolver().solve()) ; Assert.assertEquals(m.getSolver().getMeasures().getSolutionCount(), 9); m.getSolver().reset(); c1.post(); while (m.getSolver().solve()) ; Assert.assertEquals(m.getSolver().getMeasures().getSolutionCount(), 6); }
public final void post() { propagators[0].getModel().post(this); }
Constraint { public final void post() { propagators[0].getModel().post(this); } }
Constraint { public final void post() { propagators[0].getModel().post(this); } Constraint(String name, Propagator... propagators); }
Constraint { public final void post() { propagators[0].getModel().post(this); } Constraint(String name, Propagator... propagators); Propagator[] getPropagators(); Propagator getPropagator(int i); ESat isSatisfied(); String toString(); final boolean isReified(); void reifyWith(BoolVar bool); final BoolVar reify(); final void post(); final void ignore(); final void declareAs(Status aStatus, int idx); final void checkNewStatus(Status aStatus); final Status getStatus(); int getCidxInModel(); Constraint getOpposite(); void setName(String newName); String getName(); PropagatorPriority computeMaxPriority(); static Constraint merge(String name, Constraint... toMerge); }
Constraint { public final void post() { propagators[0].getModel().post(this); } Constraint(String name, Propagator... propagators); Propagator[] getPropagators(); Propagator getPropagator(int i); ESat isSatisfied(); String toString(); final boolean isReified(); void reifyWith(BoolVar bool); final BoolVar reify(); final void post(); final void ignore(); final void declareAs(Status aStatus, int idx); final void checkNewStatus(Status aStatus); final Status getStatus(); int getCidxInModel(); Constraint getOpposite(); void setName(String newName); String getName(); PropagatorPriority computeMaxPriority(); static Constraint merge(String name, Constraint... toMerge);  }