[gecode-users] Symbolic Constraints - fd_relation contraint in Gecode?

Mikael Zayenz Lagerkvist zayenz at gmail.com
Tue May 26 11:42:18 CEST 2009


On Tue, May 26, 2009 at 11:36 AM, Pedro Salgueiro <pds at di.uevora.pt> wrote:
> On Mon, 2009-05-25 at 16:30 +0200, Mikael Zayenz Lagerkvist wrote:
> Sorry, my bad, didn't noticed that on the documentation... Now I
> understand why it gets really slow, as the domain gets really big.
>
> So, there is no easy way of preventing the translation of this sparse
> domain to a dense domain, even if it is just to make some tests and see
> the behavior of Gecode under those circumstances?

If your domain is big (not just a big width but lots of values) then
extensional constraints always takes a lot of memory. This is due to
the nature of extensional constraints.

If your domain has a large width (difference between minimum and
maximum element) but few elements (say {-1000, 0, +1000}), then the
problem can be solved. You just need to translate your large domain
into a smaller domain (say {0, 1, 2}). The translation can either be
done by reformulating the problem or by channeling to a new variable
using an element constraint.


Cheers,
Mikael

-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/




More information about the gecode-users mailing list