[gecode-users] Conditional constraints ?

Wajid Hassan wajidhassan at gmail.com
Fri Feb 17 09:39:37 CET 2012


Hi,

I am a beginner user working on finding an optimal solution for a binding,
scheduling and routing problem. I have done the binding and scheduling
part, and now have some questions regarding the routing dependencies, i.e.,
if they can be expressed in gecode or not. This might be something trivial,
but I haven't figured it out yet.

I run the Gecode model and find the appropriate binding (decision of which
task should be assigned to which resource), this is stored in an
IntVarArray _binding.

The routing part depends on the binding, i.e., it considers two tasks T1
and T2, and as per the application, lets say that the output of T1 needs to
go to the input of T2. To assign the data coming out of T1 to an
appropriate link on the network so that it reaches T2, we need to know the
resources to which T1 and T2 were bound. As I stated above, this
information is itself found out by the Gecode model and stored in an
IntVarArray _binding.

Now, I cannot figure out a way to check the value of an IntVarArray
_binding and use it to constrain another IntVarArray. A naive approach is
the if else, which cannot be applied on a constraint variable since it has
not been assigned a value yet. Any suggestions would be highly appreciated.

BR/ Wajid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20120217/c822b1d0/attachment.htm>


More information about the users mailing list