Designing a Multi-Stage Transport System Serving e-Commerce Activity

: In this paper, the author designs an e-commerce transport system, which covers the locations of producers’ facilities, distribution warehouses, and the business customers and deliveries among them. The study aims to identify the best locations for warehouses to increase efﬁciency in multi-stage transport systems. To reach this goal, the author revises distance metrics and suggests a methodological framework useful for warehouse location selection and practical applications. The empirical research is delivered by selecting a warehouse location using the maximal coverage model and mandatory closeness distance condition. After analyzing four warehouses’ alternatives, results are presented by applying various distance metrics. The results show that the selection of the location of the main warehouse depends on the level of returns that are deﬁned by using the Mersenne Twister algorithm, and the distance calculation metrics representing differences in ranking. By the end of the study, the recommendation is given to apply the presented methodological approach for decision-makers seeking to improve service distances where decisions are made using path-based service distance criteria. The increase of efﬁciency is important from a policy development perspective, as ﬁndings of the study could help to reduce transport delivery costs for customers.


Introduction
The demand for e-commerce services is growing under the pandemic situation [1]. Many authors [2][3][4][5][6] have investigated e-commerce and analyzed the various stage transport systems, such as single-stage and multi-stage. A single-stage transport system presents the direct delivery strategy, under which freight is executed with a single vehicle from pick-up to destination without reloading at an intermediate warehouse. Whereas, a multi-stage transport system includes reloading at the intermediate warehouse and the fulfilment of operations such as storage, picking, consolidation, packing, and/or transshipment. A multistage transport system involves one or more production facilities, storage or transshipment areas called warehouses, and the points for the final destination. The several types of multi-stage e-commerce transport systems are defined: • Multi-stage transport system with storage which focuses on a warehousing strategy; • Multi-stage transport system with transshipment which focuses on an immediate freight transfer strategy. Under the transshipment strategy, there is no option to stock products; the strategy requires vehicle changing when freight is unloaded at the warehouse from the incoming vehicle and loaded into the outgoing vehicle without changing the freight's nature [7].
Previous studies investigating e-commerce indicate the case of return transport that is quite specific to this activity. The level of reverse flows for e-commerce activity in Europe is between 7 and 18% [8]. They are due to miscounting, misloads, damages during deliveries, improper paperwork, and delivery delays [9]. Systematically, producers accept previously sold products or parts from the point of use for possible repair, rework, or disposal.
The design of a multi-stage transport system follows the approach of analytical modelling. The authors analyzing the transport system apply analytical methods such as linear programming (LP), non-linear programming (NLP), multi-objective linear programming (MOLP), fuzzy mathematical programming (FMP), stochastic programming (SP), heuristic algorithms (HEU), and hybrid ones (HYB). For designing a transport system, McDonald et al. presented an integer LP model for solving the problem in a multi-stage case [20]. Park proposed a model applicable to the transport system design that uses mixed-integer LP across multiple points [21]. Goetschalckx provided a mixed LP method, including the revision of seasonal demand in designing a transport system [22]. Lababidi (2004) proposed the NLP model to optimize the chemical business's transport system [23]. Authors Chern [24] and Selim [25] developed MOLP for approaching central planning [24,25]. Aliev suggested FMP for setting up a transport system [26]. Roghanian presented an SP framework applicable to planning a transport system [27]. The same author, Park (2005), proposed a two-phase HEU to design transport systems [21]. The first step determined the initial design plan, optimized in the second step by modifying the main components (some are presented in Table 1). Finally, Lee et al. proposed a hybrid method that integrated LP and simulation for capacity revision of the multi-stage transport system [28]. Table 1. The key points which are important for the review of the multi-stage transport system.
As mentioned above, multi-stage transport systems are characterized by one or more intermediate stages in which various operations can be performed. The role of these intermediate facilities is to perform the distribution process, reduce costs, provide higher quality services, or offer additional services to producers or customers.
The key criteria presented in Table 1 are also important for e-commerce activity. The importance is highlighted in published papers by authors such as [44][45][46][47][48]. Cargo transportation activity is quite costly. Therefore, the authors analyzing freight deliveries proposed the combination of pick-up from producers with delivery to customers to reduce transportation costs. They proved that the combination of both flows reduces transportation costs. According to their studies, integrated pick-up and delivery (PDP) refer to vehicles performing a set of routes that have fulfilled many transport requests. Each PDP route is characterized by a set of pick-up points, delivery points, and freight load size. Lahyani (2015) integrated additional constraints to PDP [49]. However, pick-up and delivery are usually treated as two separate problems performed by separate transport modes. Bergmann (2019) investigated the effect of integrated pick-up and delivery on the single transport route [50]. The authors specified that last-mile delivery accounted for one-third of transportation costs and proposed combining pick-up from producers with delivery to customers [50]. Several methods for planning PDP have been proposed in the vehicle routing literature.
The PDP method is used to estimate the route distance and decide how many trucks to allocate. Shen et al. proposed a system-based approach to generate a one-day truck schedule that provides estimated customer deliveries with multiple time intervals [51]. Linnainmaa et al. provided a three-phase approach [52]. The first phase is used to calculate the distance between supply and demand points to distribute volume. In the second phase, weekly truck and driver schedules are offered using mathematical programming methods and heuristics. The third phase is used for optimization and daily route modifications. Weintraub et al. proposed a modelling-based methodology for generation of the truck schedule [20]. Other authors [53,54] also proposed modelling-based methods for creating daily truck route schedules. Different heuristic rules have been developed in searching for a solution to make operations more efficient, including improving the rules of assigning trucks. Audy et al. proposed a small-scale PDP solution [55]. The method has three phases. The first stage is used to create many possible routes. In the second phase, trucks are assigned to the routes. In the last phase, a machine-based planning model is used for route improvement.
The multi-stage delivery approach requires clustering. In some studies, demand points are allocated to a cluster and the delivery tour is planned within that cluster. There are two methods. (I) cluster-first-route-second: in the first phase, demand points are assigned into pre-defined clusters, and the routes are planned within constructed groups. The algorithm starts with the closest supply facility demand point, and then sequentially, other demand points are assigned to the vehicle concerning supply point location. Afterwards, the final delivery routes are formulated for each cluster. (II) route-first-cluster-second: the first are two methods. (I) cluster-first-route-second: in the first phase, demand points are assigned into pre-defined clusters, and the routes are planned within constructed groups. The algorithm starts with the closest supply facility demand point, and then sequentially, other demand points are assigned to the vehicle concerning supply point location. Afterwards, the final delivery routes are formulated for each cluster. (II) route-first-cluster-second: the first phase, a gigantic tour, which includes all demand points, is constructed, and later, the trip is subdivided into full load (FTL) routes.
Based on the above, the study provided in this paper focuses on the first phase approach proposed by Linnainmaa et al. [52], which is closely linked with designing the multi-stage transport system and following Bergmann's [50] suggestion to combine delivery to customers with pick-ups from producers. However, backway cargo movements are not covered in studies [50,52] but an examination of such is required for the specific case of e-commerce.
The number of stages under Figure 1 depends on the number of freight reloads to different vehicles. In an e-commerce case, the deliveries from producers are picked up and delivered to the central warehouse, where they are picked according to business customers orders. In this study, the author also combines pick-up from customers and identifies which serving warehouse helps attain the lowest total distance level for combining the above mentioned flows. Herein, the forward and backwards transport costs are characterized by the piecewise linear costs function. Such a function was first proposed by Balakrishnan et al. [56].

The Selection of Serving Warehouse in the Multi-Stage Transportation System
Researchers developed many warehouse selection models important for designing a multi-stage transport system. These models are oriented to the identification of warehouses that provide the best service. Later, demand is allocated to the identified warehouse. In the classical case, a single warehouse belongs to the sole decision-maker. However, in practice, multiple in-distance located warehouses belong to one decision-maker.
The warehouse is an entity for inventory allocation performing logistics activities (storage, picking, packing, sorting, and distribution and/or collection of physical goods). There are various options for the selection of the serving warehouse [26].
The term "selection" refers to the choice among several or multiple warehouse location alternatives. The selection convergence method could be used in such phases: • From all alternative warehouses, which do not cover geographic territory; • From the list, left after the previous elimination, in which other alternative warehouses are eliminated, mainly those which total service distance is the highest. In this study, the author also combines pick-up from customers and identifies which serving warehouse helps attain the lowest total distance level for combining the above mentioned flows. Herein, the forward and backwards transport costs are characterized by the piecewise linear costs function. Such a function was first proposed by Balakrishnan et al. [56].

The Selection of Serving Warehouse in the Multi-Stage Transportation System
Researchers developed many warehouse selection models important for designing a multi-stage transport system. These models are oriented to the identification of warehouses that provide the best service. Later, demand is allocated to the identified warehouse. In the classical case, a single warehouse belongs to the sole decision-maker. However, in practice, multiple in-distance located warehouses belong to one decision-maker.
The warehouse is an entity for inventory allocation performing logistics activities (storage, picking, packing, sorting, and distribution and/or collection of physical goods). There are various options for the selection of the serving warehouse [26].
The term "selection" refers to the choice among several or multiple warehouse location alternatives. The selection convergence method could be used in such phases: • From all alternative warehouses, which do not cover geographic territory; • From the list, left after the previous elimination, in which other alternative warehouses are eliminated, mainly those which total service distance is the highest.
Numerous methods have been developed for warehouse selection analysis. One type of method used in this research problem is the multiple criteria evaluation method, present since 1980. This type of method is applied to figure out which location alternative receives the highest score. Among widely-known methods of this type, there are PROMETHEE II, TOPSIS, ELECTRE, and AHP. They are used for cases with noncomparable warehouse alternatives. More advanced methods do not require a pair-wise comparison when matching options are added or deleted. Various criteria are considered for warehouse selection decisions, such as the closeness to the supply and delivery market, infrastructure development for multiple types of transportation, the costs and availability of labour, human education, business climate, etc. Some of these models search for region preferences. Such models include comparison of economic, technical, social, and environmental aspects of pre-selected regions [57].
Spatial yield models usually require specific characteristics for the selection of site location in open field cases. Distance-dependent yield models include distance-dependent, single-product, and distance-independent models. In general, models consist of the optimization algorithm, where the distance variable is selected for optimization [58]. Two types of distances are used by authors studying freight delivery: total travel distance and average travel distance. By minimizing total travel distance, average travel distance is also reduced. For an appropriate application, GIS data is incorporated as well.
The development of optimisation models started in 1963. Even though these models were developed at an early stage, they are complicated in terms of selecting the best alternative. Arch-based distance or a related measure (e.g., travelling costs or volume delivery time) is the primary variable in such models. There are eight basic warehouse selection models: maximal covering, maxisum, set covering, p-dispersion, p-center, pmedian, fixed charge, and hub. These models include the system of demand locations which are served from new and existing warehouses.
In maximal covering models, a maximum distance is used to cover the public or private interest. These models search for the location which guarantees coverage in a given area. Any retail chain might want to locate its outlets to maximize the number of potential clients present within maximum walking distance [59,60]. In the maxisum case, the objective is to maximize the demand-weighted total Euclidean distance. This requires assigning a demand point to the farthest supply point, except the constraint, which ensures that case demand points could be assigned to the nearest warehouse [61,62]. Set covering models are used for the objective of locating the lowest number of distribution facilities to cover demand. To solve the problem, these models incorporate the set of demand nodes and the set of candidate warehouse selections [63,64]. P-dispersion models analyze only the Euclidean distance between new facilities. These models are set up for the objective to maximize the minimal distance between selected pairs of facilities, where the problem is the reduction of demand cannibalization among outlets [65][66][67]. P-center models search for solutions that minimize the maximum distance when demand is linked with the pre-determined number of facilities [68].
Furthermore, classical p-median models select warehouse locations to reduce the demand-weighted total Euclidean distance between demand points and the assigned distribution facilities. In the demand-weighted case, the distances between demand points and potential facilities are multiplied from the weight associated with the demand level. The objective is to minimize the maximum demand-weighted distance, where each outlet is assigned to a single warehouse [65][66][67]. All assigned facilities are un-capacitated, and the number of facilities, which are planned for assignment, is known in advance; and each demand point has only one assigned facility [68][69][70][71].
In the case of random demand, an un-capacitated warehouse model is used which makes demand at each customer probabilistic. One of the assumptions of the capacitated warehouse model is that demand is known and fixed. The capacitated warehouse model with capacity restrictions could satisfy current business needs. However, for the satisfaction of future business expansion and demand fluctuations, the application of an un-capacitated warehouse model is more convenient.
Finally, hub location models are used to minimize total transportation costs. Herein, they cover interaction costs associated with node-to-node flows. The function to access the hub system is quadratic, and assignment to the nearest hub is not always an optimal solution [72,73]. The literature review shows that research must address the subsets of relevant factors for transport system design ( Table 2). There are two models which incorporate costs metrics: fixed charge location model and basic p-hub location model. The first model involves costs per demand specified in the transport unit (pallet) and per distance unit (kilometre). The second model involves costs for accessing the hub system and transportation between hubs, including discounts for high volume transportation cases [74,75]. The classic p-median model focuses on the minimization of lead-time [76]. Different warehouse selection models have a unique impact on the transport system (Table 2). Three models, such as the maximal covering model, fixed charge location model, and basic p-hub location model, are oriented to efficiency increase.
In some cases, it is necessary to select warehouses for the number of production sites by minimizing the network's total operating costs. In such cases, the volume flows are pre-defined among production and warehouse facilities according to the maxisum model. During modelling, optimal capacities are defined for those facilities where necessary, and quantities for different products are specified as essential for designing the transport system.
Other methods are different in their logical approach. The p-center method searches for geographic mid-point and does not include the selection among warehouse alternatives. The maximal covering model uses the geographical coverage condition. If the geographical territory is a circle, the model searches for the mid-point of the circle. However, in practice, this is not an optimal solution when a path-based distance metric is used.
The revision of costs is also essential for a functioning multi-stage transport system that combines delivery and return flows. For this problem, the warehouse selection models serve as an umbrella. The costs change over time and represent the transport system's performance in a single time period. The changes must be re-examined to identify the warehouse serving demand point in the most cost-efficient way.
In the next section, different combinations of delivery and return policies are presented. The service distances for each policy type are examined through the modelling, and then guidelines are provided on how to make the e-commerce transport system more efficient.

The Methodology for Serving e-Commerce Activity
To research the multi-stage transport system serving e-commerce activity, the author developed a multi-layer methodology and presented it in Table 3. The methodology includes three layers: the multi-stage transport system layer, delivery service to e-commerce activity layer, and warehouse selection layer, where ranking is implemented for serving warehouse selection.
The methodology of the case study consists of four steps: 1. The retrieval of addresses and coordinates of all locations and the calculation of service distances following two distance metrics; 2.
The application of the maximal coverage model incorporating mandatory closeness service distance. The model incorporating the analytical linear programming (LP) method is used for the revision of the locational system configuration and the number of warehouses covering the geographical territory identification; 3.
The review of the impact of returns on the overall service distances important for e-commerce activity through the modelling. For identification of which location requires pick-up, the author uses a pseudorandom number generator (PRNG) applied by the Mersenne Twister algorithm; 4.
The ranking of alternative warehouses following the sum of service distances evaluation results that are important for the efficiency increase in the multi-stage transport system. Following the ranking rule logic, the enterprise should choose a warehouse to which total distance is the lowest at the priority row.
Following the first methodology step, Google maps and robotic process automation (RPA) applications were used. At first, the author retrieved addresses of all locations. Later, based on the address information, latitude and longitude coordinates of geographic locations were found with the programmed UiPath RPA bot by searching the addresses on Google maps. The RPA solution also retrieved the latitude and longitude coordinates for each address and combined them with the list of geographic locations and path-based distance identification. After the RPA process, errors are revised and manually corrected to have proper service distance calculation results. It consists of producers, warehouses, and business customers with pick-up (return) and delivery services.
The design of a multi-stage transport system includes the revision of the locational configuration to reach the best possible performance of the system.
Combined pick-up (return) and delivery services involving multiple locations.
Achievements in the development of the transport system required going forward to reach the savings of natural resources. II layer (Delivery service to e-commerce activity) The revision of the combined delivery and pick-up (return) to increase the motivation of business customers.
Comparative analysis of key service delivery components stimulating e-commerce activity.
The reduction of delivery service price for the business customers.

III layer (Warehouse selection)
The warehouse selection to improve demand coverage and minimize maximum service distance in fulfilment of delivery and pick-up (return) transportation.
The evaluation of service distance required to reach the warehouse facility and the selection among warehouse alternatives.
The formulation of suggestion, allowing a maximal coverage model incorporating mandatory closeness to service distance.
The selection of alternatives which enables the requirements of sustainable development.

•
The straight-line or arch-based distance metric between two points is called Euclidean distance; • The path distance metric connecting two locations is called path-based distance.
For the calculation of service distances, latitude (Lat) and longitude (Lon) values of two location points are included as specified in Equation (1) and summarised in the distance matrix (Table 4) [77]: Table 4. The matrix of distances between locations of producers, warehouses, and business customers. The sum of the shortest Euclidean distances L j to all locations I is computed in Equation (2): The path linking the locations of producers, warehouses and business customers is based on single-mode distance and performed by single land freight mode and identified using Google maps and the RPA tool. For the warehouse selection, the shortest path-based service distance approach could be used as specified in Equation (2). The sum of the shortest path-based distances L j to all locations is computed in Equation (3): herein: d ij -the path-based distance from the analyzed warehouse j to location i, where I-the set of locations. Following the second step, the maximal coverage model is selected. According to the classical warehouse selection methods, presented in Table 2, five models focus on reaching multiple points: maximal covering model, p-dispersion model, p-center, classic p-median model, and maxisum model. However, only three of them have requirements for specifying the number of warehouses and the coverage in defined service distance. Among these methods is the maximal covering model, p-center, and maxisum methods. The methods are different in their logical approach. The p-center method searches for geographic mid-point and does not include the selection among warehouse alternatives. The maxisum method includes the sales volume for each customer per period and the calculation of weights among the customers. Therefore, after searching for a defined solution, the Maximal covering model was identified as the most suitable as well as the model which guarantees an efficiency increase in the transport system. The maximal coverage model is applied to identify the area's geographical coverage of locations. If the geographical territory is a circular area the best place for the central warehouse is in the middle of the circle (identified as a pair of Lat and Lon coordinates). If the geographical territory is not a circular area, the geographic midpoint is calculated by finding the cross point of all straight lines between all the locations in the list.
The classical warehouse selection methods using Euclidean distance logic search for the geographic midpoint. All these methods have shown the application of Euclidean distance. However, there are situations in which the length in the path-based case is different from a straight-line and path-based distance length is influenced by terrain characteristics. As the problem is quite complex, it is not easy to find a common cross point for all roads connecting multiple locations and representing the shortest service distances. In such a case, it is easier to have predefined alternatives for central warehouse locations, and among them, select the location to which the sum of path-based services distances is the lowest.
The previous studies using the maximal coverage model applied various coverage calculation methods: sigmoid partial coverage, weighted linear partial coverage, linear partial coverage, and classical coverage. The application of this method is sometimes complicated as mathematical programming packages cannot solve large-sized problems. Heuristic approaches used for the selection of warehouse alternatives can solve largesized problems, but do not guarantee an optimal solution can be reached. To solve the problem, the author investigated the classical full-coverage approach and for the revision of coverage used several distance measuring methods (Euclidean distance and path-based distance measures). Following the central warehouse selection case, the author combined delivery and return distances into the analysis of the efficiency increase in the e-commerce transport system. For the study, the author selected the maximal coverage model incorporating mandatory closeness distance. The model determined the coverage level by warehouse alternative for each pick-up and delivery point (i.e., location). Equation (4) maximizes the coverage level within the maximum service distance T: otherwise herein: C ij -the level of coverage provided by warehouse j to location i; I, i-the set of locations and the index of individual location; J, j-the set of warehouses and the index of specific warehouse location; M i -the set of potential warehouses; d ij -the shortest distance from location i to warehouse j, S-acceptable service distance, T-maximum service distance, when warehouse facility j is away from location i, as T > S; and x j -binary variable, 1 if warehouse j is selected, otherwise 0.
Equation (5) shows that a location i is covered only when one or more warehouses are located within an acceptable service distance S: where x j = (0, 1), j ∈ J , y i = (0, 1), i ∈ I . herein: y i -binary variable, 1 if location i is not covered by warehouse j in S distance, otherwise 0, N i -the set of potential warehouses that could reach location i within the acceptable service distance S (N i is lower than M i ).
According to Equation (6), there is at least one warehouse j in distance T: Following the third step, the author analyzed the return flows. The studies showed that return flow is quite common for e-commerce activity. However, it is not easy to identify locations in which the delivery will be damaged, late, miscounted, or misloaded. This changes the logic that for efficiency increase it is necessary to find a geographic midpoint. Therefore, the author applied the Mersenne Twister algorithm to identify random locations, which are candidates for the return.
When both distances (forward and reverse) are included for Euclidean and path-based distances, the modifications of Equations (7) and (8) are applied: herein: d ijr specifies Euclidean distance for return cases from producer or customer i, to the analyzed warehouse j; d ijr -path-based distance for return cases from producer or customer i, to the analyzed warehouse j; and r represents return cases. Following the fourth step, the ranking of warehouses is applied after the total distance is known. The higher the value of L j , L j , L jr , L jr the lower the rank. According to rank results, which are specified as L 1 < L 2 < L 3 < L 4 , the enterprise should choose warehouse one, as its total distance is the lowest and appears in the first place. Ranking for warehouse selection is applicable for the results following Equations (2) and (3) and Equations (7) and (8).
The ranking allows minimization of total service distance value and helps e-commerce companies create and deliver value to business partners.

Case Study and Review of Service Distance
The case study focused on delivery for a business selling office supplies, gifts, printed materials, and stationery products. The company started business in the domestic market and later expanded the business into other neighbor markets in the Baltic states and acquired 800 business customers. Recently, the company was sold and the new business owner is planning reorganization.
The purpose of the case study is to define which warehouse to select for products distribution after reorganization, assuming that all locations are fully covered from the single (central) warehouse and the efficiency is reached in the e-commerce transport system.
For this case study, four alternative warehouses were analyzed. The coordinates of these warehouses are as follows: After the reorganization, the distribution of products will be organized through a single warehouse by a third-party logistics company. Among the alternative warehouses, the criteria for the selection of a single warehouse are efficiency and accessibility. The main assumption for the case study is that the efficiency increase is accepted only when all delivery points are covered from the single warehouse. For problem-solving in the e-commerce transport system, the author applied one of the classical warehouse selection methods.
The empirical study included multiple locations: 219 producers, four warehouse candidates, and 800 business customers, located in the Baltic states, and focused on sustainable e-commerce activity development. The locations of producers, warehouses, and business customers are fixed for transport system design purposes.
The empirical research contains four steps, which are specified in Section 3: 1.
The retrieval of the coordinates of all locations and calculation of the distances for the case study; 2.
The application of the maximal coverage model and the number of warehouses covering the geographical territory identification; 3.
The review of the impact of returns on the accumulated distances; 4.
The application of ranking of alternative warehouses following the accumulated distances.
Below is the presentation of the results of the empirical study.

Results of the Analysis
The maximum coverage model helps to decide on the number of warehouses and specifies which warehouse alternatives are appropriate for an area's geographical coverage. In the case study, four warehouse alternatives were evaluated to define maximum and mandatory service distances (Tables 5 and 6) and average service distance metrics (presented in Table 5, under 1.1-1.2 and 2.1-2.2). Herein, the maximal coverage metrics ensure that no supply and demand points go beyond the geographic area's maximum service distance level.  The lowest maximum service distance is seen among Warehouse2 and Warehouse3. The different distance calculation methods report the differences in results. According to the calculations, it is evident that the path-based service distance is almost 20% longer than the Euclidean one and that the selected calculation method influences the warehouse selection results.
Following the geographical territory, the first three warehouses (WH1, WH2 and WH3) cover further located pick-up and delivery locations. However, the location of Warehouse4 is not attractive as it does not cover the farthest geographical locations. Euclidean distance for WH4 should be in the radius of 606 km and path-based distance should be 720 km to cover these locations. Table 5 also shows that warehouses (WH2 and WH3) are located more than 300 km away. However, the author sought to identify if the two warehouses cover all pick-up and delivery locations. For such a condition evaluation, the author used a mandatory closeness distance metric. The author checked how many serving warehouses could meet the criteria S < T and identified these results in Table 6.
The mandatory distance check results showed that the condition to have two warehouses covering 100 per cent of the geographic territory is not met. The results presented in Table 6 also showed that three warehouses must be selected to cover mandatory closeness path-based distance in the 300 km range, and four warehouses must be selected to cover mandatory closeness Euclidean distance in a 250 and 300 km radius. Other options are not considered as there are more than 5% uncovered objects. The most suitable warehouse is selected according to Equations (5) and (6). Based on mandatory closeness distance results, it is evident that Warehouse3 (WH3) meets the best mandatory closeness Euclidean distance in the 300 km case by 93% and Warehouse1 (WH1) meets the best in mandatory closeness path distance in the 200 km case at 56%. However, if the enterprise wants to select a single warehouse, the acceptable service distance criteria must be increased until the S = T condition is reached.
In the final stage, ranking among warehouse alternatives is applied. The greater the value of L j , the lower the placement dedicated to warehouse j. According to rank results, the warehouse should be allocated to all pick-up and delivery locations (specified as the set of I), which appeared in the first place. These ranks are given in Table 7 under the second column. The sum of distances is compared with the rank which is having the lowest total distance value. The comparison results showed that the accumulated distance for WH4 is the highest and this alternative during ranking appears in the last place.
The ranking results (Table 7) showed that the priority for path-based distance is given to WH2 and for Euclidean-based distance to WH3.
Further on, the return effect on distances was investigated. The author, during analysis, calculated how the number of returns influences the increase in service distance.
After business customers provide return orders, the company organizes freight pickup services. After delivering freights to the business customers, vehicles travel to nearby producers to pick-up the products; however, trucks must fulfill additional trips in extra loads, which means higher km and costs.
The study delivers interesting results which show that the higher impact of pathbased service distance on return is the highest among distance metrics. The results of these calculations are presented graphically in Figure 2. After business customers provide return orders, the company organizes freight pickup services. After delivering freights to the business customers, vehicles travel to nearby producers to pick-up the products; however, trucks must fulfill additional trips in extra loads, which means higher km and costs.
The study delivers interesting results which show that the higher impact of pathbased service distance on return is the highest among distance metrics. The results of these calculations are presented graphically in Figure 2. The graph shows the exponential increase in overall service distances: the higher the return level, the higher the accumulated service distances. The highest impact is evident on path-based distance and is dependent on return level; therefore, the higher the level of returns, the higher the impact on specified service distance.
The ranking of warehouses is repeated. The presentation of the effect of returns on warehouse selection priorities is stated in Table 8. The results of the study show that the number of returns influences the warehouse ranking results. The WH3 is the pre-dominant warehouse for Euclidean distance cases and WH2-for path-based distance cases.
The ranking of warehouses shows that it is strongly recommended to plan the returns The impact of returns on distance increase Return, % Path distance, % Euclidean distance, % The graph shows the exponential increase in overall service distances: the higher the return level, the higher the accumulated service distances. The highest impact is evident on path-based distance and is dependent on return level; therefore, the higher the level of returns, the higher the impact on specified service distance. The ranking of warehouses is repeated. The presentation of the effect of returns on warehouse selection priorities is stated in Table 8. The results of the study show that the number of returns influences the warehouse ranking results. The WH3 is the pre-dominant warehouse for Euclidean distance cases and WH2-for path-based distance cases. The ranking of warehouses shows that it is strongly recommended to plan the returns level. The case study presents that the selection of a warehouse is dependent on the application of return policy, and based on this, the ranking results could be different. The proposed methodology based on return scenarios could help select the most appropriate single warehouse for the e-commerce transport system.
The results help to improve efficiency in the multi-stage e-commerce transport system, which correspond to sustainable development needs by selecting the appropriate warehouse; thus, the service delivery distance is minimized. For further improvements, the suggested methodological framework must be applied in case of e-commerce activity development and significant changes in business customers' locations.

Discussion
Efficiency improvement is quite important in the multi-stage e-commerce transport system. The results of such analysis could help to reduce delivery costs for customers.
For the design of the multi-stage transport system, the author included warehouse selection methods. Most of which searched for a geographic midpoint place to establish a warehouse or a nearby warehouse location. However, the aspects of reverse flow were not included in the application of these methods.
The study expanded the application of distance-dependent models, by including more distance calculation metrics between the locations of producers, warehouse alternatives, and business customers for analyzing delivery and return flows. According to the case study, it is evident that neither the nearest warehouse of some locations nor the location representing geographical mid-point is selected to reach efficiency in the transport system. The new theoretical findings show that the main component for efficiency increase in the transport system is the review of return flow and volume when selecting warehouse location.
The author presented the methodology useful for designing the transport system, which serves e-commerce activity. Following current needs, the research covered more detailed service distance analysis, supporting the geographic maximal coverage condition. The maximal coverage model helped decide the appropriate number of warehouses required and suggested which warehouse alternatives follow the geographical coverage of the territory.
The author analyzed not only Euclidean distance as selected in previous studies following p-median, p-center, p-dispersion, set-covering, fix charge, and maximal covering models but also included path-based distance and showed differences that are important in decision making. In the case study, the author revised four warehouse alternatives and showed the potential to ground decisions by revising the results of path-based distances.
The review of the effect of the return is important for e-commerce activity. For the identification of which location requires pick-up, the author used the Mersenne Twister algorithm, which allowed the determination of new results. Furthermore, the author investigated how the level of returns influences the increase of service distance and affects the warehouse selection results. Aiming to minimize service distance, the company must estimate the actual level of returns and finalize the design of the transport system by deciding on warehouse location. During warehouse selection, the alternatives of warehouses are ranked according to the priority row. The accumulated service distance results are used during ranking and prioritize the warehouse selection. Additionally, the savings in service distances are presented accordingly.
The efficiency gains are especially important for business subjects that can take advantage of e-commerce. The increase in efficiency could help meet the UN Sustainable Development Goals. The positive impacts could benefit trade volume and the environment through the reduction of vehicle use, and subsequently for customers who would pay a lower price for the delivery. These changes mean that a holistic approach to e-commerce policy is needed. Policymakers should stimulate the solutions, which impact various policy areas, especially those identified in this paper. Periodic policy reviews can help ensure continuous efficiency increase in the system serving e-commerce activity.
In summary, designing a multi-stage transport system is one of the strategic decisions that should be assessed by precise distance calculations, business expansion strategies, practical experience, expectations, and many other important factors. The study extends current studies but has some limitations: the volume of delivery and return flows, product type, and transport time are not included in the analysis of the transport system. The study did not analyze the costs for opening a warehouse, as was investigated by the fixed charge warehouse selection model, but these could be included in other studies. In future, the research could be developed in other directions such as analysis of weighted-Euclidean and path-based distances, the selection of the number of serving warehouses, the research of the impact of warehouse-oriented strategies, i.e., warehousing and transshipment on e-commerce delivery costs, and the comparison of single-stage and multi-stage transport systems.

Conclusions
This study investigated the design of the multi-stage transport system, which serves e-commerce needs. To research such a multi-stage transport system, the author developed the methodology.
Various methods are used for the design of a multi-stage transport system such as vehicle routing, classical warehouse selection, and methods used to research e-commerce activity. The efficiency of the transport system and delivery costs strongly depend on warehouse location. The author investigated the number of models essential for serving warehouse selection. During the application of classical warehouse selection methods, authors used Euclidean service distance metric, which does not guarantee that the finding of geographical midpoint means the highest efficiency of the transport system.
The revision of these problems requires investigation into the geographic coverage of multiple locations belonging to the transport system, the impact of returns on service distance metrics, and ranking of warehouses in an effort to minimize total service distance. The extension of the application of the maximal coverage method follows the accessibility of multiple locations and efficiency increase in the transport system. The author incorporated the return flow, which is typical of e-commerce activity and the Mersenne Twister algorithm for identifying locations with return needs. The involvement of the return flow in the study shows that this component influences warehouse ranking results.
The study presents methodological implications where the involvement of path-based distance metric into classical warehouse selection models presents different results from previous investigations. The research shows that path-based service distance is about 20% longer than the Euclidean one and suggests the selection of different warehouse alternatives rather than the application of the Euclidean service distance metric.
For the practical application of the maximal coverage method, the author investigated the transport system with four alternative warehouses and revised the condition of mandatory closeness service distance. The case study shows that mandatory closeness distance could be covered with three serving warehouses; otherwise, the multi-stage transport system is designed with a single warehouse when mandatory closeness service distance is equal to maximal coverage service distance. The efficiency of the transport system highly depends on the level of return flow that suggests different choices among warehouse alternatives. This also proves that the identification of a geographical midpoint for warehouse establishment does not guarantee that its selection is the most efficient solution.
The design of the multi-stage e-commerce transport system is quite complex. The complexity of the multi-stage e-commerce transport system was revealed in this study and the results that meet sustainability requirements were highlighted. These results are also important for policymakers and practitioners researching e-commerce transport systems.