Gecode / gecode

Generic Constraint Development Environment
https://www.gecode.org
Other
283 stars 76 forks source link

Simple MiniZinc float var model does not produce solution in a reasonable time-frame #164

Open ptal opened 1 year ago

ptal commented 1 year ago

In GeCode 6.3.0 used through MiniZinc IDE, the GeCode solver hangs and crashes after a while for this code:

float: x = 1.1e10;
var float: y;
constraint x > y;

The problem being the exponent syntax with the 'e'. When using GeCode through the python-minizinc binding, I've got the error "minizinc.error.MiniZincError: unexpected token `e'". I works well with other solvers so I don't think it's directly related to MiniZinc.

zayenz commented 1 year ago

The python-minizinc error seems unrelated to Gecode, as Gecode can parse floating point literals in exponent syntax (https://github.com/Gecode/gecode/blob/release/6.3.0/gecode/flatzinc/lexer.lxx#L112). I would recommend raising that as an issue with python-minizinc.

Why this particular model does not solve in a reasonable time-frame with the default float variable search is another issue, and that is less clear. Changing the title to better reflect the Gecode-related issue.