ISE-422- Facility Layout and Location Chapter 5: Layout planning models and design algorithms Part 2 Dr. Nabil Nahas 1 Mathematical Modeling: Multiple floors (8) Two Stage Approach • Stage 1: Solve Q • Stage 2: For each floor solve P How to solve P and Q? • Exact Methods: Branch and bound based methods Cutting plane based methods Combination of branching, bounding and cutting/pricing... • Heuristic Methods: Greedy heuristic methods 62 Meta-heuristics (simulated annealing, genetic algorithms, etc.) Heuristic Methods: Notations Heuristic Methods: Greedy Approach (1) The objective of our greedy heuristic is to find a strict local optimal. We assume that we search all members of the one step neighborhood (all single swap solutions). However, in some scenarios, the size of one step neighborhood will become exponential. In such scenarios, we can restrict the neighborhood size. Heuristic Methods: Greedy Approach (2) Heuristic Methods: Greedy Approach (3) 66 Heuristic Methods: Greedy Approach (4) 67 Heuristic Methods: Greedy Approach (5) 68 Heuristic Methods: Greedy Approach (6) 69 Heuristic Methods: Greedy Approach (7) 70 Heuristic Methods: Greedy Approach (8) 71 Heuristic Methods: Greedy Approach (9) 72 Heuristic Methods: Greedy Approach (10) 73 Heuristic Methods: Greedy Approach (11) 74 Heuristic Methods: Greedy Approach (12) • In the greedy approach's flow chart, all red boxes needs problem specific information. • In the greedy approach's flow chart, all green boxes do NOT need any problem specific information. 75 Heuristic Methods: Greedy Approach (13) 76 Heuristic Methods: Swap mechanism (1) • Swap: exchange or switch. • One of the most simple, basic and oldest idea for a heuristic. • The idea led to the development of huge number of permutation based heuristics. • Simulated annealing is one of the well know meta-heuristic that has been developed upon this idea. 77 Heuristic Methods: Swap mechanism (2) The idea: • Given a solution in a programmable structure, swap the elements within the structure to produce an alternate solution. Difficult or challenging part will be: • to build a good structure that presents complete information of the solution • to develop an efficient swapping mechanism that explores all possible alternatives 78 Heuristic Methods: Swap mechanism (3) Example: Simple Row Layout Problem: To find the best row layout for a given ow matrix. Swap heuristic: Solution Structure: A VECTOR containing four departments, representing the row layout. For example, following structure says department 1 is on the first in the row sequence. The next department to the left of dept 1 is dept 2 (similarly 3 next to 2). Department four is on the end of the row. 79 Heuristic Methods: Swap mechanism (4) • Initial or Current Solution: call it initial solution (if it is the first iteration) or current solution in general. • Neighborhood: Possible swaps from the current solution: 80 Heuristic Methods: Swap mechanism (4) We consider only single swaps for ease of tractability, i.e., following swaps are only permissible from the current solution. Example: We call the SET of ALL such single swap solution vectors as single exchange neighborhood The above current solution has a neighborhood size of 42 =(4x3)/(2x1)=6 81 Heuristic Methods: Swap mechanism (4) Local Best: Any solution (including the current solution) which has the best objective function value in the neighborhood is called as local best. Candidate Solution: A solution from the neighborhood is called as candidate solution, if we will select it as the current solution for the next iteration. 82 Heuristic Methods: Greedy strategy • Start from an initial solution. • Set current solution as initial solution. • Begin iterations • Find the local best from the neighborhood of current solution. • Set candidate solution as local best solution. • If candidate solution is different from current solution • Then set candidate solution as current solution. • Else • Return current solution as local optimal and terminate. • Continue iterations 83 Greedy heuristic: Example (1) Question: Given the following flow matrix among departments 1 to 4, find the best row layout. Assume distance between the adjacent departments is one unit. 84 Greedy heuristic: Example (2) Solution: Iteration 1: Current solution = Initial Solution = [1; 2; 3; 4], Current solution's objective function value = T1;2;3;4 = 10* 1 + 15*2 + 20*3 + 10*1 + 5*2 + 5*1 = 125 85 Greedy heuristic: Example (3) Solution: Iteration 1: Current solution's neighborhood: 1 2 1 3 2 1 4 3 2 4 1 3 3 4 3 4 2 2 1 4 1 4 2 4 Cost at [2; 1; 3; 4], will be T2;1;3;4 = 10x1 + 15x1 + 20x2 + 10x2 + 5x3 + 5x1 = 105 Similarly, we have T2;1;3;4 = 105, T3;2;1;4 = 95, T4;2;3;1 = 120, T1;3;2;4 = 120, T1;4;3;2 = 105, T1;2;4;3 = 125. 2 3 1 3 Local best 86 Greedy heuristic: Example (4) Solution: Iteration 2: Current solution's neighborhood: 3 2 3 1 2 3 4 1 2 4 3 1 1 4 1 Current solution's objective function value = 95 4 2 2 3 4 3 4 2 4 Cost at [4; 2; 1; 3], will be T4;2;1;3 = 10 1 + 15 1 + 20 2 + 10 2 + 5 1 + 5 3 = 105 Similarly, we have T2;3;1;4 = 90, T1;2;3;4 = 125, T4;2;1;3 = 105, T3;1;2;4 = 105, T3;4;1;2 = 105, T3;2;4;1 = 110. 2 1 3 1 Local best 87 Greedy heuristic: Example (5) Solution: Iteration 2: Current solution's neighborhood: 2 1 2 4 1 3 3 2 3 4 3 1 4 2 1 4 3 4 Current solution's objective function value = 90 1 2 2 T1;3;2;4 = 120, T4;3;1;2 = 105, T2;1;3;4 = 105, T2;4;1;3 = 100, T3;2;1;4 = 95, T2;3;4;1 = 105. Local best = [2; 3; 1; 4], same as the current solution. Since greedy approach, we stop here. [2; 3; 1; 4] is a local optimal solution. 2 3 4 1 3 4 1 No 88 improvement Typical Layout • What is the key element in proposing a heuristic? the solution structure • What was the structure that we picked for row layout? a vector • What should be the structure for a typical rectangular layout? not a direct answer, a research topic. But lets discuss some successful approaches 89 Typical Layout: Slicing Structure-Idea (1) 90 Typical Layout: Slicing Structure-Idea (2) 91 Typical Layout: Example (1) 92 Typical Layout: Example (2) 93 Typical Layout: Example (3) 94 Typical Layout: Example (4) 95 Typical Layout: Example (5) 96 Typical Layout: Example (6) 97 Typical Layout: Example (7) 98 Typical Layout: Example (8) 99 Typical Layout: Example (9) 100 Typical Layout: Example (10) Swap – Type 1 101 Typical Layout: Example (11) Swap – Type 1 102 Typical Layout: Example (12) Swap – Type 2 103 Typical Layout: Example (13) Swap – Type 2 104 Typical Layout: Example (14) Swap – Type 2 105 Slicing Structure: Points to Remember • Total number of columns in the matrix form is (2m-1), where m is the total number of departments. • The number of internal nodes is m - 1. • The first column should be an internal node. • The last two columns should be an external nodes. • The number of zeroes in the bottom row before any given column is greater than or equal to the number of 1's before the given column. 106 Slicing Structure: Example (1) Is the following slicing structure valid? If yes, then find the corresponding layout. Solution: Verification: Rule1: The number of columns is odd, equal to 13 (m=7). Rule2: The number of internal nodes is 6. Rule3: The first column is an internal node. Rule4: The last two columns are external nodes. 107 Slicing Structure: Example (2) Is the following slicing structure valid? If yes, then find the corresponding layout. Solution: Rule5: The total number of zeros and ones before 108 Slicing Structure: Example (3) 109 Slicing Structure: Example (4) 110 Slicing Structure: Example (5) 111 Slicing Structure: Example (6) 112 Slicing Structure: Example (7) 113 Slicing Structure: Example (8) 114 Slicing Structure: Example (9) 115 Slicing Structure: Example (10) 116 Slicing Structure: Example (11) 117 Slicing Structure: Example (12) 118 Slicing Structure: Example (13) 119 Typical Layout: MULTIPLE Structure-Idea • Divide the given area Into small squares. • The smaller the square area, the good the solution will be. • Let us assume that each small square has an area of 1 sq units. 121 MULTIPLE: Space Filling Curves (SFC) • SFCs are used to reconstruct a new layout when any two departments are exchanged. • Consider the SFC below which is known as the Hilbert curve. 122 MULTIPLE: Space Filling Curves (SFC) (2) • The curve connects each grid such that a “dot” traveling along the curve will always visit a grid that is adjacent to its current grid • Each grid is visited exactly once 123 MULTIPLE: Example (1) • Suppose that the layout vector is given by 1-2-3-45-6. • Start from grid 1 and assign the first 16 grids (along the SFC) to department 1 124 MULTIPLE: Example (2) 1 2 3 4 5 6 125 MULTIPLE: Example (3) 1 2 3 4 5 6 126 MULTIPLE: Example (4) 1 2 3 4 5 6 127 MULTIPLE: Example (5) 1 2 3 4 5 6 128 MULTIPLE: Example (6) 1 2 3 4 5 6 129 MULTIPLE: Example (7) 1 2 3 4 5 6 130 MULTIPLE: Example (8) 1 2 3 4 5 6 131 MULTIPLE: Example (9) 1 2 3 4 5 6 132 MULTIPLE Structure: Points to Remember (1) • (SFCs) can be selected from standard curves, or can be hand drawn. • Hilbert Curves are the common SFCs, and can be easily drawn for any nxn grid, for n a power of 2. • Typically, the solutions obtained from MULTIPLE algorithm need to be “massaged” to smooth the department borders. 133 MULTIPLE Structure: Points to Remember (2) 134 MULTIPLE Structure: Points to Remember (3) Alternative Layouts - Type 1: Swap departments for a given SFC. - Type 2: Change SFC to get new shapes for the department. - Typical approach: • Develop more than one SFC • For each SFC, find a good heuristic solution. • Pick the best, from among the different SFCs' good solutions, as the final best layout. 135 MULTIPLE Structure: Points to Remember (4) Multiple Floors Example: Say 1-2-3 are to be placed in floor 1, 4-5-6 are to be placed on floor 2, and 7-8-9 are to be placed on floor 3. A practical way to represent the above multi-floor layout is: 1-2-3-|-4-5-6-|-7-8-9 where | indicates change of floor. 136 MULTIPLE Structure: Points to Remember (5) Multiple Floors 1-2-3-|-4-5-6-|-7-8-9 Possible swaps: Reassignment between the floors 1-2-|-3-4-5-6-|-7-8-9 rearrangement within a floor 1-3-2-|-4-5-6-|-7-8-9 137