Presentation is loading. Please wait.

Presentation is loading. Please wait.

© J. Christopher Beck 20081 Lecture 17: Tabu Search.

Similar presentations


Presentation on theme: "© J. Christopher Beck 20081 Lecture 17: Tabu Search."— Presentation transcript:

1 © J. Christopher Beck Lecture 17: Tabu Search

2 © J. Christopher Beck Outline Review: Local Search & Crystal Maze Tabu Search Tabu & 1-machine JSP Example C.5.4 Tabu & JSP N1 neighborhood

3 © J. Christopher Beck Readings P Ch C.5

4 © J. Christopher Beck Core Ideas of Local Search Start with some (random?) assignment of variables Look in “neighborhood” formed by making a small change to the assignment Choose best neighbor Repeat

5 © J. Christopher Beck Crystal Maze Place the numbers 1 through 8 in the nodes such that: Each number appears exactly once ? ? ? ? ? ? ?? –No connected nodes have consecutive numbers

6 © J. Christopher Beck Random Initial Solution ? ? ? ? ? ? ??

7 © J. Christopher Beck Random Initial Solution ? ? ? ? ? ? ?? “Broken” constraint Cost = # of broken constraints

8 © J. Christopher Beck What Should We Do Now? Move: Swap two numbers Which two numbers? Randomly pick a pair The pair that will lead to the biggest decrease in cost Cost: number of broken constraints

9 © J. Christopher Beck What Should We Do Now? Move: Swap two numbers Which two numbers? Randomly pick a pair The pair that will lead to the biggest decrease in cost Cost: number of broken constraints

10 © J. Christopher Beck Random Initial Solution ? ? ? ? ? ? ??

11 © J. Christopher Beck Cost Difference Table

12 © J. Christopher Beck Cost Difference Table

13 © J. Christopher Beck Current State ? ? ? ? ? ? ??

14 © J. Christopher Beck Swap 1 & 7: Cost 3 ? ? ? ? ? ? ??

15 © J. Christopher Beck New Cost Difference Table

16 © J. Christopher Beck Current State ? ? ? ? ? ? ??

17 © J. Christopher Beck Swap 3 & 8: Cost 2 ? ? ? ? ? ? ??

18 © J. Christopher Beck Swap 6 & 7: Cost 1 ? ? ? ? ? ? ??

19 © J. Christopher Beck Moves Initial State: Cost 6 Swap 1 & 7: Cost 3 Swap 3 & 8: Cost 2 Swap 6 & 7: Cost 1

20 © J. Christopher Beck Cost Difference Table

21 © J. Christopher Beck Now what? There are no improving moves to make! So far, we have been “hill- climbing” moves cost

22 © J. Christopher Beck Tabu Search Idea Local search but: Keep a small list of the moves that are “tabu”: you can’t (un)do them List has a limited length and the oldest entries “fall off” when the list is full

23 © J. Christopher Beck Tabu Search Start with some (maybe random) initial state Look at the moves in the “neighborhood” and take the best one Remember the last k moves (“tabu list”) so you don’t undo them

24 © J. Christopher Beck Tabu Search & 1-Machine Example C.5.4, min  w j T j Tabu List Size = 2 Jobs1234 pjpj djdj wjwj J j, p j, d j, w j J1, 10, 4, 14

25 © J. Christopher Beck TS Step 1: Find Initial Solution Arbitrarily choose (2, 1, 4, 3) J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, J j, p j, d j, w j

26 © J. Christopher Beck TS Step 2: Evaluate Neighborhood & Select Move Neighborhood: swap Adjacent pairwise interchange J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 480 J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12  wjTj = 436 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 652 Choose (1,4)

27 © J. Christopher Beck TS Step 3: Add Move to Tabu List J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12  wjTj = 436 Tabu: ((1, 4)) Best so far: (2, 4, 1, 3): 436

28 © J. Christopher Beck TS Step 2: Evaluate Neighborhood & Select Move J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 460 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12  wjTj = 500 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 608 Choose (4,2) J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12  wjTj = 436 Tabu: ((1, 4))

29 © J. Christopher Beck TS Step 3: Add Move to Tabu List Tabu: ((2,4) (1, 4)) J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 460 Best so far: (2, 4, 1, 3): 436

30 © J. Christopher Beck TS Step 2: Evaluate Neighborhood & Select Move J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 436 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12  wjTj = 440 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 632 Choose (1,2) Tabu: ((2,4) (1, 4)) J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 460

31 © J. Christopher Beck TS Step 3: Add Move to Tabu List Tabu: ((1,2), (2,4)) J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 440 Best so far: (2, 4, 1, 3): 436

32 © J. Christopher Beck TS Step 2: Evaluate Neighborhood & Select Move J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 460 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12  wjTj = 408 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 586 Choose (1,4) Tabu: ((1,2), (2,4)) J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 J4, 4, 12, 12  wjTj = 440

33 © J. Christopher Beck TS Step 3: Add Move to Tabu List Tabu: ((1,4), (1,2))  wjTj = 408 Best so far: (1,4,2,3): 408 J4, 4, 12, 12 J3, 13, 1, 1J1, 10, 4, 14J2, 10, 2, 12 And so on until a bound on the number of iterations (actually 408 is optimal, but TS has no way of knowing)

34 © J. Christopher Beck Tabu Search Framework Find initial solution (something quick) Until N moves are done Evaluate neighborhood Choose best non-tabu neighbor Update tabu list Return best solution found

35 © J. Christopher Beck Tabu Search Framework To completely define a TS algorithm, you must define How the initial solution is found Format and length of tabu list How to generate a neighborhood from a given state

36 © J. Christopher Beck TS & JSP J0 J1 J2 J0 J1 J2

37 © J. Christopher Beck TS & JSP How might you find a first solution? What could your tabu list format be? Can you define a neighborhood?

38 © J. Christopher Beck The N1 Neighborhood for JSP J0 J1 J2

39 © J. Christopher Beck The N1 Neighborhood for JSP J0 J1 J2 Pick a critical path Neighborhood: all swaps on the chosen CP

40 © J. Christopher Beck Tabu Example JSP Run Tabu on JSP from previous lectures JobsProcessing times 0 J0R0[15]  J0R1[50]  J0R2[60] 1 J1R1[50]  J1R0[50]  J1R2[15] 2 J2R0[30]  J2R1[15]  J2R2[20]


Download ppt "© J. Christopher Beck 20081 Lecture 17: Tabu Search."

Similar presentations


Ads by Google