Location Model for Distribution Centers for Fulfilling Electronic Orders of Fresh Foods under Uncertain Demand

Theproblemof locating distribution centers for delivering fresh food as a part of electronic commerce is a strategic decision problem for enterprises.This paper establishes a model for locating distribution centers that considers the uncertainty of customer demands for fresh goods in terms of time-sensitiveness and freshness. Based on the methodology of robust optimization in dealing with uncertain problems, this paper optimizes the location model in discrete demand probabilistic scenarios. In this paper, an improved fruit fly optimization algorithm is proposed to solve the distribution center location problem. An example is given to show that the proposed model and algorithm are robust and can effectively handle the complications caused by uncertain demand. The model proposed in this paper proves valuable both theoretically and practically in the selection of locations of distribution centers.


Introduction
In recent years, customers have enjoyed the fast delivery of fresh goods and foods through the rapid development of electronic commerce.Currently, in China, some big competitive e-commerce companies such as Amazon Fresh, Oahu Fresh, and Motion Optimization are providing e-commerce services with fast distribution network centers.The biggest problem faced by these companies is the uncertainty of customer demand for fresh goods, as the fresh goods are perishable and have a definite shelf life.Currently, up to 30% of all fresh food is lost throughout the supply chain before it reaches the consumers, implying huge economic loss issues [1].Having the distribution centers strategically located helps to keep perishable food fresh by keeping the time of storage and transport between facilities as short as possible [2].The location of distribution centers is of great importance during the design of the distribution network center because of the perishable nature of fresh food [3].
The size or the location of distribution centers will affect freshness, delivery speed, and distribution cost for each firm.Companies can build or rent distribution centers in a targeted area by analyzing market demand to improve the locations of the distribution network center and to reduce cost.Once the size and location of the distribution center are determined, it will not change for a certain period of time, but the customer demand of fresh goods may change.An important issue that arises while designing a distribution network is coping with the uncertainty of demand [4].Distribution center location will be affected when demand uncertainty is considered, as demand uncertainty forces companies to design a more reasonable distribution network and distribution plan to react quickly to variations and to meet customers' expectations [5].Therefore, it is important to consider the uncertain customer demand in the selection of commodity distribution centers.
The rest of the paper is structured as follows.Section 2 presents a relevant literature review on models of distribution center locations for perishable products and on robust optimization models.In Section 3, an optimization model is established to minimize the total costs of distribution center locations for delivering fresh goods; the methodology and the solution algorithm are given to solve the model.Section 4 addresses experimental results.Finally, Section 5 is devoted to the conclusions and the clarification of our work.

Related Literature Review
Many scholars have conducted in-depth studies on the location of distribution centers for perishable products and 2 Scientific Programming proposed various models and algorithms for optimizing site selection.
Hiassat et al. [6] considered the characteristics of perishable products.An optimization model was proposed to add a decision regarding the location of the distribution center to the inventory path problem.A genetic algorithm and a local search heuristic method were used to solve the problem.Govindan et al. [7] established a model of distribution center location and path optimization that mainly considers the high quality of perishable food.The model was solved with the multiobjective particle swarm optimization adaptive multiobjective variable neighborhood search hybrid method.Drezner and Scott [8] considered the location of a distribution center for a single perishable product.The model was established based on the inventory and position decision.The Weiszfeld algorithm was used to solve for the minimum total cost.Seyedhosseini and Ghoreyshi [9] formulated a new integrated production and distribution planning model for perishable products.LINGO software was used to solve the production model, and a particle swarm heuristic was developed to tackle the distribution model.de Keizer et al. [10] developed a network design model for perishable products that integrates decision-making on hub locations with the positioning of the customer order decoupling point, taking into account decay in product quality and the heterogeneity of product quality to allow for a comprehensive differentiation of product flows in network design.Orjuela-Castro et al. [3] present a model for locating facilities of mountain ranges, considering the factors of temperature and relative humidity on the perishability of fresh food.
Yang et al. [11] studied the dairy distribution center location model based on two levels of distribution and considered the cost of corruption of fresh products.He solved the model using a genetic algorithm.Zhang and Shaochuan [12] studied a model of locating fresh food distribution centers, used the addition method to solve the problem, and then used field search to replace the improved initial solution.Wu et al. [13] proposed a multiperiod location model with transportation economies of scale that distributes a single perishable product and formulated the problem as a mixed integer nonlinear programming model.Musavi and Bozorgi-Amiri [14] present a novel sustainable hub locationvehicle scheduling model considering responsiveness and environmental impacts and propose an adopted nondominated sorting genetic algorithm-II (NSGA-II) metaheuristic approach to solve problems.Rezaei-Malek et al. [15] propose a multiobjective model to design a disaster relief logistics hub location considering the lifetime of perishable products by adjusting certain time windows and consider the inherent uncertainty of input data.Khalili-Damghani et al. [16] propose a biobjective model to reduce the total cost of a company and consider the location of warehouses and the routing of vehicles for the distribution of perishable products.
From the literature review, we can see that many scholars are studying models of fresh perishable product distribution while assuming deterministic demand.However, there exists significant uncertainty regarding demand as the industry transitions from the current delivery mode of fresh products from a mono type and large batch distribution to a multitype delivery mode and small batch distribution.Therefore, companies should consider the effect of uncertainty in the establishment of distribution centers.
The main method of optimization under uncertainty is robust optimization.Robust optimization assumes that the uncertain parameters belong to a bounded and closed set and obtains a worst-case scenario to help decision makers reduce risk.Zhang et al. [17] proposed a robust mixed integer linear model with multiple objectives (economic, environmental, and social objectives) under supply and demand uncertainty.Qiu and Wang [18] developed a robust optimization model for designing a three-echelon supply chain network that consists of manufacturers, distribution centers, and retailers under both demand uncertainty and supply disruptions.Ben-Tal et al. [19,20] developed a robust optimization method and proposed an optimization framework of comprehensive robust equivalence.The robust optimization method was applied to a problem of uncertain and bounded demand.Ghodratnama et al. [21] studied the multiobjective hub location-distribution problem from a supply chain angle.The model is optimized by robust and fuzzy target programming.Habibzadeh Boukani et al. [22] considered the use of robust optimization methods to handle problems of locating multiple allocation centers under uncertain parameters.It was found that ignoring uncertainty in the supply chain network design could result in significant losses and costs.
Jakubovskis [23] presents a robust optimization modeling approach to make strategic capacity planning and resource acquisition decisions.The author examines the effects of economies of scale, economies of scope, and the combined effects of scale and scope under uncertain demand realizations.Eiselt and Marianov [24] studied WTE facility location planning problems under uncertainty from a government perspective in a cost-effective and environmental-friendly way.Bardossy and Raghavan [25] presented a robust optimization model for the connected facility location problem within the framework and extend the BS robust optimization approach using heuristics in conjunction with a lower bounding procedure for the subproblems.de Rosa et al. [26] presented the robust capacitated facility location problem to cope with uncertainty by dynamically assigning multilevel production allocations, locations, and capacity adjustments for uncertain parameter development over time.Ehrgott et al. [27] argue that robust optimization can be applied to problems where a solution is required that hedges against all possible scenarios, with realizations from the uncertain input data.Due to operational environment changes and information uncertainty in network designs, Xu et al. [28] present a general two-stage quantitative framework to help decision makers to select the optimal network design scheme for collaborative logistics networks under uncertainty, then add the robust constraints into the expected value model, and make the model more robustness.Majewski et al. [29] propose a min-max robust multiobjective problem formulation to determine a robust sustainable design to cope with uncertainties, and the formulation allows the identification of robust sustainable designs, easily guaranteeing the security of the energy supply.
The above literature shows that robust optimization is an effective way to address uncertain problems.These studies have laid the foundation for the subsequent optimization of robust research.
In this paper, we will consider factors such as uncertain demand, the shelf life of a variety of perishable products, the timeliness and freshness of those products, and the establishment of a location model for distribution centers that satisfies the customer demand for fast delivery of products.Robust optimization can also improve the ability of antiinterference in the model of locating distribution centers to address the problem of uncertainty.An improved fruit fly algorithm is used to solve the robust optimization.

Model Building and Solution Method
3.1.Problem Description.In the practice of fresh goods ecommerce, the uncertainty of customer demand for fresh products and the requirement of customer satisfaction for fresh commodities distribution often exist simultaneously.Both factors must be considered at the same time.The distribution network of an enterprise is often composed of multiple distribution centers and this paper will establish a location model for multiple distribution centers.The goal of the location model is to meet the requirements of the customers when distributing the goods from the distribution center to the customers and maintain the lowest cost possible.

Assumptions.
Many scholars have presented mathematical models, and it is crucial to consider all of the assumptions in this paper.In our research, it is assumed that fresh goods e-commerce enterprises will set up a number of discrete distribution centers within a certain period of time and a certain area.Goods are purchased from a plurality of fresh commodity suppliers and are stored in different distribution center locations.When an order is received from customers, the nearest distribution center is selected to deliver products to customers.We assume that the quantity and satisfaction requirements of the fresh commodity consumer (demand point) are predetermined, but the specific demand for each order of the consumer is uncertain.That is, each order can be ordered with multiple fresh varieties.The goal of the distribution center location model is to meet the requirements of the customers when distributing the goods from the distribution center to the customers and maintain the lowest cost possible.The logic diagram is as shown in Figure 1.
In addition to the general assumptions described above, this paper also considers the following specific assumptions that the fresh goods e-commerce enterprises operate in a specific period of time: (1) Fresh goods e-commerce enterprises prefer to rent the distribution centers from the existing candidate distribution centers and avoid the choice of constructing them.The benefit of selecting from existing distribution centers is that the fixed costs and operating costs are lower than when constructing a new center.(2) Customer demand is uncertain, and any candidate distribution center can fully satisfy the demand of a particular customer.
(3) The supply capacity of fresh commodity suppliers can meet the largest needs of the demand.
(4) In the total cost calculation, firms do not consider the fresh goods inventory costs, loading and unloading losses, vehicle maintenance costs, equipment maintenance costs, and staff bonus.
(5) Unit delivery cost is known and constant.
(6) The spoilage rate of fresh foods in the distribution process is constant.
(7) Fresh goods remain fresh when leaving the distribution center.
(8) Freshness of fresh produce can be perceived at all times during distribution.
(9) Delivery times may fluctuate, but drivers are penalized according to the degree of deviation from the service standard.
(10) This model is appropriate only for a certain period of time and static location assumptions, regardless of future costs and earnings changes.

Notation.
The following notation is used to formulate the problem considered in this paper.Parameters are as follows:

Distribution Center Location Mathematical
Model.This paper constructs the location model of the distribution center under the condition of determinate customer demand, then introduces the demand uncertainty function, and optimizes the model using the robust optimization method.

Location Mathematical Model under Determinate
Demand.The total cost of the distribution center model is the minimum total cost, which is composed of fixed costs, operating expenses, transportation costs, delayed penalty costs, and fresh goods corruption costs for distribution centers.The consumer satisfaction model includes the maximum freshness of fresh goods and the maximum accuracy of the distribution center service time: (1) Fixed costs and operating expenses ( 1 ) (2) Transportation costs ( 2 ) (3) Delayed penalty costs ( 3 ) (4) Fresh goods corruption costs ( 4 ) Fresh goods corruption costs can be expressed in terms of freshness.Consumers care about the freshness of products as visual indicators of their quality.Product transport time and mileage have a large impact on the freshness of certain perishable products.Therefore, this paper, which is based on the freshness model established by Zhang and Shao-chuan [12], takes the transportation time and the transport distance as the variables into account.We form a new freshness formula: where the transit time weight is  1 , the transport distance weight is  2 , and the weight is determined according to the specific transportation distance and the transportation time.
For the convenience of follow-up study, in this article,  1 =  2 = 0.5.

Fresh goods corruption costs
(5) The freshness of fresh goods (  ) (6) The distribution center service time (  ) (  ) is the consumer satisfaction time function.We use the satisfaction formula introduced to the literature in Yunfeng et al. [30]: In summary, the models of e-commerce distribution center locations are as follows: max   (10) max   (11) The objective function (9) indicates that the total cost is to be minimized.The objective function (10) indicates the maximum freshness of fresh goods.The objective function (11) indicates the maximum accuracy of the distribution center service time.
Constraint (12) is the supply constraint of the supplier.It ensures that the total amount of products transported from supplier ℎ does not exceed the maximum supply capacity.Constraints (13) are the distribution center  inventory constraints, and they enforce that the storage of the total fresh product does not exceed the maximum inventory capacity.Constraint (14) represents the number of new distribution center constraints.Constraint (15) ensures that each customer has only one candidate distribution center to deliver to him or her.Constraint (16) indicates that the volume of fresh foods delivered to the customer cannot be less than the customer demand, due to possible cargo damage.Constraint (17) ensures that the selected distribution center can provide delivery.Equations ( 18) and ( 19) are constrained by decision variables.
In the calculation, the multiobjective function is transformed into a single objective function by the main objective method to select the main objective function according to the enterprise's strategic plan.If the business goal is to minimize the total cost and the freshness and the distribution center service time only need to achieve a consumer satisfaction threshold, then consumer satisfaction does not have to be maximized, but consumer satisfaction is transformed into a constraint.In this paper, the main objective function is chosen to be the minimum total cost, and the satisfaction of the consumer is set as a constraint: Constraint (20) requires that the freshness of the product must reach the customer satisfaction threshold, and the satisfaction degree of the distribution center service time must meet the customer satisfaction threshold for time.
In the abovementioned distribution center location model, it is assumed that the demand   is known, and the total cost of the decision method can be obtained from the objective function (9).However, in real life, there is a great deal of uncertainty in the demand for fresh goods, so we need to use a robust optimization method to optimize the selection of locations for distribution centers.

Location Mathematical Model under Uncertain Demand.
The abovementioned distribution center location model is converted into an equivalent auxiliary model by using robust optimization.The uncertainty of demand is at the core of obtaining the equivalent auxiliary model.This paper uses a series of discrete scenarios to describe the possible requirements of the customer.
The specific demand of each location is unknown and is considered to vary in a closed and bounded box.This is a common description of the uncertainty method.
Assuming that the demand scenario is , where  = 1, 2, . . .,  is the probability that the demand scenario  of customer  satisfies the ellipsoid uncertainty set.The general form of the box can be specified as follows: where  0  is the most probable probability distribution of demand points;  ∈  × is the scope of the zoom; ‖‖ denotes the Euclidean norm for perturbation;    = 0,  0  +  ≥ 0 is to ensure that the demand scenario probability   is a probability distribution.
Assuming that the demand of each customer is independent of each other and does not interfere with each other, and the total cost of the site under the demand scenario  of customer  is   , the cost of a distribution center is determined as follows: The total expected cost for all distribution centers is determined as follows: The total cost of the distribution center is transformed: The robust correspondence model of ( 19) is expressed as min max The above model is equivalent to min s.t.max satisfies the demand uncertain set (21); then the left side of formula ( 27) is max Because ‖‖ ≤ 1 max Equation ( 27) is converted to In summary, the optimization objective of the robust optimization model is min  and composed of the constraints (30) and (12) to (20).The model has good robustness, through the robust optimization of the model, which can meet the uncertain demand of the customer and ensure the economic feasibility of the location selection scheme.

Improved Fruit Fly Optimization Algorithm (IFOA).
After the above two-step modeling, this paper establishes a model of the distribution center of fresh goods e-commerce under uncertain demand.The next important problem is the solution of the model.The location problem in the uncertain situation is an NP-hard problem.The traditional solution method is complicated, and the required amount of is prohibitive for finding a solution.Therefore, a heuristic algorithm is used to solve the problem.
FOA is suitable for solving the optimization problem with complex constraints and strong correlation between the constituent elements of the solution [31].It is widely used in many classical optimization fields, such as efficient truss optimization [32], gasification process operation optimization [33], and analysis of service satisfaction [34].The FOA algorithm is easy to combine with other methods, has strong robustness, and is suitable for robustly optimizing the location of distribution centers.Therefore, FOA is used to solve the problem in this paper.

Fruit Fly Optimization Algorithm (FOA).
FOA is outlined as follows.
Step 1. Initialize parameters, including the maximum number of evaluations (maxgen) and the size of fruit flies (sizepop), and initialize the position of the flies ( axis,  axis).
Step 2. Randomly initialize the flight direction and distance of the individual flies, where Random Value is the distance in the search: Step 3. The distance of each fly from the origin point and the smell concentration judgment value is defined as follows: Step 4. Based on   , the smell concentration of flies, denoted by Smell  , is calculated as follows: Step 5. Find the fruit flies with the best smell concentration and allow the flies to fly to the optimal position axis =  (bestindex) . ( Step 6. Stop the search if the maximum evaluation number is reached; otherwise, repeat Steps 2-5.FOA has great ability to achieve global optimization and high convergence accuracy and has great research value in the field of engineering.However, the original FOA uses a fixed search step and cannot take both global search capabilities and local search capabilities into account, thus affecting the convergence rate and search ability.Additionally, it is easy for FOA to focus on a local optimum, leading to premature convergence.This paper focuses on the shortcomings of the algorithm and improves FOA.The purpose of improving the FOA is to make it solve the location model better.

Improved Fruit Fly Optimization Algorithm (IFOA).
In this paper, an improved fruit fly optimization algorithm (IFOA) is proposed.The search step size is dynamically adjusted by introducing the weighting function.The purpose of dynamic adjustment is to divide the search into two parts.The first part contains a large search step in a large area for a global search to ensure that the algorithm considers the global optimum.The second part contains a smaller step search to ensure local search capabilities.
The fruit fly individual random search expression is as follows: where  represents the weighted function: where Smell  is the th optimal fitness value.When the ratio change is large, it indicates that the fly group is searching for a new space and that the weighting function is conducive to a global search.When the ratio change is small, the fruit fly group has shifted to a local search, and the weight function is reduced. > 0 and as  increases, fruit fly search ability increases, which prevents the algorithms from concentrating on a local optimum.It can be adjusted according to the actual problem.In addition to the random search expression, the other IFOA algorithm step expression is consistent with FOA.

Test Function.
To test and analyze the performance of the improved algorithm, the following two classic test functions were used to test FOA and IFOA, respectively.Function form, range, theoretical extremes, and peak are shown in Table 1.
The specific initialization parameter is set to sizepop = 20 maxgen = 100.We randomly initialize the flies' population position.The results of the functional tests are shown in Table 2, and the optimization process is shown in Figure 2.
From the test results in Table 2 and optimization process, IFOA has stronger capabilities of global search, local search, and higher convergence accuracy than FOA.Under the same conditions, IFOA results are superior to FOA, in terms of both mean and standard deviation.Under the same convergence accuracy, the number of valid iterations of IFOA is less than that of FOA, which indicates that IFOA converges faster.Therefore, IFOA effectively improves the convergence precision and convergence speed of FOA.  =  axis +  ⋅ rand () ,

The Calculation Process of Model
(3) According to the fitness function formula, the individual fruit fly is calculated to find the  position and optimal value of the individual and the global optimal individual.(4) Find the fruit flies with the best smell concentration and allow the flies to fly to the optimal position.(5) Stop the search if the maximum evaluation number is reached; otherwise, repeat.(6) According to the IFOA optimal location results, then find the corresponding best location of the distribution center and the optimal distribution path.

Computational Results
Experiments are proposed in this part to prove the effectiveness and feasibility of the location model.Both deterministic and uncertain demand scenarios are considered, and then a comparison and analysis of the results of the two situations is provided.The numerical calculation problem is considered to occur in a developed city where a fresh goods e-commerce firm chooses to rent a certain number of distribution centers within an appropriate area.The area of suppliers is 3 and the area of customers is 10.The firm chooses to rent 3 locations from a set of 8 candidate distribution centers.The distance between the supplier and the candidate distribution center and the distance between the candidate distribution center and the demand point are obtained by using the Euclidean theorem.The details are shown in Tables 3 and 4. The tables consider the different qualities of each candidate distribution center, such as the location, transportation, economy, and other conditions.Fixed costs, operating costs, and the largest inventory are also different, as shown in Table 5.The maximum supply capacity of supplier ℎ is shown in Table 6.
The average traveling speed is 45 km/h for the distribution vehicles in the region, the average unit freight from the supplier to the distribution center is 1.5 yuan/(t⋅km), and the freight rate from the distribution center to the demand point is 1.8 yuan/(t⋅km).To simplify the follow-up calculation, the numerical calculations only consider the distribution of two fresh goods using the corruption coefficients of 0.15 and 0.08 and the unit prices of 4 yuan/kg and 6 yuan/kg.The average satisfaction threshold for customer satisfaction is 0.75, and the average satisfaction threshold for freshness is 0.7.If the delivery vehicle arrives late, the compensation fee is 50 yuan/(h⋅t).The demand point time window is shown in Table 7.
We consider cases where demand is both deterministic and uncertain.The calculation and comparative analysis of two cases can be conducted more directly to verify whether the model can help the fresh goods e-commerce to suppress the uncertainty interference by demand.The method used to predict the consumer demand is the multivariate autoregressive integrated moving average (AMIMA) model in this paper.Fresh e-commerce is characterized by consumers ordering through the Internet, so fresh ecommerce companies can collect customer information and order information (e.g., customers' purchasing frequency, purchasing preferences, and position distribution).Then, the fresh e-commerce company can use this information to classify consumers and predict consumer demand.The autoregressive part of the multiple ARIMA model represents a linear combination of past values, while the moving average part of the multiple ARIMA model is a linear combination of past forecasting errors.The advantage of the multiple ARIMA model is that it improves prediction accuracy, facilitates statistics, and reduces the cost of prediction.Moreover, it can combine product cost changes with demand uncertainty to predict consumer demand [35].In view of this, the multivariate ARIMA model is suitable to predict the consumer demand for fresh e-commerce.Although the AMIMA model can more accurately predict the uncertainty of demand, the size of fresh e-commerce's consumers is small and widely distributed, so there is still uncertainty in demand.To learn more about the multivariate ARIMA model, studies [35,36] are suggested.The deterministic demand for each is shown in Table 7.
The affected factors of uncertain supply involve environmental factors (e.g., the natural environment, economic environment, and political environment) and the abilities of suppliers (e.g., production capacity, equipment capacity) [37].First, the planting period for fresh foods is the quarter or year as a unit; the period is longer than for other products.Fresh ecommerce can be investigated in advance through the Internet, and then the product cultivation of the fresh food and the field investigation can be planned accordingly.Second, the suppliers of fresh electricity providers are typically farmers and fresh food bases around the region.These suppliers are less affected by global economic changes and political changes.The selection diversity of suppliers also allows fresh e-commerce companies to evaluate and select suppliers in advance.In addition, the equipment failure problem has less of an effect on fresh e-commerce because fresh products can be delivered to the distribution center though simple pretreatment packaging.In summary, the supply of fresh ecommerce is uncertain, but fresh e-commerce companies are less affected by these uncertain factors due to the special nature of fresh foods.The current delivery mode of fresh products is from a mono type and large batch distribution to a multitype delivery mode and small batch distribution.Each time an order is made, the consumer evaluates the fresh electricity service (e.g., Amazon Fresh and Motion Optimization).For the majority of instances, the perishable nature of a product results in the supply process having a lower variability than the demand process [38].Therefore, this paper focuses on the location model for distribution centers under uncertain demand.For the case of uncertainty, we assume that the demand for each demand point is  = 5.The number of scenarios for each demand point can be different from each other.The value of the demand scenario is determined by the survey, and then the five cases are generated randomly by Matlab 8.3 as the demand scenario of the demand point .The demand scenario of the 10 demand points can be obtained by repeating the process ten times.
For  0  , in the range (0, 1), the simulations are randomly generated between the 10 numbers, normalized, and repeated ten times in order to get all the demand points in the uncertain demand scenario.The probability demand scenario of customer  (  ) meets the uncertainty set.Let the decentralized matrix be  = , where  is a nonnegative parameter and  is an identity matrix.
The specific initialization parameter is set to maxgen = 100 sizepop = 20.The program is implemented in Matlab 8.3 and run on a computer with 2.6 GHz Intel i5-4210M CPU, 4 GB of RAM, and Windows 10.The distribution center decision-making program and the total cost are shown in Table 8.
For the deterministic demand situation, the optimal decision is to choose distribution center  2  5  6 from the candidate list.The total cost is 7.208 million.For the uncertain demand situation, when  = 0.1 to  = 0.4, the optimal decision is to choose distribution centers  2  5  6 .The distribution range is constant, but the cost increases.When  = 0.5 to  = 0.7, the optimal decision is to choose distribution centers  2  5  6 , but the distribution range is different from the deterministic demand situation.When  = 0.8 to  = 1, the optimal decision is to choose distribution centers  5  6  7 .The increase ratio of the total cost in the case of uncertainty is compared to the total cost in the demand determination, as shown in Figure 3. Enterprises in the decision-making before the consumer demand should be the historical data for statistical and analysis, determine the variation range of parameter , and make decisions based on cost and self-conditions (Figure 3).
Then using FOA to solve the model and initial parameters and operating environment equally with IFOA, the results are shown in Table 9, the difference value of IFOA and FOA is shown in Figure 4, and the optimization process of FOA and IFOA is shown in Figure 5 (select  = 0.5).
From the test results in Table 9 and Figures 4 and 5, under the same conditions, IFOA results are superior to FOA, the convergence accuracy is more accurate, and the optimal results are better.Under the same convergence accuracy, the number of valid iterations of IFOA is less than that of FOA, which indicates that IFOA converges faster.Therefore, IFOA effectively improves the convergence precision and convergence speed of FOA.The applicability of IFOA is more extensive.

Conclusions
The location of distribution centers is a complex optimization problem.To solve the problem of unreasonable network layout and poor interpretation of customer demand and high cost of distribution, this paper optimizes the location of distribution centers, minimizes the total cost of distribution, and establishes a fast and secure distribution center network system.The conclusions of this paper are summarized as follows.
In this paper, a distribution center model is established to reduce the total cost of the enterprise.The model is combined with the inherent characteristics of fresh goods e-commerce, taking into account the principles of distribution center selection, service levels, and freshness constraints.Due to the increase in the number of fresh goods e-commerce enterprises with more intense competition, consumer demand is more and more uncertain.Robust optimization is used to optimize the distribution center model, which makes the model more robust.
An improved fruit fly optimization algorithm (IFOA) is proposed in this paper.The search step size is dynamically adjusted by introducing a weighting function.IFOA will serve to solve the established model.However, the applicability of IFOA is more general.In this paper, we validate the uncertain demand model by using an example, and we prove that the model of distribution centers is valid and can effectively handle the uncertainty of demand.
This paper considers the influence of uncertain demand on the location of distribution centers for fresh goods.It enriches the fresh goods e-commerce distribution center model and provides a theoretical basis for a scientific method of selecting the locations of fresh e-commerce distribution centers.The applicability of the proposed model is meaningful and useful for the selection of fresh e-commerce distribution center locations.The shortcomings of this paper is that it only considers the uncertainty of customer demand and does not take into account other factors of uncertainty, such as uncertain delivery weather conditions and uncertain corruption rate.
It is worth noting that some aspects of the model need to be improved.For example, we will pay more attention to a variety of uncertain factors so that the model is more suitable for more complex situations.Because the distribution center will be related to the distribution of fresh products, coupled with the international awareness of environmental protection strengthened gradually, the future will take into account the impacts of low-carbon environmental aspects of the distribution center location model.

Figure 1 :
Figure 1: Logic diagram of locating distribution centers.

( 1 )( 1 )
Collect the relevant data needed to establish the distribution center model (as shown in Section 3.3); (2) Convert the distribution center model under uncertain demand to a tractable equivalent model by using robust optimization.(3) IFOA is used to solve the mathematical model: Set the initial parameters, including the maximum number of evaluations (maxgen) and the size of the fruit flies (sizepop), and the initial position of the flies ( axis,  axis).(2) Randomly setting the flight direction and distance of the individual flies, the fruit fly individual random search expression is as follows:

Figure 3 :
Figure 3: The increase ratio of the total cost of uncertain demand.

Figure 4 :
Figure 4: The difference value of IFOA and FOA.

Table 2 :
Mean and standard deviation of function test.

Table 3 :
Distance between supplier ℎ and distribution center  (km).

Table 4 :
Distance between distribution center  and customer  (km).

Table 5 :
Fixed costs, operating costs, and maximum inventory.

Table 6 :
The maximum supply capacity of supplier.

Table 7 :
Time window and determined demand of customer.

Table 8 :
The decision-making program and the total cost of distribution center.