gecode icon indicating copy to clipboard operation
gecode copied to clipboard

nooverlap: zero-sized rectangles overlap contrary to what documentation says

Open yurivict opened this issue 3 years ago • 1 comments

Describe the bug The documentation says about nooverlap:

Note that the width or the height of a rectangle can be zero. In this case, the rectangle does not occupy any space. However no other rectangle is allowed to be placed where the zero-sized rectangle is placed.

However, rectangles from the solution do intersect.

To Reproduce This program: testcase-nooverlap.cpp.txt returns solutions that have all zero coordinates (all rectangles intersect).

Gecode and Platform Configuration Version: 6.3.0 (0916a1a) OS: FreeBSD 13

yurivict avatar Jan 26 '22 07:01 yurivict

Interesting discrepancy. There are apparently no tests with boxes with zero-dimensions, so it is not unexpected that this might be a problem. I also think I know how this might happen, but unsure on how to best handle it.

zayenz avatar Jan 26 '22 08:01 zayenz