[gecode-users] algorithm used in sequence constraint

David Rijsman David.Rijsman at quintiq.com
Thu Aug 19 08:52:39 CEST 2010


Hi Kish,

it is indeed possible to remove the IntSet s argument in the sequence constraint for boolean variables but we choose to explicitly state what value we are counting and use the IntSet for the following reason, I quote from Christian:

"we never use the C++ type bool for Boolean values as Boolean variables also take integer values. And also  choosing a set makes it easier to interface and just forget about the fact whether one is using IntVar or BoolVar."

David

>>> 
From: 	Kish Shen <kisshen at cisco.com>
To:	David Rijsman <David.Rijsman at quintiq.com>
CC:	<users at gecode.org>
Date: 	8/18/2010 10:23 PM
Subject: 	Re: [gecode-users] algorithm used in sequence constraint

Hi,

This is actually a new question about the sequence constraint: there 
seem to be two versions  of the constraint, one for IntVars, and one for 
BoolVars, but the other arguments are the same. Specifically, the 
BoolVar version has the IntSet s of values that each sequence of 
variables should take. I don't understand how this works for BoolVars, 
since they can only take 0 or 1 as values. What exactly is the semantics 
for the BoolVar version?

In the ECLiPSe versions of the constraint, there is also a version that 
has boolean variables. In this version, there is no equivalent to the 
IntSet s, so it has one less argument than the IntVar version. Each 
sequence of q variables must have between l and u variables with the 
value 1. Is this the semantics for the gecode version as well?

Cheers,

Kish

-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.

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




More information about the users mailing list