MATHEMATICAL ANALYSIS OF VEHICLE DELIVERY SCALE OF BIKE-SHARING RENTAL NODES

Aiming at the lack of scientific and reasonable judgment of vehicles delivery scale and insufficient optimization of scheduling decision, based on features of the bike-sharing usage, this paper analyses the applicability of the discrete time and state of the Markov chain, and proves its properties to be irreducible, aperiodic and positive recurrent. Based on above analysis, the paper has reached to the conclusion that limit state (steady state) probability of the bike-sharing Markov chain only exists and is independent of the initial probability distribution. Then this paper analyses the difficulty of the transition probability matrix parameter statistics and the linear equations group solution in the traditional solving algorithm of the bike-sharing Markov chain. In order to improve the feasibility, this paper proposes a "virtual two-node vehicle scale solution" algorithm which considered the all the nodes beside the node to be solved as a virtual node, offered the transition probability matrix, steady state linear equations group and the computational methods related to the steady state scale, steady state arrival time and scheduling decision of the node to be solved. Finally, the paper evaluates the rationality and accuracy of the steady state probability of the proposed algorithm by comparing with the traditional algorithm. By solving the steady state scale of the nodes one by one, the proposed algorithm is proved to have strong feasibility because it lowers the level of computational difficulty and reduces the number of statistic, which will help the bike-sharing companies to optimize the scale and scheduling of nodes.


INTRODUCTION
The bike-sharing phenomenon has emerged suddenly since 2016, which has been developing very rapidly in the first and second tier cities in China (Shao, Xue, 2017).By the end of 2017, the number of bicycles shared by Mobike Technology Co., Ltd. has reached 6.5 million (Liu, 2017).Bike-sharing is an innovative mode of sharing economy in the Internet era, which is convenient for the daily travel of the public and worth of affirmation.However, on the other hand, the disorder of bikesharing has become increasingly prominent.Some company rely on the number of bike-sharing to win the market, showing chaos expansion, the scale and scheduling of vehicles urgently need scientific analysis in order to achieve the goal of standardized management.
In the rapid development of bike-sharing, there are some problems such as the lack of scientifically reasonable decision of the scale of the vehicles and the insufficient decision-making of the dispatching of the rental nodes (this paper analyses the bike-sharing rental nodes without pile, hereinafter referred to as node), mainly as follows: (1) Some nodes have too many vehicles, the problems of idleness are prominent, and even the problems of hindering the normal passage of pedestrians and cars appear.At the same time, the number of bike-sharing in some nodes is too small to meet the needs of users.
(2) Nodal vehicle replenishment or transport reaction is not timely, the number is not accurate, the rationality of the relevant decision-making is questionable.
At present, the research tend to be more on the scale and dispatch of public bicycles invested by the government.Because of the relatively short operating hours, the research literature on the scale and dispatch of bike-sharing (mainly nonpile type) invested by the company is seldom, researchers pay more attention to the transportation value and development paths of bike-sharing (Wang, 2017), the profitability approach(Jiao, 2017), behavioural norms (Li, 2017) and the design of crime prevention environment (Yang, 2017).Bikesharing and public bicycles are significantly different in site selection, leasing and usage, operation and charging modes, etc.With more flexibility, convenience and randomness, larger user groups, higher frequency of use and wider coverage, it is more difficult and more different to study the scale and scheduling of bike-sharing nodes.
In order to avoid users' influence on individual preference factors of different brands of bike-sharing, this paper mainly analyses the issues such as the scale and dispatching of the bikesharing node in the same company.Under the precondition that the node position has been determined, the paper establishes the mathematical model of dynamic leasing of node vehicle, and analyses the steady-state characteristics of the node bicycle by using Markov chain (Gamerman, Lopes, 2006), and gives the optimal value of the node vehicle deployment and the reasonable vehicle scheduling time nodes.

Construction of Steady-state Linear Equation Group
The bike-sharing mainly solves the user's short-distance travel needs, the so-called solution to the "last mile" travel problems (Ni, Zheng, et al., 2017).In the bike-sharing usage model, users rent and return vehicles mainly between adjacent nodes.Of course, this adjacent concept is relative.It is also common for users to rent bicycles between nodes that are far away from each other.During the period 0 t -1 t , the user rent the shared bicycle from node j and return the rented bicycle at node k.The state of node k is only related to node j in the process of transfer, but not related to the states of other nodes in the same time period, and has nothing to do with the state of node j and other nodes before 0 t (no aftereffect).From this basic point of view, the state relations of bike-sharing nodes conform the basic conditions for the application of Markov process.The main characteristic of the dynamic behaviour of the Markov process is that the probability distribution of the future state depends only on the present state, not the process of reaching the present state.In order to solve the problem of bike-sharing node scale and scheduling, this paper mainly studies the discrete-time Markov chain (DTMC).
Suppose a city has a total of n shared bicycle nodes, the states of node j during the time period include: (1) The users renting bike-sharings reach to the any other node, there exist n-1 possible (mutually exclusive), each of which has two states (e.g, the bike-sharings at node j and node k).Let the bike-sharing moves from node j to node k, and the two states are denoted as (2) The bike-sharing is not leased by the user, or is still returned to the node j after being used, the state is denoted as 0 X , and the transition probability is denoted as jj P .
The bike-sharing transition status of node j in the 0 t -1 t time period as shown in Figure 1.In the scale analysis of bike-sharing nodes vehicles discussed in this paper, jk P can be regarded as the ratio of the average number of node j reach to node k in the multiple 01 tt  periods to the initial average of the total number of node j , jj P can be regarded as the ratio of the average number of cycling units at node j to node j in the same number of the multiple 01 tt  period when no bicycle is leased or returned by the user.In summary, we can get:

Transition states of all nodes
Since all the elements in the transition probability matrix are nonnegative and the sums of elements in any row are all 1, P is a random matrix.
The bike-sharing Markov chain based on a city has a limited state and has the following properties: (1) Irreducible.Let C as a non-empty subset of the state space I , if iC  and kC  , then 0 ik P  , it is called a closed set C .If all the states in the C are interconnected, the C is called an irreducible closed set (Liu, 2008).If Markov Chain's state space is an irreducible closed set, it is called irreducible.The number of bike-sharing nodes in a city is limited, all belong to the same category and theoretically there is a bidirectional connectivity relationship between any two nodes.The bikesharing Markov chain theoretically has irreducible properties (Ching, 2006).
(2) Aperiodic.Each state in the Markov chain can only be accessed at periodic intervals, then it is periodic, otherwise it is aperiodic.According to the study of Feller (Prokhorov, 1965), if a state of an irreducible Markov chain (which can be regarded as a node state) is periodic, all states are periodic and have the same period.This is obviously different from the actual observation statistics of the bike-sharing nodes.
Theoretically, if the irreducible transition probability matrix is a prime matrix, the Markov chain is aperiodic.According to Carl D. Meyer's research, if random matrix is irreducible and has at least one positive diagonal element, then it is a prime matrix (Langville, Meyer, 2011).Investigate the transition probability matrix n P , which is an irreducible non-negative square matrix with n diagonal elements ( jj P ).Investigation of the use of bikesharings, all the bicycles of all nodes in the period of 0 t -1 t are rented by the users or there is no return of bicycles to the original nodes, only at this time all the diagonal elements of n P are 0, which is inconsistent from the actual situation, non-zero diagonal elements are more prevalent.Therefore, the bikesharing Markov chain is non-periodic.
(3) Positive-recurrence.That is, if and only if starting from state j, the stochastic process can eventually return to state j with probability 1, then state j is considered as recurrence.When the average return time of state j is finite, it is called positiverecurrence.Liu Cihua argues in Stochastic Processes (Fourth Edition) (Liu, 2008) that irreducible finite Markov chains must be recurrence.It has been discussed above that the bike-sharing Markov chain has the finite and irreducible properties, so all the states in the bike-sharing Markov chain are positive-recurrence.
If a Markov chain has the above three properties at the same time, then we get the following theorem (Parzen, 1999): Theorem: Any irreducible, aperiodic and positive recurrence Markov chain, the limit state probability exists only and independent of the initial probability distribution.This limit state is called steady-state and the limit state probability is called steady-state probability.According to this theorem, the steady-state linear equations of nodes (matrix equations) can be concluded as: , P is the bike-sharing Markov chain transition probability matrix (Bolch, et al., 2006).
For n bike-sharing nodes, we have: (1)  is the steady-state probability of node j (or the ratio of the steady-state vehicle size of the node j to the total number of vehicles in all nodes), then The steady-state vehicle size of node j can also be assigned to (3) S is the total number of bike-sharings in the city.
By solving steady-state linear equations groups of (1), ( 2) or ( 1) and ( 3), the steady-state probability or bike-sharing scale of each node and the time to reach steady-state can be obtained.In addition, combined with land area values of nodes, node cycling scheduling can be analysed.

Difficulty Analysis of Markov Chain Solving
In order to solve steady-state linear equations in 1.1, it is necessary to observe and calculate the state transitions of each node in the city over the 0 t -1 t time period, so as to construct the transition probability matrix.For any node j, every destination node for each user to ride out the bicycle must be counted; or for any node j, every source node for each user to ride back the bicycle must be counted.On this basis, it's possible to calculate the probability of bike-sharing transfer between any two nodes.
The relationship between n nodes is n 2 , and the workload of observation and statistics increases exponentially with the increase of nodes.For first-tier cities, if the number of bikesharing nodes is on the order of thousands, the statistical probability of transition exceeds one millionth order ( 2 1000  ), for those companies that cannot track, observe and count the cycling data online, the workload is huge and the operability is poor; If the number of bike-sharing nodes in tier 2 cities is on the order of hundreds, the probability of observing statistics needs to be on the order of tens of thousands to hundreds of thousands, and the workload is considerable and the manoeuvrability is not strong.In addition, the initial value of the number of bicycles per node in the same time period needs to be counted, so n nodes have n numbers in total.If you add the total number of bicycles in a city shared by bike-sharing company, you need to count the total number of not less than 2 1 nn  .
In addition, the Markov chain steady linear equations are more than the number of unknowns (the difference between the two is 1), such equations are known as overdetermined equations.In the vast majority of cases, the overdetermined equations have no classical solution (Li, Liu, 2002).The least squares solution commonly used to solve overdetermined equations is an approximate solution to minimize the residuals.In the solution of overdetermined equations least square method, if Gaussian elimination method is used for matrix calculation, the time complexity is not less than 2 1 () 3 On, and the calculation is huge (Xia, Wei, 2009).Markov chain solution is usually more complicated (Liu, 2012).
To sum up, in light of the fact that the bike-sharing operation is less demanding in accuracy but highly in response speed, it is necessary to simplify and optimize the algorithm for solving the problem such as the scale of node and scheduling time, thereby reducing the statistical workload and speeding up the solution.This can enhance the feasibility.

Two-node Bike-sharing Steady-state Scale Solution
First, we begin the analysis from the simplest two-node bikesharing transition model.Suppose there are only two nodes 0 and 1 in the city (see Figure 3).There is bicycle transfer between the two nodes, suppose node 0 has 0 S bike-sharings at time 0 t , and node 1 has 1 S bike-sharings at time 0 t .The sum of the number of bicycles at two nodes is S , 01 S S S .The two nodes were observed and statistical analysis, the probability that the bicycles ride and stored at node 1 after being lent from node 0 is 1  , 1  > 0, then the probability that the bicycles being idle or returned at node 0 is 1-1  ; At the same time, the probability that the bicycles ride and stored at node 0 after being lent from node 1 is 1  , 1  > 0, then the probability that the bicycles being idle or returned at node 1 is 1-1  .
Figure The value  here may be the bike-sharing steady-state probability vector, or the steady-state scale vector of nodes，let (1) If 0  and 1  are the probability of the steady-state nodes, then: Solve the above equations, we have: (2) If 0  and 1  are the scale of the steady-state nodes, then: Solve the above equations, we have: From the conclusions (4) and ( 5) above, we can see that the node steady-state probability and scale have nothing to do with the initial value of node bicycle, which are related to the probability of riding in and riding out and the total initial number of bicycle in all nodes.At the same time, we can see that the two-node bike-sharing Markov chain overdetermined equations have classical solutions.

N-node Bike-sharing Steady-state Scale Solution
Suppose there are n bike-sharing nodes in the city, the transition probability matrix P is as follows: In fact, for a finite, irreducible and aperiodic Markov chain, the n-1 nodes other than the target node can be virtualized into the node v for the n-node case.In this way, the transition relationship between the virtual node and the target node can be conveniently counted, and the transition probability matrix of the virtual node v and the target node can be conveniently constructed.Based on this, we can continue to use the two-state Markov chain algorithm in 2.1, which can easily solve the steady-state scale of the target node, the steady-state arrival time and the number of bicycles over time, and carry out scheduling analysis.In n-node bike-sharing scale solving problem, we can use the above method to solve one by one.The above solution method can be referred to as a "virtual two-node vehicle steadystate scale solution" algorithm.
For node j, virtualize the other nodes as a whole to another node v, construct a virtual two-node transition probability matrix .
Next to discuss vj P , from the definition of analysis, vj P is the transition probability from virtual node v to node j.According to the description of the transition probability in 1.1, vj P should be the ratio of the number of bicycles transferred from virtual node v to node j and the total initial number of bicycles at node v during the period 0 t -1 t .Let j in S  be the number of bicycles transferred to node j from virtual node v, v S be the total number of bicycles of virtual node v, then 0 .
By definition, we have Using the solution method of 2.1, let j  be the steady-state scale vector of node j, and the following results can be obtained: S  be the sum of the number of bicycles rode out from node j and stored in other nodes during period 0 t -1 t , According to the definition in 1.1, we have: Substituting ( 6) and ( 8) into v P , we have It should be noted that in actual operation multiple 0 t -1 t periods may be taken for statistics in order to ensure the accuracy of calculation.In a 0 t -1 t period, the statisticians observe the initial number of bicycles of node j and the number of bicycles rode out from node j.After accumulating a plurality of groups, taking the average value, the calculation can be substituted into the (9).
From the above, we can know that in order to solve the steadystate scale value of node j, we only need to solve an overdetermined equation in 2-element one-order.For all n nodes, we can get the steady-state scale of all the nodes by solving n overdetermined equations in 2-element one-order one by one, and then calculate the steady-state arrival time and the scheduling time according to the method in 2.1.
The algorithm only needs to count 2n data of bicycles rode in or out, as well as the initial number of bicycles at every node and the total number of bicycles (that is, the sum of the number of bicycles in n nodes).The algorithm proposed in this paper need to count the total number of data to be 31 n  , much smaller than the traditional algorithm count 2 1 nn  (The same is true for n =2.The premise of this algorithm is that the number of bicycle nodes in a city is much larger than 2).The time complexity of this algorithm is O(n) , which improves the feasibility of the algorithm to solve n-ary overdetermined equations, and reduces the work intensity significantly.
The main characteristic of the algorithm provided in this section is that it considers only the overall relationship between the node to be solved and other nodes, and regards the other nodes as a whole as a virtual node.By calculating the bike-sharing transition between node and virtual node，as well as the initial number of bicycles of nodes, the simpler calculation is used to get the values of single-node bicycle size, steady-state arrival time and scheduling time.The algorithm proposed in this section is valid only for a single actual node to be solved, and the relevant value of the virtual node cannot be directly used.
Further analysis, the steady-state probability of any node j under steady-state conditions is: In ( 10), ˆj in S  , Ŝj out  and ˆj S are the node j riding in, riding out and the initial scale data during the period 0 t -1 t under steady-state conditions.
Under steady-state conditions, for node j, the number of bicycles riding in during the period 0 t -1 t is equal to the number of bicycles riding out, that is out ˆ= j in j SS  , hen simplified (10), we have

Algorithm Rationality Analysis
By comparing the steady-state probability value of the traditional solution method of steady-state equations with the algorithm of "virtual two-node vehicle scale solution" algorithm proposed in this paper, we can evaluate the rationality of the latter.
From (1) and (2), n + 1 equations can be listed as follows: First, remove the last equation and choose one equation from the rest of the equations as follows: In ( 13), let The left side of ( 13) is substituted into the above transition probability value and the steady-state probability solution space( ( 12)), we have The above equation is equal to the right of equation ( 13) )，so the solution space of (12) can be regarded as the approximate solution of (13).
Sum up every number in (12), we have In conclusion, the solution of ( 15) approximates ( 1) and ( 2), which can be regarded as a set of approximate solutions for n-node overdetermined equations of steady-state probability.Of course, the accuracy of the solution depends on the rationality of statistical methods for bike-sharing transition and the richness of data.

ALGORITHM APPLICATION
The following two questions are discussed based on the "virtual two-node vehicle scale solution" algorithm.
Question 1: Suppose no one intervenes.At time 0 t (the first day is assumed), the node j and the virtual node v each has Let , then: The scale of bike-sharing at node j is approximately: In this case, the scale of bicycles at node j is the same as the steady-state scales (see ( 5)), and the node j can be considered as steady-state.is to 1, the faster the node enters the steady-state (the faster convergence).
Question 2: Considering the influence of node area, assume that the maximum number of bicycles stored at node j is j b , to determine whether to manually adjust the number of bicycles at node j and when to adjust the start time.
To solve this problem, we first need to calculate the steady-state scale of node j.If the steady-state scale is larger than the maximum value stored by the node j, calculate the following linear equations to obtain the approximate arrival time of j b .P .If the number of bicycles transferred by the node in one step is greater than the maximum number of bicycles stored in the node j, the scheduling needs to be performed immediately (or the available area of the node is appropriately increased).Otherwise, solving the linear equations (( 18)) yields a value of k, and the bike-sharing company should send someone to move the bicycle to another node or depot before the node j reaches this time.

   
From another point of view, if the storage area is large enough that the maximum number of stored bicycles in a node is larger than the steady-state scale, it is not necessary for the bikesharing company to artificially increase the number of bicycles to fill up the space, thus only increasing the idle rate.

CONCLUSION
This paper aims at the problems of the scale and scheduling of bike-sharing.Based on the analysis of the applicability of the Markov chain method, this paper improves the traditional solving method for Markov chain equations，and proposes a "virtual two-node vehicle scale solution" algorithm, which improves the solution speed of steady-state equation.In this paper, the calculation methods of node steady-state scale, arrival time and scheduling time are given, and the rationality of this method is demonstrated theoretically.Although the accuracy of the proposed algorithm is not as good as the leastsquares solution to Markov chain steady-state linear equations, the related statistical data acquisition and calculation are more convenient and faster.The algorithm is more feasible for the bike-sharing company with low accuracy and high response speed, which can be used by these companies to dynamically optimize the scale and schedule of bicycle delivery and enhance standardized management.

Figure 1 .
Figure 1.Transition states of node j Figure 3 Transition states of 2 nodes Construct transition probability matrix P : initial number of the bicycle of node j, S be the total number of bicycles stored in all nodes, then in and (11)  are the statistical values under steady-state condition ， which are different from the initial and intermediate number of node j of one period, and cannot be confused with each other.The ratio of the initial bicycle number or an intermediate number of a node of onetime period to the total bicycle scale of all nodes cannot be directly used as the steady-state probability solution of a node.Then the steady-state probability solution space of the bikesharing steady-state equations is: bike-sharings.Solve the number of bicycles at node j after K days.This question can be solved by multiplying the vector by the matrix.Let  be the transition scale vector, after k days can be obtained by multiplying   01 SS and k P , and k P is the Ksteps transition probability matrix of bike-sharing, then: