@Test(groups = "10s", timeOut = 60000) public void testJitee2() { Model model = new Model("model", new DefaultSettings() .setCheckDeclaredConstraints(true) .setPrintAllUndeclaredConstraints(true)); IntVar a = model.intVar("a", 0, 1000, false); IntVar b = model.intVar("b", 0, 100, false); IntVar ten = model.intVar(10); Constraint modC = model.mod(a, ten, b); modC.post(); int i = 0; for (int aNow = a.getLB(); aNow < a.getUB(); aNow++) { Constraint ra = model.arithm(a, "=", aNow); model.post(ra); for (int bNow = b.getLB(); bNow < b.getUB(); bNow++) { Constraint rb = model.arithm(b, "=", bNow); model.post(rb); while (model.getSolver().solve()) { i++; } model.unpost(rb); model.getSolver().reset(); } model.unpost(ra); model.getSolver().reset(); } }
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);  }