[gecode-users] Gecode/J: bool_and()

Christian Schulte cschulte at kth.se
Wed Nov 21 10:25:54 CET 2007


Hi Malcolm,

There is no rational whatsoever: Gecode 1.* just got it wrong. For Gecode
2.0.0 the interface for Boolean constraints has been reworked and does what
logic demands ;-)

Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Malcolm Ryan
Sent: Tuesday, November 20, 2007 3:16 AM
To: gecode list
Subject: [gecode-users] Gecode/J: bool_and()

The function Gecode.bool_and(JavaSpace, VarArray<BoolVar>, BoolVar)  
acts in a way that I find counter-intuitive. If the VarArray is  
empty, this constraint will cause propagation to fail:

         VarArray<BoolVar> bools = new VarArray<BoolVar>();
         BoolVar bool = new BoolVar(space);
         Gecode.bool_and(space, bools, bool);
	System.out.println(space.status());

to my mind, the natural result would be to set 'bool' to true, i.e.  
the conjunction is true iff all the members are true. When there are  
no members, that statement is trivially satisfied.

Is there any rationale for the current operation?

Malcolm

--
Many clever men like you have trusted to civilisation.
Many clever Babylonians, many clever Egyptians,
Many clever men at the end of Rome.
                               - G.K.Chesterton, The Napoleon of  
Notting Hill




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





More information about the gecode-users mailing list