A question (bug?) on FD solver
"Xiaohua Kong" <[email protected]>
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <003401c2f226$af2f8000$9c2ace84@pais> |
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 _______________________________________________ Bug-prolog mailing list [email protected] http://mail.gnu.org/mailman/listinfo/bug-prolog