@Test(groups = "1s", timeOut = 60000) public void testJiTee1() { Random rr = new Random(2); Model model = new Model("model"); IntVar load = model.intVar("load", new int[]{0, 100, 200, 300, 400, 500, 600, 700}); IntVar dim_A = model.intVar("dim_A", new int[]{150, 195, 270, 370, 470}); model.arithm(dim_A, "<=", 271).post(); model.arithm(load, ">", 400).post(); model.getEnvironment().worldPush(); Constraint c = null; for (int round = 0; round < 350; round++) { int reqInt = (round % 100); if (c != null) model.unpost(c); c = model.arithm(dim_A, ">", 5 * reqInt); c.post(); while (model.getSolver().solve()) { } Assert.assertEquals(model.getSolver().getSolutionCount() > 0, 5 * reqInt < 270); model.getEnvironment().worldPopUntil(0); model.getSolver().hardReset(); model.getEnvironment().worldPush(); } }
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);  }