From: Wayne Mac Adams <waynemacadams_at_...6...>

Date: Mon, 27 Jul 2009 13:14:23 +0100

Date: Mon, 27 Jul 2009 13:14:23 +0100

It might be a seperate issue but I am getting an unexpected result from the following query also (again assuming ic loaded) ?- [A, B] :: 0.0 .. 0.5, C $= A + B, Cost $= -(C), minimize((locate([A, B, C], 1.0), get_min(Cost, Min)), Min). A = A{0.0 .. 0.5} B = B{0.0 .. 0.5} C = C{0.0 .. 0.5} Cost = Cost{-0.5 .. -0.0} Min = -0.5 There are 2 delayed goals. Yes (0.00s cpu) Surely the maximum for C is 1.0, and there should be a solution with Cost -1.0? Am I simply using minimize wrong, or is there another problem? Wayne On Mon, Jul 27, 2009 at 12:54 PM, Solly Brown <sollyb@...25...>wrote: > 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 - 12:15:12 CEST

*
This archive was generated by hypermail 2.2.0
: Mon Jul 09 2018 - 02:05:29 CEST
*