[eclipse-clp-users] Out of range error

From: Mick Hallward <mick1792_at_...75...>
Date: Thu, 2 Dec 2010 17:00:35 -0800 (PST)
Hi all,

I'm an Eclipse beginner with a simple (I hope :>) question.

With ic loaded, I define a constraint on X such that
X is either in the 20..30 range or in the 100...150
range:

foo(X) :- integers([X]), (X #>= 20 and X #=< 20) or 
                       (X #>= 100 and X #=< 150), labeling([X]).

Now, I would expect a query like foo(A) to result in an
answer like A = 20 or something like that - any value,
really, that respects the constraints of foo. Yet the
query results in the error:

"out of range in indomain(A{-1.0Inf .. 1.0Inf}) when evaluating 
the query foo(A)."

I wonder why that is. All I want is a value for the query
variable A that satisfies the given (disjunctive) constraint.
What is wrong here, and how can I get a satisfying value?
Many thanks in advance for the help...



      
Received on Fri Dec 03 2010 - 01:00:42 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST