Presentation is loading. Please wait.

Presentation is loading. Please wait.

© J. Christopher Beck 20051 Lecture 19: Timetabling with Operator Constraints.

Similar presentations


Presentation on theme: "© J. Christopher Beck 20051 Lecture 19: Timetabling with Operator Constraints."— Presentation transcript:

1 © J. Christopher Beck 20051 Lecture 19: Timetabling with Operator Constraints

2 © J. Christopher Beck 2005 2 Outline Adding Operator/Tooling Constraints Graph coloring Heuristics – Brelaz Example 9.5.2 Minimizing Timetabling Costs Algorithm 9.5.4 Example 9.5.5

3 © J. Christopher Beck 2005 3 People are Different So far we have been assuming that we have W people that are all equivalent Any set of W j people could do activity j Obviously this isn’t true in many applications E.g., Medical or language specialties

4 © J. Christopher Beck 2005 4 Operator or Tool Constraints The operator has to have specific skills to do the activity Able to speak French, certified accountant A specific tool is needed 1/8” drill bit, refrigerator truck If two activities require the same operator or tool, they cannot be done at the same time

5 © J. Christopher Beck 2005 5 Restricted Problem Assume some set of specific people are needed to do each activity All activities have a duration of 1 Problem is still hard Equivalent to the graph coloring problem Aka “node coloring”, “vertex coloring”

6 © J. Christopher Beck 2005 6 Graph Coloring Color each node such that No two connected nodes have the same color Use the minimum number of colors

7 © J. Christopher Beck 2005 7 Mapping from Graph Coloring to Timetabling Nodes are activities Arcs mean the activities require the same operator Colors are time slots Minimizing the number of colors is minimizing makespan

8 © J. Christopher Beck 2005 8 Constraint Programming for Graph Coloring Remember CP Make heuristic decisions Color a node Propagate Remove that color from the domain of nodes connected to the node you just colored (This level of propagation is called “forward checking”)

9 © J. Christopher Beck 2005 9 CP for GC “Domain”

10 © J. Christopher Beck 2005 10 CP for GC Algorithm Step 0: Propagate Remove the color from all neighbors nodes Color nodes with singleton domains Step 1: Pick a node and color it Step 2: Propagate If a domain is empty, undo last color and assign a different color, goto 2 Else goto 1

11 © J. Christopher Beck 2005 11 Variable and Value Ordering Heuristics How do you pick a node (variable) to color next? Smallest domain first Maximum forward degree How do you pick a color (value) for that node? Randomly Lexicographically Order colors and assign the lowest possible

12 © J. Christopher Beck 2005 12 Brelaz Heuristic Choose node with smallest domain Break ties with maximum forward degree Forward degree: # arcs to uncolored nodes Choose colors lexicographically 3 2 3 2 2

13 © J. Christopher Beck 2005 13 Example 9.5.2 Schedule 7 one-hour meetings in 4 hours Represent as a GC problem and use CP with Brelaz heuristic meeting1234567 Gary1001101 Hamilton1110000 Izak0010110 Reha1011100

14 © J. Christopher Beck 2005 14 Other Examples To Look At Example 9.5.3 OPL project mapgr.prj On ECF and Pinedo CDROM

15 © J. Christopher Beck 2005 15 A More General Problem There is a “slot cost”, c’ jt, if activity j is assigned to slot t There is a “changeover cost”,  (a i,a j ), if a i and a j are scheduled close together E.g.,  (a i,a j ) = 5 * |slot(a i ) – slot(a j )|  (a i,a j ) = 0, if a i and a j don’t conflict Objective is to minimize the sum of all slot and changeover costs See Algorithm 9.5.4!

16 © J. Christopher Beck 2005 16 And Another One: Multilingual Call Centre Assign calls to minimize makespan? Can this be represented as a GC problem? PersonLanguages AlexEnglish, French, German BarbaraGerman, Russian, Korean CharlesSerbo-Croatian, Polish DavidKorean, French, Polish EllenMandarin, Russian, English CallsLanguage 1English 2Korean 3 4French 5Russian 6Polish CallsLanguage 7German 8Russian 9Polish 10Mandarin 11French 12Russian

17 © J. Christopher Beck 2005 17 Modeling is VERY Important Remember back to Lec11 on CP If you have some solution technique (CP, GC, IP, …) an extremely important step is trying to fit your problem to the technique What do the nodes, arcs, colors represent? Is this a useful representation?


Download ppt "© J. Christopher Beck 20051 Lecture 19: Timetabling with Operator Constraints."

Similar presentations


Ads by Google