Fortran Subroutines for Approximate Solution of ... - ACM Digital Library

1 downloads 0 Views 140KB Size Report
We describe Fortran subroutines for finding approximate solutions of sparse instances ... Additional Key Words and Phrases: Combinatorial optimization, Fortran ...
Algorithm 769: Fortran Subroutines for Approximate Solution of Sparse Quadratic Assignment Problems Using GRASP PANOS M. PARDALOS and LEONIDAS S. PITSOULIS University of Florida and MAURICIO G. C. RESENDE AT&T Labs — Research

We describe Fortran subroutines for finding approximate solutions of sparse instances of the Quadratic Assignment Problem (QAP) using a Greedy Randomized Adaptive Search Procedure (GRASP). The design and implementation of the code are described in detail. Computational results comparing the new subroutines with a dense version of the code (Algorithm 754, ACM TOMS) show that the speedup increases with the sparsity of the data. Categories and Subject Descriptors: G.1.6 [Numerical Analysis]: Optimization—integer programming; G.2.1 [Discrete Mathematics]: Combinatorics—combinatorial algorithms; G.m [Mathematics of Computing]: Miscellaneous General Terms: Algorithms, Performance Additional Key Words and Phrases: Combinatorial optimization, Fortran subroutines, GRASP, local search, quadratic assignment problem

1. INTRODUCTION The Quadratic Assignment Problem (QAP) was introduced by Koopmans and Beckmann [1957] as a mathematical model for the location of a set of indivisible economical activities. Consider the problem of allocating a set of n facilities to a set of n locations, to minimize the cost associated not only with the distance between locations but also to take into account the flows between facilities. Specifically, given two n 3 n matrices, F 5 ~ f ij ! and D 5 ~ d kl ! , where f ij is the flow between facility i and facility j , d kl is the Authors’ addresses: P. M. Pardalos and L. S. Pitsoulis, Department of Industrial and Systems Engineering, University of Florida, Gainsville, FL 32611; M. G. C. Resende, AT&T Labs— Research, Information Sciences Research Center—Room C241, 180 Park Avenue, Florham Park, NJ 07932. Permission to make digital / hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and / or a fee. © 1997 ACM 0098-3500/97/0600 –0196 $3.50 ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997, Pages 196 –208.

Algorithm 769



197

distance between location k and location l , and given a set of integers N 5 $ 1, 2, . . . , n % , the problem can be stated as

O Of n

min p{PN

n

ij

d p~i!p~j!,

i51 j51

where P N is the set of all permutations of the set N . We assume that at least one of the matrices F and D is symmetric and that both matrices have zero diagonal entries. We define the sparsity of a given matrix M to be

SM 5

number of zeros in M number of entries in M

.

We denote the sparsity of a QAP with matrices F and D by max~ S F , S D ! . We use this definition because the algorithm benefits if at least one of the input matrices F or D is sparse. Because of the difficulties encountered in computing exact solutions to the QAP, much research has focused on approximate methods that obtain good, but not necessarily optimal, solutions. A collection of recent topics on the QAP, including a survey of the different formulations, exact and heuristic algorithms, and applications can be found in Pardalos and Wolkowicz [1994]. Greedy Randomized Adaptive Search Procedures (GRASP) are heuristics that have been effective in producing good approximate solutions for many combinatorial optimization problems [Feo and Resende 1995]. A GRASP heuristic for the QAP is described by Li et al. [1994], Resende et al. [1996], and by Pardalos et al. [1995]. In this article we present a version of the GRASP for the QAP, tailored to solve QAPs with sparse input matrices. Sparse QAPs arise in many practical applications, including data analysis and multiprocessor scheduling. In Section 2 a brief description of the GRASP for general QAPs (GRASP-D) is presented (ACM TOMS Algorithm 754). In Section 3 the sparse code (GRASP-S) is described. The design and implementation of gqaps.f, a set of Fortran subroutines for solving sparse instances of the QAP, are presented in Section 4. Usage of the code is described in Section 5. In Section 6 we compare GRASP-S with GRASP-D on a large set of test problems from the QAPLIB [Burkard et al. 1994]. 2. GRASP FOR THE GENERAL QUADRATIC ASSIGNMENT PROBLEM In Li et al. [1994] and Resende et al. [1996], a GRASP for general QAPs is described. For completeness, we present a brief description of that GRASP. GRASP is an iterative sampling method for combinatorial optimization[Feo and Resende 1995]. A number of GRASP iterations are carried out, each iteration producing an approximate solution to the optimization problem. The best solution over all iterations is returned. Each iteration is ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

198



Panos M. Pardalos et al.

made up of two phases: a construction phase and a local search phase. In the construction phase, a solution is constructed, guided by a greedy function. In the local search phase, the neighborhood around the constructed solution is searched for an improved solution. In the GRASP for QAPs, the construction phase has two stages. In stage 1 two assignments are produced: facility i is assigned to site k , and facility j is assigned to site l . To do this, the procedure sorts intersite distances in increasing order and interfacility flows in decreasing order. Let d k 1 ,l 1 # d k 2 ,l 2 # · · · # d k p ,l p and f i 1 , j 1 $ f i 2 , j 2 $ · · · $ f i p , j p be the sorted values, where p 5 n 2 2 n . The products d k ,l ˙f i , j ,d k ,l ˙f i , j , . . . ,d k ,l ˙f i , j are 1

1

1

1

2

2

2

2

p

p

p

p

then sorted in increasing order. Among the smallest d kl ˙f ij products, one (corresponding to the pair of stage 1 assignments) is selected at random. Only the smallest n b 5 b p values are sorted, where b is a parameter such that 0 , b # 1 . Among these n b pairs of assignments, a pair is selected at random from the set of a n b assignments having the smallest d kl ˙f ij products, where a is such that 0 , a # 1 . In stage 2 of the construction phase, the remaining n 2 2 facility-site assignments are made sequentially. Let G be the set of q assignments at a given point in the construction phase, i.e., G 5 {(i 1 , k 1 ), (i 2 , k 2 ), . . . , (i q , k q )}. The cost of assigning facility j to site l, with respect to the already made assignments, is defined to be

c j l5

Of

ij

dkl.

~i, k!{G

All costs of unassigned facility-site pairs ~ j,l ! are sorted in increasing order. Of the pairs having the smallest a | G | costs, one is selected at random and is added to the set G . The procedure is repeated until n 2 1 assignments are made. The remaining facility is then assigned to the remaining site. The GRASP construction phase is described in pseudocode in Figure 1. In the local search phase of the GRASP, a two-exchange neighborhood search is conducted on the constructed solution. 3. GRASP FOR SPARSE QUADRATIC ASSIGNMENT PROBLEMS The construction phase for the GRASP-S exploits the sparsity of either one of the matrices F and D , to reduce the computational effort required to construct an approximate solution. The construction phase is composed of a sparse and a dense procedure. To describe the sparse procedure, presented in pseudocode form (Figure 2), we need the following definitions: —G is the set of already made assignments, i.e.,

G5$~ j1, l1!,~ j2, l2!, . . . %. ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

Algorithm 769



199

Fig. 1. GRASP-D construction phase pseudocode.

—D is the set of zero-cost assignment pairs with respect to the first two assignments, i.e.,

D 5 $~i, k!u

Of

ij

dk l 5 0,|G|52%.

~j, l!{G

—D9 is the set of zero-cost assignment pairs with respect to the last element in the set G , i.e.,

D9 5 $~i, k!u fi j|G|dk l|G| 5 0,|G| $ 3, ~ j|G|, l|G|!{G%. The two assignments made in the initial construction phase are input to the sparse GRASP construction phase. Since the first two assignments are randomly chosen among the smallest cost assignments, if their resulting cost is not zero, the problem data have little or no sparsity, and we disregard the sparse procedure. Otherwise, in lines 2–3 the appropriate initializations for sets G and D are made. In lines 4 –12 the set D is constructed, consisting of all zero-cost assignments with respect to the initial two assignments. From D , a random selection of the third assignment pair to be added to the set G is made in lines 13–16. The effect of sparsity on the computational effort is illustrated in lines 18 –27, where it is unnecessary to check all possible assignments that result in zero cost with respect to the assignments in set G , but only those associated with the last inserted element of set G . Another set of zero-cost assignments D9 is constructed, and the procedure is repeated until no ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

200



Panos M. Pardalos et al.

Fig. 2. GRASP-S construction phase pseudocode.

further zero-cost assignments can be made (D9 5 À ). The size of the set of zero-cost assignments is decreased each time an assignment is made. In lines 30 –33, the algorithm randomly chooses an assignment pair to be added to G . It is clear that the performance of the algorithm (Figure 2) improves as the sizes of D and D 9 increase. The number of zero-cost assignment pairs depends both on the sparsity and the structure of the problem. The sparse construction procedure terminates when the set D9 5 À , i.e., there are no zero-cost assignment pairs left. Upon termination, the set G will contain m zero-cost assignment pairs, and the remaining n 2 m assignments must be made. This is done by passing the partial set G to GRASP-D. The construction procedure starts with the m already made ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

Algorithm 769



201

Table I. Summary of Runs for 32 and 2048 Iterations (n # 16 ) 32 Iterations Name

bks

SM

chr12a 9552 0.76 chr12b 9742 0.76 chr12c 11,156 0.76 chr15a 9896 0.8 chr15b 7990 0.8 chr15c 9504 0.8 esc08a 2 0.78 esc08b 8 0.56 esc08c 32 0.437 esc08d 6 0.56 esc08e 2 0.687 esc08f 18 0.375 esc16a 68 0.64 esc16b 292 0.25 esc16c 160 0.53 esc16d 16 0.77 esc16e 28 0.77 esc16f 0 0.93 esc16g 26 0.77 esc16h 996 0.25 esc16i 14 0.82 esc16j 8 0.84 lipa10a 473 0 lipa10b 2008 0 nug08 214 0.31 nug12 578 0.37 nug15 1150 0.33 rou10 174,220 0 rou12 235,528 0 rou15 354,210 0 scr10 26,992 0.56 scr12 31,410 0.61

2048 Iterations

Minimum Average Maximum Minimum Average Maximum 9552 9742 11,758 10,624 7990 10,748 2 8 32 6 2 18 68 292 160 16 28 0 26 996 14 8 473 2008 214 578 1150 174,220 235,528 354,210 26,992 31,410

10,088 9742 12,181 11,118 8920 11,892 2 8 32 6 2 18 68 292 160 16 28 0 26 996 14 8 473 2008 214 584 1154 174,220 237,935 361,850 26,992 31,410

10,688 9742 12,858 11,606 9552 12,704 2 8 32 6 2 18 68 292 160 16 28 0 26 996 14 8 473 2008 214 594 1166 174,220 240,124 366,930 26,992 31,410

9552 9742 11,156 9896 7990 9504 2 8 32 6 2 18 68 292 160 16 28 0 26 996 14 8 473 2008 214 578 1150 174,220 235,528 354,210 26,992 31,410

9552 9742 11,156 9920 7990 9788 2 8 32 6 2 18 68 292 160 16 28 0 26 996 14 8 473 2008 214 578 1150 174,220 235,528 354,210 26,992 31,410

9552 9742 11,156 9978 7990 9940 2 8 32 6 2 18 68 292 160 16 28 0 26 996 14 8 473 2008 214 578 1150 174,220 235,528 354,210 26,992 31,410

assignments of the sparse procedure and proceeds with the rest of the assignments until | G | 5 n . For each assignment, it produces all of the possible pairs and keeps only the ones that have not been assigned. For those assignment pairs, it inserts their corresponding cost C ik into a heap and updates a counter q , which identifies the number of elements in the heap. This process is illustrated in lines 3–11 of the pseudocode in Figure 1. In lines 12–15, the algorithm chooses randomly an assignment pair from the a q pairs, which make up the restricted candidate list. In line 16, the chosen assignment pair is added into the set G , and the algorithm proceeds with the next iteration. After the dense procedure has finished, a constructed solution is on hand, and local search is applied to improve the existing solution. The local search used is described by Resende et al. [1996]. ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

202

Panos M. Pardalos et al.



Table II. Summary of Runs for 32 and 2048 Iterations (18 # n # 36 ) 32 Iterations Name

bks

S M Minimum

Average

2048 Iterations Maximum Minimum

Average

Maximum

chr18a 11,098 0.83 13,258 14,014 15,290 11,098 11,392 11,996 chr18b 1534 0.83 1556 1612 1644 1534 1534 1534 chr20a 2192 0.85 2518 2626 2704 2232 2331 2422 chr20b 2298 0.85 2664 2756 2906 2374 2452 2514 chr20c 14,142 0.85 14,996 17,460 18,594 14,142 14,142 14,142 chr22a 6156 0.87 6528 6600 6736 6230 6302 6378 chr22b 6194 0.87 6448 6610 6788 6380 6408 6424 chr25a 3796 0.88 4810 5009 5240 3954 4282 4386 els19 17,212,548 0.68 17,212,548 17,792,100 17,937,024 17,212,548 17,212,548 17,212,548 esc32a 130 0.82 142 145 148 134 135 138 esc32b 168 0.75 184 190 196 168 168 168 esc32c 642 0.8 642 642 642 642 642 642 esc32d 200 0.85 200 200 202 200 200 200 esc32e 2 0.85 2 2 2 2 2 2 esc32f 2 0.87 2 2 2 2 2 2 esc32g 6 0.91 6 6 6 6 6 6 esc32h 438 0.9 440 440 440 438 438 438 kra30a 88,900 0.63 90,860 92,126 93,730 88,900 89,538 90,090 kra30b 91,420 0.6 92,650 93,246 94,090 91,420 91,544 91,650 lipa20a 3683 0 3683 3720 3766 3683 3683 3683 lipa20b 27,076 0 27,076 27,076 27,076 27,076 27,076 27,076 lipa30a 13,178 0 13,389 13,399 13,414 13,178 13,241 13,343 lipa30b 151,426 0 151,426 156,148 175,037 151,426 151,426 151,426 nug20 2570 0.3 2612 2620 2632 2570 2570 2574 nug30 6124 0.2 6196 6222 6244 6136 6143 6152 rou20 725,522 0 735,980 740,984 745,046 725,662 728,140 730,290 scr20 110,030 0.69 111,420 112,420 114,334 110,030 110,030 110,030 ste36a 9526 0.7 9856 10,045 10,176 9634 9679 9700 ste36b 15,852 0.7 17,118 17,280 17,532 15,852 16,063 16,378 ste36c 8,239,110 0.7 8,300,254 8,499,280 8,586,740 8,291,532 8,308,740 8,343,504

4. DESIGN AND IMPLEMENTATION OF THE SUBROUTINES The code is implemented in ANSI standard Fortran 77 and runs without any modifications on UNIX environments. It should also run on other environments with little or no change. Input, output, variable, and array declarations and parameter settings are all performed in a separate driver module. Therefore, usage and experimentation with the code are relatively simple. Subroutine gqaps is called from the driver module which, in addition to a number of auxiliary arrays, passes the following input: n: f, d:

Size of QAP. QAP flow and distance matrices.

a , b : Restricted candidate list parameters. maxiter:

Maximum number of GRASP iterations.

ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

Algorithm 769



203

Table III. Summary of Runs for 32 and 2048 Iterations (40 # n # 150 )

Name

bks

esc128 esc64a lipa40a lipa40b lipa50a lipa50b lipa60a lipa60b lipa70a lipa70b lipa80a lipa90a lipa90b sko100a sko100b sko100c sko100d sko100e sko100f sko42 sko49 sko56 sko64 sko72 sko81 sko90 tho150 tho40 wil100

64 116 31,538 476,581 62,093 1,210,244 107,218 2,520,135 169,755 4,603,200 253,195 360,630 12,490,441 152,002 153,890 147,862 149,576 149,150 149,036 15,812 23,386 34,458 48,498 60,402 82,277 115,534 8,134,056 240,516 273,044

seed: look4:

32 Iterations

2048 Iterations

Average

Average

Maximum

64 116 31,902 476,581 62,727 1,210,244 108,148 2,520,135 171,079 4,603,200 254,941 362,972 12,490,441 153,052 155,046 148,988 150,594 150,330 150,283 15,908 23,544 34,697 48,816 66,725 91,588 116,420 8,205,800 241,870 274,127

64 116 31,911 476,581 62,747 1,210,244 108,192 2,520,135 171,102 4,603,200 254,976 363,028 12,490,441 153,160 155,146 149,152 150,778 150,394 150,356 15,940 23,572 34,738 48,884 66,854 91,760 116,484 8,216,528 243,088 274,326

S M Minimum 0.98 0.95 0 0 0 0 0 0 0 0 0 0 0 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.57 0.58 0

64 116 31,933 476,581 62,767 1,210,244 108,211 2,520,135 171,158 5,516,027 255,066 363,159 15,121,756 153,608 155,284 149,554 151,186 150,664 150,544 16,070 23,702 34,806 49,060 66,986 91,896 116,750 8,239,910 243,682 274,254

64 116 31,949 493,113 62,790 1,339,350 108,243 2,902,810 171,185 5,519,179 255,123 363,204 15,136,900 153,732 155,694 149,859 151,474 150,934 150,787 16,089 23,744 34,900 49,178 67,204 92,230 117,055 8,499,280 244,979 274,585

Maximum Minimum 64 116 31,961 559,240 62,815 1,427,509 108,262 3,000,633 171,209 5,522,184 255,176 363,226 15,156,071 153,884 156,082 150,206 151,620 151,132 151,138 16,136 23,782 34,964 49,306 67,486 92,446 117,348 8,586,740 245,608 274,918

64 116 31,884 476,581 62,704 1,210,244 108,077 2,520,135 171,047 4,603,200 254,861 362,917 12,490,441 152,984 154,994 148,806 150,430 150,262 150,222 15,890 23,508 34,630 48,716 66,592 91,366 116,364 8,200,926 240,650 273,964

Random-number generator seed. A target value beyond which further improvement may not be necessary. A value of -1 will force the optimizer to stop at the maximum number of iterations.

Subroutine gqaps performs the optimization and returns the best permutation (opta) with the corresponding minimum cost (bestv) and the number of iterations performed (iter). Within the GRASP iterations, three main functions are performed: stage 1 (build0) creates the first two initial assignments simultaneously; stage 2 (build1) constructs a complete solution by assigning the remaining n 2 2 assignments; and a two-exchange local search (local) is done in the constructed solution for further improvement. Before GRASP proceeds to the next iteration, it checks the cost of the current solution (objv) and keeps the best (bestv) among all iterations (savsol). Since stage 1 of the construction phase uses the same sorted assignment costs during each GRASP iteration, the costs are sorted once, outside the ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

204



Panos M. Pardalos et al.

Fig. 3. Input file of QAPLIB instance esc16e.

main GRASP loop, in subroutine srtcst. The subroutine uses heap sort to partially sort the flow values, distance values, and assignment costs. The first (double) loops insert off-diagonal distance and flow values into their respective priority heaps. Parameter n b is computed; and, in the next do loop, the smallest distance value and largest flow values are removed from the heaps, and the assignment cost is computed and inserted into its priority heap. That do loop is repeated n b times. The final do loop puts the n b smallest assignment costs into array cost by sequentially removing the smallest cost element from the assignment cost priority heap. Information needed to retrieve the assignments corresponding to each cost is put in the array fdind. Subroutine build0 implements stage 1 of the GRASP construction phase. The permutation arrays a and b are initialized; the index (nselct) of the assignment pair is chosen at random; and the assignment indices i, ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

Algorithm 769



205

Fig. 4. Sample output of driver for QAP instance esc64a.

j, k, and l are recovered from the data structure. Just prior to the second do loop, the first assignment is put in the permutation arrays, and in the last two loops, the second assignment is put into the arrays. Since the first two assignments are chosen randomly among the smallest, if the resulting cost in not equal to zero, then the problem contains little or no sparsity. Subroutine build1 implements stage 2 of the GRASP construction phase. This subroutine is divided into two phases. The first phase is performed if the cost resulting from the initial two assignments is zero, where it proceeds by constructing an array cp that contains all of the assignment pairs (facility i to location j ) that result in zero cost with respect to the already made assignments. Every time a new assignment pair is added to the set of already made assignments, array cp is updated to reflect the new assignment, and the number of zero assignment pairs assz is incremented by one. Phase 1 will terminate when there is no assignment pair that will result in zero cost, in which case build1 proceeds to the second phase. In phase 2 the first outer do loop makes assignments assz1 1, . . . ,n 2 1 . In that loop, the cost, with respect to previously assigned pairs, of each ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

206



Panos M. Pardalos et al.

Fig. 5. Solution time ratios as a function of problem sparsity (32 iterations).

possible assignment is computed. The cost is inserted in its priority heap for sorting. After all costs have been computed, the index (nselct) of the randomly selected assignment is determined, and the assignment is retrieved from the heap. In both phases of build1, subroutine mkassg updates permutation arrays a and b with the latest assignment. The cost of the last assignment is added to the total assignment cost in the final do loop. Subroutine local implements the two-exchange of the GRASP local search phase. The local search is carried out on permutation array a, so a rearrangement is done in subroutine mkbseq to make permutation array b 5 $1,2, . . . ,n%. In the (double) loops, for all pairs i, j such that j . i, subroutine evalij evaluates the gain xgain of swapping i and j in permutation array a. If a positive gain is attained, the swap is carried out, and the cost of the assignment (objv) is updated. The procedure ends when no further improvement is possible by swapping elements in the permutation array. Subroutine savsol saves permutation a in array opta and the cost of the assignment (objv) in scalar bestv. In subroutine insrtq, a pair of elements (v and iv) is inserted into a priority heap of pairs (q and iq), ordered by the values in q. The size of the heap (sizeq) is updated. The heap is updated to take into account the additional elements. In subroutine removq, a pair of elements (v and iv) is removed from a priority heap of pairs (q and iq), ordered by the values in q. The size of the heap (sizeq) is updated to take into account the removal of the elements. Subroutine randp is the portable random-number generator of Schrage [1979]. Given a seed ix{ @ 0,2 31 2 1 # , it returns by parameter a new seed in the same range and by value a real number in the interval [0,1]. ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

Algorithm 769



207

Fig. 6. Solution time ratios as a function of problem sparsity (2048 iterations).

Subroutine evalij evaluates the assignment cost gain attained by swapping indices i and j in an assignment permutation array a. Index j is assumed to be greater than i. The do loop computes the interaction with the other facilities. Subroutine mkbseq applies identical transformations to arrays a and b to make b 5 $ 1,2, . . . ,n % . 5. USAGE OF THE SUBROUTINES The subroutines in file gqaps.f carry out the approximate optimization of the QAP. The user interface with them is subroutine gqaps, which must be called from a driver program. The sample driver program for gqaps included in the distribution (driver.f) is set for problems of dimension n # 256 . All variables and arrays needed by subroutine gqaps are defined. Variable iseed0, used by the driver, is also defined. Subroutines readp and outsol are examples of code that can be used for input and output, respectively. For example, consider the QAPLIB instance esc16e with the input file shown in Figure 3. Running the driver program for instance esc64a of dimension 64 produces the output shown in Figure 4. 6. COMPUTATIONAL RESULTS The GRASP-S Fortran implementation was tested on a Silicon Graphics Challenge computer, using the f77 compiler with flags -02 -0limit 800. The set of problems consisted of all problems in QAPLIB [Burkard et al. ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

208



Panos M. Pardalos et al.

1991] of dimension n $ 8 that are pure QAPs and that have at least one symmetric distance or flow matrix. For every problem, 40 runs were performed reflecting eight iteration settings (16, 32, 64, 128, 256, 512, 1024, and 2048 iterations) and five random-number generator seeds (1, 2, 3, 4, 5) for each iteration setting. An identical computational run for GRASP-D is presented in Resende et al. [1996], so a direct comparison can be made between the performances of GRASP-D and GRASP-S in terms of CPU time and solution quality. In Tables I–III, the performance of the GRASP-S as reported for 32 and 2048 iterations is presented, where the minimum, average, and maximum solution values are shown for every instance. In Figures 5 and 6, the speedup in solution time as a function of sparsity is presented, where speedup is the ratio of the GRASP-D time over the GRASP-S time. As can be seen from the figures, for instances with sparsity $ 0.8 , the GRASP-S procedure is, on average, twice as fast as GRASP-D. Furthermore, for completely dense problems (i.e., sparsity 5 0) GRASP-S and GRASP-D have comparable performances. 7. CONCLUSION In this article we have presented a modified version of the GRASP for the QAP for handling instances with sparse input data. GRASP-S is shown to be about 35% faster than GRASP-D, without affecting the solution quality of the heuristic. Moreover, for very sparse instances (i.e., with sparsity greater than or equal to 0.8), the sparse version performs up to 300% faster, indicating that large QAP instances with at least one sparse matrix can be solved in much less time. REFERENCES BURKARD, R., KARISCH, S., AND RENDL, F. 1991. QAPLIB: A quadratic assignment problem library. Eur. J. Oper. Res. 55, 115–119. FEO, T. AND RESENDE, M. 1995. Greedy randomized adaptive search procedures. J. Global Optim. 6, 109 –133. KOOPMANS, T. AND BECKMANN, M. 1957. Assignment problems and the location of economic activities. Econometrica 25, 53–76. LI, Y., PARDALOS, P., AND RESENDE, M. 1994. A greedy randomized adaptive search procedure for the quadratic assignment problem. In Quadratic Assignment and Related Problems. DIMACS Series on Discrete Mathematics and Theoretical Computer Science, vol. 16. American Mathematical Society, Providence, R.I., 237–261. PARDALOS, P. AND WOLKOWICZ, H., Eds. 1994. Quadratic Assignment and Related Problems. DIMACS Series on Discrete Mathematics and Theoretical Computer Science, vol. 16, American Mathematical Society, Providence, R.I. PARDALOS, P., PITSOULIS, L., AND RESENDE, M. 1995. A parallel GRASP implementation for the quadratic assignment problem. In Parallel Algorithms for Irregularly Structured Problems. Kluwer Academic Publishers, Hingham, Mass., 111–130. RESENDE, M. G. C., PARDALOS, P. M., AND LI, Y. 1996. Algorithm 754: Fortran subroutines for approximate solution of dense quadratic assignment problems using GRASP. ACM Trans. Math. Softw. 22, 1 (Mar.), 104 –118. SCHRAGE, L. 1979. A more portable Fortran random number generator. ACM Trans. Math. Softw. 5, 2, 132–138. Received October 1995; revised September 1996; accepted October 1996 ACM Transactions on Mathematical Software, Vol. 23, No. 2, June 1997.

Suggest Documents