[gecode-users] Any Advise on assignment delta

David Rijsman David.Rijsman at quintiq.com
Thu Dec 11 09:22:34 CET 2008


Hi Christian,

thanks for the reply, your absolutely right in each and every remark. The use case for the propagating check is to see  if a delta is the result of an 'external' action or a propagation action and external is defined as anything else than the propagate of the propagator instance which is also being advised. So indeed a flag will do the job.

David

>>> 
From: 	"Christian Schulte" <cschulte at kth.se>
To:	"'David Rijsman'" <David.Rijsman at quintiq.com>, <users at gecode.org>
Date: 	12/10/2008 9:14 PM
Subject: 	RE: [gecode-users] Any Advise on assignment delta

Hi David,

There are two possibilities for 'any' in general:
 (1) You really treat it like any and compute whatever you need from
scratch. Normally, you will
     have the routines for doing so anyway, as you have to initialize your
data without reference
     to a delta.
 (2) You keep a copy of the last domain: by that you can find out what has
changed exactly. Maybe your data
     structures can tell you the old domain anyway?

'any' does not happen often: assignment is relatively rare compared to other
changes on the variable because you can do it at most once; the other
operations that lead to 'any' are iterator-based variable domain updates
which in most cases just remove a single value or a range (and hence the
delta information is accurate). 

In all our propagators we use approach (1) or (2) where the datastructures
we need anyway capture the old domain.

Then, your idea about finding out whether you are "in propagation" does not
work. The space might not be stable even though no propagator is currently
running. But I have to admit that I am little bit confused by your desire:
what we use quite often is to find out whether an advisor belongs to the
currently running propagator (which is easy: just maintain a flag in the
propagator that you set to true when the propagator starts and reset to
false when you return. Then, an advisor can check that flag). I can't really
see what you would do if a propagator is not running (that's a very rare
occasion, actually). Maybe you can elaborate?

Cheers
Christian

--
Christian Schulte, www.it.kth.se/~cschulte/ 

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of David Rijsman
Sent: Wednesday, December 10, 2008 4:52 PM
To: users at gecode.org 
Subject: [gecode-users] Any Advise on assignment delta

Hi,

I have a use case where I would like to get more information than just 'any'
on a Delta when I am being advised  in a Propagator, for example as a result
of an eq invocation on an IntView. 
Specifically I would like to get each individual value that has been removed
after successfully eq(ualizing) the view. I think this is not possible
(today) but I am hoping I am missing some other ways of getting this
information? 

Second, if I would like to test in Propagator::advise if I am in propagation
is it sufficient to test Space::stable  (and it must be false to be in
propagation)?

thank you,

David


This message contains information that may be privileged or confidential and
is the property of Quintiq. It is only intended for the person to whom it is
addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute or use this message or
any part thereof. If you have received this message in error, please notify
the sender immediately and delete all copies of this message. Please note
that e-mails are susceptible to change, therefore they are not binding.

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



This message contains information that may be privileged or confidential and is the property of Quintiq. It is only intended for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you have received this message in error, please notify the sender immediately and delete all copies of this message. Please note that e-mails are susceptible to change, therefore they are not binding.




More information about the gecode-users mailing list