No, the underlaying solver is exactly the same. It only helped me to control the stack size.
Minizinc problem is rather simple in your problem. You define variables of the form var 0..3000: N3_6_fdv_i; %1374 var 0..2800: N3_6_fdv_j; %400 var 0..3000: A1_16_fdv_i; %1500 var 0..2800: A1_16_fdv_j; %1107 ... and then constraints such as constraint O_0_fdv_i = 0; constraint O_0_fdv_j = 0; constraint G1_1_fdv_i = 50; constraint G1_1_fdv_j = 50; constraint A1_0_fdv_i + 0 = G1_0_fdv_i; constraint A1_0_fdv_j + 0 = G1_0_fdv_j; .... Finally the search is defined solve :: int_search([N3_6_fdv_i, N3_6_fdv_j,...
Hi again, I half-manually translated your problem to minizinc and tried it with different search strategies. It is interesting that amximal search depth for InputOrder and IndomainMiddle is 1943 wihile for InputOrder and IndomainMin is 8557. It can explain original stack overflow. You may try to set stack size for Junit, not only for java. Best, /Kris
Hi Peter, Now I understand why you wanted to give me minizinc code ;) Specifically, I do not use Intellij and have problems to use your code. I propose you check the maximal depth of stack, both when search succeded and when it fails. You can get it using DepthFirstSearch method getMaximumDepth(). Using this information you can explore why search overflow happens. In general, your model uses well tested primitive constraints and does not contains and suspected things. Best, /Kris
There is no merhod to generate minizinc from Java JaCoP progrma. I have programmed JaOoP and you can send me Java program ;) Best, /Kris
Yes, please give me a model and I can try to look at it.
Hi Peter, I understand but cannot help much more without your code. You may try to specify smaller intervals for variable domains for domains that are really large... Best, /Kris
Hi! Stack overflow error is probably quite normal. DepthFirstSearch .label is called recursively for two branches x = c and, if failed x != c. If you use IndomainMin and solution is closer to max value the recursion depth can be rather big. In such case selecting a midddle or max value might be better choice, specially for large domains. Question 2 is probably related problem 1. I have no good knowledge on Junit but it can use smaller stack sizes for several threads. You may try to run java threads...