The Quadratic Assignment Problem QAP n common mathematical
The Quadratic Assignment Problem (QAP) n common mathematical formulation for intra-company location problems n cost of an assignment is determined by the distances and the material flows between all given entities each assignment decision has direct impact on the decision referring to all other objects n (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 1
The Quadratic Assignment Problem (QAP) n Activity relationship charts: graphical method for representing the desirability of locating pairs of machines/operations near to each other ¨ common letter codes for classification of “closeness” ratings: ¨ n A n E n I Absolutely necessary. Because two machines/operations use the same equipment or facilities, they must be located near each other. Especially important. The facilities may for example require the same personnel or records. Important. The activities may be located in sequence in the normal work flow. Nahmias, S. : Production and Operations Analysis, 4 th ed. , Mc. Graw-Hill, 2000, Chapter 10 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 2
The Quadratic Assignment Problem (QAP) ¨ common letter codes for classification of “closeness” ratings: n O n U n X Ordinary importance. It would be convenient to have the facilities near each other, but it is not essential. Unimportant. It does not matter whether the facilities are located near each other or not. Undesirable. Locating a welding department near one that uses flammable liquids would be an example of this category. In the original conception of the QAP a number giving the reason for each closeness rating is needed as well. ¨ In case of closeness rating “X” a negative value would be used to indicate the undesirability of closeness for the according machines/operations. ¨ Nahmias, S. : Production and Operations Analysis, 4 th ed. , Mc. Graw-Hill, 2000, Chapter 10 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 3
The Quadratic Assignment Problem (QAP) ¨ Example: Met Me, Inc. , is a franchised chain of fast-food hamburger restaurants. A new restaurant is being located in a growing suburban community near Reston, Virginia. Each restaurant has the following departments: 1. Cooking burgers 2. Cooking fries 3. Packing and storing burgers 4. Drink dispensers 5. Counter servers 6. Drive-up server Nahmias, S. : Production and Operations Analysis, 4 th ed. , Mc. Graw-Hill, 2000, Chapter 10 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 4
The Quadratic Assignment Problem (QAP) Activity relationship diagram for the example problem: Nahmias, S. : Production and Operations Analysis, 4 th ed. , Mc. Graw-Hill, 2000, Chapter 10 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 5
The Quadratic Assignment Problem (QAP) n Mathematical formulation: ¨ ¨ ¨ we need both distances between the locations and material flow between organizational entities (OE), all of them are of same size and can therefore be interchanged with each other n locations, each of which can be provided withe each of the OE (exactly 1) thi. . . transp. intensity, i. e. material flow between OE h and OE i djk. . . distance between j and location k (not implicitly symmetric) Transportation costs are proportional to transported amount and distance. (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 6
The Quadratic Assignment Problem (QAP) n If OE h is assigned to location j and OE i to location k the transportation cost per unit transported from OE h to OE i is determined by djk ¨ we determine the total transportation cost by multiplying djk with the material flow between OE h zu OE i which is thi ¨ . . . h thi. . i . . . OE Cost = thi djk . . . j (c) Prof. Richard F. Hartl djk. . k . . . Layout and Design locations Kapitel 4 / 7
The Quadratic Assignment Problem (QAP) Similar to the LAP: binary decision variables If OE h location j (xhj = 1) and OE i location k (xik = 1). . . h xhj = 1. . . thi. . i xik = 1 djk. j . . . k . . . OE Cost = thi djk locations Transportation cost per unit transported from OE h to OE i : Total transportation cost: (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 8
The Quadratic Assignment Problem (QAP) Objective: Minimize the total transportation costs between all OE Quadratic function QAP Constraints Similar to LAP!!! für h = 1, . . . , n . . . each OE h assigned to exactly 1 location j für j = 1, . . . , n . . . each location j is provided with exactly 1 OE h = 0 or 1 (c) Prof. Richard F. Hartl . . . binary decision variable Layout and Design Kapitel 4 / 9
The Quadratic Assignment Problem (QAP) n Example: Calculate cost for 3 OE (1 , 2 , 3) and 3 locations (A, B, C) Distances between locations djk Material flow thi A B C 1 possible solution: 1 A, 2 B, 3 C, i. e. x 1 A = 1, x 2 B = 1, x 3 C = 1, all other xij = 0 All constraints are fulfilled. Total transportation cost: 0*0 + 1*1 + 2*1 + 1*2 + 0*0 + 1*2 + 3*3 + 1*1 + 0*0 = 17 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 10
The Quadratic Assignment Problem (QAP) This solution is not optimal since OE 1 and 3 (which have a high degree of material flow) are assigned to locations A and C (which have the highest distance between them). A better solution would be. : 1 C, 2 A and 3 B, i. e. x 1 C = 1, x 2 A = 1, x 3 B = 1. with total transportation cost: 0*0 + 3*1 + 1*1 + 2*2 + 0*0 + 2*1 + 1*3 + 1*1 + 0*0 = 14 Distances Material flow 2 A 3 B 1 C (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 11
The Quadratic Assignment Problem (QAP) We resorted the matrix such that row and columns appear the following sequence 1 C, 2 A and 3 B, i. e C, A, B (it is advisable to perform the resorting in 2 steps: first rows than columns or the other way round) (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 12
The Quadratic Assignment Problem (QAP) Starting heuristics: n refer to the combination of one of the following possibilities to select an OE and a location. n the core is defined by the already chosen OE n After each iteration another OE is added to the core due to one of the following priorities (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 13
1. Selection of (non-assigned) OE A 1 A 2 A 3 A 4 those having the maximum sum of material flow to all (other) OE a) those having the maximum material flow to the lastassigned OE b) those having the maximum material flow to an assigned OE those having the maximum material flow to all assigned OE (core) random choice (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 14
1. Selection of (non-assigned) locations B 1 B 2 B 3 B 4 those having the minimum total distance to all other locations those being neighbouring to the last-chosen location a) those leading to the minimum sum of transportation cost to the core b) like a) but furthermore we try to exchange the location with neighboured OE c) a location (empty or allocated) such that the sum of transportation costs within the new core is minimized (in case an allocated location is selected, the displaced OE is assigned to an empty location) random choice (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 15
Example Combination of A 1 and B 1: n Arrange all OE according to decreasing sum of material flow n Arrange all locations according to increasing distance to all other locations A B C D E F G H I n Manhatten-distance between locations. (matrix is symmetric -> consideration of the matrix triangle is sufficient) (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 16
Example – Sum of material flow between 1 5 and 5 1 Material flow OE 1 2 3 4 5 6 7 8 9 1 - - - - 3 2 - 3 1 2 - 4 - - 10 3 - 3 5 2 - 3 4 20 4 - - - 1 - - 5 5 - 2 2 1 - 15 6 - - 4 7 - - - 7 8 - - 4 9 - 4 Sequence of OE (according to decreasing material flow): 3, 5, 2, 7, 4, 6, 8, 9, 1 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 17
Example - Distances L A B C D E F G H I A - 1 2 3 2 3 4 18 B - 1 2 3 2 3 15 C - 3 2 1 4 3 2 18 D - 1 2 3 15 E - 1 2 12 F - 3 2 1 15 G - 1 2 18 H - 1 15 I - 18 Sequence of locations (according to increasing distances): E, B, D, F, H, A, C, G, I (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 18
Example - Assignment n Sequence of OE: 3, 5, 2, 7, 4, 6, 8, 9, 1 n Sequence of locations: E, B, D, F, H, A, C, G, I n Assignment: OE 1 2 3 4 5 6 7 8 9 Loc. I D E H B A F C G (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 19
Example – Total costs OE 1 2 3 4 5 6 7 8 9 1 - - 3*3 - - 2 - 2*2 - 4*2 - - 3*1 5*1 2*2 - 3*2 4 - - - 1*2 - - 5 - 2*1 2*2 1*1 - 6 - - 7 - - - 8 - - 9 - 3*1 1*2 (c) Prof. Richard F. Hartl Layout and Design OE 1 and 5 are assigned to locations I and B 3 (Distance 1 -5) * 3 (Flow I-B) Total cost = 61 Kapitel 4 / 20
The Quadratic Assignment Problem (QAP) n Improvement heuristics: Try to improve solutions by exchanging OE-pairs (see the introducing example) ¨ Check if the exchange of locations of 2 OE reduces costs. ¨ Exchange of OE-triples only if computational time is acceptable. ¨ There a number of possibilities to determine OE-pairs (which should be checked for an exchange of locations): ¨ (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 21
The Quadratic Assignment Problem (QAP) Selection of pairs for potential exchanges: C 1 all n(n - 1)/2 pairs C 2 a subset of pairs C 3 random choice n Selection of pairs which finally are exchanged: D 1 that pair whose exchange of locations leads to the highest cost reduction. (best pair) D 2 the first pair whose exchange of locations leads to a cost reduction. (first pair) n (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 22
The Quadratic Assignment Problem (QAP) n Solution quality ¨ Combination of C 1 and D 1: n n ¨ Quite high degree of computational effort. Relatively good solution quality A common method is to start with C 1 and skip to D 1 as soon as the solution is reasonably good. Combination of C 1 and D 1 is the equivalent to 2 -opt method for the TSP CRAFT : n n Well-known (heuristic) solution method For problems where OE are of similar size CRAFT equals a combination of C 1 and D 1 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 23
The Quadratic Assignment Problem (QAP) n Random Choice (C 3 and D 2): Quite good results ¨ the fact that sometimes the best exchange of all exchanges which have been checked leads to an increase of costs is no disadvantage, because it reduces the risk to be trapped in local optima ¨ n The basic idea and several adaptions/combinations of A, B, C, and D are discussed in literature (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 24
„Umlaufmethode“ n Heurisitic method n Combination of starting and improvement heuristics Components: n Initialization (i = 1): Those OE having the maximum sum of material flow [A 1] is assigned to the centre of locations (i. e. the location having the minimum sum of distances to all other locations [B 1]). ¨ Iteration i (i = 2, . . . , n): assign OE i ¨ (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 25
„Umlaufmethode“ Part 1: Selection of OE and of free location: n select those OE with the maximum sum of material flow to all OE assigned to the core [A 3] n assign the selected OE to a free location so that the sum of transportation costs to the core (within the core) is minimized [B 3 a] (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 26
„Umlaufmethode“ Part 2: Improvement step in iteration i = 4: n check pair wise exchanges of the last-assigned OE with all other OE in the core [C 2] n if an improvement is found, the exchange is conducted and we start again with Part 2 [D 2] (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 27
Example – Part 1 Initialization (i = 1): E = centre Assign OE 3 to centre. A D G (c) Prof. Richard F. Hartl B E 3 H Layout and Design C F I Kapitel 4 / 28
Sequence of assignment i = 1 2 3 4 5 6 7 8 9 OE 3 5 2 7 4 6 8 9 1 1 0 3 0 0 0 i = 9 3 i = 3: 2 highest mat. flow to core (3, 5) 3 2 0 0 2 0 i = 1: assign 3 first 4 3 0 1 1 i = 5 5 5 i = 2: 5 highest mat. flow to 3 6 2 2 0 0 0 i = 6 7 0 2 4 i = 4 8 3 1 0 0 i = 7 9 4 0 0 0 i = 8 (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 29
Example – Part 1 Iteration i = 2 The maximum material flow to OE 3 is from OE 5 n Distances d. BE = d. DE = d. FE = d. HE = 1 equally minimal select D, n In iteration i = 2 OE 5 is assigned to D-5. A B C D 5 E 3 F G H I (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 30
Example – Part 1 Iteration i = 3 The maximum material flow to the core (3, 5) is from OE 2 n Select location X, such that d. XE t 23 + d. XD t 25 = d. XE 3 + d. XD 2 is minimal: (A, B, F, G od. H) X = A d. AE 3 + d. AD 2 = 2 3 + 1 2 = 8 X = B d. BE 3 + d. BD 2 = 1 3 + 2 2 = 7 X = F d. FE 3 + d. FD 2 = 1 3 + 2 2 = 7 X = G d. GE 3 + d. GD 2 = 2 3 + 1 2 = 8 X = H d. HE 3 + d. HD 2 = 1 3 + 2 2 = 7 A B 2 C n n B, F or H B is selected In iteration i = 3 we assign OE to B D 5 E 3 F G H I (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 31
Example – Part 1 Iteration i = 4 The maximum material flow to the core (2, 3, 5) is from OE 7 (2, 3, 5) n Select location X, such thath d. XE t 73 + d. XD t 75 + d. XB t 72 = d. XE 0 + d. XD 2 + d. XB 4 is minimal n according to the given map -> A is the best choice In iteration i = 4 we tentatively assign OE 7 to location A n (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 32
Example – Part 2 Try to exchange A with E, B or D and calculate the according costs: Original assignement (Part 1): try try n E-3, D-5, B-2, A-7 E-3, D-5, A-2, B-7 E-3, A-5, B-2, D-7 A-3, D-5, B-2, E-7 Cost =1 5+1 3+2 0+2 2+1 4 = 18 Cost = 1 5+2 3+1 0+1 2+2 2+1 4 = 21 Cost = 2 5+1 3+1 0+1 2+2 4 = 25 Cost = 1 5+1 3+2 0+2 2+1 4 = 18 Exchanging A with E would be possible but does not lead to a reduction of costs. Thus, we do not perform any exchange but go on with the solution determined in part 1…and so on… (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 33
Example – Part 2 n After 8 iterations without part 2: Cost = 54 n With part 2 (last-assigned OE (9) is to be exchanged with OE 4): Cost = 51 n While a manual calculation of larger problems is obviously quite time consuming an implementation and therefore computerized calculation is relatively simple (c) Prof. Richard F. Hartl Layout and Design Kapitel 4 / 34
- Slides: 34