# Re: [eclipse-clp-users] Question about simple system of equations

From: Thorsten Winterer <thorsten_winterer_at_...126...>
Date: Thu, 17 Nov 2011 13:25:27 +0100
```The constraint library manual states:

"In FD, numeric domains are more or less limited to -10000000..10000000
(this default domain can be modified, but the larger one makes it, the
more likely one is to run into machine integer overflow problems). In IC
there is no limit as such, and bounds on integer variables can be
infinite (though variables should not be assigned infinite values)."

So, if you use lib(fd) in ECLiPSe (and I assume it's similar with the
other SLP systems that you tried), you start with a restricted domain.
In such a case, the constraints have valid bounds that they can reason
about, and thus end up with the solution that you saw.

lib(ic) on the other hand starts with infinite domains. The constraints
won't reason about infinite bounds (since they can't), so they stay
suspended until the bounds change.

If you restrict the bounds of the ic variables to a similar range as
they would have in fd, then ic can give you the solution too:

?- X #:: -10000000 .. 10000000, X + Y #= 12, 2 * X - 3 * Y #= -1.
X = 7
Y = 5
Yes (0.00s cpu)

Cheers,
Thorsten

Am 17.11.2011 13:02, schrieb Sergey Dymchenko:
> OK, but why IC has this limitation?
>
> Sergey.
>
> On Thu, Nov 17, 2011 at 10:57 AM, Alexandre Saidi
> <Alexandre.Saidi@...37...>  wrote:
>> Hi Sergey,
>> I would use clpr in Eclipse :
>>
>> ?- lib(clpr).
>> ...
>> { X + Y = 12, 2*X - 3*Y = -1 }.
>>
>> X = 7.0
>> Y = 5.0
>> Yes (0.00s cpu)
>>
>> Regards.
>>
>> Alex
>> Le 17 nov. 2011 à 05:20, Sergey Dymchenko a écrit :
>>
>>> { X + Y = 12, 2*X - 3*Y = -1 }.
>>   -------------------------------
>> Alexandre Saidi
>> Maitre de Conférences
>> Ecole Centrale de Lyon-Dép. MI
>> LIRIS-CNRS UMR 5205
>> Tél : 0472186530, Fax : 0472186443
>>
>>
>>
>>
>>
>>
>>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
```
Received on Thu Nov 17 2011 - 12:25:35 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST