Source: http://web.auth.gr/chi/uploads/seminars/VlahavasSakellariouCLPApplications.ppt Intelligent Industrial Applications  Using Constraint Logic Programming  
 

Constraint Logic Programming 
Applications 

Mr. I. Sakellariou

Intelligent Systems & Knowledge Processing Group (ISKP)

http://iskp.csd.auth.gr

Department of Informatics, Aristotle University of Thessaloniki, Greece.

 
 

ISKP Group - CLP Applications 2005  

2  

Outline 

 
 

ISKP Group - CLP Applications 2005  

3  

CLP Applications 

 
 

ISKP Group - CLP Applications 2005  

4  

Some Examples of Real World CLP Applications (1/3) 

 
 

ISKP Group - CLP Applications 2005  

5  

Some Examples of Real World CLP Applications (2/3) 

 
 

ISKP Group - CLP Applications 2005  

6  

Some Examples of Real World CLP Applications (3/3) 

 
 

CLP Applications in ISKP group

 
 

ISKP Group - CLP Applications 2005  

8  

Research in ISKP group 

(Distributed Filtering Algorithm) 

Distributed Singleton Consistency 

(DCSP Application) 
 

DIWOMS (Distributed Workforce Management System)  

(Distributed CPL Platform) 

CSPCONS 

(CSP Application) 

University Exam Scheduling

 
 

ISKP Group - CLP Applications 2005  

9  

University Exam Scheduling Application

 
 

ISKP Group - CLP Applications 2005  

10  

Exam Scheduling 

 
 

ISKP Group - CLP Applications 2005  

11  

Exam Scheduling Problem: 
Resources & Data 

 
 

ISKP Group - CLP Applications 2005  

12  

Exam Scheduling Problem: 
Constraints 

 
 

ISKP Group - CLP Applications 2005  

13  

Modeling 

 
 

ISKP Group - CLP Applications 2005  

14  

ECLiPSe-JAVA Implementation 

 
 

ISKP Group - CLP Applications 2005  

15  

Entering Information about Classrooms (Exam Halls)

 
 

ISKP Group - CLP Applications 2005  

16  

Schedule

 
 

ISKP Group - CLP Applications 2005  

17  

Distributed Constraint Logic Programming

 
 

ISKP Group - CLP Applications 2005  

18  

Distributed CLP (Our Current Research) 

 
 

ISKP Group - CLP Applications 2005  

19  

Building DCSP Applications 

 
 

ISKP Group - CLP Applications 2005  

20  

A Platform for DCLP Applications: CSPCONS

 
 

ISKP Group - CLP Applications 2005  

21  

CSPCONS (1/3) 

 
 

ISKP Group - CLP Applications 2005  

22  

CSPCONS (2/3) 

 
 

ISKP Group - CLP Applications 2005  

23  

CSPCONS Processes 

 
 

ISKP Group - CLP Applications 2005  

24  

CSPCONS Application 

Process A 

channel 

Process B 

Process C 

Process D 

channel 

channel

 
 

ISKP Group - CLP Applications 2005  

25  

TCP/IP Mechanism Notions 

 

connection 

port 

Process A 

Process B 

CSP Application 

CSP Application 

outgoing_channel 

incoming_channel

 
 

ISKP Group - CLP Applications 2005  

26  

Constraints in CSPCONS 

 
 

ISKP Group - CLP Applications 2005  

27  

CSPCONS Constraints Schema 

 

(Up to 4 Solver Libraries) 

CSP

Process

(core) 

Constraint

Library

(solver) 

Constraint

Library

(solver)

 
 

ISKP Group - CLP Applications 2005  

28  

Current Status and Future Work 

 
 

ISKP Group - CLP Applications 2005  

29  

Distributed Workforce Management (DIWOMS)

 
 

ISKP Group - CLP Applications 2005  

30  

Distributed Workforce Management System (DIWOMS) (1/2) 

 
 

ISKP Group - CLP Applications 2005  

31  

The BT Problem 

Spatial visualization of Jobs, Bases and Personnel

 
 

ISKP Group - CLP Applications 2005  

32  

A Three Phase Solving Approach 

 
 

ISKP Group - CLP Applications 2005  

33  

Implementation 

 
 
 

ISKP Group - CLP Applications 2005  

34  

Results 

 

21.948 

24.912 

Total Cost 

67(63+4+0) 

63 

Active Techs 

190(165+23+2) 

165 

Scheduled Jobs 

Final Solution 

First Solution

 
 

ISKP Group - CLP Applications 2005  

35  

Final Solution (technician tours) and Clusters (generated during the first phase) visualized over the problem area

 
 

Distributed Singleton Consistency (DSAC)

 
 

ISKP Group - CLP Applications 2005  

37  

Singleton Arc Consistency 

 
 

ISKP Group - CLP Applications 2005  

38  

Distributed Singleton Arc Consistency 

 
 

ISKP Group - CLP Applications 2005  

39  

Χ1,Χ2,Χ3,X4,Χ5,Χ6,X7,X8,X9 
 

Χ1,Χ2,Χ3,X4,Χ5,Χ6,X7,X8,X9 
 

Χ1,Χ2,Χ3,X4,Χ5,Χ6,X7,X8,X9 
 

DSAC Agents 

Scheduler 

Responsibility Set  

Value Removal Messages 

Termination Control Messages

 
 

ISKP Group - CLP Applications 2005  

40  

Impementing DSAC 

 
 

ISKP Group - CLP Applications 2005  

41  

SpeedUp

 
 

ISKP Group - CLP Applications 2005  

42  

Implementation in CSPCONS 

 
 

ISKP Group - CLP Applications 2005  

43  

Experimental Results: Golomb Rulers

 
 

ISKP Group - CLP Applications 2005  

44  

Experimental Results: Latin Squares

 
 

ISKP Group - CLP Applications 2005  

45  

Conclusions and Future Work 

 
 

Protein Structure Prediction in CLP 

A Recent Approach

 
 

ISKP Group - CLP Applications 2005  

47  

Recent Approach to Protein Folding 

 
 

ISKP Group - CLP Applications 2005  

48  

Proteins 

 
 

ISKP Group - CLP Applications 2005  

49  

Protein Structure 

 
 

ISKP Group - CLP Applications 2005  

50  

Optimization Problem 

 
 

ISKP Group - CLP Applications 2005  

51  

Potentials Matrix (part) 

... 

... 

... 

... 

... 

... 

... 

... 

... 

... 

-2.222 

-2.447 

-2.501 

-2.647 

-2.491 

-2.208 

-2.343 

LEU 

... 

-2.303 

-2.568 

-2.647 

-2.691 

-2.530 

-2.286 

-2.410 

LE 

... 

-2.286 

-2.391 

-2.491 

-2.530 

-2.467 

-2.304 

-2.424 

PHE 

... 

-2.090 

-2.079 

-2.208 

-2.286 

-2.304 

-1.901 

-2.240 

MET 

... 

-2.080 

-2.258 

-2.343 

-2.410 

-2.424 

-2.240 

-3.477 

CYS 

... 

TRP 

VAL 

LEU 

ILE 

PHE 

MET 

CYS

 
 

ISKP Group - CLP Applications 2005  

52  

Problem Description-Constraints 

 
 

ISKP Group - CLP Applications 2005  

53  

Problem Description-Energy Function 

 
 

ISKP Group - CLP Applications 2005  

54  

Modeling Space-Lattice Model 

 
 

ISKP Group - CLP Applications 2005  

55  

Closer Look to the FCC model 

Side Size 2 

Distance 2 (Lattice Unit) 

Positions

 
 

ISKP Group - CLP Applications 2005  

56  

Constraints 

|xi-xi+1| {0,1}, |yi-yi+1| {0,1}, |zi-zi+1| {0,1}

|xi-xi+1| + |yi-yi+1| + |zi-zi+1| = 2

(xi-xj)2 + (yi-yj)2 + (zi-zj)2 > 2 

 
 

ISKP Group - CLP Applications 2005  

57  

Constraints 

 
 

ISKP Group - CLP Applications 2005  

58  

Example of Modeling A Constraint in CLP(FD) (1/2) 

 
 

ISKP Group - CLP Applications 2005  

59  

Example of Modeling A Constraint in CLP(FD) 

non_next(X1,Y1,Z1,X2,Y2,Z2):- 

  Dx #= (X1-X2) * (X1-X2),

  Dy #= (Y1-Y2) * (Y1-Y2),

  Dz #= (Z1-Z2) * (Z1-Z2),

  sum([Dx,Dy,Dz], #>, 2).  

 
 

ISKP Group - CLP Applications 2005  

60  

SS Bond Constraints 

ssbond([X1,Y1,Z1],[X2,Y2,Z2]):-

    Dx #= abs(X1-X2),

    Dy #= abs(Y1-Y2),

    Dz #= abs(Z1-Z2),

    Dx #=< 4,

    Dy #=< 4,

    Dz #=< 4.

 
 

ISKP Group - CLP Applications 2005  

61  

Energy Function 

      ...

    El in {0,Pot},

    DX #= abs(X1 - X2),

    DY #= abs(Y1 - Y2),

    DZ #= abs(Z1 - Z2),

    2 #= DX + DY + DZ #<=> El #= Pot. 

 
 

ISKP Group - CLP Applications 2005  

62  

Search 

 
 

ISKP Group - CLP Applications 2005  

63  

Results 

Future Directions

 
 

ISKP Group - CLP Applications 2005  

64  

Protein Prediction Structure in CSPCONS 

 
 

ISKP Group - CLP Applications 2005  

65  

References 

 
 

Constraint Logic Programming 
Applications 
 

Thanks.