Re: [eclipse-clp-users] Time out issue with long integer

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Fri, 12 Dec 2014 15:02:14 +0000
On 12/12/14 03:51, Edgaonkar, Shrirang wrote:
> Dear Joachim,
>
> It would be great if the problem would be fixed. I read your email and
> understood. The large domain is due to the LONG range used in java as I am
> mapping it with variables in java. In few cases, I could be in a situation
> where the no of constraints are very less. The above bug fix will also help
> me in my approach for real numbers. Please see below.

As I mentioned in my earlier reply, you should simply use indomain_split, which 
will give you the expected answer:

?- X :: -9223372036854775808 .. 9223372036854775807,
    X $> 115000000000,
    search([X], 0, input_order, indomain_split, complete, []).
X = 115000000001
Yes (0.00s cpu, solution 1, maybe more)



>
> On a separate note, please look at the following example. I read your posts
> on real numbers and understand the limitation to solve equations if the a
> finite solution is non existant.
>
> To counter the same, I have come up with the following solution.
...
>
> Please let me know your thoughts on this.

It's difficult to make a recommendation without knowing what kind of problem you 
are actually trying to solve.


-- Joachim
Received on Fri Dec 12 2014 - 15:02:23 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET