Search code examples
constraint-programmingclpfdapproximate

CLPFD for real numbers


CLP(FD) allows user to set the domain for every wannabe-integer variable, so it's able to solve equations.
So far so good.

However you can't do the same in CLP(R) or similar languages (where you can do only simple inferences). And it's not hard to understand why: the fractional part of a number may have an almost infinite region, putted down by an implementation limit. This mean the search space will be too large to make any practical use for a solver which deals with floats like with integers. So it's the user task to write generator in CLP(R) and set constraint guards where needed to get variables instantiated with numbers (if simple inference is not possible).

So my question here: is there any CLP(FD)-like language over reals? I think it could be implemented by use of number rounding, searching and following incremental approximation.


Solution

  • There are at least some major CLP(FD) solvers that support real (decision) variables:

    (The first three also support var float in MiniZinc.)