[gecode-users] optimising with 'constrain'

Andrea Rendl andrea.rendl at gmail.com
Thu Sep 4 17:36:55 CEST 2008


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




More information about the gecode-users mailing list