Re: [eclipse-clp-users] ECLiPSe - Real variables domain propagation problem

From: Solly Brown <sollyb_at_cse.unsw.edu.au>
Date: Mon, 27 Jul 2009 21:54:02 +1000
Mark Wallace wrote:
> Hi Wayne,
> It's a bit late at night here, but I confess I'm puzzled by the 
> following (inspired by your query):
> ?- [B, C] :: 0.0 .. 1.0, D $= C * (1.0 - B).
> B = B{0.0 .. 1.0}
> C = C{0.0 .. 1.0}
> D = D{-1.0 .. 1.0}
> It seems to me D ought to be constrained to be non-negative.
>     Cheers
>         Mark
Eclipse treats this situation as D $= C - C*B and the allowed bounds of 
these two terms are calculated independently before being combined. So 
the first term has bounds 0 < C < 1 and the second term has bounds 0 < 
C*B < 1. When the second term is subtracted from the first the lowest 
possible bound is 0 - 1 = -1, whilst the upper bound is 1 - 0 = 1.

Cheers, Solly

>>
>> If i had
>> ?- A :: 0.0 .. 0.5, [B, C] :: 0.0 .. 1.0, A $= eval(B + C).
>> A = A{0.0 .. 0.5}
>> B = B{0.0 .. 0.5}
>> C = C{0.0 .. 0.5}
>> There is 1 delayed goal.
>> Yes (0.00s cpu)
>
>
> -- 
> Professor Mark Wallace
> Room 6.43
> Faculty of Information Technology
> Building H
> Monash University
> Caulfield
>
> Tel: 34276
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
>   
Received on Mon Jul 27 2009 - 11:54:19 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET