You need to use reification to express if-then-else. E.g. if for the constraint if b then c1 else c2 you need to essentially implement "b implies c1" and "not b implies c2". Reification is explained in the documentation.
Cheers, Guido > On 23 Oct 2014, at 10:01 am, Bouchene Sabrina <genius_linda1...@yahoo.fr> > wrote: > > Hello, > > I would to write an (if/ else) constraint. in gecode i find how to write a > loop constraint, but how to write an ( > > if ......then > ..... > else...... > endif.) constraint ?. > Cordially. > Sabrina. > > _______________________________________________ > Gecode users mailing list > users@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users