Abstract
Medication distribution service can be delivered based on a combination of home delivery and customer pickup. That is, medications are delivered either to customers’ homes directly or to the pickup facilities (e.g. lockers) close to customers’ homes. In Taiwan, there are more than 11,000 convenience stores that provide a 24-h service for customers to pick up the ordered items from e-commerce, which is unique to the world. In the medication distribution system, convenience stores can provide a unique opportunity for customers to more conveniently collect medications at stores, and also can reduce the operating cost for a logistics company providing the medication delivery service. Therefore, this work proposes a medication distribution system through convenience stores, lockers, and home delivery. Under this system, this work investigates how to simultaneously determine employment of convenience store chains, the convenience store locations to be visited, locations of lockers, vehicle routes for convenience stores and lockers, and vehicle routes for customers’ homes, so that the total operating cost is minimized. This work further proposes a genetic algorithm to solve the medication distribution problem. Through simulation, the experimental results show that the proposed algorithm is able to solve the problem efficiently.
Keywords
Introduction
Home health care has been implemented in various medical care services,1,2 and has been widely supported by the medication distribution based on home delivery services, which delivers medications from a pharmacy directly to customers’ homes.3,4 Generally, this convenient medication distribution service is much suitable for patients with chronic diseases taking maintenance medications 5 and patients with other regular-use prescriptions. However, such a medication distribution service based on home delivery requires visiting all patients’ homes by vehicles, which cause enormous transportation cost. In business, logistics companies have been striving to reduce the transportation cost to increase their competitiveness in a competitive market. To reduce the transportation cost, some logistics companies have developed efficient distribution systems that deliver items through pickup facilities (e.g. lockers) instead of distributing to customers’ homes directly,6–8 and thus vehicles do not need to visit all patients.
A recent work by Veenstra et al. 6 has investigated the health care logistics of medication distribution in which lockers (which are automatic self-service cabinets and are available for 24 h) enable customers to receive medications if customers’ homes are within the coverage distance of those lockers; otherwise, medications are delivered to customers’ homes directly. Lockers are visited by vehicles to replenish medications with an ideal situation that it must be replenished before a given time period of the day and before customers return home. Thus, the vehicle route that visits lockers is separated from the vehicle route that needs to visit customers’ homes when they are at homes. The work by Veenstra et al. 6 considered a number of potential locations where lockers can be installed, and then investigated a joint facility location and vehicle routing problem which simultaneously determines the locations of installing lockers, the vehicle routes visiting all installing lockers, and the vehicle routes visiting all the customers that are not covered by any lockers.
To the best of our understanding, the 24-h convenience store (CS) pickup service in Taiwan is unique to the world. With this service, customers can pick up the ordered items at CSs whenever they are available after they receive pickup messages. In addition to providing flexible time for picking up items, this service is advantageous because an enormous number of CSs can support the arising number of customers. In 2019, the major CS chains in Taiwan (with an area of 35,808 km2) include 7-Eleven™ (having 5579 branches), FamilyMart™ (having 3406 branches), Hi-Life™ (having 1380 branches), and OK Mart™ (having 902 branches). On average, there is a CS every 0.31 km2 in Taiwan. The CS density in Taiwan is only lower than that in South Korea, and is ranked second in the world. Therefore, it has been popular and extensively used for customers in Taiwan to pick up items through CSs, especially for the items ordered from e-commerce. A unique opportunity for using CSs in the medication distribution system is that customers can more conveniently collect their medications at 24-h CSs instead of going to hospitals or pharmacies in person. Multiple medication packages for different customers with close home locations can be jointly distributed to a CS just once, so that the transportation cost can be reduced. Furthermore, the total cost can be decreased when existing CSs are employed instead of constructing new pickup facilities.
In light of the above, this work proposes a novel medication distribution system through CSs, lockers, and home delivery (Figure 1). The proposed system includes a depot (i.e. a logistics center of a pharmacy), customers’ homes, CSs, and lockers. For convenience of explanation, both CSs and lockers are called pickup facilities through the rest of this article. Although a lot of medication packages can be collected together within a pickup facility, this medication distribution system is secure. For using the locker pickup service, the customer requires providing a pickup code to open the locker. Similarly, for using the CS pickup service, the customer requires providing an identification document to be verified by the CS clerk. The pickup facilities are associated with a coverage distance. If a customer is within the coverage of a certain pickup facility, then this system delivers the customer’s medication to this facility; otherwise, medication is delivered to the customer’s home directly. Note that, although both lockers and CSs provide 24-h pickup services, they differ as follows: (1) CSs have existed, but lockers are considered to be installed; and (2) CSs are divided into multiple chain brands, and can join this service only when their chain has a contact with the pharmacy. Hence, employment of each CS chain (with a set of CSs) requires payment of a contract fee; whereas employment of each locker requires an installation cost, which mainly depends on the installation site.

Illustration of the proposed medication delivery system through CSs, lockers, and home delivery.
Under the above assumptions, this work investigates the medication distribution problem which integrates the location routing problem (LRP), consideration of employment of CS chain brands, and the covering concept for serving customers through pickup facilities. For convenience of notation, this problem is called the medication distribution problem with multiple delivery methods (MD2 for short). The MD2 problem simultaneously determines how to employ CS chains with contracts, the CS locations to be visited, the locations of installing lockers, the vehicle routing for pickup facilities, and the vehicle routing for uncovered customers, so that the total operating cost (including the total contract fee, cost of installing lockers, and the total routing cost) is minimized. This work further proposes a genetic algorithm (GA) to solve the MD2 problem, and then implements and evaluates the GA on various problem instances.
The main contributions of this work are as follows:
Different from the previous work by Veenstra et al., 6 this work proposes additionally considers CSs, which have existed and are available for being employed without further investment in construction, in the medication distribution system based on lockers and home delivery.
This work provides a GA solution to solve the MD2 problem. In addition, the performance of the proposed GA is evaluated on different-scale problem instances.
Literature review
The LRP generally joins the facility location problem (FLP) and the vehicle routing problem (VRP). Because both FLPs and VRPs are NP-hard, the LRP is also NP-hard.9–12 The essential characteristics of a standard LRP consist of the deterministic data, one planning period, a finite set of potential locations for deploying facilities, a single-objective problem, satisfaction of customers’ demand, no load transfer, visiting only once for each customer by only one vehicle, and no inventory. 9 Furthermore, the standard LRP can be extended to solve various problems that consider additional characteristics, 13 for example, inclusion of uncertain information, 14 subcontracting options,10,15 capacitated constraints,16,17 pickup and delivery, 18 inventory decision, 19 fuzzy demand, 20 price-sensitive demand, 21 and restricted time window constraints.18,20,22
A variety of algorithms and heuristic approaches to address various LRPs have been developed. The work by Zhang et al. 14 proposed a hybrid intelligent algorithm integrating uncertain simulation and GA to solve the sustainable multi-depot emergency facilities LRP with uncertain multi-objective. A hybrid heuristic method integrating simulated annealing (SA) and variable neighborhood search (VNS) was represented by Stenger et al. 10 to solve the LRP with capacitated vehicles of small package shippers, in which the proposed idea of subcontract depot operations is similar to the work by Stenger et al., 15 which employed an adaptive VNS algorithm that combines an approach for routing and customer selection in the shaking step. The adaptive VNS algorithm was also developed to determine the swap station locations and the vehicle routes with capacitated electric vehicles in Hof et al. 16
To solve the capacitated LRP with a tight capacity constraint on both depots and vehicles was proposed by Yu et al. 17 using a hybrid GA. They developed the algorithm that allows both feasible solutions and infeasible solutions kept in two subpopulations, and then combines them into the population subsequently. The work by Capelle et al. 18 presented a column generation method to solve the LRP involved the vehicle route for both picking up the items and delivering items to the destination. The decision of inventory management at the facilities was integrated with the LRP in the work of Hiassat et al., 19 which adopted the GA to determine the number and the locations of required warehouses, the inventory level at each retailer, and the routes. To solve the LRP with fuzzy demands and time windows, the work by Fazayeli et al. 20 adopted a two-part GA for solving a mixed-integer mathematical fuzzy model. The work by Ahmadi-Javid et al. 21 studied the profit-maximization LRP with price-sensitive demands, and further tackled the problem by a branch-and-price algorithm. The work by Schiffer and Walther 22 solved an LRP within time window by an exact approach that simultaneously determined the routing of electric vehicles and the charging infrastructure.
In general, the LRP is considered with only one level of routing within the network from depots to customers. Furthermore, the LRP can be extended to the so-called two-echelon location routing problem (2E-LRP), which has two levels of routing: the routes from depots to satellites and the routes from satellites to customers. 23 The work by Breunig et al. 24 tackled the 2E-LRP arising in the city logistics by a hybrid metaheuristic approach combining local and large neighborhood search. Moreover, the work by Pichka et al. 25 addressed a special case of the 2E-LRP, that is, the two-echelon open location routing problem (2E-OLRP) operated by the third-party logistics providers, and hence the vehicle routes did not need to return to the depot and to satellites after finishing the service. They proposed a mixed-integer linear programming method and a hybrid SA heuristic to solve this problem. The work by Zhou et al. 7 solved the multi-depot two-echelon VRP which involves two levels of VRPs including the delivery option for the last mile distribution. They proposed a hybrid multi-population GA to improve the search efficiency and speed up the evolution process obtained by the multi-population strategy. They included two subpopulations derived from feasible solutions and infeasible solutions similar to the work by Yu et al. 17
LRPs have been particularly applied in the real-world case with practical instances to increase efficient distribution networks and to increase competitiveness in the recent market. Some real-world case studies were presented by Veenstra et al. 6 and Zhu and Ursavas, 26 which solved the LRP for the medication distribution in the Netherlands. The proposed model by Zhu and Ursavas 26 determined the facility and routing decisions simultaneously by considering three node types: depots, satellites, and customers. They formulated and solved the problem by Lagrangian relaxation, branch and cut algorithm, and upper bound heuristic approach. In their work, each customer had to be visited by vehicles, whereas the work by Veenstra et al. 6 did not need. That is, some customers were assigned to receive their medicines at lockers instead of receiving at home directly. The function of lockers by Veenstra et al. 6 was a temporary medication storage that is then distributed to customers. The work by Veenstra et al. 6 focused on the medication distribution from the depot (i.e. pharmacy) to patients in order to minimize the routing cost. They considered two types of routes: locker routes (from the depot to lockers) and patient routes (from the depot to patients’ homes). Their work further proposed a branch-and-bound algorithm and a hybrid heuristic algorithm for solving this LRP.
Our problem is also related to the covering problem. In most of the covering problems, customers receive services from facilities depending on the distance between customers and facilities. Basically, the decisions on the location of a set of facilities and a set of demand points are considered.27,28 The solutions to the covering location problem were proposed by Marín et al. 27 and Zarandi et al. 29 with exact methods for small instances and heuristics for large instances. The Lagrangian heuristic was employed to tackle the covering location problem under multi-period stochastic by Marín et al. 27 while the SA algorithm was proposed by Zarandi et al. 29 to solve the maximal covering location problem with numerous demand nodes and potential facilities. In addition, the covering tour problem, in which each facility might be visited more than once by a vehicle, was solved in the studies.8,30–33
The work by Karaoğlan et al. 30 formulated an integer non-linear programming problem under probabilistic coverage, and solved it by a branch-and-cut algorithm and a local search heuristic based on VNS. The work by Pham et al. 8 proposed a branch-and-cut algorithm comparing to GA. The formulation of the covering tour problem arising in humanitarian logistics was solved by a heuristic approach in the works of Nedjati et al. 31 and Naji-Azimi et al. 32 and a greedy randomized adaptive search procedure. 33 In Naji-Azimi et al., 32 the covering tour method was employed to locate the satellite distribution centers for the humanitarian aid distribution in a disaster area. The decision on facilities was determined to cover all customers. The covering concept by Veenstra et al. 6 was also similar to Naji-Azimi et al. 32 (i.e. the items were distributed to customers through facilities in the case that customers were covered by those facilities). However, the work by Veenstra et al. 6 proposed that the opened lockers do not need to cover all customers because the remaining customers can receive their parcels at their homes.
Methodology
Problem description
This work proposes the MD2 problem, in which medications are distributed through multiple delivery methods: CSs, lockers, and home delivery. The MD2 problem aims to determine the employed CS chains with contracts, the CS locations to be visited, the locations of installing lockers, the vehicle routing for pickup facilities, and the vehicle routing for uncovered customers, so that the total operating cost (including the total contract fee, cost of installing lockers, and the total routing cost) is minimized.
Consider a problem instance with one depot,
For example, in Figure 2, there are three CS chains (i.e.

Illustration of an example of the medication distribution problem.
The decision on the MD2 problem involves with employing multiple CS chains, and hence we consider that set
Each customer
The MD2 problem aims to determine both the employed facilities and the vehicle routes of both types to serve all customers. Five types of decision variables in this problem include as follows: (1) which CS chains will be employed, (2) which CSs (each of which belongs to some CS chain) will be utilized, (3) which locker locations will be selected to install lockers, (4) the vehicle routes visiting the employed facility locations, and (5) the vehicle routes visiting the uncovered customers’ homes.
With the above notations, the objective of the MD2 problem is to minimize the total cost formulated as follows
The above objective function is to minimize four types of costs. The first term is the total transportation cost of the routes visiting the uncovered customers, where
Overview of the proposed GA
This work proposes a GA approach to solve the MD2 problem. The GA is a metaheuristic approach inspired by the process of natural selection. The GA is a powerful search technique that performs the global search characteristic, and hence is suitable to solve large-scale optimization problems with the capability of reaching near-optimum values. The proposed GA is given in Algorithm 1, which is explained as follows. Consider a population of multiple chromosomes, each of which represents a candidate solution for the problem. The GA starts from randomly creating the initial population (Line 1), and its cost is evaluated (Line 2). Then, until the maximal number of iterations is achieved, a main loop in Lines 3–16 repeatedly selects the parent chromosomes from the current population (Line 4), executes GA operators on these parent chromosomes, that is, crossover (Line 5) and mutation (Lines 6–13), and remains the better chromosomes in
The main components are detailed in the following sections.
Solution representation
A chromosome (i.e. a candidate solution for the MD2 problem) in the proposed GA is represented as (
For
For
For
〈
〈
For example, a solution for this instance in Figure 2 shows a problem instance with

Solution representation for the problem instance in Figure 2.
Cost evaluation
This work sets the cost function in GA as the objective function (1) to minimize the total cost. The fittest chromosome in GA is corresponding to a solution with the minimal cost.
Given a chromosome (
Initializing the population
This section presents initializing the population as follows. Each gene (i.e. binary variable) in Parts 1, 2, and 3 of each chromosome in the population is randomly assigned 0 and 1. Part 4 in the chromosome is assigned a random permutation of {
Parent selection
The chromosomes in the population are chosen for GA operations based on the
Crossover operator
Crossover is an operator in the GA that recombines the gene codes of two parents, which partially contribute characteristics to new chromosomes (or called offspring). In this process, pairs of parent chromosomes in the mating pool are mated randomly with a crossover rate
For the binary encoding in Parts 1, 2, and 3, we apply the one-point crossover operator. With loss of generality, consider the one-point crossover operator at Part 1 on two parent chromosomes
For the permutation encoding in Parts 4 and 5, we apply the uniform crossover operator. First, a random binary string called
Mutation operator
Mutation is executed by changing a gene(s) in a chromosome to prevent the algorithm from becoming trapped in local optima and to explore new solutions in the solution space so as to increase diversity of solutions. In this mutation operator, a number of chromosomes in the population are randomly selected to be mutated with a mutation rate
Experimental results
This section evaluates the performance of the GA in an experimental environment. The performance on small-scale and large-scale instances is investigated, and the experimental analyses including a sensitivity analysis are conducted.
Experimental environment and parameter setting
The proposed GA is implemented in the C++ programming language, and runs on a PC with an Intel® Core™ i7-7700, 3.60 GHz (four core) CPU, and 8 GB RAM. The parameters used in the proposed GA are set as follows: the population size is set as 40; the crossover rate
Analysis on small-scale instances
This section describes the performance of the proposed GA on small-scale problem instance. The locations of CSs, potential lockers, and customers are randomly generated within a two-dimensional (2D) geographical region [0, 100] × [0, 100]. The depot is randomly located in the range [25, 75] × [25, 75]. The distance between all nodes and covering radius of facilities are computed as the Euclidean measure. We assume that the travel time and the travel cost are set equal to the travel distance. The other parameter setting of the problem instances is given in Table 1, in which
Parameter setting for small-scale instances.
CS: convenience store.
The convergence analysis under four various parameter settings of

Convergence analysis of the proposed GA.
Subsequently, we execute 100 runs of the four cases, and the results are shown in Figure 5. Although the 100 runs of each case obtain different cost values, these cost values show stability within a reasonable range.

The cost values of 100 runs of the proposed GA under four parameter settings of
The experimental results of the proposed GA on 54 instances under various settings of
Comparison of the experimental results of the proposed GA on 54 small-scale instances under various settings of
In Table 2, every six instances form a group with the same
where “the best cost” is the best cost among the six instances in the same group. From Table 2, the best cost result in each group may not occur in the case with the same
Analysis on large-scale instances
This section analyzes the experimental results on large-scale instances. The locations of CSs, potential lockers, and customers are randomly generated within a 2D geographical region [0, 10,200] × [0, 10,200]. The depot is randomly located at the center of this region. The other parameter setting of the large-scale problem instances is given in Table 3. The other settings are similar to those in the last section.
Parameter setting for large-scale instances.
CS: convenience store.
The results of the 54 instances under various settings of
Comparison of the experimental results of the proposed GA on 54 large-scale instances under various settings of
In Table 4, every six instances form a group with the same
According to the experiment results, it seems that there is no conclusion for the effect of changing numbers of lockers because differences of random instances may lead to different related costs such as uncertain locations of customers and pickup facilities. Furthermore, the number of existing CSs comparing to the number of defined lockers is enormous to serve customers, thus changing the number of lockers may not significantly affect cost. In practical, lockers should be installed at the places where have customers but no existing CS such as in rural area in order to support the medication delivery efficiently.
Sensitivity analysis
This section presents the impacts of changing the values of four parameters (i.e. the coverage distance of a pickup facility, the number of CSs, the contract fee of a CS chain, and the cost of installing a locker) on the cost. Each parameter is modified on four instances (i.e. 50 customers-10 lockers, 50 customers-20 lockers, 70 customers-10 lockers, and 70 customers-20 lockers). The other parameter setting of these instances follows the parameter setting of large-scale instances in the last section, except the number of CSs follows the parameter setting of small-scale instances to reduce the computational time. The parameter values are varied by multiplying the base case value (mentioned in previous sections) by 0.8 up to 2 with step of 0.2 for the coverage distance and the number of CSs, and by 0.5 up to 3.5 with step of 0.5 for the contract fee and the cost of installing a locker. The results of the sensitivity analysis are presented in Figure 6.

Sensitivity analysis on the cost of four input parameters: (a) the coverage distance of a pickup facility, (b) the number of CSs, (c) the contract fee of a CS chain, and (d) the cost of installing a locker.
Figure 6(a) shows that when the coverage distance of a pickup facility increases, the cost value decreases consistently for all scenarios. It is clear that the coverage distance considerably affects the cost. Each facility can serve more customers when its coverage distance increases, so that both the number of uncovered customers and the number of employed facilities decrease. However, adjustment of this factor should be considered with customer satisfaction. Figure 6(b) shows the effect of changing the number of CSs. Even if the plot in Figure 6(b) seems to be fluctuate, the cost in all scenarios tends to drop slightly when the number of CSs increases. This indicates that the number of CSs slightly affects change of the cost.
Figure 6(c) and (d) shows the impact of changing the contract fee of CS chains and the cost of installing a locker, respectively. In this work, the contract fee is defined as a flat-rate pricing (i.e. whether the number of CSs changes or not, the price does not change); whereas the cost of installing a locker is calculated depending on the number of lockers. The cost slightly increases if the coefficient on these two factors increases for instances C3, C4, D2, D3, and D4; whereas the cost is slightly stable for instances C1, C2, and D1. The reason why the cost has a little change is that these two types of cost are small as compared with other components of the cost function.
Discussion
Although the delivery for medications has been increasingly implemented, based on the recent literature reviews, we found that only a few studies—for example, Fathollahi Fard et al. 3 , Veenstra et al. 6 , and Zhu and Ursavas 26 —have solved the logistics problem of medication delivery to determine the locations of potential facilities and the vehicle routing simultaneously. In this work, we extend the framework derived from Veenstra et al., 6 which investigates the joint facility location and VRP for medication delivery through lockers and customers’ homes. The main difference between the previous works by Veenstra et al. 6 and our work is that the CS pickup service is added to the medication distribution system, that is, some customers can be served to collect their medications at CSs. CSs have existed, and have a lot of branches available to serve customers. Even though the main function of CSs is similar to lockers in the work of Veenstra et al., 6 a medication distribution service provider does not need to invest in constructing new pickup facilities. The covering concept is also considered in this work (i.e. this work focuses on both coverage distances of CSs and lockers to serve customers). Each customer is assigned to receive medications at either a CS or a locker if the customer is located within the service coverage of the facility; otherwise, the customer is assigned to be visited directly. To the best of our knowledge, this is a first work to propose the medication distribution system through CSs, lockers, and home delivery.
The experimental results show that the proposed GA has been designed to be suited to solve our MD2 problem, and it can solve this problem within reasonable computational time. The proposed GA can solve the smallest-scale instance R1 (in which
The feasibility to serve the medication distribution through the three pickup approaches in real-world implementation can be supported with the following reasons: (1) A lot of CS branches have existed in Taiwan, and they enable customers to access the service easily. It leads to a huge number of customers who have used the CS pickup service, especially for e-commerce. (2) In Taiwan, as compared with CSs, lockers are not the main stream to receive parcels. However, lockers enable customers who live far away from CSs to receive parcels through installed lockers. (3) In Taiwan, a company that provides the home delivery service for medications has existed. Hence, if one would like to implement other pickup facility delivery methods, the home delivery method must be included. Home delivery can support customers who live in places without CSs; and it can support the case that it is not worth investing in installing lockers when compared with the home deliver method. (4) The only skill that customers require to use the proposed service is to order medications through the Internet, that is, customers only need to upload their prescriptions and make the order through an online channel. Generally, most inhabitants in Taiwan can access the Internet, and are able to use the Internet for health care purposes. For instance, the outpatient department in some hospitals requires patients to make an online reservation in advance, and hence, they may be familiar with the online health care service.
In the future, this work can be applied to practical case studies with real data. We plan to consider more factors affecting the real-world vehicle routing situations, for example, vehicle type, alternative path selection, and traffic conditions. In addition, the customers’ satisfaction may be considered in the further framework to choose the delivery method which they are satisfied with.
Conclusion
This work has proposed the medication distribution problem with multiple delivery methods: CSs, lockers, and home delivery. Customers can receive medications through either CSs, lockers, or customers’ homes. The main contribution of this work is to additionally employ the 24-h CS pickup service serving customers to receive their medications at CSs. Although both CSs and lockers perform similar features as pickup facilities, they still have some different characteristics on the facility existence and the investment cost. This work further proposes a GA approach to solve the problem. The proposed GA can be used to evaluate the effects of the cost when the coverage distance of a pickup facility, the number of CSs, the contract fee of a CS chain, and the cost of installing a locker are changed. In experimental results, various scenarios are created and observed when the number of potential locker locations and the number of customers are adjusted whereas the number of CSs is fixed. Experimental results clearly indicate the effectiveness of the proposed GA.
Footnotes
Acknowledgements
The authors thank the anonymous referees for comments that improved the content as well as the presentation of this article.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported, in part, by the Ministry of Science and Technology, Taiwan, under grants MOST 106-2221-E-009-101-MY3 and MOST 108-2628-E-009-008-MY3.
