size limit on table constraints?

9 views
Skip to first unread message

Helmut Simonis

unread,
Jun 12, 2025, 5:49:52 AMJun 12
to choco-solver
Hi,
a possibly extreme edge case, perhaps, with Choco-solver 4.10.18, on a Windows 11 machine.
I'm trying to create a rather large table constraint (2.2 million tuples) on two variables (domain size 350k), I get a run-time error 

Caused by: java.lang.NegativeArraySizeException: nbits < 0: -1998360959
at java.base/java.util.BitSet.<init>(BitSet.java:162)
at org.chocosolver.solver.constraints.extension.binary.CouplesTable.<init>(CouplesTable.java:39)
at org.chocosolver.solver.constraints.extension.binary.PropBinFC.<init>(PropBinFC.java:31)
at org.chocosolver.solver.constraints.IIntConstraintFactory.table(IIntConstraintFactory.java:438)
...

The program running with a smaller problem instance works correctly. 
The error seems to be independent of the table method used, it occurs even for "FC".

Is there a size limit for tables? I could not find any mention.

The full-size program works with variants for CPO, Chuffed, CP-Sat and Jacop. I did not want to use version 5.xx of choco solver, due to the large domain size.

Best

Helmut
Reply all
Reply to author
Forward
0 new messages