Journal Search Engine
Search Advanced Search Adode Reader(link)
Download PDF Export Citaion korean bibliography PMC previewer
ISSN : 1598-7248 (Print)
ISSN : 2234-6473 (Online)
Industrial Engineering & Management Systems Vol.20 No.4 pp.555-562

An Integrated Optimization Model for Medicine Order Distribution and Delivery Problem of Online Pharmacy Based on the Optimal Supply
Chain Strategy

K. Z. Sholpanbaeva*, A. A. Apysheva, N. K. Shaikhanova, A. K. Modenov
Amanzholov East Kazakhstan state University, Republic of Kazakhstan
Amanzholov East Kazakhstan State University, Republic of Kazakhstan
Amanzholov East Kazakhstan State University, Republic of Kazakhstan
Department of Economic Security Saint Petersburg State University of Architecture and Civil Engineering
*Corresponding Author, E-mail:
August 10, 2021 September 10, 2021 September 18, 2021


The issue of health and medicine has always been very important. The volume of demand in the field of medicine is very high and is considered as one of the sensitive and vital products, so the accuracy in using the medicine and the accuracy of time of its use and access are among the strict requirements in the field of drug circulation. As we know, in order to achieve the best therapeutic effect and cure the disease, several drugs for a specific disease are usually used simultaneously. Therefore, an order which contains different types of medicines must be delivered on time, together and at the same time. By focusing on the supply chain, companies are experiencing significant reductions in healthcare costs. The purpose of this article is to provide a model and solution for online pharmacies through which chain costs can be optimized. In this regard, it is assumed that after the orders are received through the protocol in each period, a third-party logistics organization will collect the medicines required for each order from the physical pharmacies that have these medicines in their stock and transfer them to pharmacies that have the ability to send the medicines to the customer and a shipping fleet so that, considering logistical costs, orders are delivered to customers on time.



    Although the term Supply Chain Management (SCM) was coined over 30 years ago, the rising awareness about the importance of this concept for the performance of businesses is a much more recent phenomenon. In the e- commerce branch of Logistics and SCM (LSCM), there are two major types of business models: business-toconsumer (B2C) and business-to-business (B2B) (Bolumole et al., 2015;Edwards et al., 2019). The present study is focused on B2C models, where all transactions between the business and the consumer are done on the business’s website. B2C businesses need to pay close attention to SCM to ensure the services they provide are sufficiently diverse and flexible (Boyer and Hult, 2010). Supply chain resource allocation and planning optimization can help an e-commerce company to offer customized services to its customers (Bailey and Rabinovich, 2005). The growth of e-commerce across the world has drawn more attention to the intricacies of supply chains involved in online shopping and commerce. Indeed, the advent and rising accessibility of the Internet have made online shopping an extremely attractive subject of research (Çelik, 2007;Gehrt et al., 2012;Kim et al., 2013). Hence, a significant number of studies have examined different aspects of SCM in the context of e-commerce (Yao and Gu, 2015;Lancioni et al., 2000;Garcıa- Dastugue and Lambert, 2018). However, only a few studies have investigated the combination of online transactions and specific supply chains (Rahman, 2019). Online pharmacies are a group of modern online businesses that facilitate access to a range of medicines and health services. These businesses fall in the category of e-commerce of the B2C type and are rapidly growing in many parts of the world. Given the close association between medicine as a commodity and the health of its consumers and the high demand for pharmaceutical products, medicine circulation needs to be done strictly on time and with due attention to all relevant requirements in terms of storage, handling, security, and delivery. There are more than 20,000 types of medicines, many of which can be purchased from online pharmacies. Online pharmacies have certain features that distinguish them from other online businesses; for example, the high frequency of orders placed in small batches, scattered customers, and the vital importance of on-time and complete delivery.

    The modus operandi of online pharmacies, of which there are currently very few in the world, is that the customer uses an online system or software to register an order for medicines or cosmetics, which may or may not require a prescription. Once confirmed, the order will be sent to all pharmacies or vendors that are affiliated with the system. These pharmacies check their inventory to see whether they have the requested items and then reject or accept the order with due consideration of all pertinent issues, such as whether the sale will be economic, etc. Once the order is accepted by a pharmacy, the items can be either shipped to the customer or remain in the vendor to be picked up by the customer. In some online pharmacy systems, the customer can check which vendors have the requested items and choose one of them based on personal preferences such as distance, product price, and delivery time.

    An online pharmacy system will require a number of brick-and-mortar pharmacies in its operation domain to ensure the efficiency of order processing and the availability of products and services. Since each brick-andmortar pharmacy will be able to hold certain amounts of medicines for certain amounts of time, for some orders, the system may need multiple brick-and-mortar pharmacies to work together. Given the multitude of brick-andmortar pharmacies in the service area, there will be many different ways to handle and distribute orders. Since it is common to use multiple medicines simultaneously to achieve the desired therapeutic effects, each order tends to contain multiple types of medicines, which must be delivered together. Thus, for timely delivery of all items of each order in a single batch, it is necessary to optimize not only order distribution but also vehicle routing decisions (Hartley, 2014;Liu et al., 2020).

    The subject of this study is how to find the optimal routes for timely and cost-effective pickup and delivery of medicines from pharmacies to customers. In this decision, it is important to remember that medicines have a limited lifespan and lose their value after a period. Another important concern in this area is that all medicines should be delivered on time, as failing to do so can have catastrophic consequences. These requirements highlight the importance of distribution optimization in this field. Evidence shows that online pharmacies can benefit from more coherent structures and frameworks for decision optimization, which can be derived from the models and solution methods previously developed for other purposes, such as vehicle routing. With these techniques, these businesses will be able to make better use of their transport fleet and distribution network in their efforts to overcome challenges and achieve improved performance.

    One of the notable studies in the field of home delivery is the study carried out by Campbell and Savelsbergh (2005), where they modeled a home delivery system whereby the company decides which orders to accept and assigns the accepted orders to time slots with a cost optimization objective. These researchers divided the order fulfillment process into three phases: (1) order capture and promise, (2) order sourcing and assembly, and (3) order delivery. They proposed a two-phase heuristic for order capture and promise. In the first phase of this heuristic, an insertion algorithm is used to insert the already accepted orders in schedules starting with the “heaviest” ones. In the second phase, it is determined whether the new order can be inserted into one of the time slots of the created schedule. These researchers also approximated the expected profit of accepting an incoming order. The experimental performance evaluations of this study showed the great capability of the created heuristic in producing feasible results.

    One of the most recent studies in this field is the study of Cwioro et al. (2019) on Attended Home Delivery (AHD) services, i.e. online shopping services that require customers to be present when their deliveries arrive. In these services, the vendor and the customer must mutually agree on a time window during which the product is to be delivered to the customer. Typically, the optimization of AHD systems involves the problem of capacitated vehicle routing with time windows. In their study, Cwioro et al. (2019) focused on an online grocery shopping service of an international grocery retailer, and particularly on the challenges of the ordering phase, i.e. the phase during which customers place grocery orders on the company's website. In this study, it was assumed that the delivery schedule needs to be created dynamically as new orders are placed on the service’s website. This article provided a solution for determining which delivery time windows can be offered to potential customers and to iteratively create the schedule. The ordering phase calculations were divided into four main stages, which were carried out using a heuristic and a hybrid method based on mixedinteger programming. Finally, an experimental evaluation was performed to demonstrate the effectiveness of the proposed approach. In a study by Yanik et al. (2014), they developed a business model for collaborative competition based on multi-product sourcing between e-supermarkets. The logistics aspect of this study was the design and execution of a network where premium goods can be picked up from several vendors at different locations and delivered to customers. This study aimed to investigate the role of this delivery of premium products in profit generation, develop a model for the resulting multiple-pickup single-delivery vehicle routing problem, and propose a solution method for this problem. In this study, it was assumed that a group of products, called standard products, are offered in brick-and-mortar grocery stores and another group, called premium products, are only offered at a set of external third-party vendors. In other words, the grocery stores add the premium products provided by third-party vendors to the list of their standard products in order to attract more customers. The routing problem of this article consisted of two parts: (1) selecting vendors and allocating them to customers whose orders include premium products; (b) routing the vehicles so that they pick up the ordered premium products from vendors and combine them with the ordered standard products for delivery in a single batch. After assigning vendors to a customer, a combination of multiple pickups and a single delivery route were defined for that customer. To solve the problem, these researchers developed a hybrid metaheuristic approach consisting of a genetic algorithm for vendor selection and allocation and a modified savings algorithm for capacitated VRP with multiple pickups and single delivery and time window (CVRPMPDTW).

    Yu et al. (2018) published an article on order distribution and delivery in online pharmacies, which can be considered the one closest to this paper in terms of general approach and scope of work. This article aimed to develop a model and a solution method for urgent distribution and delivery of medicine in an online pharmacy system. This article first discussed the importance of medicine distribution for the field of medicine and the fast growth of e-commerce and how these have led to the emergence of online pharmacies and then explained why further research needs to be done in these areas. The article then discussed three approaches whereby orders can be handled in existing brick-and-mortar pharmacies. This paper presented a model for creating an order distribution scheme and a medicine pickup plan for the set of medicines included in the order. In this model, which was based on the Joint Collection method, the goal was to produce an optimal solution by identifying which pharmacies are the best choices for sending transport vehicles and how medicine should be allocated to pharmacies. The objective of this model was to minimize the total cost of order fulfillment without violating order delivery requirements.


    In this paper, we intend to model an online pharmacy network where medicines are picked up from brick-andmortar pharmacies and distributed to customers based on orders, but with details that make this network completely different from current online pharmacies. This network is assumed to be consisting of a set of brick-and-mortar pharmacies located at specific points within the area of operation and a third-party logistics company that has a transport fleet suitable for this operation. It is assumed that the vehicles of this fleet remain parked at brick-andmortar pharmacies until the orders are received. Once orders are received, scheduling and routing are done accordingly and vehicles start to pick up medicines from pharmacies to fulfill the orders. Schedule and route plans are built according to the size of orders placed for each medicine in the current period and other problem conditions such as the inventory situation of pharmacies. In the proposed model, each customer is assigned to one of the pharmacies where a vehicle is available, and each vehicle is strictly required to fulfill the orders it is assigned by using its own inventory or by picking up medicine from other pharmacies.

    For this model, we need information such as the inventory of each pharmacy and the distance between different points of the network (e.g. customers and pharmacies). It is assumed that this information can be obtained from the database of the online pharmacy software and from the data constantly exchanged with the third-party logistics company. The innovation of this model is in how an improved system of online pharmacies is implemented. Essentially, what presented in this article is the formulation of the described network as a multi-depot vehicle routing problem with time windows (MDVRPTW) in which items can be picked up from and moved between depots and vehicles fulfill the needs of depots as well as customers in their tours; an approach that is rarely taken in the literature. Therefore, this study contributes to the literature by using the said approach for a real-world problem related to the field, i.e. scheduling and routing in online stores and particularly online pharmacies.

    2.1. Mathematical Formulations and Problem Assumptions

    To make the model as realistic as possible, the following assumptions are defined for the problem:

    • - There is a strict delivery time window for each customer (because medicine must be received and consumed on time).

    • - The transport fleet operating at each level is homogenous and has a limited capacity.

    • - Each customer has a constant demand in the form of one order in which the type and quantities of needed medicines are clearly specified.

    • - The inventory levels of pharmacies and the distance between every two nodes in the network are known.

    2.2 Sets and Indices

    • I and J: Sets of pharmacy nodes

    • p: Set of medicines

    • n N ,   n p N : Elements of the intersection of pharmacy and customer sets

    • m: Set of vehicles delivering medicine from pharmacies to customers

    • V: Set of vehicles moving medicine between pharmacies

    • c: Set of customers

    • ui: Set of vehicles belonging to pharmacy i

    2.3 Parameters

    • MM: A very large number

    • IOip: The initial stock of pharmacy i of medicine p

    • tcn,np: The time it takes to move between pharmacies and customers or between two customers

    • Dicp: The demand of customer c for medicine p from pharmacy i

    • D'icp: Equals 1 if customer c takes the Dicp amount of medicine p from pharmacy i, and is 0 otherwise

    • tdijv: The time it takes for vehicle v to go from pharmacy i to pharmacy j

    • tcic: The time it takes to move between pharmacy i and customer c

    • CXvij: The cost of moving from node i to node j by vehicle v

    • ccip: The inventory holding cost of pharmacy i for medicine p

    • cc'n'cm: The cost of shipping medicine from node n' to node n by vehicle m

    • ubpc: The maximum time allowed for medicine p to reach customer c

    • IIp: Inventory level of medicine p at pharmacy i

    2.4 Variables

    • Evij: Assigns node j to depot i and vehicle v belonging to that depot

    • TGm: The departure time of vehicle m

    • IIip: The inventory level of node i at the end of period p

    • yvjip: The amount of medicine shipped from depot j to pharmacy i by vehicle v during period p.

    • AT'jpc: The time medicine p for customer c reaches node j

    • TTcm: The time vehicle m reaches customer c

    • u: A constraint variable for eliminating sub-tours

    • zznn'm: Equals 1 if vehicle m goes from node n to node n' and is 0 otherwise

    • ATijv: The time vehicle v departed from node i arrives at node j

    • Cmax: The maximum time needed to fulfill deliveries

    • IDip: Equals 1 If medicine p is present in node i is 0 otherwise

      0.5 ( i I j J v V C X v i j . x v i j + i I p P c c i p . I I i p + n ' N n N m M c c ' n ' n m . z z n ' n m ) + 0.5 ( c m a x )

    • EEjc: Equals 1 if customer c is assigned to depot i and is 0 otherwise.

    2.5 Objective and Constraints

    i ' I j x i ' j v = E v , i , j                             i I , j J , v U i , i J

    i ' I j x j i ' v = E v , i , j                             i I , j J , v U i , i J

    u i v u j v + | i | . x i j v = | i | 1 i I , p P , j J , v U i , i J

    i I j x i j v = i I j x j i v j J ,   v V

    j ' J i x i j ' v + j ' J i x j ' j v 1 + E v i j     i I , j J , v U , i j

    M . j ' J i x i j ' p j J i E v i j                         i I , v U i

    x i , i , v = 0 i I , v U i  

    I I i p = ( I O i p c C D i c p ) + j J i y j i p p P ,   i I

    ( I D i p 1 ) . M M I O i p c C D i c p                 p P , i I

    I D i p . M M I O i p c C D i c p p P , i I

    j J i y j i p I D i p . ( I O i p c C D i c p ) p P , i I

    p P y j i p v U U i v E v i j . M M i I , j i , i j

    p P y j i p v U U i v E v i j i I ,   j J ,   i j

    E v i j 1 i I , j J , i j

    A T i j v t d i j v M M . ( 1 x i j v ) i I , j J , v U i

    A T i j v j ' J A T j ' i v + t d i j v M M . ( 1 x i j v ) i I , j J , v U i

    A T i j v x i j v . M M i I , j J , v V

    A T ' j p c D ' j c p . A T i j v M M . I D j p i I , j J , v U i , p P , c C

    n N m M z z n c m = 1 c C

    n N m M z z c n m = 1 c C

    u p c m u p c ' m + | n | . z z c c ' m | n | 1   c C , c ' C , m M

    n ' N z z n n ' m = n ' N z z n n m n N , m M

    n N z z i n m = n N z z n c m 1 + E E i c i I , c C , m M

    E E i c p P D i c p i I , c C

    E E i c . M M p P D i c p i I , c C

    T G m A T ' i p c M M . ( 1 z z i c m ) i I , c C , m M , p P

    T G m A T ' i p c M M . ( 1 z z c c ' m ) i I , c ' C , c C , m M , p P

    T T c m t c i c + T G m M M . ( 1 z z i c m ) i I , c C , m M

    T T n m T T c m + t c c n M M . ( 1 z z c n m ) c C , n N , m M

    T T c m u b c m c C , m M

    c m a x T T c m c C , m M

    x i j v { 0 , 1 } i I , j J , v V

    E i j v { 0 , 1 } i I , j J , v V

    I D i p { 0 , 1 } p P , i I

    z z i c m { 0 , 1 } i I , c C , m M

    E E i c { 0 , 1 } i I , j J

    I I i p , y i j p , A T i j v , A T ' i p c , c m a x , T G m , T T c m 0

    The objective function minimizes the cost of transport between pharmacies and from pharmacies to customers and the inventory holding cost arising from storing medicines in pharmacies. Constraint (1) and (2) specify the input and output of node j based on the vehicles belonging to node i. Constraint (3) is supposed to eliminate sub-tours. Constraint (4) ensures that if a vehicle enters a node, the next vehicle that exits that node is the same. Constraint (5) states that each node (depots or pharmacy) must be linked to another node or depot to which it is assigned. Constraint (6) guarantees that if one of the nodes of set j belongs to i, then there will be a route from depot i to those nodes. Constraint (7) ensure that there could be no route between two identical nodes. Constraint (8) determines the stock of medicine p in a pharmacy. Constraints (9) and (10) state that if depot or pharmacy i has a positive stock of medicine p, then IDip will be equal to 1. Constraint (11) determines the maximum capacity for transferring medicine p from node i to node j. Constraints (12) and (13) express the relationship between the variable y and the allocation variable Evij. Constraint (14) states that Evij=1 only when vehicle v belongs to i. Constraints (15), (16), and (17) determine the time of arrival at pharmacy j. Constraint (18) determines the time of arrival of medicine p for customer c assigned to pharmacy j. Constraints (19) and (20) determine the routes going in and out of node c. Constraint (21) is for the sub-tour removal. Constraint (22) states that the vehicles arriving at node n and those leaving node n must be the same. Constraint (23) guarantees that the routes assigned to a pharmacy are based on the customers allocated to the same pharmacy. Constraints (24) and (25) ensure that if customer c is assigned to pharmacy i, then EEic=1. Constraints (26) and (27) determine the departure time of vehicle m. Constraints (28) and (29) determine the time of arrival of vehicle m at customer c. Constraint (30) computes the maximum time needed to reach customer c by vehicle m and makes sure that it does not exceed the maximum allowed time. Constraint (31) determines the time of fulfillment of orders.


    The small-scale instances of the proposed model with 4 pharmacies and 3 types of medicine were solved with GAMS 24.7.3 running on a computer with a Core i7 CPU and 8GB of RAM.

    In order to research the relationship between the SCM quality deterioration factor γp and the objective value, we range γ1 and γ2 from 0.1 to 0.9, respectively. As shown in Figure 5, the objective value increases as the SCM quality deterioration factors increase. The parameter values and results obtained in this process are given in Table 1.

    Sensitivity analysis was conducted using the additive weighting method with weights w1=0.5 and w2=0.5. Given the significant effect of the parameter cc'nn'm3 on system costs and delivery times AT'jpc, sensitivity analysis was conducted on this parameter. The importance of this parameter stems from the fact that increasing cc'nn'm3 i.e. the cost of vehicle m3 should force the model to not use this vehicle to deliver goods as long as other vehicles are available, as it would increase the cost of the entire system. As shown in Table 2, changing this parameter changes the total cost of the model but has no effect on Gmax. This is because the model is required to achieve the target order fulfillment time, or in other words, it must build a schedule in which cost is sacrificed for delivery time so that the final time of arrival at customer location does not exceed its upper limit i.e. ubcm (this is a strict constraint). Therefore, it is willing to accept changes in system costs and schedule as long as the solution remains feasible and the system time remains unchanged.


    The application of logistics and supply chain concepts in the field of e-commerce is a still evolving topic with many gaps in the research literature, which is more applicable and needful in the pandemic condition. Among the articles published in recent years on the topic of online stores and especially online pharmacies, very few have worked on the optimization of order allocation and delivery in situations where customers place a large number of orders with strict delivery time windows and the integration of this problem with the vehicle routing problem with pickups and deliveries, with due consideration of unique issues that arise when working with pharmaceutical products. Considering this gap in the literature and the growing role of e-commerce in modern life including how health services are provided, the field can benefit from an integrated system for the implementation of online pharmacies. Established businesses as well as startups can employ such tools for cost and time optimization of their online shopping systems, which will certainly increase their profit margins as cost and time are the two main determinants of success in this area. In this article, we designed an integrated model for strictly ontime fulfillment of orders placed by customers in an online pharmacy system by making vehicles pick up ordered items from the brick-and-mortar vendors. In the end, a small instance of the problem was solved and a sensitivity analysis was performed to evaluate the developed model. Future studies can improve this model and make it more realistic by considering several planning periods, heterogeneous transport fleet, and probabilistic demand, or test the model on real-world cases.



    Relationship between objective value and SCM quality deterioration factor


    Results and parameter values obtained from the solution process

    Sensitivity analysis for cc'nn'm3


    1. Bolumole, Y. A. , Closs, D. J. , and Rodammer, F. A. (2015), The economic development role of regional logistics hubs: A cross-country study of interorganizational governance models, Journal of Business Logistics, 36(2), 182-198.
    2. Boyer, K. K. and Hult, G. T. M. (2010), Extending the supply chain: Integrating operations and marketing in the online grocery industry, Journal of Operations Management, 23(6), 642-661.
    3. Bailey, J. P. and Rabinovich, E. (2005), Internet book retailing and supply chain management: An analytical study of inventory location speculation and postponement, Transportation Research Part E: Logistics and Transportation Review, 41(3), 159-177.
    4. Campbell, A. M. and Savelsbergh, M. W. (2015), Decision support for consumer direct grocery initiatives, Transportation Science, 39(3), 313-327.
    5. Çelik, H. (2011), Influence of social norms, perceived playfulness and online shopping anxiety on customers’ adoption of online retail shopping: An empirical study in the Turkish context, International Journal of Retail & Distribution Management, 39(6), 390- 413.
    6. Cwioro, G. , Hungerländer, P. , Maier, K. , Pöcher, J. , and Truden, C. (2019), An optimization approach to the ordering phase of an attended home delivery service, Proceedings of the International Conference on Integration of Constraint Programming, Artificial Intelligence, and Operations Research, Springer, Cham, 208-224.
    7. Edwards, J. , McKinnon, A. , and Cullinane, S. (2019), Comparative carbon auditing of conventional and online retail supply chains: A review of methodological issues, Supply Chain Management: An International Journal, 16(1), 57-63.
    8. Garcıa-Dastugue, S. J. and Lambert, D. M. (2018), Internet- enabled coordination in the supply chain, Industrial Marketing Management, 32(3), 251-263.
    9. Gehrt, K. C. , Rajan, M. N. , Shainesh, G. , Czerwinski, D. , and O'Brien, M. (2012), Emergence of online shopping in India: shopping orientation segments, International Journal of Retail & Distribution Management, 40(10), 742-758.
    10. Hartley, J. L. , Lane, M. D. , and Hong, Y. (2014), An exploration of the adoption of e-auctions in supply management, IEEE Transactions on Engineering Management, 51(2), 153-161.
    11. Kim, K. , Chung, B. , Jung, J. , and Park, J. (2013), Revenue maximizing itemset construction for online shopping services, Industrial Management & Data Systems, 113(1), 96-116.
    12. Lancioni, R. A. , Smith, M. F. , and Oliva, T. A. (2000), The role of the Internet in supply chain management, Industrial Marketing Management, 29(1), 45-56.
    13. Liu, B. , Zhang, R. , and Xiao, M. (2020), Joint decision on production and pricing for online dual channel supply chain system, Applied Mathematical Modelling, 34(12), 4208-4218.
    14. Rahman, Z. (2019), Internet-based supply chain management: Using the Internet to revolutionize your business, International Journal of Information Management, 23(6), 493-505.
    15. Yanik, S. , Bozkaya, B. , and Dekervenoael, R. (2014), A new VRPPD model and a hybrid heuristic solution approach for e-tailing, European Journal of Operational Research, 236(3), 879-890.
    16. Yao, J. and Gu, M. (2015), Optimization analysis of supply chain resource allocation in customized online shopping service mode, Mathematical Problems in Engineering, 2015, 1-11.
    17. Yu, M. , Li, Y. , Zhuang, Y. , and Hu, X. (2018), Integrated optimization model of the urgent order distribution and delivery problem of online pharmacy, Procedia Computer Science, 126, 1913-1925.
    Do not open for a day Close