Ruben Zilibowitz wrote:

> Suppose I have a BoolExpr called B. And I have two LinExpr: X and Y. I want a 
> LinExpr that is equivalent to:
> if (B) then X else Y
> However I don't see support for an if-then-else construct. Is there a way to 
> implement this?

You have to decompose it into implications:
rel(home, B >> X);
rel(home, (!B) >> Y);

Cheers,
        Guido

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/





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

Reply via email to