Hello, I don't understand why the two following programs don't return the same result... These programs are identical except the predicate #\/ /2 is use in the first and the predicate ;/2 in the second. When I use #\/ /2 , it returns a wrong result (or I don't understand its behaviour). With ;/2 , it returns a good result. Here is the code : :-lib(fd). final(V):- V=[CODE_ACTIVITE, PAYS_RISK, DUREE_R, W1I, ESPECE_PORTF_CTV, TYP_REC_POS,CATEGORIE_CPT], CODE_ACTIVITE::[999,101, 110, 111, 112, 114], PAYS_RISK::[0, 100, 101, 111, 112, 113], DUREE_R::[0..100], W1I::[ '102000E','204102E','204113E', '207000E', '3031127', '3031128', '3031307'], ESPECE_PORTF_CTV::[(-100)..100],TYP_REC_POS::['1','2','3','4','5','6','7'], CATEGORIE_CPT::[150000,150001,150002,150003,150005,150010,150020], labeling(V), not(( ( (W1I#='102000E' ; W1I#='204102E') #/\ (ESPECE_PORTF_CTV#<=0) ) #\/ ( (W1I#='102000E' ; W1I#='204102E') #/\ (ESPECE_PORTF_CTV#>0) #/\ (TYP_REC_POS#='1') ) )),!. ?- final(V). V = [101, 0, 0, '102000E', -100, '1', 150000] Yes (0.00s cpu) --> why ? the first part of the constraint (before #\/ /2) covers this case !? ------------------------------------------------------------------------ :-lib(fd). final(V):- V=[CODE_ACTIVITE, PAYS_RISK, DUREE_R, W1I, ESPECE_PORTF_CTV, TYP_REC_POS, CATEGORIE_CPT], CODE_ACTIVITE::[999,101, 110, 111, 112, 114],PAYS_RISK::[0, 100, 101, 111, 112, 113],DUREE_R::[0..100],W1I::[ '102000E','204102E','204113E', '207000E', '3031127', '3031128', '3031307'],ESPECE_PORTF_CTV::[(-100)..100],TYP_REC_POS::['1','2','3','4','5' ,'6','7'],CATEGORIE_CPT::[150000,150001,150002,150003,150005,150010,150020], labeling(V), not(( ( (W1I#='102000E' ; W1I#='204102E') #/\ (ESPECE_PORTF_CTV#<=0) ) ; ( (W1I#='102000E' ; W1I#='204102E') #/\ (ESPECE_PORTF_CTV#>0) #/\ (TYP_REC_POS#='1') ) )),!. ?- final(V). V = [101, 0, 0, '102000E', 1, '2', 150000] Yes (0.03s cpu) I use ECLiPSe 5.3#40 on Windows NT 4. Thanks very much for your reply. Olivier _________________________________________________________________ Téléchargez MSN Explorer gratuitement à l'adresse http://explorer.msn.fr/intl.aspReceived on Tue Dec 11 09:34:51 2001
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:12 PM GMT GMT