Re: Solving a traditional binary CSP in Eclipse

From: Mark Wallace <mgw_at_icparc.ic.ac.uk>
Date: Thu 01 May 2003 10:26:46 AM GMT
Message-ID: <3EB0F666.4108C666@icparc.ic.ac.uk>
Hi Andre,
Use the library propia.
Your example is programmed below,
	Cheers
		Mark

:- lib(ic).
:- lib(ic_global).
:- lib(propia).

csp_prob(Vars) :-
        Vars = [X,Y,Z], 
        Vars::1..5,
        cons1(X,Y) infers ac,
        cons2(Y,Z) infers ac,
        cons3(Z,X) infers ac,
        labeling(Vars).

cons1(1,1).
cons1(1,2).
cons1(3,1).

cons2(1,3).
cons2(2,3).
cons2(3,3).

cons3(1,1).
cons3(2,2).
cons3(3,1).
cons3(4,4).
cons3(5,5).


-- 
_______________________________________________________________
Dr. Mark Wallace, IC-Parc,		Phone  +44 (0)20 7594 8434 
William Penney Laboratory, 		Fax    +44 (0)20 7594 8432
Imperial College, London SW7 2AZ, UK.	Email: mgw@icparc.ic.ac.uk
Received on Thu May 01 11:27:01 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:23 PM GMT GMT