[eclipse-clp-users] Excuse me. I want to ask a question.

From: Chen Tommy <jjvwc688_at_gmail.com>
Date: Wed, 11 Apr 2012 17:13:40 +0800
Hi

   I want to ask a question. That's I want to use ECLiPSe in JAVA(eclipse).

   But when I use the instruction  "rpc(remote predicate call)" in ECLiPSe
that just return "null".

    It's can work in integer number but can't work in real number.Can I ask
why? Thanks for your help.

   If I want to solve the answer in  real number domain as follow



  :- lib(ic), lib(listut).

testTriangleTriangle(Path, OState, Arg, Result, NState) :-
Path > 0,
% Domains
[Sa] :: -127.5 .. 128.5,
[NSa] :: -127.5 .. 128.5,
[Sb] :: -127.5 .. 128.5,
[NSb] :: -127.5 .. 128.5,
[Sc] :: -127.5 .. 128.5,
[NSc] :: -127.5 .. 128.5,
% Constraints
Arg = [Sa, Sb, Sc],
NState = [NSa, NSb, NSc],
triangleTriangle(Path, OState, Arg, Result, NState),
% Solving
locate([Sa],0.01),
locate([NSa],0.01),
locate([Sb],0.01),
locate([NSb],0.01),
locate([Sc],0.01),
locate([NSc],0.01).

triangleTriangle(1, [], [Sa, Sb, Sc], [], [NSideA, NSideB, NSideC]) :-
% Precondition
Sa + Sb $> Sc,
Sb + Sc $> Sa,
Sa + Sc $> Sb,
% Postcondition
NSideA $= Sa,
NSideB $= Sb,
NSideC $= Sc,
% Invariant
NSideA + NSideB $> NSideC,
NSideB + NSideC $> NSideA,
NSideA + NSideC $> NSideB.
Received on Wed Apr 11 2012 - 09:13:52 CEST

This archive was generated by hypermail 2.2.0 : Sat Apr 14 2012 - 06:15:39 CEST