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 > [EMAIL PROTECTED] > https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users