[gecode-users] Help to express a constraint

Philippe aqwzsxaqwzsx at orange.fr
Wed Jun 4 20:12:27 CEST 2014


Sorry for the wrong form i've provided. 
Here is an example of what i wanted to express :

1) Given the fact that Status and Succ are matrix interfaces of 
   two IntVarArray and t, m are integers, the expression :

 expr(*this, Status(Succ(t,m), m) != 3);  // don't compile
 
 is more "elegant" than : 

 expr(*this, element(Status.row(m), Succ(t,m)) != 3) 

But it seems difficult to implement the first one.

2) I have another exemple in mind  :
 
 expr(*this, Succ(t,m) != t); // don't compile

 For now, one have to write this to compile :

 IntVar T(*this, t, t);
 expr(*this, Succ(t,m) != T);

 Anyway, it's just syntaxic sugar... sorry to bother you with these remarks.

Best,
Philippe





More information about the users mailing list