Parcel Locker Location Based on a Bilevel Programming Model

In order to improve delivery network efficiency and to solve consumer satisfaction problems, parcel locker location optimisation scheme is proposed based on the delivery demand under the e-commerce environment. In this paper, a bilevel programming (BLP) model is established to identify the optimal location for parcel lockers by considering benefits of consumers and logistics planning departments.)e upper-level model is to determine the optimal location by minimising the planners’ cost, and the lower one gives an equilibrium demand distribution by minimising the consumers’ pick-up cost. On the special form of constraints, a bilevel genetic algorithm is proposed based on GIS data and a genetic algorithm. Finally, a numerical example is employed to demonstrate the application of the method, which indicates that the model can solve the problem of parcel locker location.


Introduction
In recent years, the e-commerce market has developed by leaps and bounds, with products ranging from high-value durable goods to low-value consumer goods. In 2019, retail e-commerce sales worldwide amounted to 3.53 trillion US dollars and e-retail revenues are projected to grow to 6.54 trillion US dollars in 2022 [1]. e continuous growth of this market leads to a dramatic upsurge in direct-to-consumer deliveries. We should pay more attention to the problems of the last mile delivery in the supply chain. As an emerging express delivery mode, the parcel locker has become an effective way of solving the "last mile" issue in the express delivery industry [2]; however, there are many problems arising in the layout planning of parcel storage facilities, so it is necessary to explore and optimise the layout of parcel lockers.
Many scholars have studied self-service parcel lockers. Punakivi et al. [3] proposed two main modes of unattended reception box and delivery boxes and found that an unattended reception box allowed greater cost savings. Shi et al. [4] proposed the use of automatic logistic terminal equipment in a campus express delivery system and verified the implementation feasibility of automatic logistics terminal equipment through qualitative and quantitative analyses. e present research mostly focused on the development status of smart express locker mode, promotion of the mode, and development of countermeasures to problems, while little research focused on parcel locker location. Li and Lu [5] established a model that works out the quantity and optimal layout of the intelligent self-service locker on a campus based on clustering analysis, in which 0-1 integer programming model and other methods were considered. Liu [6] pointed out that the self-service terminal belongs to a special distribution node, and the location of the self-service terminal is essentially a discrete multidistribution node location problem. e parcel locker can be regarded as a type of special self-service terminal. erefore, the parcel locker location (in the present work) is also equivalent to a discrete facility location problem.
Discrete facility location problems (FLPs) constitute a major area of interest for researchers and practitioners in operations research (OR). Aikens [7] has given some basic location models, which included the simple facility location model, the capacitated facility location model, the dynamic and stochastic capacitated facility location models, and so on. All the objective functions of these models were to minimise transportation costs and fixed investment costs.
Holmberg [8] constructed the exact solution method for the simple facility location problem in which the transportation costs are nonlinear. Barahona and Jensen [9] proposed an integer programming model for the plant location, which considered not only the fixed costs and transportation costs but also the inventory costs, which had been solved by the Dantzig-Wolfe (D-W) decomposition method. Owen and Daskin [10] considered the dynamic nature of facility location problem and the stochastic nature of consumer demand and developed simple dynamic and stochastic location models. Zhou et al. [11] explored the balanced allocation of consumers to multiple distribution centres using a genetic algorithm approach. Although Miller et al. [12] studied the location problem with equilibrium-constrained models and algorithms, they were only single-level models, which could not consider benefits to both planners and consumers.
In a single-level model, the two variables are required to be solved simultaneously, while in practice, the location and demand distribution decisions are decided by two different decision-makers. Consumer demand, as distributed among parcel lockers, when determined by planners, is unreasonable: in fact, consumers always choose parcel lockers based on their own habits, and this kind of behaviour is very stochastic. In addition, the planner can only estimate the location of parcel lockers based on consumer demand, and at the same time, different location patterns will affect the distribution of consumer demand. e location problems of logistics parcel lockers can be represented as a Leader-Follower or Stackelberg game where the decision managers are the leaders, and the consumers are the followers who choose the parcel lockers freely; however, bilevel programming (BLP) can reflect the interaction among the decision levels in the location of parcel lockers and can solve the contradiction between the goals pursued by enterprises and consumers. It can also clearly reflect the real situation on both the supply and demand sides, making the location model a closer fit to reality. erefore, it is suitable to represent the location problems with BLP models. Although the facility location problem has been studied widely, little attention has been paid to the location model problem using a BLP model [13].
BLP problems are generally difficult to solve due to the nonconvex nature of the search space resulting from the complex interaction of the leader and follower problem. Various algorithms have been developed based on classical optimisation approaches such as variable elimination method based on Kuhn-Tucker approach [14][15][16] and algorithms based on the penalty function approach [17][18][19]. e literature suggests that most of the traditional solutions are problem-dependent, are relying on knowledge of the search space, and are not sufficiently robust methods to solve real-life problems [20]. Heuristic approaches are now generating interest in the research community as an alternative to solve the BLP problems. Anandalingam et al. [21] developed a Simulated Annealing Based Bilevel programming Algorithm (SABBA), Mathieu et al. [20] developed a Genetic Algorithm Based Bilevel programming Algorithm (GABBA), Gendreau et al. [22] developed a hybrid Tabu Search ascent algorithm, and Yin [23] proposed an approach based on a genetic algorithm. Most of the computational results of the heuristic approaches reported in the literature are still not satisfactory when compared to exact methods such as the Kuhn-Tucker approach or the penalty method and they are also reported to be computationally expensive [24]. In this paper, a bilevel genetic algorithm (BIGA) is proposed for solving BLP problems within a single framework. e motivation is to develop robust solutions for reallife industrial problems.
In the current work, we focus on the usage of parcel lockers (or shared reception boxes) as a solution to the last mile logistics problem. A parcel locker is a group of lockers, sited in apartment blocks, workplaces, railway stations, and so on. As the lockers have electronic locks with variable opening codes, they can be used by different consumers, at their convenience. Our work is the first attempt to develop a quantitative approach based on GIS data to determine their optimal locations, aimed at solving real-life hierarchical facility location problems.

Problem Description.
We focus on the location problem of parcel lockers based on BLP. In the upper level, a company (leader) aims to minimise its total cost which includes the cost of opening new facilities and the operation costs considering the preferences of the consumers (followers) to be served by a specific facility. In the lower level, the consumers optimise their preferences with respect to the facilities from which they will be served [25]. e influence of distance on consumers' pick-up service satisfaction is taken into account in this study. Preferences of the consumers are defined based on a predefined sorted list as described as follows.

Hypotheses
(1) e locations of regional distribution centres, parcel lockers, and consumers are known (2) e number of regional distribution centres, the locations of the candidate parcel lockers, and the demand of each customer point are known (3) All regional distribution centres and parcel lockers have maximum processing capacity (4) Each consumer can only go to a fixed parcel locker for self-service (5) Each parcel can only be sent to a fixed parcel locker, which is nearest to customer points x ki indicates the number of products delivered from a regional distribution centre to a parcel locker.
x ij indicates the number of products collected by consumers from the parcel locker. d ki indicates distance between a regional distribution centre and a parcel locker. d ij indicates distance between a parcel locker and a consumer. v c indicates the speed of the vehicle. c ki indicates freight from a regional distribution centre to a parcel locker. y ij � 1, consumer i picks parcel from locker j, 0, otherwise. e parameter settings in the model are summarised in Table 1. Herein, the upper level of the BLP is designed to meet the demands of consumers at various locations with the minimum cost. e lower level represents consumer willingness to use different parcel lockers, and its objective is to minimise the travel cost of each consumer. In addition, we assume that the competition between new and old parcel lockers is not considered.

Upper-Level Model of the BLP Location Problem.
From the perspective of enterprise, the upper-model factors mainly include the construction cost, operation cost, transportation cost, and the penalty cost caused by repetitive delivery due to parcels delayed in parcel lockers. e specific analysis is as follows.

Construction Cost.
e construction cost refers to the purchase cost, labour cost, and land lease cost of the parcel lockers. Such costs will change by location, but the selected area in this scheme is not much large, so it is regarded as a fixed value. In addition, the construction cost also includes the depreciation cost and maintenance cost of parcel lockers, which are all fixed costs, meaning that they will not change due to their operational status. e expression is as follows: (1)

Operation Cost.
For logistics enterprises, the operating cost of parcel lockers consists of the usage fee and maintenance cost (including parcel lockers repairing and cleaning). It depends mainly on the number of cells used by express-delivery staff. e expression is as follows: i∈I j∈J

Transportation Cost.
Due to the self-service nature of parcel lockers, consumers need to complete the picking process themselves. erefore, the transportation cost is only incurred from regional distribution centres to parcel lockers. Transportation cost can be determined by parcel quantity, distance, and transportation cost per unit (including labour cost and fuel cost). e expression is as follows: F(x ij ) is written as e upper-level programming is as follows: z i � 1, the parcel locker is built at customer i ∀i ∈ I, Constraint (7) ensures that at least one parcel locker is built, and no more than the number of candidates can be established. Constraint (8) ensures that the construction cost of parcel lockers sticks to budget from regional distribution centres. Constraint (9) is the capacity constraint, which can ensure that all the parcels delivered from the regional distribution centre k to parcel locker i will not exceed the capacity of centre k. Constraint (10) is the capacity constraint, which ensures that all parcels delivered from the regional distribution centre k to parcel locker i will not exceed the capacity of parcel locker i. Equation (11) represents the fact that the parcels taken from parcel locker i by consumer j should be equal to the demand of consumer j. Constraint (12) is a capacity constraint, which ensures that all the parcels taken from parcel locker i will not exceed the capacity of parcel locker i. Equation (13) represents the amount of the parcels delivered from the regional distribution centre k to parcel locker i. e amount should be equal to the sum of parcels that consumer j takes from parcel lockers. Constraint (14) prohibits the delivery from a regional distribution centre to any proposed parcel locker that is not actually constructed. Since M is an arbitrarily large positive constant, if z i � 0, then x ki cannot be positive; but if z i � 1, then x ki can be as large as expected. Constraint (15) prohibits the demand on any proposed parcel locker that is not actually constructed. Since M is an arbitrarily large positive constant, if z i � 0, then x ij cannot be positive; but if z i � 1, then x ij can be as large as expected.

Lower-Level Model of the BLP Location Problem.
e lower-level problem represents customer choice behaviours and the demand distributed among parcel lockers; that is to say, each customer assigns their demand through the parcel lockers to minimise their total cost. e model mainly considers consumers' travel costs. Parameter c ijper describes travel cost per unit for consumers to pick up parcels. e expression is as follows: i∈1 j∈J c ijper x ij d ij y ij . (19) e lower-level model is given as follows: x ij ≥ 0, ∀i ∈ I, ∀j ∈ J, z i � 1, the parcel locker is built at customer i ∀i ∈ I,  Mathematical Problems in Engineering 7

Algorithm Analysis
In general, it is difficult to solve the BLP problem. e reason is that the BLP problem is an NP-hard (nondeterministic polynomial-hard) problem. Ben-Ayed and Blair [26] studied this problem and pointed out that even a very simple bilevel problem is still an NP-hard problem. e nonconvexity is another reason that results in the complexity of the solution algorithm. Even if the upper-and lower-level problems are both convex, the whole bilevel problem is possibly  Research on algorithms to solve the BLP model can be divided into two main categories: classical optimisation approaches and heuristic approaches [27]. Due to special constraints and low flexibility to BLP in classical approaches, we decide to use heuristic approaches to solve the parcel locker problem. e genetic algorithm aims to create deferent results in order to obtain the optimal solution for the bilevel problem and achieve Stackelberg's equilibrium. e step-by-step description of the GA is shown in Figure 1 as follows: Step 1. Initial population: chromosome representation and encoding. Two groups of real number codes are used. e first group of codes is the pairing relationship between parcel lockers and consumers, and the second one is the pairing relationship between regional distribution centres and consumers. We initialise the settings and generate a feasible solution at random.
Step 2. Fitness function: in order to reflect the interaction between the upper and lower decision variables accurately and avoid a locally optimal solution, the objective function of the double-level programming model is added as a fitness function.
Step3. Elite reservation and comparison: we determine the minimum fitness of each generation and its elite.
Step 4. Design selection, crossover and mutation operators: in this study, we use Roulette Wheel Selection: the best individual in each generation is transferred directly to the next generation in the elitism step [28]. e crossover operator is a two-point crossover  Step 5. Replacement of individuals and individuality testing: remove individuals who do not meet the constraints and generate a new generation of feasible solutions.
Step 6. Iteration: continue to iterate until the maximum number of iterations is reached.
Step 7. Stopping criteria and getting optimal solution: optimal solution. Record the elite individual of each generation and select the smallest fitness value of fitness function as the approximate optimal solution of the model.

Case Study
We use a numerical example to illustrate the applications of the proposed model and the solution algorithm.

Research Region Setting.
e typical research region setting is based on the North of Tianxin District in Changsha, Hunan Province, China (Figure 2). e geographic overview map of Tianxin District is drawn using a Geographic Information System (GIS) package, as shown in Figure 2.
Given the small service radius of parcel lockers, the analysis focuses on the northern part of Tianxin District. Demand is simulated on the basis of the number of buildings and the local population. e parcel lockers directly serve customers to meet their personal demand; such customer points are scattered with low aggregation. Buildings are generally taken as aggregation points. e most common service object of express delivery is online shopping customers, whose demand for parcel lockers is huge. According to the relevant survey, online shopping customers mainly belong to the group aged 18-45 years, and there is a trend of aging of the cohort. ey are mainly students, white-collar workers, or civil servants, with a college degree or above. We crawl and vectorise the POI (point of interest) data such as urban roads, residential quarters, shopping malls, office buildings, and colleges and universities in Tianxin District from the Gaode Map API (open-source code available from https://lbs.amap.com/, see also Tables 2 and 3). We determine the candidate parcel locker layout based on the regional distribution centre and customer points. e network consists of three regional distribution centres (Table 2) and 58 customer points (Table 3). Candidate parcel lockers are listed in Table 4. All data pertaining to the centres and points are derived from the Gaode Map API. Table 3 can also be presented as a hot map (Figure 3): the kernel density in Figure 3 denotes customer demand per square kilometre and increases progressively from cold colours to warm colours. e candidate location geographic location in Tianxin District is illustrated in Figure 4.
e parcel locker location model is constructed by considering a variety of factors that affect delivery and converting some factors into delivery costs. e target is to control the minimum total cost while meeting delivery service requirements and limits. e genetic algorithm (GA) and MATLAB ™ are employed to solve this problem.

Connection line
Selected locker * * * * * * * * * * * * * 14 Figure 6: Connection between selected lockers and customers. e genetic algorithm is generally used to obtain the approximate optimal solution, with its convergence related to the initial value. We ran the algorithm many times with a 2.50 GHz Intel Core CPU and 4.00 GB RAM, to acquire the approximate optimal solution by taking different crossover probabilities and mutation probabilities. Table 5 lists the results after running the program 40 times. Eventually, the optimal solution is obtained under crossover probability of 0.9 and mutation probability of 0.005. Table 6 lists the selected locations.
Newly added parcel lockers are mainly found to be located near the dormitory of Hunan silk factory, Enrui apartment, and Youyou Kindergarten in Tianxin District. e locations correspond to those of people who often shop online. Figures 5 and 6 illustrate the connection among three parties: customer, parcel locker, and regional distribution centre. Figure 5 shows the upper-level assignment relationship, involving regional distribution centres and parcel lockers, while Figure 6 shows the lower-level assignment relationship, involving parcel lockers and customer points.
In addition, Figure 5 demonstrates that multiple distribution centres share a parcel locker. According to the actual situation, the research area is located at the junction of three distribution centres (see Figure 5). Figure 6 shows that the customer and the parcel locker conform to a one-to-one relationship, which conforms to the principle that customers are accustomed to collecting parcels from the nearest parcel locker. e result also validates the correctness of the logic of the location of parcel lockers in the algorithm.

Conclusion
In this paper, the location problem of parcel lockers is considered as a solution to the last mile logistics problem based on GIS data and BLP model: choosing the optimal location of parcel lockers facilities to maximise express company profits and minimise the travel cost to customers. On the one hand, it helps us to estimate and calculate customer demand more accurately by distinguishing and dividing different types of point of interest (POI) on the demand side into residential area, office, shopping mall, hospital, and school based on GIS data. On the other hand, the BLP model also balances the contradictory situations on both the supply and demand sides as much as possible. With the help of genetic algorithm and MATLAB ™ , we finally get an optimal solution in 40 times' experiments and find the upper-level assignment relationship between centres and selected lockers, and the lower-level assignment relationship between selected lockers and customers.
e current work has some limitations: the first is the scale of the location problem. We considered three regional distribution centres, 58 customer points, and 21 candidate parcel lockers in total and finally computed 12 selected parcel locker positions. If the spatial scale of the problem was to be increased, the computational burden and run-time become onerous and the assignment relationship in the upper and lower levels will become more complicated. Current run-times are approximately 480 to 520 s per test on average. e exact run-time depends on the spatial scale of the location problem and the computer configuration. e limitation of BLP is such that we need to ensure that the upper level and the lower level obey a Leader-Follower hierarchical relationship, and then we have to equilibrate them so as to achieve a win-win result. e second lies in the static nature of the data used as the dynamic aspects of the problem are ignored, for example, the seasonality of ordering rates, the variability of customer willingness to use the service, and the variability of operational setup prices. e third is that we do not try to determine the optimal mix of different-size lockers. We implicitly assume that all parcel lockers have a fixed and given size.
is opens the door to further research. On the one hand, to deal with the dynamic aspects of the problem, we can cooperate with e-commerce platforms to get more userdemand data. Another possible solution is to couple our optimisation model with a simulation model and to optimise the location problem of parcel lockers within a certain area over a certain time period in a dynamic manner.

FLP:
Facility location problem OR: Operation research BLP: Bilevel programming SABBA: Simulated Annealing Based Bilevel programming Algorithm GABBA: Genetic Algorithm Based Bilevel Algorithm BIGA: Bilevel genetic algorithm GA: Genetic algorithm.

Data Availability
All relevant data are within the paper.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.