[gecode-users] Conditional constraints ?

Christian Schulte cschulte at kth.se
Mon Feb 20 16:55:35 CET 2012


Sorry but I have to admit that I do not understand your problem. What is it
what you are trying to do, really?

 

Christian

 

--

Christian Schulte, www.ict.kth.se/~cschulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Wajid Hassan
Sent: Friday, February 17, 2012 9:40 AM
To: users at gecode.org
Subject: [gecode-users] Conditional constraints ?

 

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/20120220/630ab052/attachment.htm>


More information about the users mailing list