[eclipse-clp-users] Finite solution for real

From: Edgaonkar, Shrirang <Shrirang.Edgaonkar_at_...390...>
Date: Wed, 3 Dec 2014 09:04:17 +0000
Dear clp users,



  I have the following problem with constraints. If the solution is finite like [0.1,0.4], [0.2,0.2],[0.3,0.1] and [0.4,0.1].



:-lib(ic).

top(X):-

  X :: 0 .. 1.0,
  Y :: 0 .. 1.0,
  X + Y $= 0.5,
  locate([X, Y], 0.1),
  writeln([X, Y]).



Then why does the output still come in ranges. Note that the precision is 0.1 in this case.

Output

X = X{0.125 .. 0.1875}
Y = Y{0.3125 .. 0.375}
There is 1 delayed goal.
Yes (0.00s cpu, solution 1, maybe more)





Cheers,

Shrirang Edgaonkar

______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.
Received on Wed Dec 03 2014 - 09:04:29 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET