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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Daniel Araya
Sent: Wednesday, November 14, 2007 11:42 PM
To: [EMAIL PROTECTED]
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
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users


_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to