[gecode-users] Help to express a constraint

Philippe aqwzsxaqwzsx at orange.fr
Tue Jun 3 21:47:59 CEST 2014


Hi Chirstian,

Yes i definitively need a training/formation (I have asked for) and be sure
that the gecode manual is my bedside book (by the way, i suspect a mistake
in figures 4.5/4.6 pages 72/73, for me, the initial domain of variable x0 is
{1,2} not {1,2,3}).
 
1) Nevertheless, the difference between a integer and a IntVar is pretty
clear for me.
 
2) Page 97 of the manual gives me the answer of the rel vs. expr question:
   IntVar z = expr(home, 3x-4y+2) is strictly equivalent to 
   rel(home, z == 3x-4y+2). Clearly written, clearly understood !

3) The "if (Status(t, m) != 3)" is clearly not a constraint for me ! 
  (since Status(t, m) is an IntArg, it is defined before the search,
  it's more here to say something like "if this input data of the problem
  states that condition, then i have to post a constraint, otherwise, not"
  I'm clearly not trying to post the constraint that Status(t,m) must be
  different than 3 !
  However, i will do as you have suggested because i suspect (but not sure
  since i'm a newbie) that it could help propagation for the problem to 
  solve (?)

4) Do you have any opinion of allowing :
   expr(home, IntVarArray(IntVar, int) op int) 
   expr(home, IntVarArray(int, IntVar) op int) construct be possible ? 
   (op in {+,-}, int = C++ integer)

Thanks again,
Philippe





More information about the users mailing list