You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Test(groups = "1s", timeOut = 60000)
public void testWithViews() {
Model model = new Model();
IntVar start = model.intVar("start", 0, 57);
IntVar duration = model.intVar("duration", 6, 6);
IntVar end = start.getModel().offset(start, duration.getValue());
model.arithm(start, "+", duration, "=", end).post();
model.arithm(end.neg().intVar(), "+", duration, "=", start.neg().intVar()).post();
model.getSolver().findAllSolutions();
Assert.assertTrue(model.getSolver().getSolutionCount() > 0);
}
It fails because of the model.arithm(end.neg().intVar(), "+", duration, "=", start.neg().intVar()).post(); constraint, but it is exactly the same as model.arithm(start, "+", duration, "=", end).post();. Therefore, it should not fail.
My guess is that the faulty behaviour is coming from lines 123-124 in IntLinCombFactory : RESULT should be updated before NCOEFFS[i]
The text was updated successfully, but these errors were encountered:
The following test fails :
It fails because of the
model.arithm(end.neg().intVar(), "+", duration, "=", start.neg().intVar()).post();
constraint, but it is exactly the same asmodel.arithm(start, "+", duration, "=", end).post();
. Therefore, it should not fail.My guess is that the faulty behaviour is coming from lines 123-124 in IntLinCombFactory :
RESULT
should be updated beforeNCOEFFS[i]
The text was updated successfully, but these errors were encountered: