Express Delivery Handling Model Based on Monte Carlo Simulation and Linear Programming in the Background of Cloud Computing

This paper addresses the purchase options for courier companies looking for the type and number of machines to handle couriers, using Monte Carlo simulation and linear programming to simulate the processing of courier companies. The Jacques-Bella test for normality is first used, and the original hypothesis that both the machine processing capacity and the number of couriers given retain the random variables obey a normal distribution. The data are integrated into hourly time units using the principle of additivity of the normal distribution. Problem 1 requires the optimal number of equipment 1 to meet the basic operation demand of the courier company. According to the daily conditions, the article sets linear programming constraints, using Monte Carlo simulation of the number of machines working per hour for 200 cycles and gets the result that 16 machines are required. Problem 2 requires a comparison of the costs of purchasing equipment 2 and equipment 1. Due to the limitations of the work cycle of equipment 2, the article simulates 50 Google cycles to obtain the result that purchasing of three equipment 2 would meet the requirements. Because equipment 1 program costs less, the courier company should choose to buy 4 equipment 1.


Introduction
At present, Company A has 12 equipment 1, and there are two types of equipment available for purchase. Equipment 1 has to be maintained for 1 hour for every 8 hours of work, and the handle capacity per hour for eight hours of 12 equipment is known. Equipment 2 has to be maintained for one hour for every 12 hours of work and has a processing capacity of 500 pieces per hour, but the cost is 1.5 times that of equipment 1. For the number of couriers to be processed and generated, Company A records the number of couriers sampled in minutes over a 72-hour period. The company needs to use these data as a sample to find a suitable solution for purchasing the machine [1]. Among the requirements to be met are.
Couriers arriving before 22:00 are to be processed before 00:00 the next day.
According to the above, the following three issues need to be addressed. Question 1: At least how many existing equipment are needed to basically meet the express requirements of courier companies. Question 2: Given the additional equipment increase plan based on the existing 12 units of equipment 1 in the express center, i.e. whether to purchase equipment1 or equipment 2? Give the corresponding plan respectively.
Model Assumptions [2] 1. Since there are multiple solutions for the working machine situation to ensure the completion of the couriers processing requirements for the three time periods per day, an even distribution of working machine is assumed.
2. The number of new couriers per minute generated are not correlated.
3. Both machine capacity and pending couriers are generated in hours. Prioritize the early arrivals.

Modeling and solving problem 1
First, analyze the number of couriers arriving per minute. A histogram is made to show that the distribution of couriers sent for processing per minute obeys an approximately normal distribution.  Taking the number of couriers as random variables, assuming a skewness of S and a kurtosis of K, the JB statistic is constructed using the Jarque-Beratest test applicable to larger samples.
It can be shown that if the random variables obey a normal distribution, then in the case of large samples, . The statistic follows a chi-square distribution with a degree of freedom of 2 [3]. The original hypothesis of this hypothesis test is that the random variables obey normal distribution, and the alternative hypothesis is that the random variables do not obey normal distribution. For the number of couriers, the test yields a p-value of 0.55, retaining the original hypothesis that the number of couriers obeys the normal distribution.
At the same time, the processing capacity of 12 equipment 1 is considered as an independent sample, and a normal distribution test is also performed on this sample. The test yields a p-value of 0.837, and the original hypothesis retains that the hourly processing capacity of the equipment obeys a normal distribution of . Because the standard deviation of the processing capacity is small, the method of approximating the processing capacity of equipment 1 to be equal to the mean does not affect the number of machines configured for the optimal case. The processing capacity of equipment 1 is set to its rounded sample mean, which is 400 pieces per hour.
For the simulation of express delivery handling, two types of cycles need to be considered. First of all, we set the first day as the starting point, assuming that there is no backlog of  ,which represents the number of machines working from 0:00 to 8:00. Obviously, if the optimal solution is to obtain the minimum number of machines, the machines cannot be idle. Therefore, the machines working at hour 0 should work again at hour 9 after one cycle, i.e., , and so on, the work of all the machines can be represented.
Then there are planning objectives of Now create a matrix A with 72 rows and 9 columns describing the work of each group of machines during a time period, where denotes the start of the group of machines at hour , with 1 for start and 0 for no start [4].
Let the row vector of this matrix be , and construct a vector of the number of machines working at different times. Then it can be expressed as： According to the given data, the number of couriers per hour handled by each equipment 1 is about 400 pieces. Then, for the total number of couriers that can be handled by all equipment of the logistics company in hour , we have Now analyze the constraints. According to the constraints, before 24:00, the company needs to deal with the couriers arriving before 22:00. Assume that the first cycle begins, and there is no backlog of yesterday's express, then the first constraint requires that the couriers arriving before 12:00 should be dealt with before 14:00.
Let the difference between the two value be Since the optimal solution should be one in which the processing capacity of the machine is maximized, and the value should be much smaller than the number of new arrivals per hour [5,6]. This difference can be used to process couriers at 13:00 and 14:00. Then the constraint for the next hour can be written as,

Bring
in to obtain, Then the linear programming model for the first cycle can be obtained by analogy.
The constraint is to deal with all couriers during the three time periods every day. We set three constraints for one day, a cycle of nine. Due to the similar form of constraints, this paper will not fully expand [7].
And the second cycle starts, we need to determine whether there is a backlog of couriers from the previous cycle. The constructor determines whether there is a backlog of couriers for both.
( Y and Z are in the previous cycle.) That is, if there is a backlog of couriers from the previous cycle, they will be left to the current cycle. If there is no backlog of couriers, it will be the same as the first cycle. The linear programming model after the second cycle can be obtained as follows.
Unlike the first cycle, it is necessary to consider whether there is a possible backlog of couriers, and if there is no backlog, the situation is equivalent to the first cycle [8].

Modeling and solving problem 2
We choose 39 days (936 hours) to simulate, which is the common multiple of machine work cycle and the time per day.
The original equipment is divided into , indicating the number of equipment 1 that are on from 0:00 to 8:00 after maintenance. Then there exists the constraint that, Let be the number of equipment 2 that are on from 0:00 to 13:00 after maintenance. Then there are targets as follows [9]. Similarly, let the row vector of the two matrices be . Construct a vector of the number of machines that are on in different times as well, then it can be expressed as, Let X be as follows, Then the hourly handling capacity of couriers is, As in the first question, a linear programming model needs to be built in two types of cycles. The first is, Since the cycle is 39-days, the first one is the constraint that the processing capacity are integers, and the second one is that the total number of equipment 1 is fixed to 12[10]. The followings are 3 constraints per day for 39 days, which will not be repeated due to the similar structure.
When the second cycle starts, we need to determine whether there is a backlog of couriers from the previous cycle. The constructor determines whether there is a backlog of couriers for both. Y and Z are the previous cycle.
That is, if there is a backlog of couriers from the previous cycle, they need to be left to the current cycle. If there is no backlog of couriers, the simulation will be the same as the first cycle. The linear programming model after the second cycle can be obtained as follows. Unlike the first cycle, it is necessary to consider whether there is a possible backlog of couriers, and if there is no backlog, the planning is equivalent to the first cycle.
For the express number per hour ( ). We run 50 cycles to find that the optimal solution is all 3, which means that at least three pieces of equipment 2 need to be purchased. If the number of equipment 2 purchased is set to 2 for the simulation, it is shown that the full constraint in one cycle is not satisfied. Since the cost of equipment 2 is 1.5 times that of equipment 1, the purchase of 3 equipment 2 is equivalent to the cost of purchasing 4.5 units of equipment 1, which is greater than the optimal solution given in problem 1 for purchasing 4 units of equipment 1.
Therefore, the optimal strategy for equipment purchases for the courier company obtained through the Monte Carlo simulation is to add four equipment 1.