[gecode-users] if-then-else
Guido Tack
tack at gecode.org
Tue Apr 12 09:22:30 CEST 2011
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/
More information about the users
mailing list