[eclipse-clp-users] Using sets ... generating two sets

From: Claudio Cesar de Sá <claudio_at_...222...>
Date: Sat, 3 Dec 2011 08:58:42 +0100
Hi

Please ... what is my mistake in this trivial example with sets:

%%:-lib(ic).
%%:-lib(branch_and_bound).
:-lib(fd).
:-lib(fd_sets).

%% data
veloc(1,[61,66,63,69]).
veloc(4,[12,122,18,1,9,7]).

go :-
veloc(1,L1), model(L1),
veloc(4,L4), model(L4).

model(L) :-
length(L,N), writeln( n: N), writeln( l: L),
sort(L, Dominio),
writeln( dom: Dominio),

find_2_others(N, N1, N2),

writeln( n1: N1) ,
writeln( n2: N2) ,
write('xxxxxxxx is it correct this definition?'),
  L1 :: [ ] .. Dominio,
  L2 :: [ ] .. Dominio,
  L3 :: [ ] .. Dominio,

#(L1, N1),
#(L2, N2),
#(L3, N),

union(L1, L2, L3),

label_sets([L1, L2]).

The error is:

undefined arithmetic expression in _472 is [] in module fd_domain


-- 
claudio



    (
    ))
   |""|-.
   |__|-'


**********************************************************************
Skype: claudio_cesar_sa
http://claudiocesar.wordpress.com/about/
***********************************************************************
Received on Sat Dec 03 2011 - 08:26:34 CET

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST