[gecode-users] propagator PropCond

Martin Mann qyu at gmx.de
Mon May 15 16:55:56 CEST 2006


Christian Schulte schrieb:
> Yes it still does! What makes you believe otherwise? Did you really try?

:) of course I did...

> 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::PropCost
   GC_Neighbored::cost(void) const {
     if (x0.assigned() || x1.assigned()) {
		return Gecode::PC_LINEAR_HI;
     }
     return Gecode::PC_QUADRATIC_HI;
   }

   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;
   }
===========================

but I dont see anything different from the Gecode classes..

I m a bit confused as you can see.

Martin

> 
> Hmm?
> Christian
> 
> --
> Christian Schulte, http://www.imit.kth.se/~schulte/ 
> 
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
> Of Martin Mann
> Sent: Monday, May 15, 2006 2:51 PM
> To: gecode user list
> Subject: [gecode-users] propagator PropCond
> 
> 
> Dear all,
> 
> I wrote a propagator class derived from BinaryPropagator.
> 
> The template is wrapped like that
> 
> typedef Gecode::BinaryPropagator<Gecode::Int::IntView, 
> Gecode::Int::PC_INT_VAL> BinProp;
> 
> Therefor the BinProp derived propagator is only called if one the two 
> variables get assigned to a value.
> 
> My goal is a propagator that is called everytime the domain changes. So 
> I set the PropCond template var from
> 
> PC_INT_VAL to PC_INT_DOM.
> 
> But now my propagator is not called anymore if the variable gets 
> assigned.. Do I ve got to combine them or whats wrong? I m a bit confused!
> 
> Thanks for help
> 
> Martin
> 
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org https://www.gecode.org/mailman/listinfo/gecode-users
> 
> 




More information about the gecode-users mailing list