[gecode-users] propagator PropCond

Guido Tack tack at ps.uni-sb.de
Mon May 15 17:19:52 CEST 2006


>> Really sure: _DOM means reexecution whenever a view changes in wahtever
>> form. However it does not mean that for each domain change the
>> propagator is
>> executed once!
>
> ok, I know that, but in my case it is not called anyway! mybe it's
> because of my cost or propagate function?

>    Gecode::ExecStatus
>    GC_Neighbored::propagate(Gecode::Space* home) {
>      if (x0.assigned()) {
>        GECODE_ME_CHECK(removeNonNeighbors(home,x1,x0.val()));
>      }else if (x1.assigned()) {
>        GECODE_ME_CHECK(removeNonNeighbors(home,x0,x1.val()));
>      } else {
>        GECODE_ME_CHECK(removeNonNeighbors(home));
>      }
>      return Gecode::ES_SUBSUMED;
>    }

This propagator will be called at most once. ES_SUBSUMED means that this
propagator won't contribute any more. The propagator will be called once
when it's posted (as every propagator is called then, except for those
that are subscribed to VAL), and then it disappears.
What you probably want to return is ES_FIX or ES_NONFIX, depending on
whether your propagator computes a fixpoint or not.

Cheers,
   Guido

-- 
Guido Tack
http://www.ps.uni-sb.de/~tack






More information about the gecode-users mailing list