[gecode-users] Gecode/J: Setting boolean var

2007-11-14 Thread Malcolm Ryan
Is there a simple standard way to constraint the value of a BoolVar to a constant? bool_eq() does not have a constant argument version, and eq() doesn't seem to work. Malcolm -- "If there is one thing worse than the modern weakening of major morals it is the modern strengthening of minor

Re: [gecode-users] Diagnosing failures

2007-11-14 Thread Malcolm Ryan
On 13/11/2007, at 7:25 AM, Christian Schulte wrote: > That's not quite an option: well known, there are too many propagator > invocations (really, absolutely incomprehensible). Really? I wouldn't have thought that there were so many. But then I've never written an engine. > Fact is, there has

[gecode-users] Gecode/J

2007-11-14 Thread Daniel Araya
Hi, I discover that Gecode/J not implemented the function "atleast" and "atmost", but it is easy to resolve with the function "count" and "rel". But I have a Question: How I do a restriction like: VarArray variable; VarInt Max; IF(variable.get(0)==1){ //THIS IS THE PROBLEM!! linear(this,cr

Re: [gecode-users] Gecode/J

2007-11-14 Thread Christian Schulte
Hi, atleast and atmost are just aliases for count. No rel is needed (check the docs, use IRT_LQ or IRT_GQ as relation). You need to use reification for that unless you really want to check the value (rather than propagating). If you really want to check the value you might want to: variab

Re: [gecode-users] Gecode/J: Setting boolean var

2007-11-14 Thread Christian Schulte
rel with IRT_EQ should work, check its docs (if not, it'll work with 2.0.0 which we finished today, hurray! More tomorrow). Maybe you want to check some of the C++ examples that are shipped with Gecode, modeling in C++ is sufficiently close (albeit nicer) to modeling in Java. Christian -Origi