[gecode-users] Gecode/J
Christian Schulte
cschulte at kth.se
Thu Nov 15 01:23:26 CET 2007
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:
variable.get(0).assigned() && (variable.get(0).val() == 0)
Christian
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Daniel Araya
Sent: Wednesday, November 14, 2007 11:42 PM
To: users at gecode.org
Subject: [gecode-users] Gecode/J
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,credits,variable,IRT_LQ,Max);
}
Thanks and sorry for the newbie question!
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list