Hi, I wrote a small program as following: ######################################## :-lib(ic). case5(LD1,LD2,Va):- LD1 = [X1,X2,X3,X4], LD2 = [D1,D2], LD1 :: [0.0.. 20.0], LD2 :: [1.0.. 12.0], Va :: 0.0 .. 5.0, ic:(X1 =:= 0), ic:(X2 =< X1+4), ic:(X2 >= X1+2), ic:(X3 =:= X1+D1), ic:(X4 =:= X2+D2), ic:(D1 =< D2+Va), ic:(D1 >= D2-Va), ic:(X4 =< X3). ################################### I got result: LD1 = [0, X2{2.0 .. 4.0}, X3{3.0 .. 12.0}, X4{3.0 .. 12.0}] LD2 = [X3{3.0 .. 12.0}, D2{1.0 .. 10.0}] Va = Va{0.0 .. 5.0} It seems the result is incorrect (e.g. When Va=0, there exists no solution). I guess it is a problem of global consistency, since there are several constraints with three variables. I have tried using xpress, but it does not help. What should I do if I want global consistency with several constraints? Is there anything I can use if I change the CSP problem to integer domain? Thanks Xiaohua ************************************************************************* Xiaohua Kong __ O_ Off. : (514)398-3937 Microelectronics And // \ 398-3055 Computer System Laboratory // Fax : (514)398-4470 Department of Electrical & O / Computer Engineering ------ Email: kong@macs.ece.mcgill.ca McGill University, Montreal ---- kongkonk@hotmail.com *************************************************************************Received on Mon Aug 04 18:07:11 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:25 PM GMT GMT