bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A question (bug?) on FD solver


From: Daniel Diaz
Subject: Re: A question (bug?) on FD solver
Date: Tue, 25 Mar 2003 10:55:32 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

See answer I post in users-prolog

Xiaohua Kong wrote:
Hi,
I am using FD solver to work on some verification problem that is modeled as CSP problem. Since most constraints are linear, I choose partial consistency operators in FD solver.
Here is a small example:
========================
ieq(LD1,LD2,Va):-
LD1 = [X1,X2,X3,X4],
LD2 = [D1,D2],
fd_domain(LD1,0,20),
fd_domain(LD2,1,12),
Va #=<5,
Va #>=0,
X1 #= 0,
X2 #=< X1+4,
X2 #>= X1+2,
X3 #= X1+D1,
X4 #= X2+D2,
D1 #=< D2+Va,
D1 #>= D2-Va,
X4 #=< X3.
===========================
By asking ieq(LD1,LD2,Va).
The solver gives answer:
LD1 = [0,_#25(2..4),_#47(3..12),_#69(3..12)]
LD2 = [_#91(3..12),_#113(1..10)]
Va = _#134(0..5)
However, there is no assignment exsits if Va=0.
Actually, labeling Va will return give answer that Va could b [2,5].
==============================================
Several questions on this penominon: - Is there any problem with the code? Or it is a problem that caused by the algrithm. - Without labeling, if the solver gives answer "yes" and return a domain, does that means there exist at least one solution? (Even though the answer of the variable domains is not accurate).
- The computation cost of labeling.
Thanks
Xiaohua Kong

--
Ce message a subi une analyse antivirus par MailScanner <http://www.mailscanner.info/> ;
il est vraisemblablement sans danger.


------------------------------------------------------------------------

_______________________________________________
Bug-prolog mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-prolog



--
Ce message a subi une analyse antivirus par MailScanner ; il est vraisemblablement
sans danger.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]