2. Applicability Analysis of Markov chain
2.1. Breif Concept of the Markov Chain
A discrete-state, discrete-time Markov stochastic process is called a Markov chain, named after the Russian mathematician Andrey Markov. Markov chains are widely used in economics, traffic management, game theory, queuing theory, genetics and finance.
A Markov chain is a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. We have a set of states,
. The process starts in one of these states and moves successively from one state to another. Each move is called a step. If the chain is currently in state
, then it moves to state
at the next step with a probability denoted by
, and this probability does not depend upon the states the chain was in before the current state. The probabilities
are called transition probabilities. The process can remain in the state it is in, and this occurs with probability
. Then,
A matrix consisting of one-step transition probabilities of multiple states is called a transition probability matrix, in which the value showed in each of these rows is the probability that the state represented by the diagonal element is transferred to another state, respectively, and the probability that each column is transferred to the state represented by the diagonal element, respectively.
Let
be a matrix of one-step transition probabilities, state space
, then
is called a one-step transition probability matrix of Markov chains, and .
2.2. Markov Chain Characters of Bike-Sharing
Bike-sharing provides people with a convenient way for commuting, and solves the “first/last mile” travel problem (DeMaio, 2009). Based on the bike-sharing usage model, the users mainly rent and return the bicycles between adjacent stations. Of course, the concept of “being adjacent” is relative. There is a situation where users rent and return bicycles between stations that are far away from each other. This section theoretically assumes that there is connectivity or bicycle state transition relationships between any two stations to facilitate analysis.
Assuming that a user rents the shared bicycle from the station and returns the rented bicycle at the station , regardless of the state of other stations in the same interval, the state of the station during the transfer is only related to the station , and independent of the states of other stations before the time . According to the Markov Chain property, “the past is conditionally independent of the future given the present state of the process” or “given the present state, the past contains no additional information on the future evolution of the system.” So, the state relationship of shared bicycle stations is in accordance with the basic conditions of the Markov stochastic process application.
Suppose a city has a total of dockless bike-sharing stations, the states of station j during the time period include:
The user at the station rents a bicycle ride to any other stations that exists kind of possible (mutually exclusive), each of which has two states, (e.g., the bicycle at station and station ). Set the bicycle move from station to station , and the two states are denoted as and , respectively. The transition probability of this bicycle process is denoted as , .
The bicycle at station is not rented or still returned to the station after being rented, the state is denoted as , and the transition probability is denoted as .
The bicycle transfer state of station
in the time period
is showed in
Figure 2.
For the probability of dockless bike-sharing discussed in the paper, can be regarded as the ratio of the average number of bicycles that the user rides from station to station in the multiple time periods to the average number of bicycles in station at . can be regarded as the ratio of the average number of bicycles that are not rented or still returned to station in the multiple time periods to the average number of bicycles in station at .
In summary, the probability
and
are accumulated to 1.
By analogy, the transition state of all n stations is showed in
Figure 3.
The transition probability matrix of all n stations is constructed as
Since all the elements in the transition probability matrix are nonnegative and the sums of elements in any row are all 1, is a random matrix.
At a certain time, the ratio of the number of bicycles at each station to the total number of bicycles deployed in the city is called the probability of the station, and the probability values of all stations constitute the probability vector at this time. It is assumed that the initial probability vector of the dockless bike-sharing stations at time
is
, and the probability vector at time
is
. The bike-sharing transition probability matrix in the
is
P, by the Markov chain property, it can be obtained:
The
moment can be regarded as the 0th transfer of the bike-sharing Markov chain, and the
moment can be regarded as the 1th transfer. With the passage of time, the probability vectors after the
steps and
steps transfer are
and
, respectively. The relationship between the two is
Iterate over Equation (1) and one can get
2.3. Proof of Steady-State Exsiting in Bike-Sharing Markov Chain
The state of the dockless bike-sharing Markov chain based on a city is limited and has the following properties:
Irreducible. Let
be a non-empty subset of the state space. If
and
, the connectivity probability
,
is called a closed set. If all the states in
are interconnected,
is called an irreducible closed set [
32]. If Markov chain’s state space is an irreducible closed set, it is called irreducible. The total number of bike-sharing stations in a city is limited, all belong to the same category and theoretically there is a bidirectional connectivity relationship between any two stations (except for prohibited areas such as residential areas, government agencies, parks, water systems, and roads, etc.). The bike-sharing Markov chain theoretically has irreducible properties [
33].
Aperiodic. Each state in the Markov chain can only be accessed at periodic intervals, then it is periodic, otherwise it is aperiodic. Theoretically, if the irreducible transition probability matrix is a prime matrix, the Markov chain is aperiodic. Theoretically, if the irreducible transition probability matrix
is a prime matrix (there is only one non-negative irreducible matrix with only one eigenvalue falling on its spectral circle) [
34] the Markov chain is aperiodic. According to Carl D. Meyer’s research, if a random matrix is irreducible and has at least one positive diagonal element, it is a prime matrix (sufficient condition) [
35]. Investigate the transition probability matrix
, which is an irreducible nonnegative square matrix with
diagonal element
. In the actual rental of dockless bike-sharing, if all the diagonal elements of
are
, which are the situations where all bicycles at all stations in the time period
are rented by the users or there is no return of bicycles to the original stations, this is inconsistent with a real-life situation. Observing the use of bicycles, it can be concluded that the diagonal elements with no internal zero are more prevalent, that is the trace of the matrix
is not 0 (
)
. Therefore, the dockless bike-sharing Markov chain is aperiodic (non-periodic).
Positive-recurrence. If and only if starting from state
, the random process can eventually return to state
with probability 1, then state
is considered as a recurrence [
32]. When the average return time of state
is finite, it is called positive-recurrence. Liu Cihua’s argument in the "Random Process" (Fourth Edition) has shown that irreducible finite Markov chains must be recurrence [
32]. It has been discussed above that the bike-sharing Markov chain has the properties of being finite and irreducible, so it is a positive-recurrence.
It can be seen from the above that the dockless bike-sharing Markov chain has the above three properties, and the following theorem is established:
Theorem 1. For 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.
When k steps of the bike-sharing Markov chain transition are big enough, one has the following,
where
From formula (2), one has the following,
Therefore, the main idea of the algorithm in the paper is based on multiplying the initial probability vector of the dockless bike-sharing stations by the higher power of the transition probability matrix, that is . The computed vector will approximate the steady-state probability vector with the increase of power. With the increase of iteration, the probability vector of the dockless bike-sharing stations will gradually stabilize. Each element of the steady-state probability vector is the steady-state probability of bicycles at each bike-sharing station, and multiplying them by the total number of shared bicycles in the city respectively, one obtains the steady-state fleet size of the bike-sharing at each station. Solving the steady-state probability vector of the bike-sharing Markov chain can optimize the configuration of the fleet size for each dockless bike-sharing station. The above iterative method is called the power method.
3. Methodology for Fleet Size and Rebalancing of Bike-Sharing
To solve the steady-state probability vector of dockless bike-sharing stations, we must first determine all the elements of the transition probability matrix . We need to observe and count the state transitions of stations in the city during the time period . For every station, it is necessary to count the specific destination station for each user riding out of the bicycle, or for every station, it is necessary to count the specific source station that each user rides back of the bicycle.
The relationship between stations is . In addition, it is also necessary to compute the initial value of the fleet size of each station in the same segment, so stations have numbers in total. And one should consider the total fleet size of bicycles deployed by the bike-sharing company in the city. The total number of statistics to be counted is not less than .
On the basis of the usage statistics of the bike-sharing and the computation of the transition probability, the transition probability matrix of the bike-sharing (sparse matrix) is constructed first. Second, the reducibility of the transition probability matrix is analyzed. If it is irreducible, the steady-state probability is directly obtained by the power method; if it is reducible, the rank-one updating method is used to compute the steady-state probability. Combined with the practical application of bike-sharing, the algorithm is improved to solve the steady-state fleet size of bicycles at different time periods in one day. On this basis, the linear programming method is used for the bicycle rebalancing analysis. The Fleet size and rebalancing analysis of dockless bike-sharing stations framework is showed in
Figure 4.
3.1. Analysis of Fleet Size
3.1.1. Sparse Matrix Construction and Reducibility Determination
Based on the observation of the usage of dockless bike-sharing, it is found that for any station
, the riding of the shared bicycle is mainly performed at its adjacent stations. The number of ride-in and ride-out bicycles between the stations that are far away is very small. The user’s single riding distance statistics are showed in
Table 1 [
36].
According to
Table 1, the bike-sharing stations can be divided into the following three categories.
Close stations. For any station , another station within 10 km away has a more frequent bike-sharing relationship with it. This paper refers to this kind of station as the close station of station .
Peripheral stations. For any station
, the station that is more than 10 km away is a peripheral station. According to
Table 1, the average value of the peripheral stations to the total number of stations could be set to 4%.
Unrelated stations. This paper refers to a station with no bicycle transfer relationship between station as an unrelated station. The transition probability between the unrelated station and the station is set to zero. An unrelated station with a bicycle initial value of zero is called a suspended station.
Based on the above analysis, a new dockless bike-sharing transition probability matrix is constructed, which is a sparse matrix obviously. Set each station have an average number of close and peripheral stations are , then there are about non-zero elements in . For medium and large cities, , .
This method can be referred to as the "Markov chain dockless bike-sharing fleet size solution". Using this method, one can deduce that the mutual riding relationship between stations is reduced to . In addition, it is also necessary to count the initial fleet size of each station, as stations have a total of values. If the total fleet size of bicycles is deployed by the bike-sharing company in the city, the total number of statistics to be counted is not less than , which is significantly smaller than the traditional total number of statistics .
After the transition probability matrix is sparse, the station interoperability is affected due to the unreachability of some stations. The irreducible nature of the transition probability matrix may be changed to be reducible. The steady-state condition of the matrix is destroyed and the steady-state fleet size cannot be solved. Therefore, the suspended station check is firstly performed on the sparse matrix ’. If the elements in the row and column of the ’ diagonal element are both zero (including ), the rows and columns are deleted from ’.
On this basis, the matrix ’ is checked for reducibility. If ’ is irreducible, the power method is directly performed (see 3.1.3); otherwise, the rank-one updating method of the sparse matrix needs to be performed first to satisfy the irreducible condition, and then the power method is carried out. The following method is used to determine the reducibility of the matrix ’:
Construct the reachable matrix ’ of the matrix ’ by replacing all non-zero elements in ’ with one and unchanging zero elements. The determination of matrix reducibility is equivalent to the determination of the connectivity of the reachable matrix.
Determining the connectivity between any two stations and cannot be argued only based on whether the element in ’ is equal to zero. This only indicates that the direct connection between the two stations does not exist, and it is necessary to verify the possibility of connectivity through other stations.
Arguing station and station are connected by (, is the total number of stations) stations, one needs to consider the arrangement of stations. That is, one needs to compute the possible arrangement of . Analyzing whether the multiplications of the corresponding elements in each case of the arrangement is equal to zero, if there is a case that is not equal to zero, stations and are connected. If there exists a case where it is equal to zero, stations and are not connected. If any two stations in the matrix ’ have a connectivity relationship, the sparse matrix ’ is irreducible. If there is a non-connective relationship between the two stations, ’ is reducible.
One can argue that station and station are connected by stations, the maximum number of connection paths is .
The computation complexity of the connectivity argument is computed as follows (See proof of the below equation in
Appendix A):
Through Taylor’s formula, one obtains,
The above is only the complexity of the connectivity computation between one station pairs. Considering that the maximum number of different station pairs in the matrix
is the
, assuming that
station pairs are directly connected, the total connectivity computation complexity is not less than
. R. Tarjan’s strongly connected components algorithm [
37] significantly reduces the computational complexity of the matrix reducibility argument to
. In practice, we can use software tools such as MATLAB to argue the reducibility of the matrix.
3.1.2. The Rank-One Updating of the Reducible Matrix
The rank-one updating method first appropriately reduces the probability of non-zero elements in the transition probability sparse matrix . Then, the sum of the transitional probabilities of peripheral stations (not exceeding 4%) is evenly distributed to all stations. Under the premise that the sum of the elements of each row of the matrix is one, a new random matrix that satisfies the solving of the steady-state probability of dockless bike-sharing is constructed.
In the specific rank-one updating operation, firstly,
can be multiplied by one adjustment parameter
(that is
,
, and
is close to one) to decrease the non-zero elements appropriately. Then the sum of the elements of each row in the matrix
is
. Next, each element in
adds
separately, and the sum of the increments in each row is
, so the sum of the elements of each row is
. Therefore, the sum of the elements of each row of the matrix remains unchanged. From the above, a new transition probability matrix
is constructed. The above operation can be expressed as
is the transposition for the unit column vector
. The rank of the matrix formed by
is one, so the above operation is called the rank-one updating for
. According to
Table 1, about 96% of the users have a single riding distance within 10 km; thus the
in the
can be selected as 0.96, and the computation result of the rank-one updating part is
square matrix. One has the following,
In summary, we know that is a random prime matrix, which satisfies the irreducible, aperiodic and positive-recurrence property of the dockless bike-sharing Markov chain. The steady-state condition of the transition probability matrix is established.
3.1.3. Steady-State Fleet Size Solution
When computing the steady-state probability vector of
by the power method, one has
Although the matrix is a dense matrix, it can be known from Equation (6) that we actually perform vector-matrix operations on the original sparse matrix when performing the power method, and the correlation operation of the dense matrix is not performed. The change in the element after the rank-one updating was not directly involved in the computation, therefore the time complexity of this algorithm is still
Continue iterating on the
, one can obtain,
Substituting
into the above equation yields,
When n is large enough, one can obtain,
After the rank-one updating, the probability value of the non-zero element
in the sparse matrix
is changed as follows:
If the number of bike-sharing stations in the city is large (such as ), , the probability value of non-zero elements changes very little. In addition, after the rank-one updating, the probability value of each zero element is changed to: . If in the city, the corrected probability value of each zero element is no more than 0.0004.
The larger the city size, the higher the number of the bike-sharing station is, and the smaller the impact of the rank-one updating on the element. Therefore, after the rank-one updating of the sparse matrix , the constructed new transition probability matrix does not change the main state transition relationship between the bike-sharing stations. For the bike-sharing operation with low accuracy requirements and high response speed, the rationality of the solution results can be guaranteed.
3.1.4. Steady-State Fleet Size Convergence Determination Method
The dockless bike-sharing transition probability matrix is a random matrix, the max row sum matrix norm . According to the relationship between the spectral radius and matrix norm, the spectral radius of the matrix in any complex field is not greater than the max row sum matrix norms, that is . It is also defined that the spectral radius is the largest value of the eigenvalues of the matrix (the absolute value of the dominant eigenvalue), so it is known that the absolute value of the dominant eigenvalue of is .
At the same time, since is a random matrix, , that is, 1 is a eigenvalue of .
From the above, the dominant eigenvalue of the bike-sharing transition probability matrix
is
. For a random prime matrix, the dominant eigenvalues are unique [
38], therefore, without loss of generality, we can make the following
eigenvalues have the following relationship:
. Then
.
Let eigenvalues of the random prime matrix be , where , without loss of generality, one can make the following eigenvalues have the following relationship: . According to the proof of Carl D. Meyer, , , is the eigenvalues of the dockless bike-sharing transition probability sparse prime matrix Then . Since , .
Based on the random prime matrix
, we compute the steady-state probability vector of the bike-sharing fleet size by the power method, and its convergence rate is
[
34,
35]. Since
, the convergence rate does not exceed
. If the precision of the computation is one digit after the decimal point, set
, since
,
= 0.1, we can take the base 10 logarithm on both sides of the equation to get
. In this paper, we set
, the number of iterations does not exceed
times.
If the minimum time period of the bike-sharing state transition is in unit of day, the convergence value of the power method iteration can be regarded as the time when the overall stations of a city reach the steady-state.
Combining the iterative process of the power method, when computing the steady-state fleet size probability vector, the steady-state can be argued by computing the absolute value of the difference between the corresponding elements of the adjacent probability vectors. Set
When every absolute value of the difference is less than a sufficiently small constant
, one obtains,
where
= the total fleet size of dockless shared bicycles in a city.
At this point, the bike-sharing transfer can be considered to have reached the steady-state. For the convenience of computation, set . When is small enough (may also take ), it can be considered that two adjacent vectors are equal and the dockless bike-sharing Markov chain reaches the steady-state.
3.1.5. Improvement of Bike-Sharing Fleet Size Algorithm
Through the practical application of dockless bike-sharing, it is not difficult to find the following characteristics: On the workdays, the use of dockless bike-sharing is tightly coupled with different time periods every day, that is, it is used frequently during peak hours and afternoons, moderately used at noon, and less used at night. Therefore, the working day time is divided as shownin
Table 2.
The 24 h in
Table 2 is a change cycle of the bike-sharing station status. For bike-sharing companies, the change of the fleet size of bike-sharing stations in different time periods can provide an important basis for the formulation of the rebalancing strategy. Therefore, it is necessary to further improve the algorithm.
According to the analysis provided in chapter 2, we can see that the changes of the bicycle state in the seven time periods all meet the basic requirements of discrete-time Markov chain applications. Therefore, the algorithm can be further refined to dynamically compute the transition probability matrix of each major time period of the day, and then compute the steady-state fleet size of each bike-sharing station in each time period.
The initial fleet size of bike-sharing of station
at different time periods in a day is
,
, respectively. Set the initial fleet size of the bike-sharing of station
in each time period of the
k+1th day be
,
. In the
time period, the number of rides out of station
is
and the number of rides is
. Then
Knowing the initial value of bike-sharing for a certain time period in station , and the number of shared bicycles from station to station , then the bike-sharing transition probability of station to station in this time period is , . Set the transition probability matrix at different time period in a day as , , substituting and into the to construct the transition probability matrix.
Since is a random matrix, the is also a random matrix. Set ( can be referred to as bike-sharing total transition probability matrix). If is irreducible, the power method is directly performed; if is reducible, the rank-one updating method is needed and then the power method is performed. The steady-state probability vector is obtained by power method.
After reaching the steady-state, the fleet size of each bike-sharing station in each time period of the day can be computed separately. The steady-state fleet size vector of bike-sharing stations at the morning peak in a day is equal to the total size of the bicycles multiplied by the steady-state probability vector.
According to formula (9), the early morning peak fleet size of bike-sharing (the bicycle station fleet size vector at 7:00 in the morning) is obtained. The vector is multiplied by the state transition probability matrix of other consecutive time periods, thus the fleet size vector of other time periods of the day can be obtained.
The fleet size vector of
bike-sharing stations in other time periods
,
is solved as follows:
3.2. Analysis of Rebalancing
In practical applications, the fleet size decision of each bike-sharing station can be made by referring to the computation results under steady-state conditions, and optimized by considering factors such as the land area of stations. If the steady-state fleet size of the bike-sharing station is greater than the maximum number of bicycles allowed in the actual area, set station for this type of stations, if is larger (such as ), it means that such stations have more idle bicycles, and the bicycles removal adjustment is required. Otherwise, if is within the normal range of values, indicating that the steady-state bicycle fleet size of such stations exceeds the load capacity of the station land area, the dynamic rebalancing of the number of bicycles at the station is required. The above two situations are collectively referred to as the fleet size rebalancing of dockless bike-sharing. The following is an analysis of the bike-sharing fleet size rebalancing optimization based on the linear programming method.
First, computing the actual number of bicycles that can be accommodated based on the available area of each station, and constructing the actual fleet size vector of the bicycle station, let the vector . Considering the elements in , set elements equal to 0, elements equal to negative numbers, and elements equal to positive numbers, then .
For the positive elements in , we construct the bicycle moving-out fleet size vector , , ; for the negative elements in , we construct the bicycle moving-in fleet size vector , , . Constructing moving-out stations sequence vector , and moving-in stations sequence vector .
Let be the distance between station and . For the convenience of computation, let be the straight line distance between the diagonal intersection points of the grids where station and are located. The rectangular coordinate system is established with the lower left corner of the city bike-sharing station grid as the origin, and the coordinates of station and are , , .
Let
denote the number of bicycles that are transferred to the moving-in station
through transport trucks from the moving-out station
. In order to optimize bicycle rebalancing, bicycle service providers use transport trucks to load and unload bicycles between moving-out stations and moving-in stations. The lowest rebalancing cost is the goal pursued by the businesses. For the rebalancing stations, during a rebalancing period (such as noon time), the fewer bicycles are dispatched by the transport trucks, and the shorter the distance traveled, the lower the rebalancing cost. This paper does not directly compute the rebalancing cost, but uses the multiplication of the bicycle number moved out of the stations and the distance traveled by the transport truck to dispatch [
39] these bicycles as a rebalancing optimization. Then the solution is as follows:
Equation (11) is a special type of transportation problem [
40], which can be solved by the Lingo software to obtain the optimal solution (lowest cost). Equation (11) is based on the premise that the total number of moving-out bicycles is not greater than the total number of moving-in bicycles, that is
. When the total number of moving-out bicycles is greater than the total number of moving-in bicycles, that is
, which means that the number of shared bicycles exceed the capacity of the urban space area, and the number of bicycles needs to be reduced. When
, it can be considered that the ideal state is reached, and at this time Equation (11) has a feasible solution.
The computation results show that the rebalancing optimization is mainly carried out between the moving-out stations and the nearby moving-in stations. In real-life situation, the moving-out stations and the nearby moving-in stations can be unified for rebalancing management. One can use incentives to encourage the users to pick up the bicycles at the moving-out stations, and use the penalty strategy to reduce the number of users who drop off the bicycles at the moving-out stations, as an auxiliary means to further reduce the cost pressure of rebalancing optimization.
3.3. Algorithmization
Algorithm 1: Markov chain dockless bike-sharing fleet size solution |
Input: The initial fleet size of the bike-sharing , the transition probability matrix of seven time periods in one day, the adjustment parameter , the total fleet size of the urban bicycles , the actual fleet size vector of bike-sharing stations . |
Output: The steady-state fleet size of bike-sharing stations during the seven time periods in a day. |
- 1:
Build the transition probability matrix of dockless bike-sharing stations; - 2:
Argue the reducibility of . If it is irreducible, let , turn to step 5; - 3:
If is reducible, perform rank-one updating on and construct ; - 4:
; - 5:
- 6:
; - 7:
; - 8:
- 9:
; - 10:
- 11:
ELSE - 12:
; - 13:
ENDIF - 14:
}/*Compute the steady-state fleet size probability vector of dockless bike-sharing stations.*/ - 15:
; - 16:
- 17:
; - 18:
; ; - 19:
THEN EXIT; - 20:
} /*Compute the fleet size of the dockless bike-sharing stations at different time periods in one day respectively.*/ - 21:
Solve the linear programming equation , and obtain the optimal moving-in stations collection for each moving-out stations in different time periods.
|
4. Experiment and Verification
This section uses commercial data and simulation data to verify the feasibility of Algorithm 1. The commercial data is provided by Mobike Inc. [
22], which is more than 1.14 million lines. After the commercial data verification, the technical experts of Mobike Inc. believe that the steady-state fleet size of the bike-sharing solved by Algorithm 1 can be used as the baseline reference data in practical operations. However, due to the commercial confidentiality agreement signed with Mobike Inc., this paper mainly shows the specific process and results of the simulation experiment and verification.
The simulation experiment proves that Algorithm 1 is effective and can provide decision support for bike-sharing deployment operations. The simulation data is generated randomly by R language, and the matrix computation is performed according to Algorithm 1 to illustrate the feasibility of obtaining the steady-state fleet size of the station for decision support. On this basis, by comparing the time required to reach the steady-state under the different total fleet size of bicycles and different number of stations, the rule of the steady-state realization and the effectiveness of Algorithm 1 is further verified. For ease of explanation, the simulation experiment takes 20 stations as an example, and sets the total fleet size of bike-sharing as . The experiment and verification process of the steady-state probability is as follows,
1. Build a total transition probability matrix
of dockless bike-sharing.
2. Argue the reducibility of .
3. Perform rank-one updating on
and construct
.
4. Compute the steady-state fleet size probability vector of dockless bike-sharing stations.
5. Compute the steady-state fleet size vector of dockless bike-sharing stations.
The total bicycle size and the steady-state probability vector are multiplied to obtain the steady-state fleet size of each station.
In
Figure 5, the horizontal axis represents the stations and the vertical axis represents the steady-state fleet size of stations.
6. Compute the actual fleet size vector.
In
Figure 6, the horizontal axis represents the stations and the vertical axis represents the actual fleet size of stations.
7. Compute the difference between the steady-state fleet size vector and the actual fleet size vector.
In
Figure 7, the horizontal axis represents the stations and the vertical axis represents the difference between the steady-state fleet size vector and the actual fleet size vector.
8. Construct the moving-out stations number vector and moving-in stations number vector.
- (1)
Moving-out stations sequence vector
- (2)
Moving-in stations sequence vector
9. Compute the distance matrix of the moving-out and the moving-in stations.
Taking the maximum value of the distance in the matrix as the denominator, the elements in the matrix are respectively used as molecules, and after dividing, the following distance matrix is constructed, which is showed in
Figure 810. Solve the feasible solution of bicycle rebalancing.
In
Figure 9, the number in the arc is the number of bicycle rebalancing, and the number in parentheses is the station serial number.
In order to further verify the feasibility of the proposed algorithm, under the different total fleet size of shared bicycles and the number of bike-sharing stations, this paper computes and compares the steady-state fleet size of the bike-sharing station and the convergence speed, respectively. In the simulation, the number of stations is set to 300, 500, 700, 900, and 1100, respectively. The total fleet size of bike-sharing is set to 1 × 10
5, 2 × 10
5, 3 × 10
5 and 4 × 10
5, respectively. The adjustment parameter is taken as 0.96. The steady-state probability is computed 1000 times for a total of 20 simulation combinations for the bike-sharing station and the total fleet size. The average convergence speed is computed, see
Table 3 for details.
Experiments show that when the total fleet size of shared bicycles in the city is constant, the more the number of stations, the fewer the number of iterations are required to reach the steady-state, that is, the less time is needed for the fleet size to reach the steady-state. Theoretically, this conclusion can also be proved. From Equation (7), when n is larger, the in formula (7) is closer to zero, Equation (7) gets closer to Equation (8). Then, the less the factors affecting the steady-state of dockless bike-sharing, only affected by , so the number of iterations required to reach the steady-state is relatively reduced.
On the basis of solving the steady-state fleet size vector, this paper uses the Lingo software to analyze the linear programing of bicycle rebalancing in four scenarios with 300 stations and 1 × 105, 2 × 105, 3 × 105, 4 × 105 bicycle numbers.
The choice of value is set based on the actual travel data of the dockless bike-sharing. In a general sense, if , it means that the shared bicycles are riding to the closest stations within 10 km, and the peripheral stations more than 10 km away are not used as the riding destination. This is an ideal situation, and the transition probability sparse matrix is an irreducible matrix and does not need to be rank-one updating. If , it means that the shared bicycles are almost all riding to the peripheral stations 10 km away, and the close stations within 10 km are not used as the riding destinations, which is obviously inconsistent with the facts.
The value of is chosen close to one. On the one hand, when , the change in the probability value of the non-zero element in is very small. It is actually consistent with the riding of the bike-sharing, and there are few users riding to the peripheral stations. On the other hand, the element updating control of the transition probability sparse matrix is within an acceptable range. In this paper 3.1.4, after the rank-one updating, the probability value of the non-zero element in the sparse matrix changes to . If the number of shared bicycle stations in the city is large (such as ), then the absolute value of the above formula , taking selected in this paper as an example, , the probability value of non-zero elements changes very little.
If the peripheral stations are used more frequently, the difference between and one is larger, and the updating to is also larger, thus the deviation between the rank-one updating method and the actual situation is more obvious. The experiment shows that the difference between and one is greater than 0.1, therefore this algorithm is not recommended.