[gecode-users] problem with gecode 3.0

Christian Schulte cschulte at kth.se
Mon Mar 23 16:32:51 CET 2009


Hi Alberto,

I reproduced the bug but haven't found or fixed it (it is still a puzzle to
me how this bug could have escaped our tests...).

But, you should have never experienced the bug in the first place: you use
	linear(*this, x, IRT_GR, 0, b)
where x is an array of Boolean variables. With other words: b is 1 iff there
is one x which is one. This constraint is known as Boolean disjunction!

So, you should rewrite it to (twice in your program):
	rel(*this, BOT_OR, x, b);

Much faster (and no bugs in 3.0.0).

Cheers
Christian

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


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Alberto Delgado
Sent: Monday, March 16, 2009 10:24 AM
To: users at gecode.org
Subject: [gecode-users] problem with gecode 3.0

Hi,

I'm getting some weird solutions from a problem I'm solving with gecode 3.0
that i don't when i use gecode 2.2.

There is a simplified version of the problem where i've isolated the
specific situation in the attached files.
Basically,  what the problem does is to determine whether there is any
repeated occurences of a value assigned to a position in a stack below such
position.  I define an objective variable that is the sum of positions with
repeated occurrences below them.


When i try to find the best solution  some of the reified variables i use
are set to 0 in situations where they shoudn't, and the objective variable
takes values that don't match the valuation of the solution.

prueba.cc is  set to be run using gecode 3.0 and prueba2.cc using gecode
2.2.

Thanks ind advance for any help/advice.


Alberto





More information about the gecode-users mailing list