the p-median problem under uncertainty

12
Discrete Optimization The p-median problem under uncertainty Oded Berman a , Zvi Drezner b, * a Joseph L. Rotman School of Management, University of Toronto. 105 St. George Street, Toronto, Ontario, Canada M5S 3E6 b College of Business and Economics, California State University-Fullerton, Fullerton, CA 92834, United States Received 7 September 2005; accepted 13 May 2007 Available online 9 June 2007 Abstract Consider the need to currently locate p facilities but it is possible that up to q additional facilities will have to be located in the future. There are known probabilities that 0 6 r 6 q facilities will need to be located. The p-median problem under uncertainty is to find the location of p facilities such that the expected value of the objective function in the future is min- imized. The problem is formulated on a graph, properties of it are proven, an integer programming formulation is con- structed, and heuristic algorithms are suggested for its solution. The heuristic algorithms are modified to reduce the run time by about two orders of magnitude with minimal effect on the quality of the solution. Optimal solutions for many problems are found effectively by CPLEX. Computational results using the heuristic algorithms are presented. Ó 2007 Elsevier B.V. All rights reserved. Keywords: Location; Network; Stochastic 1. Introduction Various models of stochastic p-median problems are proposed in the literature (Berman and Krass, 2002). There are studies which investigate uncer- tainty about future weights modeling the weights as random variables drawn from a given distribu- tion (Frank, 1966, 1967; Drezner, 1985), uncertainty about future locations (Cooper, 1978; Juel, 1981; Drezner, 1985, 1979). Another stream of research also assumes random weights and seeks the minimi- zation of the probability that the value of the objec- tive function exceeds a given threshold (Berman and Wang, 2004, 2007; Drezner et al., 2002; Frank, 1966, 1967). There exist several papers that investi- gate the probability that the optimal solution is at certain points when the weights are random vari- ables (Wesolowsky, 1977; Drezner and Wesolow- sky, 1981; Drezner and Shiode, 2007). In this paper we investigate the situation when the number of facilities in the future is uncertain. We need to locate p facilities at the present time and will have to locate up to q additional facilities in the future. The probability that r facilities will be located in the future is given for every 0 6 r 6 q. It is assumed that when new facilities are located in the future, they are located at sites which are optimal given the location of the original p facilities. Current et al. (1998) considered the problem of locating p facilities immediately and later locate several new facilities during the time horizon. They proposed to use the minimax regret criterion since the number 0377-2217/$ - see front matter Ó 2007 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2007.05.045 * Corresponding author. Tel.: +1 714 278 2712; fax: +1 714 278 5940. E-mail address: [email protected] (Z. Drezner). Available online at www.sciencedirect.com European Journal of Operational Research 189 (2008) 19–30 www.elsevier.com/locate/ejor

Upload: oded-berman

Post on 26-Jun-2016

217 views

Category:

Documents


3 download

TRANSCRIPT

Available online at www.sciencedirect.com

European Journal of Operational Research 189 (2008) 19–30

www.elsevier.com/locate/ejor

Discrete Optimization

The p-median problem under uncertainty

Oded Berman a, Zvi Drezner b,*

a Joseph L. Rotman School of Management, University of Toronto. 105 St. George Street, Toronto, Ontario, Canada M5S 3E6b College of Business and Economics, California State University-Fullerton, Fullerton, CA 92834, United States

Received 7 September 2005; accepted 13 May 2007Available online 9 June 2007

Abstract

Consider the need to currently locate p facilities but it is possible that up to q additional facilities will have to be locatedin the future. There are known probabilities that 0 6 r 6 q facilities will need to be located. The p-median problem underuncertainty is to find the location of p facilities such that the expected value of the objective function in the future is min-imized. The problem is formulated on a graph, properties of it are proven, an integer programming formulation is con-structed, and heuristic algorithms are suggested for its solution. The heuristic algorithms are modified to reduce the runtime by about two orders of magnitude with minimal effect on the quality of the solution. Optimal solutions for manyproblems are found effectively by CPLEX. Computational results using the heuristic algorithms are presented.� 2007 Elsevier B.V. All rights reserved.

Keywords: Location; Network; Stochastic

1. Introduction

Various models of stochastic p-median problemsare proposed in the literature (Berman and Krass,2002). There are studies which investigate uncer-tainty about future weights modeling the weightsas random variables drawn from a given distribu-tion (Frank, 1966, 1967; Drezner, 1985), uncertaintyabout future locations (Cooper, 1978; Juel, 1981;Drezner, 1985, 1979). Another stream of researchalso assumes random weights and seeks the minimi-zation of the probability that the value of the objec-tive function exceeds a given threshold (Berman andWang, 2004, 2007; Drezner et al., 2002; Frank,

0377-2217/$ - see front matter � 2007 Elsevier B.V. All rights reserved

doi:10.1016/j.ejor.2007.05.045

* Corresponding author. Tel.: +1 714 278 2712; fax: +1 714 2785940.

E-mail address: [email protected] (Z. Drezner).

1966, 1967). There exist several papers that investi-gate the probability that the optimal solution is atcertain points when the weights are random vari-ables (Wesolowsky, 1977; Drezner and Wesolow-sky, 1981; Drezner and Shiode, 2007).

In this paper we investigate the situation when thenumber of facilities in the future is uncertain. Weneed to locate p facilities at the present time and willhave to locate up to q additional facilities in thefuture. The probability that r facilities will be locatedin the future is given for every 0 6 r 6 q. It isassumed that when new facilities are located in thefuture, they are located at sites which are optimalgiven the location of the original p facilities. Currentet al. (1998) considered the problem of locating p

facilities immediately and later locate several newfacilities during the time horizon. They proposedto use the minimax regret criterion since the number

.

20 O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30

of new facilities is not known and compared it withthe expected opportunity loss criterion.

There are practical situations that should bemodeled by the p-median model under uncertainty.For example, suppose that there is a limited budgetthat allows the location of p facilities and there may

be additional budget available in the future forexpansion. Another example is the location of achain of specialty stores, specialty restaurants, cof-fee houses, movie theaters, or others, planned fora market area. The planner is not sure about thesuccess of the chain. If the chain is successful, morefacilities will be built in the future. The model canalso be used in a non-probabilistic context. Supposethat we know that in five years an additional facilitywill be built and suppose that the planning horizonis for 20 years. The first p facilities contribute to theprofit for 20 years and the additional facilitycontributes to it for only 15 years. Present valueconsiderations can also be incorporated into the cal-culation. Instead of viewing a as a probability, it canbe viewed as a function of the additional facility’srelative contribution to the profit. A combinationof these approaches can also be useful. There is aprobability that in a few years demand will increaseuniformly at all demand points. Such an increasewill require the establishment of more facilities. Sev-eral scenarios for adding one, two, or more facilitiescan be incorporated into the model. The probabilityof each scenario can be multiplied by the extent ofthe increase in demand. The shorter service timefor the extra facilities can also be incorporated intothe calculations.

The p-median problem under uncertainty is sim-ilar, in many ways, to the Stackelberg equilibriummodel (Drezner, 1982; Drezner and Drezner, 1998;Hakimi, 1983, 1990; Miller et al., 1991). In the Stac-kelberg equilibrium model, the leader wishes tolocate a competing facility such that when a futurecompetitor (the follower) locates a facility in his best

location (knowing the location selected by the lea-der), the market share preserved by the leader’sfacility is maximized. The progressive p-medianproblem (Drezner, 1995b) is also related to the p-median problem under uncertainty. It investigatesthe location of an increasing number of facilitiesas weights change in a predicted way over the timehorizon. The conditional p-median (Berman andSimchi-Levi, 1990; Drezner, 1995a; Minieka, 1980)solves the problem of locating a given number ofnew facilities given that several existing facilitiesare already located.

In this paper we introduce the p-median problemunder uncertainty, formulate it, and analyze in detailthe case q = 1. The paper is organized as follows. InSection 2 we define the problem and in Section 3 weformulate the problem as an integer program andreport results using CPLEX for 1 6 q 6 10. In Sec-tion 4 we analyze the special case of q = 1. Heuristicalgorithms are proposed for the solution of thisproblem. In Section 5 we report computationalexperiments on a set of 40 test problems. We con-clude in Section 6 and propose future research.

2. Problem definition

Consider a graph G(N,L) with a set N of n nodes,and a set of m links L. The shortest distance betweennode i and node j is dij. Demand at node i 2 N is wi.When several facilities are available on the network,each customer selects the closest facility. The p-med-ian model seeks the locations for p facilities such thatthe total weighted distance is minimized. We extendthe p-median problem as follows. Suppose that atsome point in the future some new facilities will beadded to the system. Suppose that up to q new facil-ities can be added, and the probability that 0 6r 6 q facilities are added is a given ar. By definitionPq

r¼0ar ¼ 1. For example, if the probability of add-ing a facility is a and these events are independent,then ar follows a binomial distribution. The p-med-ian model under uncertainty seeks the location forp facilities that minimize the expected weighted dis-tance when additional facilities are added in thefuture. The additional facilities will be located inthe future at the best set of sites taking into accountthe p sites that were selected at present.

In the following Theorem we prove that the p-median problem under uncertainty satisfies theHakimi property, i.e., an optimal solution mustexist with all the facilities located on nodes. Conse-quently, it suffices to consider only location onnodes of the network.

Theorem 1. There exists an optimal solution to the p-

median problem under uncertainty with all facilities

located on nodes

Proof. Consider the value of the objective functionwhen one facility is located on a link and all otherfacilities are fixed. The distance between a nodeand a point on the link is a concave function ofthe location on the link. The weighted sum of suchdistances is concave, and a minimum between two

O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30 21

concave functions is also concave. Therefore, theobjective function as a function of one facilitylocated on a link is a concave function on that linkand must obtain its minimum on one of the two endnodes on that link. In conclusion, a solution with atleast one facility located in the interior of a link can-not be the only optimal solution. h

Let Kr(P) be a set of r nodes in N � P and letFr(P) be the best value of the objective functionwhen r facilities are added in the future to an exist-ing set of facilities P. The value of Fr(P) is:

F rðP Þ ¼ minKrðPÞ2N�P

Xi2N

wi minj2P[fKrðPÞg

fdijg( )

: ð1Þ

The p-median problem under uncertainty is:

minP

F ðP Þ ¼Xq

r¼0

arF rðP Þ( )

; ð2Þ

where Fr(P) are defined by (1).Note that when ar = 1 and all the other a’s are

equal to zero, the p-median problem under uncer-tainty is equivalent to the p + r-median problem.Once a solution to the p + r-median problem isfound, any selection of p facilities out of the p + r

facilities is a solution to the p-median problemunder uncertainty because the final configurationconsists of p + r facilities, the remaining r facilitiesare located at their optimal locations, and all solu-tions with a different number of facilities have aweight of zero.

Once the locations of the p facilities are given, thevalue of the objective function is readily calculated.For each 0 6 r 6 q the optimal location for theadditional r facilities is found and the value of theobjective function is the weighted sum (weightedby the probabilities) of these values of the objectivefunction. Finding the best location for r additionalfacilities for a given a set of p existing facilities isknown as the ‘‘conditional p-median problem’’(Berman and Simchi-Levi, 1990; Drezner, 1995a;Minieka, 1980).

3. An integer programming formulation

The problem can be formulated as an integerprogram. Let xp

j be a binary variable that assumesthe value of 1 if one of the p facilities is located atnode j and 0 otherwise. Let xpþr

j be a binary decisionvariable that assumes the value of 1 if facility islocated at node j when r new facilities should be

located on the network and 0 otherwise for j =1, . . . ,n and r = 1, . . . ,q. Let xpþr

ij be a binary deci-sion variable that assumes the value of 1 if demandnode i is assigned to a facility located at node j whenp + r facilities are located on the network. Theproblem can now be formulated as follows:

minXq

r¼0

ar

Xn

i¼1

wi

Xn

j¼1

xpþrij dij

s:t: Xn

j¼1

xpj ¼ p; ð3Þ

Xn

j¼1

xpþrj ¼ r r¼ 1; . . . ;q; ð4Þ

xpij� xp

j 6 0; ð5Þxpþr

ij � xpj � xpþr

j 6 0 i; j¼ 1;2; . . . ;n r¼ 1; . . . ;q;

ð6ÞXn

j¼1

xpþrij ¼ 1 i¼ 1;2; . . . ;n r¼ 0;1; . . . ;q; ð7Þ

xpþrij ¼ 0;1 i; j¼ 1;2; . . . ;n r¼ 0;1; . . . ;q;

xpþrj ¼ 0;1 j¼ 1;2; . . . ;n r¼ 1; . . . ;q; ð8Þ

xpj ¼ 0;1 j¼ 1;2; . . . ;n:

The objective function is to minimize the expectedcost of serving all the demand nodes, taking into ac-count that r new facilities may be located in the fu-ture, r = 0, 1,. . .,q. In Constraints (3) (constraints(4)) we make sure that p (r new) facilities shouldbe located. Constraints (5) (Constraints (6)) ensurethat node i can be assigned to facility located atnode j when p (p + r) facilities should be locatedonly if a facility at node j is located. Constraints(7) make certain that each demand node is assignedto a facility for all possible numbers of facilities tobe located.

The number of binary decision variables is(q + 1)(n + n2) and the number of constraints is(q + 1)(1 + n + n2). Notice that if q = 1 (at mostone facility could be located in the future), thereare twice the number of constraints and decisionvariables of the standard p-median problem.

As an example, consider the 6-node network inFig. 1, where the numbers near the links are lengthsand the numbers near nodes are weights.

Suppose p = 1 and q = 2, a0 = .3, a1 = .4, a2 = .3.The optimal solution is to locate a facility at node 2now, at nodes {2,4} if r = 1 and at nodes {2,4,5} ifr = 2. The optimal objective function value is 25.2.

Table 1Results by CPLEX

n p Objective Timea n p Objective Timea

100 5 5586.5 0.05 400 5 7988.5b 60.34100 10 3972.0 0.03 400 10 6897.5b 60.16100 10 4147.0 0.31 400 40 4780.0 1.92100 20 2986.0 0.02 400 80 2832.0 1.05100 33 1328.5 0.03 400 133 1780.5 1.09

200 5 7578.0 5.94 500 5 8955.0 2.57200 10 5527.0 0.41 500 10 8464.0b 60.31200 20 4386.0 0.17 500 50 4597.5 2.65200 40 2705.0 0.14 500 100 2949.5 2.20200 67 1243.0 0.14 500 167 1820.5 2.20

300 5 7544.5 5.42 600 5 10911.5b 60.54300 10 6522.0 1.29 600 10 8220.0 53.04300 30 4340.0 0.49 600 60 4480.5 5.75300 60 2947.5 0.71 600 120 3023.5 3.35300 100 1718.5 0.48 600 200 1983.0 3.35

a Time in minutes.b Not proven optimal.

Fig. 1. A 6-node network.

22 O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30

It is interesting to note that the 1-median solution(setting a0 = 1) is node 5, the 2-median solution(a1 = 1) is {2,4}, and the 3-median solution is{2,4,5}. The best solution if locating node 5 nowis to locate nodes {2, 5} if r = 1 and nodes {2,4,5}if r = 2 with an objective function value of 25.9.

3.1. Solving moderately sized problems using CPLEX

As test problems throughout this paper for the p-median problem under uncertainty we used the setof 40 problems given in Beasley (1990) for testingp-median algorithms. We tested 1 6 q 6 10 anda ¼ 1

qþ1.

A program that prepared the input file forCPLEX8.1 was coded in Microsoft Visual C++6.0 and run on a Dell OPTIPLEX GX280 PC with0.99 GB RAM and 3.2 GHz Pentium(R) 4 CPU.The run was stopped after 1 hour of computer timeif it was not finished.

Table 2Number of problems optimally solved by CPLEX

n q

1 2 3 4 5 6 7 8 9 10

100 5 5 5 5 5 5 5 5 5 5200 5 5 5 5 5 5 5 3 3 2300 5 5 2 2 0 0 0 0 0 0400 3 0 0 0 0 0 0 0 0 0

3.1.1. Results for q = 1

Problems with n P 700 could not be run becauseCPLEX ran out of memory. No integer solutionwas found for any of these problems. The resultsfor n 6 600 problems are reported in Table 1.

Better solutions were found by the heuristic algo-rithms described below for the n = 400, p = 5,

n = 400, p = 10, and n = 600, p = 5 problems. Thebest known solution for the n = 500, p = 10 prob-lem is the same as the solution found by CPLEXafter 1 hour.

3.1.2. Results for q P 1

We solved problems with n 6 400 because prob-lems with n P 500 ran out of memory for q > 1.Five problems are given in Beasley (1990) for eachvalue of n. Therefore, we report the combined fiveresults for each value of n. In Table 2 we reportthe number of problems (out of 5) solved to opti-mality within one hour. In Table 3 we report theaverage run time in minutes for problems that weresuccessfully solved. In Figs. 2 and 3 we depict theaverage run time and the average solution valuefor the five n = 100 problems as a function of q. Itis clear from these tables that larger values of q

are more difficult for CPLEX and run time requiredfor finding the optimal solution generally increaseswith the value of q. The increase in run time as afunction of q is also evident from Fig. 2. Increasing

Table 3Average time (in minutes) for problems optimally solved by CPLEX

n q

1 2 3 4 5 6 7 8 9 10

100 0.06 0.12 0.23 0.37 0.31 0.48 0.87 1.61 1.08 1.57200 1.02 1.59 5.36 5.27 6.29 10.37 11.74 19.76 19.21 5.77300 1.35 3.83 32.50 4.85400 1.64

1.0

1.5

2.0

0.0

0.5

1 10

Tim

e (m

in)

q2 3 4 5 6 7 8 9

Fig. 2. Run times for n = 100 problems.

3300340035003600

2900300031003200Va

lue

1 10q

2 3 4 5 6 7 8 9

Fig. 3. Average objective function values for n = 100 problems.

O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30 23

the value of q is expected to enable lower values ofthe objective function which is confirmed in Fig. 3.

4. One additional facility

Suppose that the probability that one facility isestablished in the future is a. Let P of cardinalityp be a set of selected nodes. The value of the objec-tive function F(P) for a given set P is calculated byEqs. (1) and (2). Let F0(P) be the value of the objec-tive function when no extra facility is located in thefuture (the p-median objective), and F1(P) be thevalue of the objective function when a facility isadded in the future (at the best location for it givenP). Then,

F ðP Þ ¼ ð1� aÞF 0ðP Þ þ aF 1ðPÞ; ð9Þ

where

F 0ðP Þ ¼Xi2N

wi minj2P

dij

� �;

F 1ðP Þ ¼ mink2N�P

Xi2N

wi minj2P[fkg

dij

� �( ):

4.1. The descent approach

The descent approach is based on the exchangeapproach suggested in Teitz and Bart (1968). Allp(n � p) pair exchanges (one facility removed fromP and one not in P added to P) are evaluated, theexchange which improves the objective functionthe most is executed, and a new iteration starts.The algorithm is stopped when no improvingexchange is found.

4.1.1. Calculating the value of the objective function

following an exchange

Calculating the value of the objective functiondirectly requires O(np) time to calculate F0(P) andO(np(n � p)) time to calculate F1(P). Since a dis-tance between a node and itself is zero, there is noneed to evaluate the sum for the nodes in P and thusthe complexities can be reduced to O((n � p)p) andO((n � p)2p), respectively. When all exchanges of anode in P and a node not in P are evaluated, thereare O(p(n � p)) such possible exchanges and calcu-lating the value of the objective function directly isdominated by the calculation of F1(P) and thusrequires O((n � p)3p2) time. This complexity canbe reduced by a factor of p as follows. Maintain avector of length n of the minimum distance betweena node and all nodes in P and apply the algorithmdepicted in Table 4.

4.2. Tabu search

Tabu search (Glover, 1986; Glover and Laguna,1997) proceeds from the solution found by the des-cent algorithm in an attempt to escape local minima

Table 4Calculating all possible exchanges

Operation Complexity

Preamble

(1) "j 2 N � P Calculate Dj ¼ mini2Pfdijg. Note that Dj = 0 for j 2 P O(p(n � p))(2) Calculate F 0ðP Þ ¼

Pj2N�P wjDj O(p(n � p))

Scan all r 2 N � P for the additional facility(3) Find DF ¼ maxr2N�P

Pj2N�P wj maxfDj � drj; 0g O((n � p)2)

(4) F1(P) = F0(P) � DF

(5) F(P) = aF0(P) + (1 � a)F1(P) = F0(P) � (1 � a)DF

Iterations

Scan all i 2 P for removal(6) "j 2 N Calculate Dð1Þj ¼

minl2P�figfdljg j dij ¼ Dj

Dj j Otherwise

�O(np2)

(7) DF ð1Þ ¼P

j2N wjðDð1Þj � DjÞ O(np)Scan all k 2 N � P for inclusion

(8) "j 2 N Calculate Dð2Þj ¼ minfdkj;Dð1Þj g O(np(n � p))

(9) DF ð2Þ ¼ DF ð1Þ þP

j2N wjðDð2Þj � Dð1Þj Þ O(np(n � p))

(10) Find the set Q of all j such that Dð2Þj > 0 O(np(n � p))Scan all r 2 N � P � {k} + {i} for the additional facility

(11) Find DF ð3Þ ¼ maxr2N�P�fkgþfigP

j2Qwj maxfDð2Þj � drj; 0g O(p(n � p)3)

(12) DF0(P) = DF(2); DF1(P) = DF(2) � DF(3) + DF

(13) Find the i and k that minimizeDF(P) = DF(2) + (1 � a) (DF(3) � DF)

(14) Remove i from P and add k to P. Update F(P) = F(P) + DF(P)(15) Set Dj ¼ Dð2Þj and DF = DF(3) O(n)

24 O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30

and possibly get the search to better local minima orthe global minimum.

The following simple tabu scheme was used. Anode is in the tabu list if it was recently removedfrom the selected set of nodes. It cannot re-enterthe selected set while in the tabu list (unless its inclu-sion improves the best known solution). When thetabu list consists of n � p members, no exchange ispossible. Therefore, we opted to select the tabu ten-ure to be a fraction of n � p. Following extensiveexperiments on small problems, we randomly selectthe tabu tenure each iteration in the range[0.05(n � p), 0.25(n � p)]. Since the run time of thedescent approach is relatively long, we did notexperiment with many iterations of the tabu search.Let the number of the iterations of the descent algo-rithm be h, then the number of extra tabu searchiterations was set to 9h so that the run time of thetabu search is about 10 times the run time of the des-cent algorithm.

4.3. Reducing the run time of the algorithms

When experimenting with the descent algorithmand the tabu search on the 40 p-median problemsin Beasley (1990) we found that run times increase

very rapidly with the size of the problem and thebiggest problem may require over a month of com-puter time to apply 100 replications of the descentalgorithm or 10 replications of the tabu search. InTable 5 we report the solutions obtained for the first20 problems (n 6 400) using a = 0.5. The largestproblem in this category takes about 3 days of com-puter time for 100 replications of descent or 10 rep-lications of tabu.

We attempted to reduce the run time with mini-mal effect on the performance of the algorithms.Examining the process depicted in Table 4 revealsthat the most time consuming part of the algorithmis Step (11). If we can ‘‘guess’’ correctly which r

yields the maximum DF(3), we can reduce the com-plexity of Step (11) by a factor of n � p.

The following approach worked quite well. The(p + 1)th facility tends to be far from the first fixedp facilities. The vector Dð2Þj already contains the min-imum distance from demand point j to the new setof p facilities. The demand point with the largestvalue of Dð2Þj is the most likely candidate locationfor the (p + 1)th facility. To increase the probabilitythat we use the best r we repeated Step (11) forthe five nodes with the largest values of Dð2Þj (foundin O(n) time). We identify the exchange (i.e., i and k

Table 5Solutions to moderately sized problems applying the exhaustive algorithms

n p Best known Descent Tabu

Averagea Maxa b Timec Averagea Maxa b Timec

100 5 5586.5d 0.00 0.00 100 0.51 0.00 0.00 10 0.44100 10 3972.0d 0.40 0.74 45 1.33 0.00 0.00 10 1.15100 10 4147.0d 0.09 0.64 57 1.22 0.00 0.00 10 1.09100 20 2986.0d 0.29 3.05 27 2.34 0.00 0.00 10 2.36100 33 1328.5d 0.04 0.11 69 1.72 0.02 0.11 8 2.26

200 5 7578.0d 0.00 0.00 100 5.17 0.00 0.00 10 4.48200 10 5527.0d 0.02 0.05 60 14.90 0.01 0.05 9 12.65200 20 4386.0d 0.03 0.11 43 44.26 0.01 0.05 8 39.95200 40 2705.0d 0.49 0.74 6 91.58 0.47 0.70 1 91.24200 67 1243.0d 0.75 2.21 11 113.60 0.00 0.00 10 113.69

300 5 7544.5d 0.03 0.38 91 17.36 0.00 0.00 10 14.32300 10 6522.0d 0.00 0.00 100 57.28 0.00 0.00 10 53.55300 30 4340.0d 0.07 0.52 70 332.34 0.00 0.00 10 360.34300 60 2947.5d 0.33 1.32 1 738.37 0.01 0.05 8 738.20300 100 1718.5d 0.46 1.37 0 894.75 0.12 0.23 3 886.21

400 5 7985.5 0.04 0.09 25 48.44 0.00 0.00 10 37.44400 10 6896.5 0.04 0.84 58 151.97 0.01 0.05 8 146.25400 40 4780.0d 0.11 0.79 17 1612.35 0.03 0.08 3 1831.26400 80 2832.0d 0.34 0.85 1 3495.34 0.08 0.21 1 3625.15400 133 1780.5d 0.33 1.12 9 4248.60 0.06 0.11 5 4263.57

Average 0.19 0.75 44.50 593.67 0.04 0.08 7.70 611.28

a Percentage of the average and maximum values over the best known solution.b Number of times (out of 100 for descent and 10 for tabu) that BK found.c Total time in minutes for all runs.d Optimal by Table 1.

O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30 25

in Step (13)) that yields the best DF(P) based on thepossibly suboptimal DF(3). We then repeat Step (11)just for these particular i and k, and this is the valueused for DF(P). Note that if the ‘‘best’’ exchange isindeed selected, the last step calculates DF(P) cor-rectly for it. An improving exchange might bemissed if all the improving exchanges do not includeone of the five candidates for the (p + 1)th facilityand we stop the descent algorithm, for example,pre-maturely. Note that an improving exchangemay be selected even if the best exchange with a sub-optimal DF(3) is not improving but the last step thatcalculates the correct DF(3) for it and may yield animproving exchange.

The improvement in the run time is obtained byevaluating an equivalent of six values rather thann � p values in Step (11). Therefore, the run timeis reduced by about a factor of n�p

6. For the larger

problems (n P 500), such a reduction factor isbetween 50 and 150 which is very significant. Inthe computational results section we report theresults using the modified approach for the decentalgorithm and the tabu search and found that they

performed almost as well as the original algorithmswith a significant reduction in run time.

4.4. The repeated p-median solutions

In this section we propose to solve the problemby solving n p-median problems.

Theorem 2. The solution to the p-median problem

under uncertainty with q = 1 is equivalent to solving n

p-median problems each based on n nodes.

Proof. There are n possible selections for the futurefacility, one selection per node. Once a node k isselected for the future facility, the problem can beconverted to a p-median problem. The p facilitiescan be located on the remaining n � 1 nodes andall n nodes are included in the objective function.This is done by defining the following distancesfor any i, j 2 N:

dðkÞij ¼ ð1� aÞdij þ a minfdij; dikg:

26 O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30

Note that the distances dðkÞij are not symmetric andthey are valid when node j is selected as one of thep facilities and i is any node. Once such distancesare defined, if there is no future facility (probabilityof (1 � a)), then the service distance for demandpoint i (which can be node k) is minj2Pfdijg. How-ever, when the future facility is located at node k

(probability of a), then the service distance for de-mand point i is minfminj2Pfdijg; dikg (and is equalto zero for node k). The expected distance servicefor demand point i is therefore dðkÞij . Once the n result-ing p-median problems are solved (one problem foreach k 2 N), the p-median problem with the ‘‘cor-rect’’ k results in the optimal solution for the p-med-ian problem under uncertainty with q = 1. h

It seems that generalizing this approach to a gen-eral q is prohibitively complicated. The number ofpossible sets of nodes for the future facilities is verylarge. Furthermore, since the sets for future facilitiesare not necessarily contained in one another (for1 6 r1 < r2 6 q the set of nodes selected for r1 arenot necessarily included in the set selected for r2),

Table 6Solutions to moderately sized problems applying the repeated p-media

n p Best known Descent

Averagea Maxa b

100 5 5586.5d 0.00 0.00 100100 10 3972.0d 0.09 0.54 47100 10 4147.0d 0.01 0.05 68100 20 2986.0d 0.03 0.22 53100 33 1328.5d 0.02 0.04 58

200 5 7578.0d 0.00 0.00 100200 10 5527.0d 0.03 0.15 56200 20 4386.0d 0.00 0.00 100200 40 2705.0d 0.06 0.26 36200 67 1243.0d 0.07 0.28 27

300 5 7544.5d 0.00 0.08 96300 10 6522.0d 0.00 0.00 100300 30 4340.0d 0.00 0.09 97300 60 2947.5d 0.06 0.15 6300 100 1718.5d 0.17 0.32 0

400 5 7985.5 0.03 0.09 37400 10 6896.5 0.01 0.05 68400 40 4780.0d 0.04 0.09 6400 80 2832.0d 0.08 0.16 1400 133 1780.5d 0.05 0.14 9

Average 0.04 0.14 53.25

a Percentage of the average and maximum values over the best knowb Number of times (out of 100 for descent and 10 for tabu) that BKc Total time in minutes for all runs.d Optimal by Table 1.

the number of possibilities is huge. However, theexistence of such a set of problems can provide analternative proof to Theorem 1 concerning the Hak-imi property of the p-median problem underuncertainty.

As a heuristic approach we propose to solve theindividual p-median problems either by the descentalgorithm or tabu search. One can apply repeatedlyother solution techniques for the solution of the p-median problem and for reasonably sized problemseven an optimal algorithm may be used for the solu-tion of the individual p-median problems yieldingthe optimal solution to the p-median problem underuncertainty with q = 1.

5. Computational experiments

As test problems for the p-median problem underuncertainty we solved the set of 40 problems givenin Beasley (1990) for testing p-median algorithms.We tested problems with q = 1 additional facilityand a = 0.5.

n algorithms

Tabu

Timec Averagea Maxa a Timec

0.19 0.00 0.00 10 0.140.52 0.00 0.00 10 0.400.52 0.00 0.00 10 0.391.27 0.00 0.00 10 0.982.16 0.00 0.00 10 1.68

1.66 0.00 0.00 10 1.194.31 0.00 0.00 10 3.09

13.48 0.00 0.00 10 9.8934.56 0.01 0.09 8 25.7961.75 0.00 0.00 10 45.79

5.13 0.00 0.00 10 3.7616.03 0.00 0.00 10 12.4198.07 0.00 0.00 10 77.42

265.38 0.00 0.00 10 213.42454.62 0.01 0.03 6 357.93

18.78 0.00 0.00 10 14.6651.78 0.00 0.00 10 42.98

596.20 0.01 0.01 4 543.471626.70 0.02 0.04 2 1483.822718.78 0.00 0.00 10 2417.39

298.59 0.00 0.01 9.00 262.83

n solution.found.

O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30 27

5.1. Solving problems by applying the descent and

tabu algorithms

All proposed algorithms were coded in Fortran,compiled by Microsoft PowerStation Fortran 4.0and run on a 2.8 GHz Pentium IV desktop Per-sonal Computer. We used the probability ofa = 0.5 that a new facility is added in the future.

In Table 6 we depict the results for solving mod-erately sized problems by applying the repeated p-

Table 7Solutions to moderately sized problems applying the modified algorith

n p Best known Modified descent

Averagea Maxa b

100 5 5586.5d 0.45 2.41 0100 10 3972.0d 0.51 1.23 37100 10 4147.0d 0.12 1.06 50100 20 2986.0d 0.32 3.05 26100 33 1328.5d 0.05 0.15 60

200 5 7578.0d 0.04 1.02 96200 10 5527.0d 0.28 1.00 1200 20 4386.0d 0.23 1.23 39200 40 2705.0d 0.59 1.94 6200 67 1243.0d 0.83 2.45 3

300 5 7544.5d 0.04 0.38 39300 10 6522.0d 0.00 0.00 100300 30 4340.0d 0.29 1.47 10300 60 2947.5d 0.45 1.44 1300 100 1718.5d 0.66 1.63 0

400 5 7985.5 0.07 0.18 10400 10 6896.5 0.11 0.84 46400 40 4780.0d 0.22 0.92 7400 80 2832.0d 0.35 0.85 1400 133 1780.5d 0.41 1.12 6

Average 0.30 1.22 26.90

a Percentage of the average and maximum values over the best knowb Number of times (out of 100 for descent and 10 for tabu) that BKc Total time in minutes for all runs.d Optimal by Table 1.

Table 8Summary of average results for moderately sized problems

Property Descent (100 runs)

Exhaust. Repeated Modified

Problems BK found 19 19 18Times BK found 44.50 53.25 26.90

Minimum over BK 0.004% 0.001% 0.011%Average over BK 0.193% 0.038% 0.301%Maximum over BK 0.748% 0.136% 1.219%

Time (minute) 593.67 298.59 12.77

median approach using both the descent and tabusearch algorithms. The results are much better thanthose obtained by the exhaustive searches reportedin Table 5. The quality of the solutions is betterand the run times are cut by about one half. Therepeated p-median approach is clearly better thanthe exhaustive searches.

In Table 7 we report the results of tests with themodified descent and tabu algorithms on the sametwenty moderately sized problems (n 6 400) reported

ms

Modified Tabu

Timec Averagea Maxa a Timec

0.04 0.36 0.42 1 0.030.10 0.00 0.00 10 0.090.09 0.00 0.00 10 0.080.22 0.00 0.00 10 0.220.29 0.01 0.11 9 0.40

0.16 0.00 0.00 10 0.100.46 0.14 0.36 0 0.331.51 0.00 0.05 9 1.193.77 0.35 0.70 2 3.475.84 0.06 0.56 9 6.02

0.32 0.01 0.02 5 0.221.19 0.00 0.00 10 0.997.35 0.05 0.10 5 6.51

19.30 0.02 0.07 6 19.1129.77 0.16 0.55 4 31.19

0.79 0.03 0.09 4 0.602.28 0.03 0.07 6 1.88

23.88 0.05 0.13 2 21.7762.01 0.06 0.11 1 71.4896.04 0.04 0.11 6 118.67

12.77 0.07 0.17 5.95 14.22

n solution.found.

Tabu (10 runs) CPLEX (1 run)

Exhaust. Repeated Modified

20 20 19 187.70 9.00 5.95 �

0% 0% 0.003% 0.003%0.040% 0.002% 0.068% �0.083% 0.008% 0.173% �

611.28 262.83 14.22 7.01

28 O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30

in Tables 5 and 6 and summarized in Table 8.Run time was reduced from almost 17 days to calcu-late all the results in Table 5 and less than 8 days tocalculate all the results in Table 6 to only 9 hours tocalculate all the results in Table 7. These resultsconstitute factors of about 45 and 21, respectively.The results in Table 7 are indeed not as goodbut the deterioration in the quality of the solutionis quite small. While the exhaustive decent and tabusearches found the best known solution for all 20problems, the repeated p-median problems failedto find it for one problem using the descent algo-rithm, the modified descent found it for 18 of the20 problems and the modified tabu search found itfor 19 of the 20 problems. Combined, the twomodified approaches found the best known solutionfor all 20 problems because the modified descentalgorithm found the best known solution for theonly problem (n = 200, p = 10) for which themodified tabu search failed to find it. All the aver-ages are lower for the modified approaches but,again, not by much. For example, the averagesolution over the best known solution increasedfrom 0.193% over the best known solution for the

Table 9Solutions to large problems by the repeated p-median algorithm using

n p BK a

500 5 8955.0d 10500 10 8464.0 10500 50 4597.5d 4500 100 2949.5d 10500 167 1820.5d 10

600 5 9715.0 10600 10 8220.0d 10600 60 4480.5d 4600 120 3023.5d 8600 200 1983.0d 10

700 5 9852.0 10700 10 9201.0 10700 70 4683.5 6700 140 3005.0 9

800 5 10204.5 10800 10 9815.5 10800 80 5042.0 0

900 5 10861.5 10900 10 9315.5 10900 90 5116.0 2

Average 8.1

a Number of times out of 10 that BK found.b % of the average and maximum values over BK.c Total time in days for all 10 runs.d Optimal by Table 1.

exhaustive descent and 0.038% over the bestknown solution for the repeated p-median algo-rithm, to 0.301% over the best known solution forthe modified descent; the average solution over thebest known solution increased from 0.040% overthe best known solution for the exhaustive tabusearch and 0.002% over the best known solutionfor the repeated p-median problem, to 0.068%over the best known solution for the modified tabusearch. This is definitely worthwhile for savingalmost 96% of the run time of the repeated p-medianalgorithm.

5.2. Solving large problems

The exhaustive and repeated p-median algo-rithms consume a substantial amount of computertime for many of the large problems (n P 500).We solved the large problems by tabu searchapplied on the repeated p-median problem and ittook almost three months of computer time. InTable 9 we report the results of this experiment.Run times are given in days of computer time.The algorithm found the best known solution for

tabu search

Averageb Maxb Timec

0.000 0.000 0.0150.000 0.000 0.0640.007 0.011 1.1230.000 0.000 3.0600.000 0.000 5.495

0.000 0.000 0.0280.000 0.000 0.1060.011 0.033 2.4850.003 0.017 7.2790.000 0.000 12.324

0.000 0.000 0.0450.000 0.000 0.1700.004 0.011 5.6020.002 0.017 15.970

0.000 0.000 0.0750.000 0.000 0.2760.019 0.020 11.226

0.000 0.000 0.1050.000 0.000 0.2810.013 0.020 16.581

5 0.003 0.006 4.115

Table 10Solutions to large problems applying the modified algorithms

n p Best known Modified descent Modified tabu

Averagea Maxa b Timec Averagea Maxa a Timec

500 5 8955.0d 0.00 0.00 100 1.31 0.00 0.00 10 0.98500 10 8464.0 0.35 1.32 63 3.83 0.00 0.00 10 3.10500 50 4597.5d 0.26 0.91 11 67.58 0.08 0.15 3 59.08500 100 2949.5d 0.43 1.66 3 184.11 0.04 0.17 6 203.81500 167 1820.5d 0.79 1.59 0 255.40 0.13 0.49 1 356.10

600 5 9715.0 0.12 0.16 23 1.99 0.00 0.00 10 1.31600 10 8220.0d 0.02 0.74 97 8.36 0.00 0.00 10 7.60600 60 4480.5d 0.21 0.83 0 193.30 0.05 0.13 3 221.59600 120 3023.5d 0.40 1.26 0 417.67 0.07 0.10 1 634.27600 200 1983.0d 1.07 1.82 0 497.03 0.14 0.40 2 854.87

700 5 9852.0 0.19 0.26 27 3.94 0.00 0.00 10 3.75700 10 9201.0 0.00 0.00 100 14.30 0.00 0.00 10 16.60700 70 4683.5 0.27 0.76 2 391.09 0.08 0.25 2 456.53700 140 3005.0 0.38 0.95 0 885.90 0.07 0.12 0 1660.71

800 5 10204.5 0.10 0.93 33 6.41 0.10 0.13 2 7.03800 10 9815.5 0.18 0.70 44 22.74 0.00 0.00 10 22.68800 80 5042.0 0.21 0.56 2 755.89 0.09 0.15 0 902.95

900 5 10861.5 0.16 0.55 27 9.66 0.03 0.06 4 11.63900 10 9315.5 0.00 0.33 99 29.00 0.00 0.00 10 29.82900 90 5116.0 0.28 1.00 0 1781.17 0.07 0.18 1 3280.98

Average 0.27 0.82 31.55 276.53 0.05 0.12 5.25 436.77

a Percentage of the average and maximum values over the best known solution.b Number of times (out of 100 for descent and 10 for tabu) that BK found.c Total time in minutes for all runs.d Optimal by Table 1.

O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30 29

19 of the 20 problems. The average solution wasonly 0.003% over the best known solution and themaximum solution was only 0.006% higher thanthe best known solution on the average. The bestknown solution was found in 81.5% of the runs.

In addition, we tested the modified algorithms onthe large problems. In Table 10 we report the resultsof tests with the modified descent and tabu algo-rithms on the twenty larger problems (n P 500).These problems were solved in a reasonable com-puter time. The modified descent was about 40% fas-ter solving each problem 100 times compared withthe time required for the tabu search for solving eachproblem 10 times. The quality of the solutions wasmuch better for the modified tabu search. It failedto find the best known solution for two problemswhile the modified descent failed to find it for sixproblems out of 20. The averages over the bestknown solution were better for the modified tabu(see Table 10). The descent algorithm found the bestknown solution in 31.55% of the runs while the mod-ified tabu found it in 52.5% of the runs. In conclu-sion, the modified tabu search is the recommended

approach. It is better than the descent approach,requiring some extra computer time, and is about14 times faster than the repeated p-median approach.The repeated p median approach provided betterresults but the longer run time is not warranted.

6. Conclusions and future research

In this paper the p-median problem with uncer-tainty on the network is presented. We need tolocate p facilities at the present time and up to q

additional facilities in the future. The problem isdefined and an integer programming formulationis constructed.

The integer programming formulation is solvedefficiently by CPLEX for moderately sized problemsusing 1 6 q 6 10. For larger problems and q = 1 wepropose various heuristic methods which found allthe optimal solutions found by CPLEX for q = 1and are capable of solving larger problems in a rea-sonable computer time.

As future research we propose to design heuristicalgorithms for the more complicated case of q > 1.

30 O. Berman, Z. Drezner / European Journal of Operational Research 189 (2008) 19–30

This uncertainty formulation can be applied to otherlocation models such as the p-center problem. Also,these problems on the plane are also of interest.

Acknowledgements

This research was supported, in part, by theNatural Sciences and Engineering Research Councilof Canada and by a grant from the College of Busi-ness and Economics, California State University-Fullerton.

References

Beasley, J.E., 1990. OR-Library – distributing test problems byelectronic mail. Journal of the Operational Research Society41, 1069–1072 http://people.brunel.ac.uk/simmastjjb/jeb/orlib/pmedinfo.html.

Berman, O., Krass, D., 2002. Facility location problems withstochastic demands and congestion. In: Drezner, Z., Ham-acher, H.W. (Eds.), Location Analysis: Applications andTheory, pp. 329–371 (Chapter 11).

Berman, O., Simchi-Levi, D., 1990. Conditional location prob-lems on networks. Transportation Science 24, 77–78.

Berman, O., Wang, J., 2004. Probabilistic location problems withdiscrete demand weights. Networks 57, 47–57.

Berman, O., Wang, J., in press. The 1-median and 1-antimedianwith uniform distributed demand. INFOR.

Cooper, L., 1978. Bounds on the Weber problem solution underconditions of uncertainty. Journal of Regional Science 18, 87–93.

Current, J.R., Ratick, S., ReVelle, C.S., 1998. Dynamic facilitylocation when the total number of facilities is uncertain: adecision analysis approach. European Journal of OperationalResearch 110, 597–609.

Drezner, Z., 1979. Bounds on the optimal location to the weberproblem under conditions of uncertainty. Journal of theOperational Research Society 30, 923–931.

Drezner, Z., 1982. Competitive location strategies for twofacilities. Regional Science and Urban Economics 12, 485–493.

Drezner, Z., 1985. Sensitivity analysis of the optimal location of afacility. Naval Research Logistics Quarterly 32, 209–224.

Drezner, Z., 1995a. On the conditional p-median problem.Computers and Operations Research 22, 525–530.

Drezner, Z., 1995b. Dynamic facility location: the progressive p-median problem. Location Science 3, 1–7.

Drezner, T., Drezner, Z., 1998. Location of retail facilities inanticipation of future competition. Location Science 6, 155–173.

Drezner, Z., Shiode, S., 2007. A distribution map for the one-median location problem on a network. European Journal ofOperational Research 179, 1266–1273.

Drezner, Z., Wesolowsky, G.O., 1981. Optimum location prob-abilities in the ‘p distance Weber problem. TransportationScience 15, 85–97.

Drezner, T., Drezner, Z., Shiode, S., 2002. A threshold satisfyingcompetitive location model. Journal of Regional Science 42,287–299.

Frank, H., 1966. Optimum locations on graphs with correlatednormal demands. Operations Research 15, 552–557.

Frank, H., 1967. A note on a graph theoretic game of Hakimi’s.Operations Research 15, 567–570.

Glover, F., 1986. Future paths for integer programming and linksto artificial intelligence. Computers and Operations Research13, 533–549.

Glover, F., Laguna, M., 1997. Tabu Search. Kluwer AcademicPublishers, Boston.

Hakimi, S.L., 1983. On locating new facilities in a competitiveenvironment. European Journal of Operational Research 12,29–35.

Hakimi, S.L., 1990. Locations with spatial interactions: Com-petitive locations and games. In: Francis, R.L., Mirchandani,P.B. (Eds.), Discrete Location Theory. Wiley-Interscience,New York, NY, pp. 439–478.

Juel, H., 1981. Bounds in the generalized weber problem underlocational uncertainty. Operations Research 29, 1219–1227.

Miller, T., Tobin, R., Friez, T., 1991. Stackelberg games on anetwork with Cournot–Nash oligopolistic competitors. Jour-nal of Regional Science 31, 435–454.

Minieka, E., 1980. Conditional centers and medians of a graph.Networks 10, 265–272.

Teitz, M.B., Bart, P., 1968. Heuristic methods for estimating thegeneralized vertex median of a weighted graph. OperationsResearch 16, 955–961.

Wesolowsky, 1977. Probabilistic weights in the one-dimensionalfacility location problem. Management Science 24, 224–229.