[gecode-users] A new variable composed by two IntVar

2009-09-26 Thread amina kemmar
Hello, To model my problem, I need to use Point(x-coordinate, y-coordinate), I can separate the point in two variables (IntVar), I obtain: ... IntVar Px; IntVar Py; IntVar Gx; IntVar Gy; Different_Point(*this,Px,Py,Gx,Gy, ICL_DOM); // It is a new constraint which post propagator for Px != Gx

Re: [gecode-users] A new variable composed by two IntVar

2009-09-26 Thread Guido Tack
Hi, if you just want to encapsulate two IntVars to make modeling easier, simply implement a wrapper class that forwards the relevant operations (such as update) to the two component variables. There's nothing special about IntVars, they're plain C++ objects and you can put them in whatev

Re: [gecode-users] A new variable composed by two IntVar

2009-09-26 Thread Martin Mann
Hi Amina, why dont you just post a distinct constraint on all variables? will solve your problem (a) more efficient and (b) you wont need to implement a new propagator. always good to go as far as possible with available and tested stuff to reduce coding efforts and errors.. what you can thin