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

From: Amine Marref <amine.marref_at_...6...>
Date: Sat, 17 Apr 2021 22:52:44 +0100
Thank you Matthew,

In the page search/6 <https://eclipseclp.org/doc/bips/lib/ic/search-6.html>,
it says "A generic *search* routine for finite domains or *IC*", then in
the page library(ic)
<https://eclipseclp.org/doc/bips/lib/ic/index.html#desc> it says "The *IC*
(Interval Constraint) library is a *hybrid integer/real* interval
arithmetic constraint solver"; aren't these "ICs" the same? That's what
made me think that search/6
<https://eclipseclp.org/doc/bips/lib/ic/search-6.html> works for reals.

Incidentally, is there a way to control how values are tried in locate/4
<https://eclipseclp.org/doc/bips/lib/ic/locate-4.html>? How would I make
the solver favorise using the largest values from the domain?
Also, when you said locate/4
<https://eclipseclp.org/doc/bips/lib/ic/locate-4.html> and friends, did you
mean locate/3 <https://eclipseclp.org/doc/bips/lib/ic/locate-3.html> and
locate/2 <https://eclipseclp.org/doc/bips/lib/ic/locate-2.html>, or are
there other friends as well?

Cheers.

On Sat, Apr 17, 2021 at 9:54 PM <mskala_at_...206...> wrote:

> On Sat, 17 Apr 2021, Amine Marref wrote:
> > My understanding from this page is that search/6 also works for real
> values;
> > why is search/6 complaining about integer bounds?
>
> I don't think search/6 works for real values.  The page you linked to says
> "It can currently be used with either the finite domains (if loaded via
> lib(fd_search)), integer IC finite domains, and GFD integer finite domains
> (if loaded via lib(gfd_search))."
>
> Reals aren't on that list, and since search/6 depends on indomain/2 -
> which only works on finite domain variables - it's reasonable to guess it
> wouldn't work on reals.  Maybe at the absolute outside you could implement
> your own replacement for indomain/2 and use that as argument 4 of search/6
> to do a search on real-valued variables.  But you may also get better
> results with locate/4 and friends, which are meant to work with reals.
>
> --
> Matthew Skala
> mskala_at_...206...                 People before tribes.
> https://ansuz.sooke.bc.ca/
>


-- 
marref.org
Received on Sat Apr 17 2021 - 21:53:07 CEST

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