Hi, I am a new user of Eclipse and want to use it for RIA constraint solving. I wrote two programs. One with finte domain and another with IC. But I did not got the same result. What's the problem with my program? #################################################### With FD solver #################################################### :- lib(fd). :- lib(ic). case3_fd(LD1, LD2):- LD1 = [X1,X2,X3,X4], LD2 = [D1,D2], LD1 :: [0 .. 20], LD2 :: [1 .. 12], X1 #= 0, X2 #=< X1+4, X2 #>= X1+2, X3 #= X1+D1, X4 #= X2+D2, D1 #=< D2+1, D1 #>= D2-1, X4 #=< X3+2. ------------------------------- I got the result as I expected ############################################### With IC solver--if I did it right :-) ################################################ :- lib(ic). case3_ic(LD1, LD2):- LD1 = [X1,X2,X3,X4], LD2 = [D1,D2], LD1 :: [0.0 .. 20.0], LD2 :: [1 .. 12.0], ic:(X1 =:= 0), ic:(X2 =< X1+4.0), ic:(X2 >= X1+2), ic:(X3 = X1+D1), ic:(X4 = X2+D2), ic:(D1 =< D2+1), ic:(D1 >= D2-1), ic:(X4 =< X3+2). -------------------------- The result of query was "No" Thanks ************************************************************************* 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 Wed Jul 30 05:00:28 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:25 PM GMT GMT