A Modified p-Median Model for the Emergency Facilities Location Problem and Its Variable Neighbourhood Search-Based Algorithm

Emergency incidents, including natural disasters, terrorist attacks, public health outbreaks, and industrial and mining accidents, and so forth, result in severe human casualties and property losses. Emergency facilities, which provide relief materials and services, play an important role in rescue management. The decision of where to locate the emergency rescue facilities is very important, as it determines the efficiency and effectiveness of the emergency management process. This paper develops a modified p-median problem model that accounts for rescue time limitations. A variable neighbourhood search(VNS-) based algorithm is developed for themodel considered.ThemodifiedVNS algorithm exhibits good performance on p-median benchmark problems. A case from Western China is studied, and a reasonable location decision is then made for emergency rescue facilities using the modified VNS algorithm. The paper also compares the results with and without considering the rescue time limitation.


Introduction
Disaster is a part of human history.Disasters, which can be divided into natural catastrophes and man-made disasters, have long threatened human survival and societal development.In recent years, many serious catastrophes have occurred throughout the world.On May 12, 2008, an 8.0magnitude earthquake struck in Wenchuan, China; in the fall of 2009, a serious drought affected several provinces in southwest China, including Yunnan, Guizhou, and Guangxi; on March 11, 2011, a 9.0-magnitude earthquake occurred, triggering a tsunami that struck Fukushima, Japan, resulting in heavy casualties and a serious nuclear disaster.The acceleration of economic and industrial globalisation increases the likelihood of numerous types of disasters.
To reduce the losses caused by disasters, it is important to deliver rescue resources in a timely manner.The rescue resources, including mining equipment, tents, blankets, living supplies, heaters, and staffs, should be stored in the nearby the disaster areas.Therefore, time/distance is a key factor in emergency management.Meanwhile, to avoid waste, it is important to site a suitable number of facilities and minimise transportation costs to ensure operational efficiency.
Given the importance of the choice of rescue facility locations in emergency management, this paper considers a modified p-median model that limits the maximum travel time to the demand points.While total transportation distance should be minimised, the number of facilities, denoted  in the p-median problem, is also a variable in the model considered here.A variable neighbourhood search-(VNS-) based algorithm is developed for the original p-median model and a modified model.Numerical studies demonstrate the good performance of the VNS algorithm.A case study from Western China is analysed.This analysis demonstrates that reasonable rescue facility locations can be identified using the proposed VNS algorithm.
The remainder of the paper is organised as follows.Section 2 reviews the literature related to emergency location problems.The p-median problem and the algorithms for p-median problem are then discussed.Both the original p-median model and the modified p-median model are presented in Section 3. A VNS-based algorithm is developed for the p-median models in Section 4. Numerical analyses are conducted in Section 5 including p-median benchmark instances.A case from Western China is studied in Section 6.Finally, Section 7 concludes the paper.

Literature Review
Location problems have been widely addressed in the literature.In the first study in this vein, Weber [1] studied the problem of determining the location of a warehouse to minimise the total distance between the warehouse and the customers (which is called a Weber problem).Hakimi [2] found the optimum location of a "switching centre" in a communication network and located the best place to construct a "police station" in a highway system.Berman and Krass [3] considered a generalisation of the maximal cover location problem, which allows for partial customer coverage, with the degree of coverage being a nonincreasing step function of the distance to the nearest facility.The topic of emergency facility location has received substantial attention in recent   decades.According to Jia et al. [4], emergency facility location problems can be divided into three types depending on the objective function of the location models: covering models, p-median models, and p-centre models.The objective of coverage models is to provide "coverage" to demand points, and the earliest work on the subject is by Toregas et al. [5].A demand point is only considered covered if a facility is available to service the demand point within a specified distance limit.The p-median problem, introduced by Hakimi [6], is to determine the location of  facilities to minimise the average (total) distance between demand points and facilities.Subsequently, ReVelle and Swain [7] formulated the p-median problem as a linear integer program and used a branchand-bound algorithm to solve the problem.In contrast to pmedian models, which concentrate on optimising the overall performance of the system, the p-centre model attempts to minimise the maximum distance between each demand point and its nearest facility, so the p-centre model is also called the minimax model.The problem addressed in this paper is a revised version of the p-median problem, which minimises both the total distance and the number of the emergency facilities, under a constraint on the maximum amount of time required to access the demand points.The problem studied here is common in reality because both fixed and the variable costs should be minimised when establishing emergency facilities    while guaranteeing the efficiency of any possible rescue operation.In 1979, Kariv and Hakimi [8] demonstrated that the p-median problem is NP-hard.Since then, many heuristic algorithms have been proposed to solve the p-median problem and its various versions, including the genetic algorithm, ant algorithms, tabu search, artificial neural network.
The VNS algorithm initially proposed by Mladenović and Hansen [9] is among the most advanced methodologies for solving optimisation problems.Because its principle is simple and easy to understand and implement, various VNS-based algorithms have been successfully applied to many optimisation problems [10].Hansen and Mladenović [11] were the first to apply VNS to the p-median problem.Hansen et al. [12] developed the variable neighbourhood decomposition search (VNDS) to solve the p-median problem.Mladenović et al. [13] summarised a variety of heuristic methods for the pmedian problem and concluded that the VNS outperformed other algorithms.

The Original p-Median Problem Model.
The original pmedian problem model assumes that there are total of  potential sites, from which  candidate facilities are selected to serve  customers.Let  be the set of the potential  sites, N the set of the  customers,   the distance from facility  to customer j,  ∈ , and  ∈ .It is generally assumed that m = n and  = ; that is, the locations of the  customers are employed as the potential facility sites.The mixed integer model for the p-median problem is as follows: ,   ∈ {0, 1} ∀,  ∈ .
In the above model,   = 1 indicates that location  is selected as the service facility,   = 0 otherwise.When demand in location  needs to be served by facility i,   = 1,   = 0 otherwise.Therefore, the objective function in formulation ( 1) is to minimise total transportation distance from the service facilities to all demand points.Constraint (2) ensures that any demand point is served by one and only one facility.Constraint (3) guarantees that whenever location  services a demand point j, it should be selected as the facility.Constraint (4) ensures that the total number of the service facilities equals p.
The mathematical model above was first proposed by ReVelle and Swain [7], and variants of this model have been developed by other researchers.For example, Church [14] studied the condensed Balinski constraints with the reduction of assignment variables using equivalent variable substitution; in 2008, Church [15] proposed a new mathematical formula for the p-median problem: Both Exact and Approximate Model Representation (BEAMR).
Important modifications need to be made to adapt the pmedian model to emergency management.When the average (total) distance decreases, the accessibility and effectiveness of the emergency facilities will increase.However, rescue time is also a key factor in emergency management, which is included in the modified p-median model below.

The p-Median Problem Model with a Maximum Time
Limitation.In emergency management, it is very important that the rescue teams and rescue resources are able to access the demand point in time.Therefore, there should be some limitation to the maximum rescue time in contrast to the traditional p-median problem, which in turn means that  becomes a variable.Without loss of generality, it is assumed that the maximum time limitation is equivalent to the distance constraint.Denote  as the longest distance allowed (equivalent to the maximum time limitation); the corresponding mathematical model is as follows: Initialisation.Define the set of neighbourhood structures   ,  = 1, . . .,  max , that will be used in the search; find an initial solution  0 ; set  ←  0 ; and choose a stop condition.Repeat the following until the stop condition is met: (1) Set  ← 1; (2) Until  =  max repeat the following steps: (a) Shaking.Generate a point   at random from the th neighbourhood of  ( ∈   ()); (b) Local search.Apply some local search method with   as the initial solution; denote with   the local optimum that is obtained; (c) Move or not.If   is better than Y, move there ( ←   ), and continue the search from  1 () ( ← 1); otherwise, set  ←  + 1; Algorithm 1: The basic VNS scheme.
In the above model, there is an additional item  in the objective function that is absent from formulation (1), while  can be considered as the fixed cost one of establishing an emergency facility.As mentioned above, p is a variable in formulation (6), as additional emergency facilities may be required due to the limitation on the maximum travel distance to any demand point.Consequently, , the fixed cost of establishing one emergency facility, should be considered and initially set a sufficiently large value to minimise the number of emergency facilities.Therefore, in reality,  can be set to a very large value, such as 10,000,000.
The constraints in the modified p-median problem model are identical to those in the original p-median model except that constraint (10) is added.Constraint (10) requires that the distance from any demand point to its nearest emergency facility be within the predefined distance L.

A Variable Neighbourhood Search-Based Algorithm
VNS is a type of metaheuristic devoted to the combinatorial problems, such as those described by the two models in Section 3. Briefly, VNS is a heuristic strategy that can be used to conduct an efficient stochastic search for better solutions through predefined and systematic changes of neighbourhoods.It implies the general principle of moving from smaller to larger sets to explore the neighbourhoods of the incumbent solution.Algorithm 1 presents the basic scheme of the VNS algorithm in Hansen et al. [12].
The VNS algorithm has also been applied to solve pmedian problems.Hansen and Mladenović [11] proposed several VNS heuristics for the p-median problem and compared them to the greedy-plus-Interchange algorithm and two tabu search heuristics.García-López et al. [16] considered several parallelisation strategies of the VNS for the p-median problem and coded them in  using OpenMP.Crainic et al. [17] proposed a cooperative multisearch method for the VNS metaheuristic based on the central-memory mechanism.The p-median problem serves as a test case.The results indicate that, compared to sequential VNS, the cooperative strategy yields significant gains in terms of computation time without a loss in solution quality.Kochetov et al. [18] considered the p-median problem using a modified VNS algorithm.A new large neighbourhood for the graph partition problem is proposed.Computational experiments conducted by Kochetov et al. [18] show that the local improvement algorithm with the neighbourhood is fast and finds feasible solutions with little relative error.Hansen et al. [19] solved the clustering problem as a large-scale p-median model, using a new approach based on the VNS metaheuristic.
In this paper, we propose a modified VNS algorithm for the p-median problem model with a maximum time limitation.It can also be used to solve the original p-median problem model.The neighbourhood of the current solution in the proposed algorithm is determined by a stochastic rule.For example, more opportunities will be provided to the nearest neighbour if the current solution is simply being updated; otherwise, more distant neighbours may need to In Algorithm 2, the function EFLP outputs the overall results of the modified algorithm, including the optimal number of the emergency facilities, the sites of these facilities, the demand clusters serviced by each facility, and the total travel distance.In Algorithm 2, p is initially at an initial value  0 that is sufficiently large such that the solution  acquired in line 6 is feasible.The functions randomize and initMap initialise all of the sites (line 2 and line 3).In line 4,  1 is the set of the facility sites, numbering p, obtained by randomly selecting  sites from the full set of available points.From line 5 to line 11, the algorithm repeatedly completes the steps to find the optimal solution  given  and  1 , which is obtained through the function pmp search (line 6), and the feasibility of the solution is then checked (line 7).The loop will continue with  − 1 if all demand points can be accessed within the maximum time limitation, and the current solution is saved as   , which includes both the minimal total travel distance and the emergency facilities set, along with the allocation of the demand points to the emergency facilities (line 8), and the initial cluster with updated  is obtained for the next loop (line 9); otherwise, the algorithm stops, and the final solution is obtained.
Algorithm 3, called function pmp search, is the core of the function EFLP.In pmp search, the subfunctions LocalSearch and ChangeCluster are run first, while LocalSearch outputs the new emergency facilities set   1 and the overall travel distance  1 by conducting a local search (see Algorithm 4 for detail).Next, ChangeCluster searches the updated neighbourhood around the current solution   1 , while  1 ⋅count is the times that  1 is unchanged.Algorithm 5 describes ChangeCluster function in detail.
In line 2 in Algorithm 3, REPEAT is the predefined value of repeating the steps from line 3 to line 15.In each loop, the local search around the current solution   is conducted first, with the output of    .If the solution is updated and is within the maximum time limitation (i.e.,   ⋅ objv <  −1 ⋅ objv and   ⋅ maxlength ≤ ), then the neighbourhood of    is searched, and   ⋅ count is recorded as 1; otherwise,   ⋅ count is accumulated.If the accumulation is as large as RESTART, a predefined number, the search will start with a new initial solution (line 9); otherwise, the neighbourhood of    /  is searched if a generated random number is smaller (not smaller) than Pc, a predefined decimal and Pc < 0.5.In line 15, the best results of the first  loops are recorded as min, and line 16 outputs the final optimum after the total REPEAT loops.
Algorithm 4, called function LocalSearch, conducts local search around solution C. In this algorithm, each demand point is first allocated to its nearest facility site   ∈ ,  = 1, 2, . . ., , and the corresponding cluster set,   ,  = 1 ⋅ ⋅ ⋅ , which includes the facility site   and its service sites, is formed.For each   ,  = 1 ⋅ ⋅ ⋅ , an updated   that minimises the total length in   is searched.If C is modified, a new search of cluster set,   ,  = 1 ⋅ ⋅ ⋅ , is restarted; otherwise the local search is finished with the final output of   ,   ,  = 1 ⋅ ⋅ ⋅ .
Algorithm 5, called function changecluster, conducts a neighbourhood search around the solution C. In the algorithm, the neighbourhood of the solution C is defined as the number of the emergency facilities to be moved from C, which is determined by equation CN = ⌈count * ChangeNum/RESTART⌉ in line 1, while "count" is the number of times that C has remained unchanged (the maximal number of unchanged repetitions allowed is RESTART); ChangeNum is a predefined value that is selected randomly as 1 or 2 (extensive computational studies indicate that it is difficult to improve on the solution if ChangeNum is larger than 2).When CN is determined, both the sites to be chosen as emergency facilities and those to be removed from C are selected randomly.The loop repeats CN + 1 times.It can be seen from Algorithm 5 that although the neighbourhood of the solution C is not determined because ChangeNum is selected randomly from 1 and 2, it is more likely that more sites (a larger neighbourhood) will be selected if the value of "count" increases.
As can be observed from Algorithm 2 and the subfunctions (Algorithms 3 to 5), the proposed modified VNS algorithm successfully combines the variable neighbourhood search scheme with some random mechanics.However, all of the necessary steps can be implemented easily.

Numerical Studies
Algorithm 2, which is designed for the emergency rescue facilities location problem, originated from the algorithm developed for the p-median problem.Accordingly, mechanics employed by the two algorithms (i.e., for the original p-median problem and for the p-median problem with time limitation) to determine the global optimisation solution with a given p, which is the pmp search function in Algorithm 2, are identical.In this section, the benchmark instances ORLIB pmed1-40, fl1400 and pcb3038 are used to evaluate the performance of the proposed algorithm.The CPU of the computer used for computation is 2.1 GHz, and the code is written in C. The parameters in the function pmp search are as follows: REPEAT = 50, 000, 000, RESTART = 80, 000, and Pc = 0.3.
As in Hansen et al. [12], the relative error = (( −  * )/ * ) * 100% is used for evaluation, where  is the objective value obtained by the proposed algorithm and  * is the optimal objective value under comparison.In Tables 1 and 2, the results generated by the pmp search function (i.e., the proposed p-median algorithm) are compared to the optimal solutions of the ORLIB pmed1-40 and the results for fl1400, pcb3038, and rl5934 reported in Hansen et al. [12], respectively.
In Table 1, the computational results gained by the proposed p-median algorithm for the ORLIB pmed1-40 are compared to the optimal solutions.Table 1 demonstrates that the proposed p-median algorithm can obtain the optimal solutions, except the solution for the last instance.However, the result of the proposed model is only 0.019501% higher than the optimum.Additionally, to demonstrate the computational efficiency of the proposed algorithm, the last column of Table 1 lists the number of iterations required to obtain the final results.Table 1 shows that  is the main factor in the global search.When  is small, the function pmp search is highly efficient.For pmed1-40 instances, 1,000,000 iterations require approximately 10 minutes.
Table 2 compares the computational results for the fl1400, pcb3038, and rl5934 instances with those in Hansen et al. [12].While some of the results obtained by Hansen et al. [12] are updated by the proposed algorithm, the two algorithms exhibit similar performance with respect to computational results.See the last row for each data set.Moreover, as the proposed algorithm is simple to realise and outputs the final results in a short period of time, overall, it outperforms the algorithm in Hansen et al. [12].The same is true of the results in Table 1.

A Case Study
The real case studied here comes from a county in Western China.In this county, there are a total of 18 townships and 35 villages for a total of 54 sites with the inclusion of the county seat.Figure 1 plots the sites, along with the routes and the distances between the sites.In Figure 1, the county seat is denoted 0, the townships are denoted A, B, . . ., R, and the villages are denoted 1, 2, . . ., 35.

Solution with Maximum Time Limitation.
The objective of this study is to determine the minimum number of emergency facilities such that the total distance from the emergency facilities to the demand points are minimised, and the distance from any emergency facility to any demand point it serves is less than the restriction of 15 km.This case is solved using the algorithm proposed in Section 4. In the final solution, a total of 14 sites are selected for the emergency facilities, as shown in the left column in Table 3. Figure 2 plots the locations of these emergency facilities.Table 3 indicates that the total distance in the solution is 353.6 kilometres, while the maximal distance from any emergency facility to any demand location it services is 14.5 km.In Table 4, we list the emergency facilities and the demand points they serve.In addition, the case was solved with the exact method using CPLEX.There is no deviation from the optimum.

Solution without a Maximum Time Limitation.
For comparison, in this subsection, no maximum time limitation is assumed.The computational results are listed in Tables 5 and  6, while the locations of the emergency sites are plotted in Figure 3.
The results shown in Table 5 indicate that compared to the results in Table 3, the total distance in the solution declines, while the maximal distance from any emergency facility to any demand point it services increases.While the value of  is identical in these two cases, the sites of these emergency facilities differ, as do the demand points they serve.See Tables 4 and 6 for details.

Conclusions
In this paper, we consider an emergency facilities locations problem.The location of emergency rescue facilities plays an important role in rescue management because it determines the efficiency and effectiveness of the emergency management process.A reasonable location decision can, on the one hand, improve the efficiency and effectiveness of emergency management and, on the other, reduce both the fixed and variable costs of establishing these facilities and conducting emergency rescue operations.This paper proposes a modified p-median problem model capable of considering a rescue time limitation.A VNS-based algorithm is developed for the considered model.The VNS algorithm exhibits good performance on p-median benchmark problems.A case from Western China is studied, and the VNS algorithm determined a reasonable set of emergency rescue facility locations.

Figure 1 :
Figure 1: The sites in the case study.

Figure 2 :
Figure 2: Locations of the emergency facilities in the case study with maximum time limitation.
Site of the county seat Site of a township Site of a village Site of a village in a nearby county Site of the emergency facilities 8

Figure 3 :
Figure 3: Locations of the emergency facilities in the case study with a maximum time limitation.

Function EFLP ( 1 )Algorithm 2 :
set =  0 , exist = false; (2) randomize; (3) initmap; (4)  1 = initcluster (); (5) while !exist do (6)  = pmp search (,  1 ) The modified VNS algorithm for the -median problem with a time limitation.be explored.The proposed VNS scheme is embedded in the algorithm for the original p-median problem and the pmedian problem model with a maximum time limitation.Accordingly, the modified VNS algorithm is illustrated in four parts.The first, called function EFLP, is the overall scheme of the modified algorithm (shown in Algorithm 2); the second, called function pmp search, is a subfunction in EFLP that is used to find the global optimum for a given p (shown in Algorithm 3); the third and fourth parts, called function LocalSearch and function ChangeCluser, respectively, are subfunctions in pmp search.The first part conducts the local search, and the second performs the variable neighbourhood search to change sites in the current emergency facilities set (shown, resp., in Algorithms 4 and 5).

Table 2 :
The computational results for the fl1400 and pcb3038 instances.

Table 3 :
The final solutions for the emergency facilities location problem.

Table 4 :
The emergency facilities and the demand points they serve.

Table 5 :
The final solutions for the emergency facilities location problem.

Table 6 :
The emergency facilities and the demand points they serve.