A cross entropy-based metaheuristic algorithm for large-scale ...

1 downloads 0 Views 163KB Size Report
Oct 8, 2008 - Von-Melle-Park 5, D-20146 Hamburg, Germany. E-mail: ...... John Wiley and Sons,. Inc.: New ... Qiu L, Padmanabhan VN and Voelker G (2001).
© 2009

Journal of the Operational Research Society (2009) 60, 1439 --1448

Operational Research Society Ltd. All rights reserved. 0160-5682/09 www.palgrave-journals.com/jors/

A cross entropy-based metaheuristic algorithm for large-scale capacitated facility location problems M Caserta1∗ and E Qui˜nonez Rico2 1 Universit¨ at

Hamburg, Hamburg, Germany; and 2 University of Texas at El Paso, El Paso, TX, USA

In this paper, we present a metaheuristic-based algorithm for the capacitated facility location problem. The proposed scheme is made up by three phases: (i) solution construction phase, in which a cross entropy-based scheme is used to ‘intelligently’ guess which facilities should be opened; (ii) local search phase, aimed at exploring the neighbourhood of ‘elite’ solutions of the previous phase; and (iii) learning phase, aimed at fine-tuning the stochastic parameters of the algorithm. The algorithm has been thoroughly tested on large-scale random generated instances as well as on benchmark problems and computational results show the effectiveness and robustness of the algorithm.

PY

Journal of the Operational Research Society (2009) 60, 1439 – 1448. doi:10.1057/jors.2008.77 Published online 8 October 2008 Keywords: heuristics; location; integer programming; cross entropy; local search

A U

TH

O

R

Given a set of n clients C, each with a demand, and a set of m facilities F, each with a fixed cost and a maximum capacity, the capacitated facility location problem (CFLP) is concerned with finding which facilities should be opened and what distribution pattern should be followed to minimize the total cost, given that we incur a unitary transportation cost between facilities and customers. The facility location problem is NP-hard and has been thoroughly studied in the literature, having a wide range of applications. Some of them include access network design problems (Andrews and Zhang, 1998), placement of routers and proxies (Li et al, 1999; Guha et al, 2000), placement of internet instrumentation and web server replications (Jamin et al, 2000; Qiu et al, 2001), clustering problems in data mining (Agarwal and Sharir, 1998). Other applications, as mentioned in Sridharan (1995) and Klose and Drexl (2005), can be found in equipment replacement, scheduling, and location of offshore platforms. In recent decades, two main approaches have emerged to tackle the CFLP:

capacitated version of the facility location problem. For this reason, recent approaches are focused on the development of sophisticated local search techniques. • Metaheuristic-based algorithms, which do not provide a bound on the solution quality. However, these metaheuristicoriented approaches are generally based on obtaining good Lagrangean duals that are used to provide a lower bound on the optimal solution.

C O

Introduction

• Approximation algorithms, providing an upper bound to the gap between the algorithm solution and the global optimum. It is worth noting that approximation algorithms for the facility location problem were originally based on location problem techniques. However, this kind of approach has been unsuccessful in dealing with the ∗ Correspondence: M Caserta, Institute of Information Systems, Department of Business Administration, University of Hamburg, Von-Melle-Park 5, D-20146 Hamburg, Germany. E-mail: [email protected]

Since the approach presented in this paper belongs to the second class, we only present here existing approaches from the literature falling in the same category. Since it is very difficult to calculate an exact solution for instances of realistic size, Lagrangean relaxations play a dominant role in the design of heuristic-based algorithms (see, eg, Barcelo and Casanovas, 1984; Barcelo et al, 1990; Beasley, 1993; Sridharan, 1995; D´ıaz and Fernandez, 2002; Klose and Drexl, 2005). A number of metaheuristic approaches to CFLP, such as evolutive algorithm, simulated annealing, GRASP, tabu search, are discussed in Filho and Galv˜ao (1998) and D´ıaz (2001). An algorithm for very large instances of CFLP is presented in Barahona and Chudak (2005), where the authors propose a heuristic scheme that combines the volume algorithm applied to a relaxation of the problem with a randomized rounding procedure. Excellent results are reported in terms of solution quality for instances with up to 1000 facilities and 1000 customers. From the analysis of the literature, it emerges that one key issue in CFLP is the selection of a good set of facilities to be opened. Once this set is determined, CFLP may be reduced to a standard transportation problem. In line with this observation, the main feature of the proposed algorithm is a metaheuristic-based mechanism aimed at identifying the subset F  ⊆ F of facilities that should be opened. We use a

Journal of the Operational Research Society Vol. 60, No. 10

PY

Here F = {1, . . . , m} indicates the set of candidate facilities, C = {1, . . . , n} is the set of customers, ci j the unitary transportation cost between facility i and customer j, f j the fixed cost of opening facility i. In addition, y = (yi j ) is the set of flow variables, which is, how many units are transported from facility i to customer j. Furthermore, the binary vector x indicates which facilities must be opened among the set of m available facilities, by assigning value 1 to xi if facility i is opened and 0 vice versa. In the model, the first set of constraints deals with the demand of each client, whereas the second set of constraints ensures that a facility does not ship more than what its capacity allows and, at the same time, it enforces the logical relation between flow variables and binary variables. The first phase of the algorithm, the solution construction phase, is made up by two main steps: first, the set of facilities to be opened is identified by using a CE-based algorithm; next, taking as input the set of facilities that are to be opened, an associated transportation problem (ATP) is defined and efficiently solved via a network algorithm. The most important features of CE have been exposed in De Boer et al (2005). For this reason, we only present those features of CE that are relevant to the problem hereby discussed. The main idea of the CE method is related to the design of an effective learning mechanism. It associates an estimation problem to the original combinatorial optimization problem, called the associated stochastic problem, characterized by a density function . The stochastic problem is solved by identifying the optimal importance sampling density ∗ , which is the one that minimizes the Kullback–Leibler distance with respect to the original density . This distance is also called the cross-entropy between  and ∗ . The minimization of the cross-entropy leads to the definition of ‘optimal’ updating rules for the density functions and, consequently, to the generation of improved feasible vectors. The method terminates when convergence to a point in the feasible region is achieved. Since we want to generate binary vectors to identify which facilities should be opened, we use a family of Bernoulli density functions under the following pdf:

A U

TH

O

R

probabilistic mechanism based upon the cross entropy (CE) method (Rubinstein and Kroese, 2004; De Boer et al, 2005), that iteratively ‘guesses’ which facilities should be in F  , and updates its probabilistic parameters by using learning mechanisms that bias the search toward the selection of a minimum cost set F  . The paper presents at least two contributions: first, to the best of the authors’ knowledge, it provides the first application of the CE method to the CFLP; second, it integrates the CE method with local search mechanisms, enhancing the overall performances of the metaheuristic scheme. The proposed algorithm can be seen as a three-phase process: (i) solution construction phase, (ii) local search phase, and (iii) learning phase. During the solution construction phase, a CE-inspired scheme is used to generate binary vectors under a family of Bernoulli distributions, with the aim of ‘intelligently’ guessing a good subset of facilities to be opened. Once such a subset is identified, an associated transportation problem is defined and optimally solved via a transportation algorithm. The second phase of the algorithm is based upon a local search scheme, used to examine a neighbourhood of the elite solution suggested by the CE-based scheme. The local search phase defines two heuristic moves, called AddOne-DropMany and AddMany-DropOne, modelled as knapsack problems and solved in pseudopolynomial time. Finally, the third phase, the learning phase, is based upon an updating mechanism that collects information about individual features found in good solutions and adjusts the algorithm in such a way that these features have higher probabilities to appear in the next generation of CE population points. The three-phase process is then restarted and repeated until either a maximum number of iterations is reached or convergence of the CE method is achieved. This paper has the following structure: the next section briefly presents a mathematical formulation of the problem along with the first phase of the algorithm; next, we introduce the local search mechanism, by defining neighbourhoods, moves and other rules used during the local search phase; subsequently, a summary of the overall algorithm is provided. Finally, the last two sections present experiment plans and computational results on some instances of CFLPs and some remarks and concluding observations.

C O

1440

CE-based algorithm A mathematical formulation of the CFLP is min

s.t. CFLP:

m  n 

ci j yi j +

i=1 j=1 m 

yi j = d j ,

i=1 n 

yi j  si xi ,

j=1

yi j  0, xi ∈ {0, 1},

m 

f i xi

i=1

j = 1, . . . , n i = 1, . . . , m i = 1, . . . , m and j = 1, . . . , n i = 1, . . . , m

(x, u) =

m  (u i )xi (1 − u i )1−xi

(1)

i=1

to generate a random sample X 1 , . . . , X N . At each iteration, the following optimal updating rule is used to update the stochastic parameters: N k=1 I{z(xk )  z} X ki pˆ i =  , i = 1, . . . , m N k=1 I{z(xk )  z} where I{z(x)  z} is the indicator function, whose value is 1 if z(x)  z, which is, if the objective function value of a vector x is less than or equal to a fixed threshold and 0 otherwise, and X ki is the ith component of the random variate X k . This rule is iteratively used with the aim of generating, at each iteration t, a sequence of tuples {z t , pt+1 } such that

M Caserta and E Quiñonez Rico—Cross entropy-based metaheuristic algorithm

z 0  z 1  z 2 . . . , for the estimation of P(S(X)  z t ). At each iteration t, the new value of z t is used to generate a better vector pt+1 . The new vector pt+1 is, in turn, used to draw a sample population under a different distribution function (x, pt+1 ), which will lead to better values of z t+1 . The process stops when the vector p converges to a vector in B. In addition, we implemented a ‘smoothed’ version of the updating rule for CE, as in De Boer et al (2005), in such a way that at each iteration t: pit+1 =  pˆ it+1 + (1 − ) pit

yi j = d j ,

j ∈C

yi j  si ,

i ∈ F

i∈F 



TH

j∈C

yi j  0

O

ATP(F  ):

A U

Problem ATP(F  ) is solved using Goldberg’s (1997) algorithm.  Obviously,  such a problem has a feasible solution only if i∈F  si  j∈C d j . The objective function associated to a binary vector x induced by a random variate X is computed as the sum of two terms:   z(x) = fi + ci j yi∗j i∈F 

Local search heuristic

C O

PY

In order to thoroughly explore the feasible space, we define a local search scheme that examines feasible solutions located in the neighbourhood of a given solution of CFLP. Let F  ⊆ F be a subset of facilities induced by a binary vector X generated from a Bernoulli distribution under Equation (1). Each component of vector X indicates whether a candidate facility should be opened, if set to 1, or kept closed, if set to 0. Furthermore, let us define yi∗j , with i = 1, . . . , |F  | and j = 1, . . . , n, as the optimal solution to ATP(F  ). The objective here is to device a local search scheme to explore solutions in the neighbourhood of the current solution. In the following, let   si ,  i ∈ F\F  f i , i ∈ F\F  fi = s i = si − yi∗j , i ∈ F  0, i ∈ F  j∈C

R

i∈F  j∈C



F  indicates the set of opened facilities induced by X while F = F\F  indicates the set of closed facilities. For instance, if |F| = m 0 , we define F = {(1), . . . , (m 0 )} as the ordered set of closed facilities induced by the current CE vector X, with its probability vector p = { p(1) , . . . , p(m 0 ) }. It is easy to see that, if the current problem has at least one feasible solution, Procedure Project X will find such a solution. The overall complexity of the projection scheme is, in the worst case, O(m 2 ).

(2)

with typically 0.7   0.9. The smoothed update prevents the algorithm from converging too fast to a degenerate vector, hence fostering a more thorough exploration of the search space. The second phase of the algorithm deals with an ATP where one wants to identify, given a set of opened facilities, the transportation pattern between facilities and clients. Given a random state X drawn under Equation (1), let us indicate with the decision variable x ∈ {0, 1} the induced binary vector, where xi takes the same value of X i , for i =1, . . . , m. Furthermore, let F  ⊆ F be the set of facilities opened, which is, F  = {i ∈ F : xi = 1}. The formulation of ATP is the one of a classical transportation problem  ci j yi j min s.t.

1441

i∈F  j∈C

where yi∗j , i ∈ F  , j ∈ C, is the optimal solution to ATP(F  ). Remark 1 As previously mentioned, given a binary  vector induced ATP(F ) problem is feasible only  X, the if i∈F  si  j∈C d j . For this reason, every time a vector X that induces a non-feasible ATP(F  ) is generated, we need to define a quick ‘projection’ scheme that modifies the binary vector until a feasible ATP(F  ) is induced. We devised a quick and simple mechanism to project X back into the feasible space. We iteratively add facilities to the current  pool of candidates induced by X until the feasibility  check i∈F  si  j∈C d j is passed. In order to preserve the measure of ‘attractiveness’ of each candidate facility indicated by the CE scheme through p, we add new facilities to X as presented in Procedure 1. In the following,

be the residual fixed cost and residual capacity of facility i, respectively. Given a solution to CFLP, the following two types of moves can be formalized. AddOne-DropMany: This move corresponds to opening a large facility while closing a set of smaller facilities, with the aim of generating a positive net saving. Let k ∈ F be the facility that is added to the current solution F  and T ⊆ F  \{k} be the subset of facilities to be dropped from F  . The new solution is given by the set of facilities F  ∪ {k}\T and a greedy lower bound to the savings of closing facilities in T and opening facility k, under the assumption that the whole demand covered by facilities in T is reassigned to facility k, can be estimated as facility saving plus service saving: cost(AddOne-DropMany(k,T))   = fi − f k + (ci j − ck j )yi∗j i∈T

i∈T j∈C

which indicates a real saving if positive or extra cost if negative. This greedy lower bound is valid only if the opening facility k has enough capacity to cover the demand served by the closing facilities in T. It is worth noting that the opening facility k could be chosen in F  . In this case, the problem would correspond to redistributing demands assigned to facilities in T to an already opened facility k ∈ F  . Given an opening facility k ∈ F, the problem of finding the set of facilities to be closed T ⊆ F  \{k} can be formulated

Journal of the Operational Research Society Vol. 60, No. 10

max



u i xi

i∈F  \{k}

KP(k)

s.t. 



ai xi  s k i∈F  \{k} |F  \{k}| x∈B

CKP(k, t) :

O

TH

A U

i∈F

s.t.

t

i∈Ft

s i x i  dk − s t

i∈Ft

x ∈ B|Ft | where u i =cik s i + f i is the cost of assigning s i units of demand to facility i, which is the cost of rerouting s i units of demand from facility k to facility i, and Ft = {i ∈ F\{k, t} : u i  u t }. The covering knapsack constraint accounts for the fact that, in order to reach a feasible solution, facilities opened must have a total capacity of at least dk −s t . As we will show later in this section, problem CKP(k, t) can be solved in time polynomial in |Ft | and dk using a dynamic programming algorithm. If we indicate with z(t) the objective function value of the optimal solution to problem CKP(k, t) under the hypothesis that k is closed and t is the furthest facility in the optimal solution, we get that an estimate of the cost of closing k and opening facilities in T ≡ R ∗ = {i ∈ F\{k} : xi = 1} ∪ {t} is:

R

∗ where u i = f i + j∈C (ci j − ck j )yi j is the saving of closing  facility i and reassigning its demands to facility k, ai = j∈C yi∗j is the amount of demand assigned to i ∈ F  that must be reassigned to k ∈ F, s k is the residual capacity of the opening facility k and, finally, xi is the binary variable that takes value 1 if facility i ∈ F  is closed and 0 otherwise. The knapsack constraint accounts for the fact that facility k must have the capacity to accommodate all the clients previously served by facilities in T. Finally, T = {i ∈ F  \{k} : xi = 1}. Obviously, only those facilities i ∈ F  \{k} for which u i > 0 are considered in the definition of the knapsack problem. The knapsack problem can be solved in pseudo-polynomial time using a dynamic programming algorithm whose complexity is O(|F  |s k ). Since we need to solve a knapsack problem for each candidate facility k ∈ F, the overall complexity of this phase of the local search is O(|F|2 s) in the worst case, where s is the maximum facility capacity. AddMany-DropOne: This move corresponds to closing a larger facility while opening a set of smaller facilities, in such a way that a positive net saving is generated. Let k ∈ F  be the facility to be closed and T ⊆ F\{k} the set of facilities to be opened. We want to reassign demands from k to T, while keeping unaffected the remaining facilities. The problem of identifying the optimal set of facilities T to be opened is in itself a facility location problem, where the set of customers is given by the customers served by k and their demands by the portion of demand covered by facility k, which is, yk∗j . For this reason, when it comes to selecting which facilities should be included in T, we use a greedy scheme aimed at estimating the total cost of the swap. Given a closing facility k ∈ F  , an upper bound of the cost of rerouting a unit of demand from k to a facility i ∈ F\{k} can be computed as ck j +ci j , since, for any given customer j ∈ C, the triangle inequality holds true. Let cki =max{ j∈C:yk∗j >0} {ck j + ci j } be an upper bound of such cost. Given any closing facility k, the problem of finding a set of facilities T ⊆ F\{k} to be opened can thus be seen as a facility location problem with a single  ‘customer’, which is, facility k, whose total demand dk = j∈C yk∗j is to be supplied by facilities in T. The special case of facility location problem with a single customer can be solved in polynomial time in the number of facilities, |F\{k}|, and the total demand to be relocated, dk . Let us indicate with R ∗ the optimal solution to the single-client facility location problem and let t ∈ R ∗ be the furthest facility in the optimal solution, which is, t is such that ctk  cik , for every i ∈ F\{k, t}. In this case, there must exist an optimal solution such that every facility i ∈ R ∗ is used to full capacity while facility t will cover the remainder of the demand dk ,

which is, the optimal solution must be such that yik = s i , for every i ∈ R ∗ \{t}, and ytk = dk − i∈R ∗ s i > 0. If the furthest facility t in the optimal solution were known, the problem of finding the optimal set of facilities in R ∗ is equivalent to finding the best set T of opening facilities in AddMany-DropOne and can be formulated as a covering knapsack problem: ⎛ ⎞   u i xi + ckt ⎝dk s i xi ⎠ + f t min

PY

as a knapsack problem:

C O

1442

cost(AddMany-DropOne(k,t)) = z(t) + f t − f k

Since there are m−1 candidate t facilities for any given closing facility k, and given that there are |F  | candidate k facilities, the move AddMany-DropOne has a cost of O(|F|3 s) in the worst case, where s is the average facility capacity. Let us now discuss the dynamic programming algorithm used to solve CKP(k, t), for simplicity, CKP. To simplify the notation, let us redefine b = dk − s t , ci = u i − s i u t , ai = s i , and |F  | = m  . A dynamic recursion for CKP is given by  c if a1  d, k=1 z 1 (d) = 1 ∞ otherwise, z k (d) = min{z k−1 (d), ck + z k−1 (d − ak )}, k = 2, . . . , m  with d = 0, . . . , b. In the Appendix, Proposition 1 establishes the equivalence between CKP and the standard knapsack problem. Consequently, CKP can be solved in pseudo-polynomial time. Finally, we can introduce the local search heuristic, as illustrated in Procedure LocalSearch(). Let qt = z (  N ) be the objective function value of the ( N )th best point of the current CE iteration t. Due to the computational cost of the local search moves, we use these schemes sparingly. More specifically, we apply the scheme only to points that are in the upper  N % of the current CE population. Furthermore, if the solution found by the local search scheme improves the best known result, we add this new solution to the CE population with the aim of ‘biasing’ the CE-based mechanism and to

M Caserta and E Quiñonez Rico—Cross entropy-based metaheuristic algorithm

In this section we present the overall algorithm, which is made up by the CE-based scheme along with the local search heuristic. It is worth noting that, as the probability vector p stabilizes, the chance of re-generating vectors X already explored increases. Let us indicate with Y the set of all the Bernoulli vectors generated so far. When a new vector X is drawn, we first need to check whether X ∈ Y: if this is the case, the objective function value associated to X is known and X can be directly added to the CE population.

O

k = m (NGm + NCmn + N  Hm + S N )

We first tested the algorithm on Beasley’s OR Library instances, whose optimal solution is known. Instances cap41 to cap134, of size ranging from 16 × 50 to 50 × 50, were solved to optimality in less than 2 s. On larger instances, capa, capb, capc, of size 100 × 1000, the algorithm was able to find the global optimum in less than 120 s. In order to further test the effectiveness of the algorithm on very large-scale instances on CFLP, we randomly generates instances of the problem following the scheme proposed in Barahona and Chudak (2005), as reported in Aardal (1998) and Cornu´ejols et al (1990). This scheme has been used by several authors and has the advantage of providing varying ratios of total capacities and total demands. Demand and facility points are randomly generated uniformly in [0, 1] × [0, 1]. The transportation cost is then computed as the Euclidean distance multiplied by 10. Demands are uniformly generated in the range [5, 35], while capacities are generated in the range [10, 160]. The fixed cost for a given facility √ i is computed as f i = U [0, 90] + U [100, 110] si , where U [a, b] indicates a number generated under the continuous uniform distribution in the interval  [a, b].Next, capacities si are rescaled in such a way that i si / j d j = , where  is a fixed factor. Proposed values for the factor  are {1.5, 2, 3, 5, 10}. Finally, the fixed cost of each facility i is multiplied by a parameter v, where v = 2 when  = 1.5, 2 and v = 1 for the remaining cases. Thus, we define, as in Barahona and Chudak (2005), five types of instances, ranging from 300 × 300 to 1000 × 1000, as reported in Table 1.

R

Remark 2 As presented in Rubinstein (2002), it is possible to compute the empirical computational complexity of algorithm CE-LS, which can be defined as

(1) On the one hand, we want to measure the performances of the algorithm, in terms of solution quality, computational effort and robustness, on large-scale instances of CFLP. In order to evaluate the solution quality, we used a mixed-integer programming solver to get the optimal solution to the random generated instances and, subsequently, we compared these solutions with those of the proposed algorithm. (2) On the other hand, we performed a descriptive study of the algorithm, to better understand the effect of some of the key features of the heuristic scheme on the solution quality. With this aim, we investigated how the algorithm performs when only the CE scheme is used, as well as when the local search scheme is used in conjunction with the CE scheme.

PY

Overall algorithm

heuristic-based algorithms presented in the literature could be carried out. All the computational tests presented in this section have been carried out on a Pentium 4 1.2 GHz Linux Workstation with 256 MB of RAM memory. The algorithm has been implemented in C++, and compiled with the GNU g++ compiler using the −O option. (The source codes used in this section along with the random instances are available at http://iwi.econ.uni-hamburg.de/mcaserta/.) The objective of the experiment plan is twofold:

C O

embed the information gathered during the local search within the learning mechanism. On the other hand, if the local search does not produce any improvement in the solution, its result is simply discarded. The aforementioned scheme is presented as pseudocode in Procedure LocalSearch(), where  defines the quantile and is typically chosen in [0.01, 0.2] and N is the size of the CE population and is chosen according to the instance size. In the procedure, xi indicates the binary vector  induced by the random variate Xi , y∗ ∈ Z|F |×|C| is the optimal  best solution to ATP(F ), z is the maximum saving produced by the local search mechanism applied on a given solution F  and, finally, z ∗ is the cost of the best solution found so far.

A U

TH

where m is the total number of iterations needed before the algorithm stops, N is the sample size, G m = O(m) is the cost of generating √ a binary vector under a Bernoulli distribution, Cmn = O( m + n(m × n) log((m + n)C)) is the cost of computing the objective function value of a given CE point via ATP, Hm = O(m 3 s) indicates the cost of the heuristic local search phase, and S N = O(N log N ) is the cost of sorting N binary vectors. We empirically found that t = O(log m). Finally, the empirical computational complexity is found to be O(N m log m), where the sample size N depends on the problem size, in terms of number of facilities. The overall algorithm is presented as pseudocode in Algorithm 5.

Computational results In order to measure the effectiveness of the algorithm, we first ran the algorithm on the benchmark instances of Beasley’s OR Library, whose optimal solutions are known. However, since no large-scale CFLP instances are publicly available, we generated instances following the well-known random scheme of Barahona and Chudak (2005). In this way, a comparison between the effectiveness of the proposed scheme and other

1443

1444

Journal of the Operational Research Society Vol. 60, No. 10

Table 1 Comparison of results on random generated large-scale instances (CPU time and solution quality are average values, computed over 10 instances of the same type) m

n



CE

CE-LS

Time*

C E (%)

N



Time*

C E . L S (%)

N



300

1.5 2 3 5 10

48 49 46 27 29

0.46 0.38 0.00 0.00 0.00

100 100 100 100 100

0.1 0.1 0.1 0.1 0.1

38 38 32 34 26

0.00 0.00 0.00 0.00 0.00

100 100 100 100 100

0.1 0.1 0.1 0.1 0.1

500

500

1.5 2 3 5 10

119 124 125 119 112

0.34 0.79 1.01 0.93 0.59

100 100 100 100 100

0.1 0.1 0.1 0.1 0.1

91 78 65 61 63

0.09 0.06 0.07 0.00 0.00

100 100 100 100 100

0.1 0.1 0.1 0.1 0.1

800

800

1.5 2 3 5 10

173 191 198 156 149

0.35 0.88 1.12 0.77 0.98

500 500 500 200 200

0.1 0.1 0.1 0.1 0.1

226 219 207 218 203

0.46 0.31 0.19 0.20 0.11

200 200 200 200 200

0.1 0.1 0.1 0.1 0.1

1000

1000

1.5 2 3 5 10

346 311 367 344 356

1.93 1.98 1.37 1.45 1.25

500 500 500 500 500

0.1 0.15 0.15 0.15 0.15

429 443 415 471 425

0.43 0.40 0.27 0.25 0.26

200 200 200 200 200

0.1 0.1 0.1 0.1 0.1

the instance. Columns 4 and 5 present CPU time and solution quality of the algorithm when only the CE scheme is used, without any local search mechanism. Columns 6 and 7 indicate the values of N and  for which the best results were obtained. Columns 8–11 provide the same information of columns 4–7, but referred to the full-featured algorithm. We specify an indicator • to measure the solution quality, which provides an empirical measure of the approximation value of the algorithm. The indicator • is defined as follows:

A U

TH

O

R

Along with the random generation process, we implemented a branch-and-cut (B&C) code to solve problems to optimality. The heuristic solution obtained by the proposed algorithm was then compared with the global optimum. The B&C algorithm uses the Cbc module of the COIN-OR Library (Lougee-Heimer, 2003) and has been implemented in C++. We fixed a maximum computational time of 10 000 s for the B&C code and we collected the best upper and lower bounds provided (note that the best upper bound need not be the global optimum). We then compared the solution provided by the CE-based algorithm with the global optimum, if available, or with the best lower bound offered by B&C, if no global optimum solution was found after 10 000 s. Table 1 collects the results on different instance sizes. For each value of m, n, and  we generated 10 different random instances. We, then, computed the average computational time and solution quality. The value of algorithmic parameters N and  has been determined in a fashion similar to what presented in Caserta and Qui˜nonez (2007). The algorithm terminates when (i) convergence of the CE method, which is a degenerate probabilities vector p ∈ Bm , is achieved; or (ii) a maximum number of 50 iterations is reached; or (iii) a maximum wall-clock time of 500 s is reached. Experimental results for large-scale instances are presented in Table 1. In the table, the first and second columns define the problem size, in terms of number of candidate facilities and number of clients, respectively. The third column indicates the factor level  used in the random generation process of

C O

∗ Time measured in seconds on a Pentium 4 1.2 GHz Linux Workstation.

PY

300

• =

z• − z∗ z∗

where z • is the objective function value of the CE algorithm without the local search scheme, when • = CE, and of the complete algorithm, CE and local search, when • = CE.LS, and z ∗ is either the global optimum, if found by B&C within the allotted computational time, or the best lower bound found by B&C, if the global optimum was not found within 10 000 s. It is worth noting that • =0 indicates that the global optimum has been found by the CE-based algorithm. From the empirical results of Table 1 we observe that the algorithm produces excellent performances in terms of solution quality, especially considering the short amount of computational time used. An interesting observation that emerges from the analysis of Table 1 is that, for medium-size instances, the local search feature presented in the Section ‘Local Search Heuristic’ does not seem necessary, since the simple CE scheme and the full-featured algorithm provide

M Caserta and E Quiñonez Rico—Cross entropy-based metaheuristic algorithm

Conclusions

PY

Aardal K (1998). Capacitated facility location: Separation algorithms and computational experience. Math Program 81: 149–175. Agarwal PK and Sharir M (1998). Efficient algorithms for geometric optimization. ACM Comput Surveys 30: 412–458. Andrews M and Zhang L (1998). The access network design problem. In: Proceedings of the 39th Annual IEEE Symposium on Foundations of Computer Science. IEEE Computer Society: Piscataway, NJ, pp 40–49. Barahona F and Chudak F (2005). Near-optimal solutions to large scale facility location problems. Discrete Optim 2: 35–50. Barcelo J and Casanovas J (1984). A heuristic Lagrangean algorithm for the capacitated plant location problem. Eur J Opl Res 15: 212–226. Barcelo J, Hallefjord A, Fernandez E and J¨ornsten K (1990). Lagrangean relaxation and constraint generation procedures for capacitated plant location problems with single sourcing. ORSpektrum 12: 79–88. Beasley JE (1993). Lagrangean heuristics for location problems. Eur J Opl Res 65: 383–399. Caserta M and Qui˜nonez E (2007). A cross entropy-Lagrangean hybrid algorithm for the multi-item capacitated lot-sizing problem with setup times. Comput Opns Res 36: 530–548. Cornu´ejols G, Nemhauser GL and Wolsey LA (1990). The uncapacitated facility location problem. In: Mirchandani PB and Francis RM (eds). Discrete Location Theory. John Wiley and Sons, Inc.: New York, pp 119–171. De Boer P, Kroese DP, Mannor S and Rubinstein RY (2005). A tutorial on the cross-entropy method. Ann Opns Res 134: 19–67. D´ıaz JA (2001). Algorithmic approaches for the single source capacitated facility location problem. PhD thesis, Universitat Polytecnica de Catalunya, Barcelona, Spain. D´ıaz JA and Fernandez E (2002). A branch-and-price algorithm for the single source capacitated plant location problem. J Opl Res Soc 53: 728–740. Filho VJ and Galv˜ao RD (1998). A tabu search heuristic for the concentrator location problem. Location Sci 6: 189–209. Goldberg AV (1997). An efficient implementation of a scaling minimum-cost flow algorithm. J Algorithms 22: 1–29. Guha S, Meyerson A and Munagala K (2000). Hierarchical placement and network design problems. In: Proceedings of the 41th Annual IEEE Symposium on Foundations of Computer Science. IEEE Computer Society: Piscataway, NJ, pp 603–612. Jamin S, Jin C, Jin Y, Raz D, Shavitt Y and Zhang L (2000). On the placement of internet instrumentations. In: Proceedings of IEEE INFO-COM’00. IEEE Computer and Communication Societies: Tel Aviv, Israel. Klose A and Drexl A (2005). Facility location models for distribution system design. Eur J Opl Res 162: 4–29. Li B, Golin M, Italiano G and Deng X (1999). On the optimal placement of web proxies in the internet. In: Proceedings of IEEE INFOCOM’99. IEEE Computer and Communication Societies: New York, pp 1282–1290. Lougee-Heimer R (2003). The common optimization interface for operations research. IBM J Res Dev 47: 57–66. Qiu L, Padmanabhan VN and Voelker G (2001). On the placement of web server replicas. In: Proceedings of IEEE INFOCOM’01. IEEE Computer and Communication Societies: Piscataway, NJ, pp 1587–1596. Rubinstein RY (2002). The cross-entropy method and rare events for maximal cut and partition problems. ACM Trans Modell Comput Simul 12: 27–53. Rubinstein RY and Kroese DP (2004). The Cross-Entropy Method: A Unified Approach to Combinatorial Optimization, Monte Carlo Simulation, and Machine Learning. Springer-Verlag: Berlin. Sridharan R (1995). The capacitated plant location problem. Eur J Opl Res 87: 203–213.

A U

TH

O

R

In this paper, we present a CE-based algorithm for the CFLP. The algorithm can be seen as a three-phase scheme, where CE, local search, and learning mechanisms are combined and effectively intertwined. Computational results suggest that in dealing with large-scale instances of the problem, higher quality solutions can be produced if one is willing to sacrifice something in terms of computational time, by using the more sophisticated algorithm, that embeds a local search scheme within the CE framework. Such a scheme is able to find globally optimal solutions for all the instances of Beasley’s OR Library as well as on instances with up to 500 facilities and 500 clients. An interesting extension of CFLP is the multi-level CFLP, where one has a set of facilities and a set of warehouses, each with a fixed cost and a capacity, and a set of clients, each with a demand. The objective is to find which set of facilities and warehouses should be opened and what distribution pattern should be followed to minimize the sum of fixed costs and service costs while complying with all the demands and respecting a set of capacity constraints. Consequently, the use of a scheme that resembles the one proposed in this paper can be envisioned. Finally, another advantage of the CE algorithm is that, since it can easily be parallelized, it has a large potential for speed up. The CE-based scheme can be parallelized in such a way that each ATP problem can be solved on parallel machines, down to the level in which each machine is assigned a single point of the CE population. This proves beneficial when dealing with very large-scale instances of the problem and is currently an object of study of the authors.

References

C O

solutions of comparable quality. However, by observing the results of larger instances of Table 1, we deduce that the local search feature becomes relevant with the growth of the instance size. In Table 1, the solution quality of the CE-LS scheme is almost always superior to the one of the simple CE scheme for instances greater than 300 × 300. For example, considering the biggest instances tested (1000 facilities and 1000 customers), the average primal–dual gap of the CE scheme is of 1.59% while the CE–LS scheme produces a gap of 0.322%. As one would expect, though, such improvement in the solution quality comes with a cost in terms of computational time. Finally, if we compare the results obtained by the proposed algorithm with those of Barahona and Chudak (2005), we can see that the proposed algorithm provides promising results, especially in the case of very large-scale instances. On the largest instances, of size 1000 × 1000, the gap reported by the two authors is 0.772%, while the average gap of the proposed algorithm is 0.322%. Considering that these values are averaged over a large number of instances to reduce any ‘instance-specific’ effect, we can conclude that the proposed algorithm shows promising performances on very large-scale instances.

1445

1446

Journal of the Operational Research Society Vol. 60, No. 10

Appendix Proposition 1 Problem CKP is equivalent to a standard Binary Knapsack Problem. Proof

Let xi = 1 − xi in CKP. Then, CKP is equivalent to 

min

m 

(ci − ci xi )

i=1 m 



m  − ai

ai xi  d

s.t. −

i=1

xi ∈ B,

i=1

i = 1, . . . , m 

The optimal solution to this problem is given by the optimal solution to m  ci xi min 



i=1

xi ∈ B,



PY

i=1

m m   s.t. ai xi  ai − d

KP:

i=1

i = 1, . . . , m 

r ← U [0, 1] k←1 k  t p(w)

4:

 while w=1

pit

d j do

{uniform random number in [0, 1]}

< r do

A U

i∈F

k←k+1 5: 6: end while 7: add (k) to F  8: remove (k) from F 9: update X 10: end while

O

2: 3:

j∈C

TH

i∈F

R

Require: X, pt , F  , F Ensure: feasible X   si < 1: while

C O

Procedure 1 : Project X()

{update set of opened facilities} {update set of closed facilities} {update binary vector}

Procedure 2 : AddOneDropMany() Require: F  , X Ensure: z best , k ∗ , T ∗ 1: T ∗ = ∅; z best ← 0 2: for k ∈ F do 3: define and solve KP(k, T ) 4: if z KP(k,T ) − f k > z best then 5: k∗ ← k 6: T∗ ← T 7: z best ← z KP(k,T ) − f k 8: end if 9: end for

{opening and closing facilities} {zbest is maximum saving} {find facilities to be dropped} {best solution found} {maximum saving}

M Caserta and E Quiñonez Rico—Cross entropy-based metaheuristic algorithm

Procedure 3 : AddManyDropOne() Require: F  , X Ensure: z best , k ∗ , T ∗ 1: T ∗ = ∅ 2: compute s i for every i ∈ F 3: for k ∈ F  do 4: compute cki for every i ∈ F\{k} 5: for t ∈ F\{k} do 6: define and solve CKP(k, t) 7: if z CKP + f t − f k < z best then 8: z best ← z CKP + f t − f k 9: k∗ ← k 10: T ∗ ← {i ∈ F\{k, t} : xi = 1} ∪ {t} 11: end if 12: end for 13: end for 14: solve ATP(F  ∪ T ∗ \{k ∗ })  15: z best ← i∈F  ∪T ∗ \{k ∗ } f i + z ATP

{closing and opening facilities} {set of added} {residual capacities} {relocation costs}

PY

{covering knapsack problem}

C O

{solve ATP with best solution found} {compute real obj function value}

A U

O

TH

Require: CE population Y, z best Ensure: z best , Y 1: for Xi ∈ Y do 2: if z(xi ) < qt−1 then 3: call AddManyDropOne() 4: if z best < z ∗ then 5: z ∗ ← z best 6: add solution to CE population Y 7: end if 8: call AddOneDropMany() 9: if z(xi ) − z best < z ∗ then 10: z ∗ ← z best 11: add solution to CE population Y 12: end if 13: end if 14: end for

R

Procedure 4 : LocalSearch()

{bias CE probabilities}

{bias CE probabilities}

1447

1448

Journal of the Operational Research Society Vol. 60, No. 10

Algorithm 5 : CrossEntropyFacilityLocation(CE-LS)

C O

PY

{update set of visited points} {associated transportation problem}

A U

TH

O

R

Require: algorithmic parameters N ,  Ensure: best solution (x∗ , y∗ ) 1: generate p0 , pi0 = 1/2, i = 1, . . . , m. Set t := 0 2: draw a sample population Y = {X1 , . . . , X N ∼ Ber (pt )} 3: for all Xk ∈ Y do 4: if Xk is not feasible then 5: call Project X() 6: end if 7: if Xk ∈ / Y then 8: add Xk to Y 9: define ATP(Fk ) 10: solve ATP(Fk ) 11: end if 12: end for 13: sort Y in ascending order w.r.t. the objective function value 14: select best  N points of sample population 15: call LocalSearch() 16: compute pt+1 using Equation (2) 17: if stopping criteria then 18: STOP. 19: else 20: t ← t + 1 and go back to Step 2 21: end if

{quantile} {local search scheme} {smoothed update of pt }

{termination criteria achieved} {update iteration counter}

Received March 2007; accepted June 2008 after two revisions

Suggest Documents