users-prolog
[Top][All Lists]
Advanced

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

Division in FD solver


From: Xiao-Hua Kong
Subject: Division in FD solver
Date: Thu, 9 Sep 2004 10:19:41 -0400 (EDT)

Hi,

I have a question when I use FD solver.

In following script:

=============================================
req1(LD1,LD2):-
LD1 = [A, B],
LD2 = [L1, L2, L3],
fd_domain(LD1,0,120),
fd_domain(LD2,1,10),
L2 - L1 #= 1,
A #=< L2*6,
B #>= 58 + L3*(31-6*(L1-1))//2, %Implicitly L1 < 7
B #=< A,        
fd_labeling(LD2).
=============================================

L1 > 6 will not be considered because (31-6*(L1-1)) will be a negative
integer when L1 is larger than 6. 
There won't be such a problem if I do not use integer division "//". For
some reason, I have to use division in my project. 

Does any one know how to avoid this problem? Is there any switch, or other
expression I can use?

Thanks
Xiaohua


*************************************************************************
Xiaohua Kong                    __ O_     Off. : (514)398-3937
Ph.D. Candidate                   // \         
Microelectronics And             //                 
Computer System Laboratory     O /        Fax  : (514)636-8029
Dept. of ECE                   ------     Email: address@hidden    
McGill University, Montreal    ----                  
*************************************************************************





reply via email to

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