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 whatever other class you like.
Shouldn't Different_Point implement Px != Gx OR Py != Gy rather than
AND?
Cheers,
Guido
amina kemmar wrote:
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 and Py != Gy
...
I want to implement the variable PointVar to obtain a model like this:
...
PointVar P;
PointVar G;
Different_Point(*this, P, G, ICL_DOM);
...
This new variable is composed by two IntVar, I don't understand how
to implement it, if you can
give me the first step to do this, or any documentation or
information about the implementation of a new variable?
thank you,
amina.
Vous voulez savoir ce que vous pouvez faire avec le nouveau Windows
Live ? Lancez-vous ! _______________________________________________
Gecode users mailing list
us...@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
_______________________________________________
Gecode users mailing list
us...@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users