[gecode-users] Disjunction of linear expressions
Christian Schulte
schulte at imit.kth.se
Mon Jun 5 09:38:40 CEST 2006
Yes, that should work. Of course, you can also post the necessary
constraints yourself: use reified linear constraints and then bool_or to
connect them.
Christian
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Jérémie Vautard
Sent: Sunday, June 04, 2006 4:47 PM
To: users at gecode.org
Subject: [gecode-users] Disjunction of linear expressions
Hi !
I want to modelise some disjunction of linear constraints on integers. In
minimodel, I found this method :
Gecode::MiniModel::BoolExpr operator~ (const
Gecode::MiniModel::LinExpr &)
Reification of linear expression.
So, for example, can I modelise the constraint : a == 0 OR b ==4 with
something like :
post(s, tt( ~(a==0) || ~(b==4) ) ); (with a and b being IntVars
belonging to the space *s ) ?
If not, what is the best way to do it ?
Cheers,
Jeremie Vautard
_______________________________________________
Gecode users mailing list
users at gecode.org https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list