Title: A UMLBASED SOLVER TOOL FOR COMBINATORIAL PROBLEMS
1A UML-BASED SOLVER TOOL FOR COMBINATORIAL
PROBLEMS
- Xiaofeng Li
- Department of Computer Science
- University of Regina
- Supervisors Dr. Malek Mouhoub
- Dr. Samira Sadaoui
2Outline
- Introduction
- Background
- Generic CSP Framework
- Generic Temporal CSP Framework
- UML-based (Temporal) CSP Solver Tool
- Conclusion
- Future Work
31. Introduction
- Describing combinatorial problems
- Ambiguity and misinterpretation of natural
language descriptions - Solving combinatorial problems
- Operational research and/or AI solving
techniques - Constraint solvers
-
-
41. Introduction (cont.)
- Operational research and/or AI solving techniques
- Based on AI and Math foundations
- Constraint solvers
- Difficulty of using constraint solvers
- Lack of temporal solving algorithms
51. Introduction (cont.)
- Choosing and extending a formal specification
language (OCL) to describe combinatorial
problems. - Wrapping constraint solvers and solving
techniques behind a friendly GUI (UML-Based
Solver). - Extending constraint solvers with more powerful
algorithms (including temporal techniques).
62. Background
- Description Language
- Object-Constraint Language (OCL)
- A part of UML to describe constraints in
object-oriented systems - Solving techniques
- Constraint Satisfaction Problem (CSP)
- Temporal CSP (TCSP)
-
72. Background (cont.)
CSP Finite variables with discrete values
domains constraints Map Coloring Problem
Variables A,B,C,D,E,F Domain red, blue,
green Constraint AltgtB, AltgtC,
AltgtD, BltgtC, BltgtE,
CltgtD, CltgtE, CltgtF
ltgt
A
D
ltgt
ltgt
ltgt
C
ltgt
F
ltgt
ltgt
E
B
82. Background (cont.)
TCSP Temporal domains (SOPO structure) Allen
logical relations
Get up
Before
Before
or
- Time Scheduling Problem
- Tom has class at 830 a.m. He can either have
a breakfast at home (10 minutes) or buy food at
store (5 minutes). After breakfast he has a rest
(5 minutes). Then he goes to school by bus (at
least 45 minutes). Today, Tom gets up between
705 a.m and 715 a.m. The question is can Tom
arrive at school in time for class?
Breakfast at home
Breakfast at store
Before
Before
Before
Take a bus
Have a rest
93. Generic CSP Framework
- Generic CSP Class Diagram
- OCL Extensions
- CSP Description Template
- Example Map Coloring Problem
103. Generic CSP Framework (cont.)
Generic CSP Class Diagram
113. Generic CSP Framework (cont.)
OCL Extensions
- New Keywords
- CSP
- Variable number
- Constraint number
- Variables including domains and initial values
- Constraints
- Solution types (all solutions, one solution,
best solution)
123. Generic CSP Framework (cont.)
OCL Extensions
- Invariant Expressions
- Variable number, constraint number, solution type
- Variables, domains and initial values
- Constraints
- Pre- and Post-condition Expressions
- Conditions of a constraint
133. Generic CSP Framework (cont.)
CSP Description Template
143. Generic CSP Framework (cont.)
- context CSP inv
- Name Map Coloring Problem"
- VarNum 6 -- 6 vertices
- ConNum 8 -- 8 edges
- TimeLimited 0 -- no time limited
- SolutionType AllSolutions --
all complete solutions - context Vars1 inv
- Name Vertex A
- Domain red, blue, green
- Value red -- color number of vertex A
- .
- context Cons1 inv
- Vars1 ltgt Vars2 -- an edge
between vertices A and B - .
CSP Description with OCL Extensions
154. Generic Temporal CSP Framework
- Generic TCSP Class Diagram
- OCL Extensions
- TCSP Description Template
- Example Time Scheduling Problem
164. Generic Temporal CSP Framework (cont.)
Generic TCSP Class Diagram
174. Generic Temporal CSP Framework (cont.)
OCL Extensions
- New Keywords
- TCSP
- Event number
- Constraint number
- Events with domains and initial values
- Domains described with SOPO structures
- Solution types
184. Generic Temporal CSP Framework (cont.)
Events
TCSP Description Template
194. Generic Temporal CSP Framework (cont.)
- context TCSP inv
- Name Time Scheduling Problem
- EventNum 4 -- event number
- ConNum 3 -- constraint number
- TimeLimited 0 -- no time limited
- SolutionType OneSolution -- a complete
solution - context Events1 inv
- Name get up -- name of event 1
- Duration 10 -- during time
- Step 1
- Domain 0, 10 --
event 1 domain - Value 0, 10 -- initial value of
event 1 - .
- context Cons1 inv
- Events1 P Events2 -- getting up before
breakfast at home - .
TCSP Description with OCL Extensions
205. UML-based (Temporal) CSP Solver Tool
Generic
Note CSP Specification include the information
of the problem and solution rules
215. UML-based (Temporal) CSP Solver Tool (cont.)
Map Coloring Problem
225. UML-based (Temporal) CSP Solver Tool (cont.)
Time Scheduling Problem
236. Conclusion
- A systematic development methodology for CSP/TCSP
descriptions in an object-oriented way. - OCL extensions without depressing simplicity and
usability as a specification language. - A graphical user interface assisting end-users in
describing and solving CSPs/TCSPs.
247. Future Work
- Extending the OCL functions to make descriptions
more conveniently. - Enhancing Constraint Class Libraries with more
temporal solving techniques and algorithms. - Providing a distributed CSPs/TCSPs tool based on
Agent UML.
25Thank You!
26Distributed CSP Techniques
27Distributed CSP Description
- OCL Extensions
- Distributed CSP
- Agent number
- Action number
- Agents and agent weights
- Actions
28Distributed CSP Description Template
--2. Agents context Agents1 inv Name
--Agent1 s name Weight --Agent1 s
Weight VarNum --variable number ConNum
--constraint number --Agents Variables and
Domains context Agents1.Vars1 inv Name
--variable1 s name Domain --variable1 s
domain Value --variable1 s initial
value context Agents1.Vars2 inv
... ... --Constraints context Agents1.Cons1
inv Name --constraint1 s name --logical
formulas of constraint1 context Agents1.Cons2
inv ... ... context Agents2 inv ...
- --1. Distributed CSP and Solution Rules
- context DCP inv
- Name --problem name
- AgentNum --Agent number
- ActionNum --Action Number
- Timeout --time limited
- SolutionType --solution type
--3. Agent actions context Actions1 inv --
action 1 of the problem --equal equation of
action 1 of agent 1 context Actions2 inv --
action 2 of the problem ...
29SOPO Structure for TCSPs
Domain 300, 330, 10, 5. The possible
values of a time point are 300,310, 305,
315, 310, 320, 315, 325 and 320,330.
30Allen Logic Relations for TCSPs
31Bench Mark