[gecode-users] Disjunction of linear expressions

Jérémie Vautard jeremie.vautard at laposte.net
Sun Jun 4 16:47:10 CEST 2006


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




More information about the gecode-users mailing list