[gecode-users] Help to express a constraint

Christian Schulte cschulte at kth.se
Wed Jun 4 10:10:59 CEST 2014


Hi Philippe,

The figures are correct, of course your choice of initial values would also
work.

As for 4) I am not sure what you mean, can you give some examples?

Cheers
Christian

--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Philippe
Sent: Tuesday, June 03, 2014 9:48 PM
To: users at gecode.org
Subject: Re: [gecode-users] Help to express a constraint

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



_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list