Вы находитесь на странице: 1из 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/228727372

Assignment Problems in Logistics

Article · January 2008

CITATIONS READS

2 1,791

1 author:

Janez Povh
University of Ljubljana
79 PUBLICATIONS   568 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Extending first and second order algorithms for nested classes of optimization problems to solve computationally challenging industrial questions View project

High-Performance Solver for Binary Quadratic Problems View project

All content following this page was uploaded by Janez Povh on 15 January 2014.

The user has requested enhancement of the downloaded file.


Logistics & Sustainable Transport Volume:1, Issue:3

ASSIGNMENT PROBLEMS IN LOGISTICS

Janez Povh
University in Maribor, Faculty of Logistics
Hočevarjev trg 1, Krško, Slovenia
janez.povh@uni-mb.si
__________________________________________________________________________________

Abstract
We consider two classical problems from location theory which may serve as theoretical models for several logistic
problems where one wants to assign elements of a set A to elements of a set B such that some linear or quadratic
function attains its minimum. It turns out that linear objective function yields a linear assignment problem, which
can be solved easily by several primal-dual methods like Hungarian method, Shortest augmenting path method etc.
On the other hand, taking quadratic objective function into account makes the problem much harder. The resulting
quadratic assignment problem is a very useful model but also very tough problem from theoretical and practical
point of view.
We list several well-known applications of these models and also the most effective methods to solve the problem.
However, it is still a challenging task to solve this problem to optimality when the size of underlying sets A and B
is greater than 25 and currently impossible task when the size is greater than 35.

Keywords: quadratic assignment problem, linear assignment problem, branch and bound algorithm, heuristics

1. INTRODUCTION
A variety of practical problems turn out to be a special instance of the assigning problem, i.e. a
problem, where one looks for an assignment of members of set A to members of set B such that
some function attains its optimum. We may always assume that the numbers of elements in sets
A and B are equal and that we want to assign exactly one element from A to each element from
B. Solving such a problem often means that we have to evaluate some function for each
assignment. Since there are n! possible assignments, where n is the number of elements in A, this
may lead to a very hard problem.
In this paper we consider two problems: the quadratic assignment problem (QAP) and the linear
assignment problem (LAP). The first is very hard from theoretical and practical point of view while
the second turns out to be much easier. Therefore we put stronger focus on QAP. It was
introduced in 1957 by Koopmans and Beckam [9] to model problems from location theory and
since then it has attracted hundreds of researchers to work on it. Recent survey paper from
Loiola et al. [11] quoted more then 370 references about this problem.
This paper is planned to be a survey of the state-of-the-art results about QAP and LAP with a
special focus to efficient methods for solving these problems and to the applications of QAP and
LAP in logistics. We also throw light on possible directions for the future research. We hope that
people who are solving real logistic problems will after reading the paper get a feeling for which
practical problems we may apply these theoretical models and for what size we can solve the
resulting optimization problem.
Logistics & Sustainable Transport Volume:1, Issue:3

Outline
In Section 2 we introduce QAP and LAP on a simple example. In Section 0 we list several well-
known applications of QAP an LP and in Section 4 we show different formulations of QAP
which are important since they are basis for several relaxations of the problem. Solving QAP and
LAP in practice is the topic of Sections 5 and 6.
Notation
We denote by I the identity matrix. For a given matrix X is XT its transpose and xij the (i,j)th
component. By X ≥ 0 we mean that xij ≥ 0 , for all i, j. The sum of diagonal components of a
square matrix X we call trace and denote tr(X). For given matrices A, B ∈ R m×n we call the sum
∑ aij bij a trace product of A and B, since it is equal to tr(ATB).
i, j

2. MOTIVATION AND PROBLEM FORMULATION


Quadratic assignment problem was introduced to model the location problems which take into
account the costs of placing new facilities on certain places and the interaction between all
facilities. We explain this model on the following example.
Example Suppose that some company wants to build a factory (building 1) to produce certain
products, a warehouse (building 2) to store the products and a new shop (building 3) to sell these
products. It owns three peaces of land in three different cities. It wants to locate these buildings
on the given sites of land in such a way that
- the total construction cost plus
- the total interaction between these buildings is minimal.

factory warehouse shop

site 1 site 2 site 3


place 2 place 3

Figure 1: Example of an assignment problem with 3 buildings and 3 sites

Let denote by cij the total cost of erecting the building i on the jth site. (i.e. c11 denotes the total
cost of building the factory on site 1, c12 the total cost of building the factory on site 2, … , c33
Logistics & Sustainable Transport Volume:1, Issue:3

the total cost of building the shop on site 3. If we plan to set the factory on site 2, the warehouse
on site 3 and the shop on site 1 (like it is shown in the Figure 1), then the total construction cost
is c12 + c23 + c31 . If we collect the constructing costs into matrix C = [cij ]1≤i , j ≤3 and represent this
assignment of buildings by a permutation ϕ (i.e. ϕ (1) = 2, ϕ (2) = 3, ϕ (3) = 1 ), then the total
construction cost is c12 + c 23 + c31 = ∑i ciϕ ( i ) . We may represent each permutation π by a 0-1
matrix X = X (π ) , defined by xij = 1 if and only if π (i ) = j (we call such a matrix a permutation
matrix). For our particular assignment we have

0 1 0 
X = X (ϕ ) = 0 0 1
1 0 0

and the total construction cost is c12 + c 23 + c31 = ∑i , j cij xij = tr (C T X ).

Suppose that in addition to construction costs we also consider the total expected distance that
people from the company will have to cross in the future if the company chooses some
assignment. Let d ij denotes the distance between ith and jth site with d ii = 0, for all i, and f ij
the expected number of people that will have to go from ith building to jth building (e.g. per
week). If the company chooses the assignment from above, then the total expected distance that
the people from the company will have to cross between the factory and the warehouse is f12 d 23
and the total expected distance between all buildings is

f 12 d 23 + f 13 d 21 + f 21 d 32 + f 23 d 31 + f 31 d12 + f 32 d13 = ∑ f ij d ϕ ( i ),ϕ ( j ) .


i, j

Note that the latest sum from above can be written also as ∑f
i , j ,k ,l
ij d kl xik x jl , where xik and xjl are

the components of corresponding permutation matrix X. When we combine both goals:


minimizing the construction costs and minimizing the total distance that has to be crossed, then
we talk about the quadratic assignment problem (QAP). The quadratic assignment problem can be
therefore formulated as the following optimization problem:

 
(QAP) min ∑ f ij d ϕ ( i ),ϕ ( j ) + ∑ c i ,ϕ ( i ) | ϕ permutation  ,
 i, j i 
where C, D, F are n × n real matrices. When we do not bother with interaction between buildings
and therefore consider only construction costs, the QAP reduces to linear assignment problem
(LAP):

 
(LAP) min ∑ ci ,ϕ (i ) | ϕ permutation  .
 i 
This application of QAP was used for example in planning the hospital layout. Specifically,
designing the German university hospital Klinikum Regensburg yielded a subproblem how to
place rooms in a hospital. It turned out to be a special instance of QAP. The problem instance,
which arose from this application, was finally solved in 2001 (see [8]).
Logistics & Sustainable Transport Volume:1, Issue:3

3. OTHER APPLICATIONS OF QAP AND LAP


Both problems, QAP and LAP, have many other applications. Steinberg [16] presented a
backboard wiring problem as a special instance of QAP. He considered a particular instance where he
wanted to place 34 computer components with 2625 interconnections on a board with 36 open
positions such that the total wiring length needed to realize all connections is minimal. The data
for his instances are available on the QAP website [3] under names Ste36a– Ste36c.
In 1970 several researchers (see e.g. [4]) studied the problem how to assign letters from a given
alphabet to a typewriter keyboards such that the expected time needed to write a text in this
language is minimal. If we have for a given language for each pair of letters u and v the relative
frequency of appearing words uv and vu in all words from this language and if we measure for
each pair of keys p and q from the keyboard the time elapsed between consecutive pressing of
these two letters, then we can formulate this problem as QAP where matrix F contains the
relative frequencies, matrix D contains times and C = 0 . The problem data for instances of
Burkard are available on [3] under names Bur26a–Bur26h.

Several problems from combinatorial optimization can also be modelled as QAP. The travelling
salesman problem (TSP) is a problem, where we have a number of cities and the costs of travelling
from any city to all neighbouring cities and we want to find the cheapest round-trip route that
visits each city exactly once and then returns to the starting city. If the matrix D contains
distances or costs of travelling between each pair of cities and if F is the adjacency matrix of a
cycle (i.e. f ij ∈ {0,1} , f 12 = f 23 = L f n−1,n = f n1 = 1 and fij = 0 otherwise), then finding the
cheapest round-trip route amounts to solving the QAP. TSP is again very hard problem but in
practise it is easier than QAP since several applications with n ≥ 10.000 have been solved
recently (see e.g. TSPLIB [17]).

An example of LAP appears also in railway when we wants to assign to each train a locomotive
such that the total time needed to pull the trains from starting stations to final stations is minimal.

Some purely graph theoretic problems can be also modelled as QAP: the bandwidth problem, the
graph partitioning problems etc., but this is beyond the scope of the paper.

4. EQUIVALENT FORMULATIONS OF LAP AND QAP


In this section we first list the most important formulations of LAP and QAP. All these
formulations are related to different representations of the set of permutation matrices Π.
Any permutation matrix has in each row and column only one non-zero component, which must
be equal to 1. This leads to the following description of the set of permutation matrices

 n n

Π =  X ∈ {0, 1}n×n | ∑ xij = 1, ∑x ji = 1, 1 ≤ j ≤ n  (1)
 i =1 i =1 

Note that we used only linear equations and 0-1 constraint to describe Π.
Logistics & Sustainable Transport Volume:1, Issue:3

The second representation basis on the fact that a non-negative matrix has in each row exactly
one non-zero component if and only if the columns of this matrix are pair wise orthogonal. This
implies the following description

{
Π = X ∈ R n×n | X T X = I , X ≥ 0 . }
If we use the fact that

∑f
i, j
ij dϕ (i ),ϕ ( j ) + ∑ ci ,ϕ ( i ) =
i
∑f
i , j ,k ,l
ij d kl xik x jl + ∑ cij xij = tr ( FXDT X T + C T X )
i, j

for any X ∈ Π , then we get the following representations of QAP

 n n

(QAP) min  tr ( FXD T X T + C T X ) | ∑ xij = 1, ∑x ji = 1, 1 ≤ j ≤ n, xij ∈ {0,1}, 1 ≤ i , j ≤ n  ,
 i =1 i =1 

(QAP) {
min tr ( FXD T X T + C T X ) | X T X = I , X ≥ 0 . }
In the first problem is feasible set defined by linear constraints while in the second with quadratic
constraints.
The third representation has been shown recently [14] and is important since the resulting
problem is a linear program over the cone of completely positive matrices and opens many
possibilities to approximate the optimal solution of QAP. This representation yields currently the
strongest semidefinite lower bounds for the optimal value of QAP and is therefore important for
efficient implementation of branch and bound algorithms, as is also mantioned in Section 5.2,
but this calls for a new notation and is quite specific, therefore we skip it.

Similarly we may write LAP as

 n n 
(LAP) min  tr (C T X ) | ∑ x ij = 1, ∑ xij = 1, 1 ≤ j ≤ n, xij ∈ {0,1}, 1 ≤ i, j ≤ n  .
 i =1 j =1 

We used only the first representation of Π , since it is sufficient for explaining the idea how to
solve LAP.

5. SOLVING QAP
QAP is known to be very hard from a theoretical and practical point of view. Problems of size
n ≥ 25 are currently still considered difficult to solve in practice. Sahni and Gonzales [15]
showed that even finding an ε -approximate solution for QAP is NP-hard, for any ε > 0 . This
means that if we can solve any instance of QAP to a precision ε > 0 in polynomial time, then we
can use this algorithem to solve a large family of all NP-complete problems in polynomial time.
Checking the QAP library QAPLIB [3] we can see that the optimal solutions for the exposed
problem instances are found only for dimension n ≤ 35 . For larger instances there are available
feasible solutions, obtained by different heuristics, but the quality of these solutions is not
known.
In this section we list three approaches to solve QAP. The first two: greedy and branch-and-
bound approach, provide an optimal solution and are very time consuming. The last approach is
Logistics & Sustainable Transport Volume:1, Issue:3

heuristic. It gives solutions that are often sufficiently good for real problems, but we do not know
how close to the optimum they are.

5.1 Complete enumeration

The most naive approach to solve QAP is evaluating the cost function ∑f
i, j
ij dϕ (i ),ϕ ( j ) + ∑ ci ,ϕ ( i )
i

for each permutation. The number of all permutations of order n is n! and therefore grows
rapidly, so this greedy method is useful only for small instances. Table 1 shows time needed to
solve to optimality test instances for different values of n with complete enumeration. We used
the Matlab software and a computer with Pentium 4 CPU 3.00 GHz and 512 Mb RAM.

size of QAP
time (sec.)
instance (n)

6 0.1

8 4.1

10 375

12 52.330

14 9.763.970 ≈ 113 days*

16 2,6 ⋅ 10 9 ≈ 79 years*

30 7,2 ⋅ 10 23 years

Table 1: Time, needed to solve to optimality QAP by the greedy algorithm


The second column in the table shows that the time needed to solve QAP really increases very
fast (time to solve the problem with dimension n is at least n times larger than the time to solve
problem with dimension n–1).

5.2 Branch and bound approaches


Branch and bound framework seems to be the only way to obtain in a reasonable time an optimal
solution for QAP instances with size n ≥ 15 . All recent break-through in solving QAP are
actually related to this approach. The main idea is as follows: we do not want to check all
permutations, therefore we construct an optimal permutation step by step. We start with the
empty permutation (i. e. no building is assigned) and successively extend it to a full (optimal)
permutation. Throughout the procedure we need a good feasible solution for QAP (i. e. a good

*
This is an estimate, obtained by measuring the time for 1.000.000 evaluations and then extrapolating it to the
complete enumeration.
Logistics & Sustainable Transport Volume:1, Issue:3

upper boud B). Suppose that we have already assigned the buildings 1, 2, … ,i and want to
assigne the building i+1. First we need a good lower bound for the optimal value of new QAP,
obtained by respecting this partial assignment (we denote it by bi). We have n-i possible locations
for assigning the (i+1)st building. For each possible location j we compute a reduced cost ci +1, j , i.
e. a lower bound for the increase of the cost function if we assign (i+1)st biulding to jth location.
If the following holds: ci +1, j + bi > B , then this could not yield an optimal solution and we can
eliminate the jth location from the current list of candidates. All remaining locations lead to sub-
problems, which have to be considered recursively.
The procedure results in a branching tree, which determines the complexity of the problem. Each
path from the root of the tree with length n determines some permutation. Finding an optimal
permutation therefore amounts to checking all possible paths. We do not know in advance where
the current path will stop, so we have to compute for each node in the tree a lower bound and
reduced costs for unassigned locations. Having a narrow branching tree is therefore very
desirable. Several branching strategies are proposed to minimize the tree (see [1] and [5]).
Table 2, which we mainly took from [5], shows the evolution of branch and bound approaches in
last decades. The second row in the table shows the size of instances that could be solved by the
branch and bound algorithm and the hardware, available at that time.

Year 1962 1973 1980 1992 2003 2006

n 8 8 15 20 32 ?

Table 2: Progress in solving QAP by branch and bound method


The last column is due to Anstreicher et al. [1], who have presented optimal solutions for several
QAP instances with n ≈ 30 , which were unsolved for decades. They implemented parallel
branch and bound algorithm and constructed a computational grid with more then 600 active
computers in average and solved the instance with n = 32 in 12,3 days. However, the time they
needed is equivalent to 10,4 years on a single HP9000-C3000 machine. The branching tree that
they have analysed had 1,7 ⋅ 1010 nodes. This was probably the largest computational experiment
ever done and again demonstrates how difficult is QAP.

5.3 Heuristics
The main idea behind all heuristics is to find optimal permutation in a subset Π ' of the set of all
permutations Π . The differences between heuristics are in the choice of this subset. The results,
obtained this way, are in general not optimal and we even do not know how close they are to the
optimum. However, heuristics are important for the following reasons:
- they provide us upper bounds for the optimal value of the problem, which are important
in the branch and bound framework,
- they are currently the only way to obtain good (not optimal) solutions for the problems
where n ≥ 35 and this is important since in many real life applications we are already
happy with solutions that are nearly optimal.
The most trivial heuristic method is limited enumeration. Here we stop evaluating the objective
function after some time limit expires or if there was no improvement in a given time period. The
Logistics & Sustainable Transport Volume:1, Issue:3

idea comes from the observation that an optimal or a good feasible solution is usually found
relatively quickly and most of the time is spent to prove the optimality or to slightly improve the
existing solution. For example, in all cases with n ≤ 14 from Table 1 we found the optimal
solution after checking less than 10 % of permutations.
Local improvement is another popular idea, which is often incorporated in other more refined
heuristics. Here we start with some permutation ϕ and then try to find a better permutation ϕ '
in the neighbourhood of ϕ . The definition of the neighbourhood is crucial for this method.
Typically we consider only the permutations which can be obtained from ϕ by a transposition
(two buildings exchanges the assigned locations) or by a cyclic triple exchange (three buildings
cyclically exchange the assigned locations).
Following QAPLIB [3] we can see that the most important results on larger instances were
obtained using the following heuristics: iterated tabu search (ITS) algorithm (see [13]), genetic algorithms
and simulated annealing [12]. All this algorithms combine local improvement methods with some
searching method which guaranties that a large subset of the feasible set is scanned.
Implementation of this method requires high-skilled programmers and a lot of computational
experiences to make these methods efficient.

6. SOLVING LAQ
As contrary to QAP we can solve LAP very efficiently (theoretically and practically) using several
optimization methods. The most efficient are so-called primal-dual methods. They are based on the
fact that replacing the 0-1 constraint xij ∈ {0,1} in (1) by xij ∈ [0, 1] does not change the optimal
solution of LAP, since the convex set, spanned by all permutation matrices, is exactly the convex
hull of set (1).

Primal-dual methods start with an infeasible X ∈ R n×n and a feasible dual solution u , v ∈ R n
which satisfy the condition xij (cij − u i − v j ) = 0, 1 ≤ i, j ≤ n and then iteratively update this pair
of solutions by means of so-called admissible transformations of the cost matrix C (see [2] for more
details). The difference between several primal-dual methods is actually due to choice of admissible
transformations.
The most famous primal-dual method to solve LAQ is Hungarian method, which was introduced in
1955 by Harold Kuhn [10] and was at that time the first method with known polynomial
complexity to solve LAP. Kuhn named the method after two Hungarian mathematicians
Egerváry and König, whose results he used to construct the method.
Currently the Shortest augmenting path method is considered the most efficient method to solve LAQ.
This primal-dual method finds an optimal solution after n steps, where at each step it has to
augment the current solution by constructing a bipartite graph and solving the single-source
shortest path problem in this graph (see [2] and [6] for more details).
We can solve LAQ also by using any mathod for solving linear programming. Optimizing a linear
function tr (C T X ) over (1) is exactly a linear programming problem, which we can solve
efficiently, using a wide range of LP solvers.
CONCLUSIONS
In this paper we considered two basic problems from location theory, which may serve as models
for practical problems in logistics: quadratic and linear assignment problem.
Logistics & Sustainable Transport Volume:1, Issue:3

We presented several formulations of these problems and listed the most famous applications of
these problems. We also presented the complexity of solving these problems and the most
effective methods to solve them in practice.
The main message of the paper is that the quadratic assignment problem is a proper model for
several logistic problems, but solving it to optimality for n ≥ 25 is a very time consuming task,
hence using advanced heuristics like iterated tabu search algorithm, genetic algorithms and
simulated annealing is highly recommended.
On the other hand, when we consider only linear terms in the objective function, we obtain a
linear assignment problem where practical limits are far beyond the limits of QAP.
REFERENCES
[1] Anstreicher, K., Brixius, N., Goux, J.-P., Linderoth, J. (2002), ''Solving large quadratic
assignment problems on computational grids'', Math. Program. B, 91, pp. 563–588
[2] Burkard, R. E., Çela, E. (1999), ''Linear assignment problems and extensions'', Handbook of
combinatorial optimization, Supplement Vol. A, pp. 75–149, Kluwer Acad. Publ.,
Dordrecht
[3] Burkard, R. E. , Çela, E., Karisch, S. E., Rendl, F., (June 2006), ''QAPLIB - A Quadratic
Assignment Problem Library'', available at http://www.seas.upenn.edu/qaplib/
[4] Burkard, R. E., Offermann, J., (1977), ''Entwurf von Schreibmaschinentastaturen mittels
quadratischer Zuordnungsprobleme'', Zeitschrift für Operations Research, 21, pp. B121–
B132
[5] Çela, E. (1998), ''The Quadratic Assignment Problem: Theory and Algorithms'', Kluwer
Academic Publishers, Dordrecht
[6] Cherkassky, B. V., Goldberg, A., V., Radzik, T., (1996), ''Shortest path algorithms: theory and
experimental evaluation'', Mathematical Programming, 73, pp. 129–174
[7] Drezner, Z. (2003), ''A New Genetic Algorithm for the Quadratic Assignment Problem'',
INFORMS Journal of Computing, 15, pp. 320–330
[8] Hahn, P., Krarup, J. (2001), "A hospital facility problem finally solved", The Journal of
Intelligent Manufacturing, 12(5/6), pp. 487–496
[9] Koopmans, T. C., Beckmann, M. J., (1957), ''Assignment problems and the location of
economics activities'', Econometrica, 25, pp. 53–76
[10] Kuhn, H. W., (1955), ''The Hungarian method for the assignment problem'', Naval
Research Logistic Quarterly, 2, pp. 83–97
[11] Loiola, E. M., de Abreu, N. M. M., Boaventura-Netto, P. O., Hahn, P., Querido, T., (2004),
''An analytical survey for the quadratic assignment problem'', to appear in European Journal
of Operational Research
[12] Misevicius, A. (2003), ''A modified simulated annealing algorithm for the quadratic
assignment problem'', Informatica, 14, pp.497–514
[13] Misevicius, A., (2005), ''A Tabu Search Algorithm for the Quadratic Assignment Problem'',
Computational Optimization and Applications, 30, pp. 95–111
Logistics & Sustainable Transport Volume:1, Issue:3

[14] Povh, J., Rendl, F. (2006), ''Copositive and Semidefinite Relaxations of the Quadratic
Assignment Problem'', submitted
[15] Sahni, S, Gonzales, T. (1967), ''P-complete approximation problems'', J. Assoc. Comput.
Mach., 23, pp. 555–565
[16] STEINBERG, L., (1961), ''The backboard wiring problem: a placement algorithm'', SIAM
Review, 3, pp. 37–50
[17] Travelling salesman problem library TSPLIB (June 2006), http://www.iwr.uni-
heidelberg.de/groups/comopt/software/TSPLIB95/

View publication stats

Вам также может понравиться