Rebalancing Strategy for Bike-Sharing Systems Based on the Model of Level of Detail

Traveling by bike-sharing systems has become an indispensable means of transportation in our daily lives because green commuting has gradually become a consensus and conscious action. However, the problem of “difficult to rent or to return a bike” has gradually become an issue in operating the bike-sharing system. Moreover, scientific and systematic schemes that can efficiently complete the task of rebalancing bike-sharing systems are lacking. *is study aims to introduce the basic idea of the kdivisive hierarchical clustering algorithm. A rebalancing strategy based on the model of level of detail in combination with genetic algorithm was proposed. Data were collected from the bike-sharing system in Ningbo. Results showed that the proposed algorithm could alleviate the problem of the uneven distribution of the demand for renting or returning bikes and effectively improve the service from the bike-sharing system. Compared with the traditional method, this algorithm helps reduce the effective time for rebalancing bike-sharing systems by 28.3%. *erefore, it is an effective rebalancing scheme.


Introduction
e issue of traffic congestion is becoming increasingly serious with the increase in the number of motor vehicles in urban areas [1]. is situation has become a major problem in the development of modern cities. In many big cities in China, the running speed of cars on the arterial roads during rush hours is less than 20 km/h. Persistent traffic congestion and a series of social problems, such as environmental pollution, energy waste, and exhaust emissions, have seriously hindered the development of economy. Nevertheless, people are paying increasing attention to environmental protection, energy saving, and emission reduction because of the increasing transportation problems and the deteriorating ecological environment. e concept of green commuting has also attracted increasing attention, and the vigorous development of a public transport system in cities has become the community consensus. Traveling by bike-sharing system is regarded as a green and low-carbon way of transportation [2]. is mode of transport can alleviate the traffic pressure on the road and solve "last mile" problem in public transportation [3]. erefore, traveling by bikesharing system has become increasingly popular and received the attention of governments worldwide [4][5][6][7].
However, bikes cannot spontaneously form a relatively balanced distribution due to the asymmetry of traffic flow and the uncertainty of needs from users. e government has utilized a considerable proportion of manpower and financial resources to rebalance bikes. However, situations such as "no bike to rent" or "no pile to return a bike" still exist in many stations due to the hysteresis and nonscientificity of the rebalance [8,9]. Consequently, many citizens abandon bike-sharing system when they go out, thereby greatly reducing the probabilities for people to use bike-sharing system [10][11][12] and restricting the development of bike-sharing systems to a certain extent.
Simply increasing facilities to improve the service of the bike-sharing system and increase the satisfaction from the public cannot fundamentally solve the problem. How to effectively rebalance bikes among stations to ensure that stations with fewer bikes can be quickly transferred in, whereas those with more bikes can be transferred out, has become a topic of common concern for more and more researchers [13,14].
is study develops a rebalancing scheme based on the model of level of detail and the hierarchy of cognitive processes.
is method performs the rebalancing scheme with granularity from coarse to fine throughout the whole experimental area. By taking the bike-sharing system in Ningbo city as an example, this study verified through a comparative experiment that the rebalancing scheme proposed can improve the operational efficiency of the bikesharing system and reduce the management cost. Such an undertaking is performed to support the related departments in formulating reasonable rebalancing schemes for bike-sharing system.

Rebalancing Schemes.
In recent years, researches related to bike-sharing system have been advancing, and these studies have provided a large number of ideas for rebalancing bike-sharing system. e main options to rebalance bike-sharing system include user-based and operator-based strategy [15]. e former is more popular in dockless bikesharing system, while the latter performs better in stationbased bike-sharing system. For the latter, current trend shows a hybrid solution in combination with different rebalancing modes.
Yin et al. [16] developed a logit model to estimate the influence of sociodemographic, land-use, and public transit characteristics on rebalancing bike-sharing system and got good result. But the logit model is too simple to deal with the complex pattern in rebalancing bike-sharing system. Lu [17] treated the issue of providing service to as much users as possible as a bike-dock pair allocation problem. ey further developed an algorithm with local ratio to solve the problem. Results showed that the algorithm could save time for trips and help more users to use bike-sharing system. But if users are unwilling to walk a long way to the station, the algorithm would not work. Shi [18] designed an improved particle swarm optimization algorithm and formulated a corresponding model for rebalancing bike-sharing. However, the trucks generally have a low ratio of the average load according to the statistics. So, the algorithm needs further optimization. Liu and Ren [19] proposed a dynamic rebalancing strategy with an improved genetic algorithm. is algorithm aims to improve the overall efficiency by reducing the number of routes. But some idealized settings have caused a lot of errors in the model and reduced the effect. Mao [20] proposed a dynamic rebalancing model for bikesharing system and calculated the number of bikes in each area with spatiotemporal graph to analyze the mobility patterns. Results showed that the proposed method had high accuracy. But there are still factors unconsidered in the model which will affect the accuracy. Recently, some scholars [21] proposed a bottom-up cluster-based model to rebalance bike-sharing system in combination with the spatiotemperal characteristic of the bike-sharing trips. However, this method is purely a static rebalancing strategy, and its effect and performance need to be improved.

Model of Level of Detail.
e model of level of detail (LoD) originated in the field of computer vision. e computer determines the allocation of resources to render objects according to the position and importance in the environment so as to reduce the level of detail of nonimportant objects and obtains higher rendering efficiency. In recent years, the model of level of detail has been widely used in many fields.
Fan et al. [22] proposed a hierarchy training strategy on images in classification. e network would be more stable and robust through hierarchy training. Experiments show that the network trained by this strategy will get better result. Wang [23] presented a reliability-oriented hierarchical control strategy. is strategy is adopted to further improve the efficiency of the microgrids. Results show that the proposed hierarchical control structure has better performance towards reliability enhancement. e image pyramid model is another application of the level of detail model in the storage and management of the images [24]. e image pyramid establishes a series of layers with different resolutions and establishes a corresponding spatial indexing mechanism.
is will improve the rendering speed of zooming or browsing images. Hu [25] further introduced a routing strategy with hierarchical model and calculated the optimal travel route with a hierarchical manner. Nakano [26] classified the transposable elements as a hierarchical classification issue and proposed hierarchical classification strategies with new data sets. Experimental results showed that the method proposed had a more competitive result compared to those by other strategies.
In short, the data structure of the model of level of detail is easy and clear. It has been applied in many academic fields. Meanwhile, the implementation of the model is simple, so it is more suitable for rebalancing bike-sharing system in urban areas.

Modeling the Rebalance of Bike-Sharing Systems
To study rebalancing bike-sharing system is to determine the stations that need to be rebalanced and the number of bikes that must be transferred in or out of each station, as well as to compute the optimal path for rebalancing trucks [27].
is study assumes that the total numbers of bikes and the stakes in each station are limited to simplify the rebalancing problem. A bike is either locked at a station or being used by a user. ree states occur in each station, namely, no bikes available, no idle piles, and available bikes and idle piles. We assumed that a certain number of rebalancing centers are set up. ese centers are in charge of rebalancing bikes for the stations around them. Each center is equipped with several trucks. e carrying capacity of these trucks remains constant.
e rebalancing system will always monitor the status of the bike-sharing system. When the locked ratio of the piles at the station is lower than or exceeds a certain range, the system would automatically alert the staff at the management center to rebalance the bikes.

Model Construction.
erefore, how to design a reasonable and efficient rebalancing scheme based on the demand from stations has been a key issue. With this scheme, trucks can pass through stations in an orderly manner and finally return to the center. In this situation, the bike-sharing system could meet the needs from users as much as possible and improve the service of bike-sharing system [28,29]. Moreover, the cost of rebalancing bikesharing system must be taken into account, so that the running distance by the trucks is the shortest or the total time spent is the least. is is a problem that urgently needs to be solved in the current bike-sharing system, which is also the problem that this study tends to solve. erefore, the rebalancing scheme proposed in this work takes the transportation cost and satisfaction from bikesharing system as the objective functions.
(1) Transportation Cost. e truck travel must be short to minimize transportation costs. e distance covered by a truck for performing rebalance for a trip is shown in the following formula: where X ij is a decision variable. X ij � 1 means that the truck moves from station i to station j in a certain trip, while X ij � 0 means that the truck does not travel from station i to station j. d ij is the distance from station i to station j, and ω is the transportation cost per kilometer. N refers to the total number of the stations that need to be rebalanced in a certain trip.
(2) Satisfaction. Satisfaction can be translated into penalty costs that do not satisfy time windows. Specifically, the dispatching truck should complete the dispatch task within the time expected as soon as possible to ensure that users can avail of the services at the station. We use soft-time window to constrain the arrival time of the trucks. e penalty cost is high when the arrival time before/after the expected time is early/late. e penalty cost of the time is shown in the following formula: where W i is a decision variable indicating whether station i needs to be rebalanced. t i is the time when the truck arrives at station i; [L i , U i ] is the time window of site i, and L i represents the earliest time expected by site i; U i is the latest time expected by site i; epu is the penalty cost for early arrival when the time window is unsatisfied; and lpu is the penalty cost for late arrival. Figure 1 shows the diagram of the penalty function for the soft-time window.
In summary, the objective function for the rebalancing model is shown as follows: where α is the weight value of the transportation cost, β is the weight value of penalty cost of time window, Z 1 is the transportation cost, and Z 2 is the penalty cost of the time window. us, the objective function to be optimized is shown as follows: e constraints of the above formula are as follows: (1) Decision variable is a 0-1 variable, which is defined as follows: (2) In each trip, every station can only be served once by a truck. us, where V represents the collection of all the stations, including the rebalancing center which is (4) e loading of each truck must be a nonnegative integer and does not exceed its maximum capacity.
where g ij represents the number of bikes that the truck transports from station i to station j, and Q is the maximum number of bikes that the truck can carry.
(5) e number of bikes is balanced before and after the station is rebalanced.
where p i is the initial number of the bikes before the station is rebalanced, and q i is the number afterward. (6) e arrival time t j of the truck at station j is shown in the following formula: where wt is the time of loading or unloading a bike, and tt ij is the running time of the truck from station i to station j. (7) e truck shall visit the station one by one, as shown in formula (12), where M is a number that approaches infinity.
In summary, the model of the rebalancing algorithm for bike-sharing system proposed in this study is shown as follows:

K-Means.
Clustering is an unsupervised learning method in machine learning. is method uses the similarity between objects to divide the entire data set into several different clusters. Such step is conducted to ensure that the data in the same cluster has a great degree of similarity, and the similarity among data in different clusters is low. In this manner, clustering is often used to reveal the inherent nature among data. e topology relationship of stations is an important spatial feature because the distribution of bike stations is regarded as a network topological structure. A reasonable division scheme is easy to design when dividing the areas where stations locate if the characteristic of the network topology is considered. In this study, we use the K-means clustering algorithm to cluster the stations on the basis of the spatial characteristics of the stations.
K-means algorithm is a commonly used clustering algorithm and an important analytical tool in research fields.
is algorithm aims to randomly select k points in the data set as the initial cluster centers and then calculate the distance between each center and the remaining objects. e remaining data are then divided into the clusters closest to these k centers. Finally, the center of each cluster is recalculated according to the objects in the cluster, and the cluster is redivided. is process is repeated until the result of each division remains the same or the sum of the squared errors of the points in each cluster reaches the minimum, and the algorithm ends.
In K-means, the selection of the k value directly affects the final clustering results. Many strategies in the literature can be adopted to determine the k value. In this work, we will use the elbow rule. e core index of the elbow rule is the sum of squared errors (SSE). is index indicates the quality of the clustering result. e degree of aggregation of the clusters would increase and the value of SSE would naturally become smaller as the value of k increases [30]. Specifically, if the value of k is smaller than the real number of the clusters, the decline in SSE would be large since the increase of k will increase the aggregation of each cluster. However, if k becomes closer to the real number of the clusters, the reward in increasement of the aggregation will decrease sharply [30]. Accordingly, the decline of SSE will be sharply reduced. As the value of k continues to increase, it tends to become flattened.
is indicates that the relationship between SSE and k looks like the shape of an elbow. e value of k that corresponds to the elbow part is the best clustering number, as shown in Figure 2. e curve in Figure 2 is similar to an elbow, and the k value corresponding to the elbow is the appropriate value.

Genetic Algorithm.
Genetic algorithm (GA) is used to "search for the optimal solution by simulating the natural evolution process" [31,32]. Some of the core operations in the genetic algorithm will be briefly introduced in this part.

Coding.
A sequence of numbers are used for encoding to overcome such shortcomings as large search space and long codes generated by binary encoding. In this article, the number 0 is used to represent the rebalancing center and {1,2,3, ..., n} to represent the bike stations that need to be rebalanced. For example, if a chromosome is [0, 2, 3, 4, 0, 1, 5, 0], it means that the rebalancing truck departs from the center, rebalances stations 2, 3, and 4 in turn, and returns to the center. en it departs from the center to rebalance stations 1 and 5 and returns to the center again. e specific route is as follows: Rebalancing center ⟶ station 2 ⟶ station 3 ⟶ station 4 ⟶ rebalancing center ⟶ station 1 ⟶ station 5 ⟶ rebalancing center 2.5.2. Initial Population. First, the numbers of all the stations that need to be rebalanced are randomly sorted, and then k−1 0 s are randomly inserted into the chromosome, where k is the number of rebalancing trucks. en a 0 is inserted, respectively, at the beginning and at the end of the sequence, representing that the rebalancing trucks depart from the center and finally return to the center. After that, it is judged whether the current rebalancing scheme meets the capacity constraint of the truck and whether there are continuous zeros in the current rebalancing scheme. If the load constraint meets the requirement and there are no consecutive 0s in the rebalancing path, it will be chosen as an initial chromosome or it will be discarded and a new chromosome is regenerated. e above process is repeated to generate N chromosomes to form the initial population.

Fitness Function.
Fitness can be used to simply evaluate the quality of a chromosome. e greater the value of the fitness function is, the better the corresponding chromosome is. erefore, in this study, the reciprocal of the value of the cost function above is taken as the fitness function; namely, 2.5.4. Selection. e elite retention and roulette wheel selection are combined in this paper, which not only ensure that the best individual survives into the next  Journal of Advanced Transportation generation but also enable individuals with large value of the fitness function to enter the next generation. It is assumed that the number of chromosomes in the current population is NP, and the specific operation steps are as follows: (1) e optimal individual with the greatest value of fitness function in the current population is recorded as elite. is individual does not perform pairwise crossover and mutation but is directly copied to the next generation. (2) e roulette wheel selection is performed on the remaining individuals. In other words, the NP−1 chromosomes are selected for crossover.

Crossover.
e crossover operation is performed on the NP−1 chromosomes selected in the previous step. New individuals are continuously generated through crossover, expanding the search space of the algorithm .
(1) When the number of the rebalancing trucks K > 1, this study adopts an improved crossover operator. Specific steps are shown in Figure 3.
Step 1: gene fragments with 0 at the beginning and at the end are randomly selected on the chromosomes of parent 1 and parent 2, respectively.
Step 2: prepend the gene other than the last 0 in the two gene fragments to the head of the parent chromosome.
Step 3: based on gene fragment 1 and gene fragment 2, offspring 1 and offspring 2 are constructed.
Step 4: expand offspring 1: traverse the genes of parent 2 from the left to the right, and add the genes that do not appear in gene segment 1 (offspring 1) to offspring 1 in order, and finally add code 0 at the end of offspring 1. Fill in offspring 2 symmetrically in the same way.
Step 5: for offspring 1, K−2 zeros are randomly inserted after segment 1 to ensure that there are K rebalancing paths. After that, it is judged whether the current chromosome meets the capacity constraint of the rebalancing truck and ensured that there are no consecutive 0s. If the constraints are not met, the K−2 zeros are reinserted. Offspring 2 is processed in the same way. (2) When the number of the rebalancing trucks K � 1, the cyclic crossover operator is used, and the specific steps are shown in Figure 4.
Step 1: first, the 0s at the beginning and at the end of parent 1 and parent 2 are deleted, and then a position is randomly selected on parent 1.
Step 2: find the number of the genes on the corresponding position in parent 2; and then return to parent 1 to find the gene position with the same number. Repeat this process until a ring is formed. e gene and the corresponding position of parent 1 in the ring are saved.
Step 3: the gene selected in parent 1 is picked to generate offspring 1, and the position order is not disturbed.
Step 4: the remaining genes in parent 2 are put into offspring 1.
Finally, add 0 to both ends of the chromosome to get the final result of chromosome of offspring 1. Similarly, chromosome of offspring 2 can be obtained.
2.5.6. Mutation. In this study, swapping mutation is selected to perform mutation on chromosomes; namely, two nonzero genes are randomly selected in the parent chromosomes and exchanged. If the route could meet the constraint of truck capacity after the exchange, it will updated.
In summary, the complete algorithm flow of genetic algorithm is shown in Figure 5.

K-Divisive Hierarchical Clustering
Algorithm. e divisive hierarchical clustering algorithm [33,34] is also called the top-down clustering method. In this algorithm, all objects in the collection are treated as a cluster first. is cluster is then divided into small ones, each as a new cluster to be subdivided. Overall, the implementation of the divisive hierarchical clustering method is also a process of constructing a tree from top to bottom, as shown in Figure 6, where lines with different colors refer to different clusters. In the aforementioned recursive division process, all objects are first treated as the root node of a tree. e cluster is then recursively split into multiple small ones.
is process is iteratively executed until only one object is present in each cluster or a predefined termination condition is satisfied.
Among the many divisive hierarchical clustering algorithms, the divisive hierarchical clustering with K-means, which is called the K-divisive hierarchical clustering, is one of the most widely used algorithms. is algorithm aims to divide data by using the divisive hierarchical clustering algorithms through iteratively applying K-means until each object becomes a cluster or the termination conditions are satisfied. e K-divisive hierarchical clustering method combines the traditional K-means algorithm with divisive hierarchical clustering, thereby not only making the clustering realistic but also greatly improving the clustering efficiency [35].

Rebalancing Algorithm Based on the K-Divisive Hierarchical Clustering.
e corresponding rebalancing strategy for bike-sharing system is designed in this section on the basis of the K-divisive hierarchical clustering algorithm. e previous analysis indicates that the K-divisive hierarchical clustering algorithm is actually a process of dividing the cluster with granularity from coarse to fine. e essence of the rebalancing algorithm proposed is a rebalancing strategy with granularity from large to small and a continuous refinement process.
After the corresponding divisive areas are obtained, the areas covered by clusters, which are divided from the original data set, are treated as rebalancing units on the top level. e renting/returning number of bikes in each cluster is then counted. Based on the statistic result, a corresponding rebalancing scheme is formulated, which is also the rebalancing strategy on the top level. en, the subclusters of the bike stations on the next level are obtained for each rebalancing unit. e clusters at this level are more refined than the previous ones. e corresponding rebalancing units are formed according to the range of each cluster. ese units are treated as rebalancing cells on the second level. ereafter, all clusters on different levels are traversed according to such a rule. e corresponding rebalancing scheme is Step (1) Gene fragment 2 Step ( Step (4) Step ( Step (   Step (2) Step (4) Step (3)  Journal of Advanced Transportation computed according to the renting/returning demand among different clusters on the same level. In this way, the rebalancing strategies on each layer are integrated together to form a tree-like scheme, which is the rebalancing algorithm based on the model of level of detail. e complete process is shown in Figure 7.
In summary, the proposed algorithm is actually a rebalancing process from coarse to fine. is notion also fully reflects the cognitive process of humans from the macro to the micro. When decision-makers are conducting rebalancing schemes, they always carry out the scheme from a macro perspective and then gradually refine it to small ones, rather than focusing on the needs of one or two stations from the beginning. erefore, the rebalancing algorithm proposed in this work also conforms to the processes and characteristics of cognition and thinking.

Results and Discussion
e experiments were conducted using Python, and the program was tested and run under the operating system of Windows 10. Besides, a comparison experiment was performed with the traditional scheme. e results showed that the rebalancing algorithm proposed in this work had obvious advantages compared with the traditional one.

Experiment for K-Divisive Hierarchical Clustering.
e bike-sharing system in the downtown area of Ningbo City is selected as the experimental area in this work. Statistics shows that 169 bike stations are positioned in the area. e area where these stations located is divided into multiple levels of detail, as shown in Figure 8, where one dot represents a bike station. Specifically, the collection of all the stations was regarded as a cluster, which was also treated as the start of the hierarchical division. ese stations were used to draw an elbow diagram. A suitable k value was found to divide the cluster that composed of all stations to form small subclusters. ese subclusters were regarded as cells on the top level, as areas 1, 2, and 3 shown in Figure 8.
e entire area where all the bike stations locate is divided into three subclusters. ese clusters generally cover a large space. e number of bike stations included is relatively large. ese stations have a low-density distribution, and the arrangement between stations is relatively sparse. ereafter, the elbow diagram is drawn again to find the appropriate k value in each subcluster. e K-means clustering algorithm is applied to further divide the subcluster to obtain a second-level division scheme (e.g., areas 11, 12, and 13 in Figure 8). e subcluster range will gradually diminish with continuous division. e number of bike stations in each subcluster will also decrease. e division process is continuously performed according to such rules until each cluster contains a small number or only one station. A hierarchical division scheme for stations in bike-sharing system with granularity ranging from large to small is finally formed by overlaying together multiple layers of clusters with different extensions.

Experiment for Rebalancing Algorithm Based on the Model of LoD.
To minimize the amount of calculation, the clusters formed by the stations on the bottom in the division scheme of LoD are treated as the rebalancing units on the last level. In other words, the stations in these cells are no longer to be divided. Combined with the renting/returning demand in each cell, the rebalancing scheme on each layer is computed. en the rebalancing schemes at each layer are superimposed together to form a complete scheme with granularity from coarse to fine. e records in rush hours in the morning on June 30, 2019, were selected as manifested in the sample data in the study experiment. e number of bikes at each station at 7: 00 a.m. was treated as the initial state. e usage of the bikes at each station was simulated by reading the rental/returning records in the database. e alarm thresholds at stations were set to [0.4, 0.6]. Specifically, the station would alarm when its saturation exceeds the threshold interval. ereafter, a fixed time window starting from the alarming time was generated. e total demand for bikes in each area and its corresponding time window were determined separately, as shown in Table 1.
e genetic algorithm was applied to compute the optimal path among rebalancing units. e times that trucks return to the rebalancing center should be minimized as much as possible. After the rebalancing task at the current level was completed, rebalance for units on the lower level was further performed. Our genetic algorithm supposes the following: the population size is 100, the number of iterations is 1000, the mutation rate is 0.1, the running speed of the truck is 30 km/h, and the maximum carrying capacity of the truck is 400 with an initial load of 250. Finally, the rebalancing schemes at different levels were solved, as shown in Table 2.

Comparative Experiment and Analysis.
We also compared the proposed algorithm with the traditional one. In the traditional algorithm, we did not divide the area where the station locates with the model of LoD. Instead, the genetic algorithm is directly called to rebalance the areas on the lowest layer in the model of LoD of the clusters.
In this experiment, we only assigned one truck to rebalance the bike-sharing system to clarify the results. It is supposed that the running speed of the truck is 30 km/h. e  experimental results are shown in Figure 9. Figure 9(a) shows that the truck would directly run towards all rebalancing units from the center with the traditional rebalancing algorithm. Figure 9(b) shows the rebalancing scheme based on model of LoD proposed in this work.
If the traditional rebalancing method is adopted, then the truck would directly run to all stations from the rebalancing center. e rebalancing scheme for each station was calculated by the genetic algorithm, as shown in Table 3. e total length covered by the truck is 65318.75 m, and the effective time is 130.7 min as shown in Table 4. However, on the basis of the rebalancing scheme proposed in this work, we collected the statistical data on different levels and found that the total length of the path using the proposed method in this paper is 46845.62 m, and the effective time is 93.73 min as shown in Table 4. It is concluded that the proposed algorithm can reduce the effective time for rebalancing bike-sharing system by 28.3% compared with the traditional one. e rebalancing method proposed in this work can effectively shorten the total distance, thereby reducing the effective time. is mechanism can help to satisfy the needs of users to use bikes as much as possible and improve the overall service of bike-sharing system in urban areas. erefore, this rebalancing scheme is practical for bikesharing system. e rebalancing algorithm is the key to solving the imbalance distribution of the demand for bikes in the space and time.
e experiment proves that the rebalancing method proposed in this work can upgrade the response speed, improve the service of the bike-sharing system, and   reduce the maintenance cost. If the method proposed in this work is applied to the operation and management of the bike-sharing system in major cities, then it will not only help improve the service of such system and increase the satisfaction from citizens but also effectively guide people to use bike-sharing system instead of cars. Accordingly, the current situation of traffic congestion on the road is enhanced.

Conclusion
We studied a rebalancing scheme for bike-sharing system on the basis of the model of level of detail combined with the K-divisive hierarchy clustering algorithm. e algorithm takes the comprehensive consideration of maximizing to satisfy the renting or returning demand for bikes and minimizing the rebalancing cost as the goals to be optimized.   e algorithm initially treats the collection of all stations as a cluster and then uses the K-means algorithm to cluster them. e obtained subclusters are then reclustered using K-means to form small subclusters. Clustering is continuously executed according to such a rule to form hierarchical layers. e areas where bike stations locate are divided with different granularities. In each layer of the hierarchical structure, the extent covered by the cluster is regarded as a rebalancing unit. Finally, genetic algorithm is called to compute the optimal rebalancing route among units at each level. A rebalancing scheme from coarse to fine is formed from a macro perspective.
Meanwhile, we take bike-sharing system in the downtown area of Ningbo as an example to verify the feasibility and practicability of the algorithm. e comparative experiments proved that the rebalancing scheme can effectively relieve the problem of "difficult to rent/return a bike" in the bike-sharing system. Compared with the traditional method, the algorithm proposed can reduce the effective time for rebalancing bike-sharing system by 28.3%. erefore, this work can provide an effective theoretical basis for rebalancing bike-sharing system in urban areas and important guidance for management departments.
Although this work has achieved considerable results, some shortcomings are also noted. (1) In establishing the model, the length of the time window is set to a fixed value. We did not discuss the setting of this value in detail. In our future research, the characteristics of demand for renting/ returning bikes at stations will be comprehensively considered to analyze the effect of setting different values of time window on the algorithm. is task is necessary to determine the optimal value of the time window. (2) e experiments involved in this study are only used to verify the algorithm's effectiveness. In the future research, we will combine the spatiotemporal distribution characteristics of renting or returning demand of bikes with a neural network to predict the renting/returning requirements. By doing so, the algorithm proposed could be more accurate.
e research contribution will bring inspiration or guidance to researchers engaged in this field. We will further study the dynamic and intelligent rebalancing strategies for the bike-sharing system in urban areas.
Data Availability e sample data and codes that support the findings of this study are available at https://figshare.com/s/ b1f7067d0e6ce05bb003.

Conflicts of Interest
e authors declare that they have no conflicts of interest.