[gecode-users] Constraint Optimization (newbie)

Pieter Thysebaert pieter.thysebaert at intec.ugent.be
Tue Sep 12 16:17:11 CEST 2006


Hello,

I'm new to Gecode but have some experience with ILOG Solver.

As I'm crawling through the reference documentation, and the examples, I
have stumbled across the following problem.
Suppose I want to find the maximal value of X [0..100] such that X < 10,
how do I model this (the maximization objective - the simple constraint
problem has turned up in the mailing list archives)?

I have taken a look (inspired by the n-queens example) at BAB and the
function constrain() added to the problem class, but I have not been
able to let my problem return X = 9 so far - even after fiddling with
the BAB and constrain() function, my problem still returns X = [0..9]
What's the simple (and correct) way of doing this?

Thanks,
Pieter




More information about the gecode-users mailing list