choco-solver icon indicating copy to clipboard operation
choco-solver copied to clipboard

Deal with large domains in at_most and at_least

Open cprudhom opened this issue 8 years ago • 0 comments
trafficstars

Since at_most and at_least are used to decompose, resp., all_equal and not_all_equal, in IIntConstraintFactory, wouldn't it be nice to avoid computing the union of variables domain when domains are very big (which may occur when using (not_)all_equal) ?

The domain union is used to :

  • to iterate over concerned variables, in PropAtLeastNValues and PropAtMostNValues
  • to have an estimation of the map size required in PropAtLeastNValues_AC

I think these 3 propagators can be duplicated to deal with a range instead of the list of values. That would prevent OutOfMemoryError.

See for instance: ChessboardColoration-40-40.xml.lzma (XCSP3)

cprudhom avatar May 16 '17 08:05 cprudhom