[gecode-users] gecode

penche21 penche21 penche21 at hotmail.com
Sun Mar 4 23:31:52 CET 2007


hi,

I am not sure if this is the right&efficient way but I handle it like that;

boolVar expression;
linear(x1,IRT_LE,x2, expression);

boolVar action;
rel(x2,IRT_EQ,x1+1, action);

boolVar t = true;
bool_imp(expression, action, t); // expr = true implies that action = t

same idea for the else part.
syntax is just for a rough idea, please check for it. hope this helps..


Cheers,
penche

>From: kemmar amina <kemmami at yahoo.fr>
>To: users at gecode.org
>Subject: [gecode-users] gecode
>Date: Sun, 4 Mar 2007 12:31:28 +0100 (CET)
>
>hi,
>I want to express a programm JAVA to constraints with GECODE, what are the 
>constrains must be used to express an if_then_else instruction such as :
>if(x1>2){x2 = x1 + 1;}
>else{
>y2 = y1 + 1;
>}
>thank you.
>
>
>---------------------------------
>  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos 
>questions ! Profitez des connaissances, des opinions et des expériences des 
>internautes sur Yahoo! Questions/Réponses.


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

_________________________________________________________________
Hem e-postalarinizi, hem de Bilgisayarinizi MSN Güvenlik ile koruma altina 
alin! http://www.msn.com.tr/security/





More information about the gecode-users mailing list