flatzinc

How to obtain an exact infinite-precision representation of rational numbers via a non-standard FlatZinc extension?

ぃ、小莉子 提交于 2019-12-11 07:19:51
问题 By default mzn2fzn automatically computes the result of a floating point division within a MiniZinc model, and stores it as a constant float value in the resulting FlatZinc model. Example: The file test.mzn var float: x; constraint 1.0 / 1000000000000000000000000000000000.0 <= x; constraint x <= 2.0 / 1000000000000000000000000000000000.0; solve satisfy; translated with mzn2fzn test.mzn becomes equal to var 1e-33..2e-33: x; solve satisfy; What we would like to obtain***, instead, is a FlatZinc