[gecode-users] optimising with 'constrain'
Guido Tack
tack at ps.uni-sb.de
Thu Sep 4 18:11:19 CEST 2008
Hi!
Did you instantiate the BAB search engine instead of DFS? DFS will
not call the constrain method. Have a look at golomb-ruler.cc, for
example.
Cheers,
Guido
Andrea Rendl wrote:
> Hello everybody,
>
> I'm trying to minimise a variable in my problem instance by adding the
> following method (as member of my problem class that inherits from
> Example):
>
> void
> constrain(Space* s) {
> rel(this, variable, IRT_LE, static_cast<ProblemModel*>(s)-
> >variable.val());
> }
>
> However, it has no effect: whenever I run the instance it gives me all
> possible solutions, ignoring the minimisation constraint. I compared
> my instance to some of the optimisation problems in the examples/
> directory and could not see any difference. Do you have any idea what
> I could have done wrong? When and where is 'constrain' called? I could
> not find a description in the documentation...
>
> Thanks for your help,
> Andrea
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list