Hi Bauke,

No, they can't, in the current setup this would make the propagator
incorrect. The reasoning is as follows: while the task is still optional,
one is not allowed to prune anything. The reason why the code still lingers
on as a comment is that if one introduces an additional wrapper in forms of
task variables, this kind of reasoing could be used.

Best
Christian

--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf
Of Conijn, B.J.
Sent: Friday, February 14, 2014 2:08 PM
To: users@gecode.org
Subject: [gecode-users] Unary constraint not-first-not-last propagation does
not cancel optional tasks

Hi,

In not-first-not-last.hpp I found the following piece of code and I was
wondering why those two lines have been commented out. While running the
tests with those two lines included, those lines get executed and the test
still succeeds. Can those two lines be safely included?

if (t[i].mandatory()) {
         GECODE_ME_CHECK(t[i].lct(home,lct[i]));
} else if (lct[i] < t[i].ect()) {
   //        GECODE_ME_CHECK(t[i].excluded(home));
   //        t[i].cancel(home,p); t[i]=t[--n];
}

Kind regards,

Bauke

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users


_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to