[gecode-users] Custom constraint to external progam
pds at di.uevora.pt
Thu Nov 13 11:51:21 CET 2008
Ok, I think thats what I want to do.
Is there any examples in Gecode that implement a custom propagator?
On Thu, 2008-11-13 at 11:10 +0100, Mauricio Toro wrote:
> I made something similar once.
> My approach was writting a propagator
> that waits until cvars and cvars
> are assigned. Once they are assigned
> it calls run_something.
> I hope that helps,
> 2008/11/13 Pedro Salgueiro <pds at di.uevora.pt>
> I have been experimenting Gecode for a while, and now I want
> to make
> something wich I don't know if its possible:
> I want to create a new "custom" constraint that allows to
> relate/constraint a variable with a function that receives two
> gecode variables as parameters. This function will be
> completely external to gecode, and evan c++, so, by the the
> function is called the gecode variables that are used on it
> already have some values assigned to it.
> Here's how it would look:
> post(this, cvars < 5)
> post(this, cvars < cvars + 2)
> post(this, new_constraint(cvars, run_something(cvars,
> In this example, we could just assume that the
> "new_constraint" is used
> to make sure that cvars "<"
> Is this possible to do? If so, where should I start?
> Thank you all
> Pedro Salgueiro
> Gecode users mailing list
> users at gecode.org
> Mauricio Toro Bermudez
> Estudiante de Ingeniería de Sistemas
> Pontificia Universidad Javeriana, Colombia
> Stagiare à l'Ircam
> 1, place Igor-Stravinsky 75004 Paris,
> France de 2008 à 2009
More information about the gecode-users