[eclipse-clp-users] Predicate search/6 over Real Numbers

From: Amine Marref <amine.marref_at_...6...>
Date: Sat, 17 Apr 2021 21:37:08 +0100
Hello,

I am trying to use search/6 in my CSP but I am getting an "type error in
get_integer_bounds" error.

This is an example that does not do anything particularly useful:
test:-
    Vars = [V1, V2, V3],
    Vars $:: 0.0..100.0,
    V1 $= 5.5,
    search(Vars, 0, largest, indomain_max, complete, []),
    writeln(V1), writeln(V2), writeln(V3).

If I am not asking for too much, my expectation from running this example
is that I get [V1,V2,V3]=[5.5,100,100]. However, search/6 complains about
integer bounds saying "type error in get_integer_bounds(5.5__5.5, _6844,
_6845)".

My understanding from this page
<https://eclipseclp.org/doc/bips/lib/ic/search-6.html> is that search/6
also works for real values; why is search/6 complaining about integer
bounds?

Cheers.
-- 
marref.org
Received on Sat Apr 17 2021 - 20:37:30 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:21 CEST