Hi Yunus,


The point is: you cannot schedule a propagator during copying (the system will 
crash).



Copying lazily is normally an excellent idea, many Gecode propagators do it. 
One way to do it is to use a flag whether the propagator has been run. When 
you clone the propagator you set it to false and in the propagate() function 
you can check whether you have run the propagator.



Would that do for you?



Storing the whole previous domain sounds very excessive to me, though and 
integer sets are definitely not an efficient data structure for that purpose. 
Maybe you could also start thinking about maintaining less information?



Hope that helps.



Cheers

Christian



--

Christian Schulte, www.gecode.org/~schulte

Professor of Computer Science, KTH, [email protected]

Expert Researcher, SICS, [email protected]



From: [email protected] [mailto:[email protected]] On Behalf Of 
Yunus Acikoz
Sent: Wednesday, April 20, 2016 09:11
To: [email protected]
Subject: [gecode-users] Scheduling A Propagator After Backtrack



Hi,



I would like to know if it's possible to schedule a custom propagator such 
that it is immediately propagated after backtracking. I mean something like 
executing the code below in the copy function of the propagator:



        auto copy_propagator = new(home)AdvisedPropagator(home, share, *this);

        Gecode::Int::IntView::schedule(home, *copy_propagator, 
Gecode::Int::ME_INT_DOM);





So the newly generated copy of the propagator (without its council being 
copied) is scheduled to be run when the search engine turns back to that node. 
Does it make sense at all?



I use advisors and they consume too much memory. Each advisor holds the 
previous state of the domain of its subscribed view as an IntSet, an unsigned 
short index and an enum to keep info about which variable array it belongs to.

I want to initialize advisors lazily, so that they are only created when the 
propagator is actually used. I thought maybe I could do it in "propagate" 
function with an initial propagation.



Thanks in advance,

Cheers,

Yunus Acikoz

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to