Bike-Sharing Static Rebalancing by Considering the Collection of Bicycles in Need of Repair

Bike-sharing systems, which are used in many cities worldwide, need to maintain a balance between the availability of bicycles and the availability of unoccupied bicycle slots. This paper presents an investigation of the net flow of each bike-sharing station in Jersey City.The data was recorded at 1-minute intervals.The sum of the initial bicycle number and the minimum net flow value was determined to be the demand for static rebalancing, and this led to the proposal of a bike-sharing demand predictionmethod based on autoregressive integratedmoving averagemodels. Considering that the existence of bicycles in a state of disrepair may adversely affect demand prediction and routine planning, we present an integer linear programming formulation tomodel bike-sharing static rebalancing. The proposed formulation takes into account the problem introduced by the need to collect bicycles in need of repair. A hybrid Discrete Particle Swarm Optimization (DPSO) algorithm was proposed to solve the model, which incorporates a reduced variable neighborhood search (RVNS) functionality together with DPSO to improve the global optimization performance. The effectiveness of the algorithms was verified by a detailed numerical example.


Introduction
Bike-sharing systems are designed to solve "the first and the last mile problem" and to provide a connection between multitransit modes.The most recent decade has witnessed the rapid worldwide development of bicycles as a transport mode driven by bike-sharing companies, such as Mobike and OFO.In this arrangement, the residents can rent or return bicycles at any public area, and this has greatly enhanced the convenience in the residents' daily commutes.These systems have since spread all over the world.In contrast, the rapid development of bike-sharing has resulted in many problems, such as damaged bicycles, bike parking needs, and bicycle maintenance.In many cities, piles of bicycles are parked along public areas, and broken bicycles tend to be left carelessly.Among these violations, the parking problem is especially critical and has aroused people's concern.These phenomena occur mainly because the operation management is not standardized and there is no effective rebalancing method.
Scholars and policy makers are committed to determining the causes and solution of these problems.Reinforcing the standardization of the bike-sharing system management is essential; however, more importantly, advanced methods should be used to rebalance the stations to their optimum levels of occupation to avoid the inefficiency due to full and/or empty stations.Today's competitive environment also requires bike-sharing companies to increase the operational efficiency by adopting such measures.
Bike-sharing systems are composed of several bike stations located at different sites across the city, and each station operates a number of bike slots from which bicycles can be collected or to which they can be returned.In a balanced situation, each bike station is required to have a certain number of empty slots, to allow arrivals, and a certain number of full slots, to allow departures.A certain amount of time after the beginning of the service, the users will have moved the bicycles among the stations of the system and the state will have deviated from the balanced one.Thus, these companies engage in the redistribution of bicycles, an operation known as rebalancing.Rebalancing, which is performed by vehicles with the necessary capacity, is normally required at the end of the day, when the system is closed or when the use of the system can be considered negligible.In this case, the rebalancing is considered to be static.Some bike-sharing operators may require the rebalancing to be performed when the system is open and in operation, incurring a situation known as dynamic rebalancing.In this paper, we present the static case, which is referred to as the Static Bike-sharing Rebalancing Problem (SBRP).
As discussed elsewhere [1][2][3][4], SBRP is a vehicle route problem, modeled on a complete digraph  = (, ), where  = {0, 1, . . ., } is the set of vertices, including the depot (vertex 0) and n stations (vertices 1,. ..,n), and A is the set of arcs between each pair of vertices.The traveling cost c  is associated with the arc (i,j)∈A.For each vertex i∈V, a request q  is given, with q 0 =0.Requests can be either positive or negative.If q  ≥0, then i is a pickup station, from which q  bicycles should be removed; if q  <0, then i is a delivery station, to which q  bicycles should be supplied, for i∈ \{0}.Bicycles supplied to delivery stations can either come from the depot or from pickup stations.Vehicles do not necessarily have to leave the depot empty.The objective is to operate a fleet of m identical vehicles of capacity Q that need to be available at the depot to respond to requests and to minimize the total cost of the traversed arcs.
However, the existence of bicycles in disrepair would disrupt the demand prediction and rebalancing efforts.In reality, after a long period of usage, some of the bicycles would require repairs.If the bicycles in need of repair continue to remain in a station indefinitely, they may be mistaken for operational bicycles by the system operator who would not deliver new bicycles to that station.Meanwhile, the customer's demand at that station cannot be satisfied.Thus, the vehicles would need to collect these bicycles in disrepair and return them to the depot, thereby increasing the complexity of the static rebalancing problem.Contrary to the traditional vehicle routing problem with simultaneous pickup and delivery (VRPSPD), the number of bicycles in need of repair collected from some stations cannot be used to respond to requests of delivery stations.As these bicycles are expected to take up a particular amount of capacity of a vehicle, the path of the vehicle would need to be newly planned and rescheduled.
This study makes the following substantial contributions to the bike-sharing static rebalancing problem: (1) We conducted a pattern analysis of each bike-sharing station over the data set of Jersey City.On the basis of high-resolution net flow data analysis, we found that there is always a fixed input/output pattern in each bicycle station.Consequently, the bicycle stations can be divided into two types: demand-station and supply-station.We also found that the bicycle demand is determined by the minimum net flow value.For a demand-station, the bicycle demand is equal to the current number of bicycles plus the minimum net flow value; for supply-station, the supply of station is equal to the current number of bicycles plus the total difference (net flow value at the end of the day).Therefore, we established the new demand prediction equations based on bike-sharing station pattern analysis.These equations are easy to implement in practice.
(2) To the best of our knowledge, our work is the first to formulate the bike-sharing static rebalancing problem by considering the need to collect bicycles requiring repair.The existence of these bicycles increases the complexity of the static rebalancing problem.The number of bicycles requiring repair collected from some stations cannot be used to respond to requests of delivery stations.The bicycles in disrepair will take up a particular amount of capacity of a vehicle.We build new integer linear programming formulations for the bike-sharing static rebalancing problem by considering the need to collect bicycles requiring repair.The presented model is expected to ensure the specific constraint that the sum of requests of the visited stations and the bicycles in disrepair plus the initial load is never negative or greater than the capacity along the route traveled by a vehicle.

Literature Review
Lately, the bike-sharing rebalancing problem has received increased attention from the practitioners as well as researchers because of its great importance in the bike-sharing system operation.Many researchers viewed the SBRP as a special Traveling Salesman Problem (TSP) [3], multiple-TSP [5], Pickup and Delivery Traveling Salesman Problem (PDTSP) [1,2,[6][7][8][9][10][11], and Vehicle Routing Problem with Simultaneous Pickup and Delivery (VRPSPD) [12], or built mixed integer linear programming (MILP) formulations with different objections or constrains [13][14][15][16][17][18].Table 1 summarizes the static BRP (Bike Rebalancing Problem) publications according to the formulations, problem objectives, solutions, determination of demand, and whether the collection of damaged bicycles is considered in the formulations.Only a few studies have presented the bicycle demand determination method.To the best of our knowledge, only Alvarez-Valdes et al. [2] studied the return of damaged bicycles, but the impact of damaged bicycles to the vehicle's capacity constraint has not been considered in the published literature.There are three main solution methods, e.g., exact method [1,3,9], heuristics method [2,10,12,13,[15][16][17], and hybrids of these two methods [8,14,18].
To solve a problem such as the VRPSPD, the general method is to establish a mixed integer linear programming  (MILP) formulation with different objectives or constrains.
Our model for the bike-sharing static problem extends the multicommodity VRPSPD [19,20].In the proposed model, the vehicles are required not only to deliver goods to customer, but also to pick up goods at customer location [21].Currently, there is no general algorithm to find the global optimal solution for this kind of nonconvex and nonlinear programming problems.Heuristic algorithm can get high-quality solutions, with good computational efficiency.We have searched the literature which uses heuristic and metaheuristic approaches solving such problems, such as Ant Colony System algorithm, D-Ants, and local search algorithm.Obviously, the static rebalancing problem is also a combinational optimization problem, and the solution space is a discrete space made up of a limited number of integral points.Hence, Discrete Particle Swarm Optimization (DPSO) is applicable to solve this kind of problem.In this paper, we adopt a hybridization algorithm combining DPSO and Variable Neighborhood Search (VNS) to solve the VRPSPD, which is proposed by F. P. Goksal et al. [21] in order to enhance the global search ability of DPSO and overcome the possibility of entrapment in local optimum and make full use of the local search ability of variable neighborhood search.

Pattern Analysis of the State of a Station.
Most existing methods to predict the short-time demand of the stations are based on the historical pattern of the bicycle number change at each station.Andreas et al. [22] detected the temporal and geographic mobility patterns based on the data from the operator's website.These patterns were applied to the prediction of the available bicycle number at any station.
After a fairly long period since a bicycle sharing system operated at an area, the resident will develop a stationary trip habit gradually.And the trip habits will tend to be stable.
There will be a state periodic similarity at each bikesharing station.That is to say, there is a fixed input/output pattern in bicycle station.We utilize operational data to analyze and find this input/output pattern.On the basis of the detailed data analysis we find that there are mainly two types of bicycle station: demand and supply-station, and the bicycle demand is determined by the minimum net flow value.For a demand-station and a demand-supply-station, the bicycle demand is equal to the current number of bicycles plus the minimum net flow value; for supply-station, the supply of station is equal to the current number of bicycles plus the total difference (net flow value at the end of the day).
One of the advantages is that forecasting the bicycle demand through analyzing the pattern of each station is more precise than other methods, such as traffic mode split forecast.Currently, the operational data is adequate.With the accumulation of operational data, the demand pattern recognition of each bicycle station will be more accurate.At the same time, the ARIMA mode we utilized is a method that has been widely used as a famous linear time series model, which usually has the advantage of high accuracy, efficiency, and adapting ability.
The bike-sharing system used for the case study is located in Jersey City, which has only 51 stations as shown in Figure 1.This bike-sharing system operates during the daytime but remains closed at night, which is quite common in small/medium cities.The redistribution of bicycles is carried out during the night by means of a single vehicle that visits each station exactly once.The twelve-month historical operation data is used for the case study, which records the details of the trips including the departure and arrival time of each trip.The station state is characterized by the net flow on oneminute basis, which is calculated as the difference between the inflow and the outflow.From the net flow curve of each station, we can determine the difference between the bicycles available at the beginning of the day and those remaining at the end of the day.For convenience of observation, we set the initial net flow to zero. Figure 1 shows the typical net flow curves of three stations, where the x-and y-axes represent the times series over one day and the difference between arrivals at and departures from a station per minute, respectively.
Based on the state curve, the stations can be divided into three categories, namely, demand-station, supply-station, and demand-supply-station.These different types of stations play different roles in the bike-sharing system.For the demandstation, the number of the outgoing bicycles always exceeds the number of incoming bicycles, such as station 3186 shown in Figure 1(a).For the supply-station, the number of outgoing bicycles is smaller than the number of incoming bicycles.Station 3129 shown in Figure 1(b) is an example of the supplystation, whose net flow remains positive, which indicates that the bicycles of this station can be delivered to other stations.At the third type of stations, demand-supply-station, the net flow can be both positive and negative, such as station 3185 shown in Figure 1(c).

The Demand Equation.
The bicycle demand is the number of bikes required in stations, which can be defined based on the station state curve.As shown in Figure 2, the real maximum demand of a day is determined by the minimum net flow value denoted by   , which is illustrated by the vertical line in Figure 2. We use   to denote the total difference between the bicycle number at the end of a day and that at the beginning of a day, which reflects the imbalance of the bicycle arrival and departure.Let   be the number of bicycles at the end of the previous day.We can easily find that the bicycle demand of a station   is equal to   +  .
Based on similar analysis, we can define the bicycle demand of three types of the stations as follows.
(1) Demand-Station and Demand-Supply-Station.For a demand-station and a demand-supply-station,  , is negative.The bicycle demand is calculated by where  , is the demand of station  of the th day;  , is the minimum demand of station  on the th day (to be predicted); and  , is the number of bicycles at station  at the end of the ( − 1)th day.
(2) Supply-Station.For supply-station,  , is zero and  , is positive.The bicycle demand of the supply-station is defined as where  , is the supply of station  on the th day;  , is the total difference between the bicycle number at the end of the th day and that at the beginning of the that day of station ; and  , is the number of bicycles at station  at the end of the ( − 1)th day.
(3) Shortage of the Bike-Sharing System.For a bike-sharing system, the total bicycle demand is equal to ∑   , , and total supply is ∑   , .If the total demand is greater than the total supply, then the bike-sharing system needs more bicycles.The number of bicycles that need to be supplied is equal to If the total demand is smaller than the total supply, the bike-sharing system does not need new supplies, and the redundant bicycles do not need to be sent to the depot.

Maximum Daily Demand Prediction Model. In (1) and
(2),  , and  , are given and  , and  , need to be predicted.There are many methods that can be used to handle the time series, such as multiple linear regression [23], exponential smoothing [24], artificial neural networks (ANN) [25], and methods based on a multimodel fusion algorithm [26].Among the abovementioned methods, autoregressive integrated moving average (ARIMA) model is the most straightforward method to predict  , and  , value.ARIMA method has been widely used as a famous liner time series model, which usually has the advantage of high accuracy, efficiency, and adapting ability [27,28].
The following shows the prediction process of  , .One can predict  , by using the same method, so these will not be reviewed here.
Figure 3 shows the maximum demand ( , ) curve of station 3186 from Sep.21, 2015, to Jan. 31, 2017.Because the demand pattern is related to the day of a week, we divided them into categories based on the day of the week.Figure 4 shows the prediction results of the  , value of the Monday series.After calibration, we find that the ARIMA(3,1,3) model is the best for Monday series.The forecasting result is shown in Table 2. Due to the fact that the real demand value in station 3186 is small, the absolute percent errors actually indicate a small absolute difference, so this result is acceptable for a bike-sharing system.
With the proposed method, we have already the demand of each station.We can obtain the number of bicycles in need of repair at each station by checking and user report, which are used to guide the rebalancing work.

Formulation of the VRPSPD Problem
To solve a problem like Vehicle Routing Problem with Simultaneous Picked and Delivery (VRPSPD), the common method is building a mixed integer linear programming (MILP) formulations with different objections or constrains.An integer linear programming formulation is proposed in this paper to model bike-sharing static rebalancing by considering the collection of bicycles in need of repair.The formulation is derived from Min (1989) [20] and Dethloff (2001) [19].We enhanced the existing SBRP methodology in the following three ways: (a) the number of vehicles that perform the task may be greater than one; (b) the number of items picked up or delivered to each customer is predicted by a dedicated method derived from the net flow pattern analysis; and (c) there are two types of commodity in the model, ready bicycles, and damaged bicycles.The impact of damaged bicycles on the vehicle's capacity constraint is considered in the proposed model.In the proposed model, the vehicles are required not only to deliver goods to customer, but also to pick up goods at customer location.This is imposed by constraints ( 11)-( 16) in the paper.
Specifically, the static rebalancing problem should involve determining how to drive at most m vehicles through the graph, with the aim of minimizing the total cost and ensuring that the following constraints are not violated: (i) Each vehicle performs a route that starts and ends at the depot.(ii) Each vehicle starts from the depot empty or with some initial load (i.e., with a number of bicycles that vary from 0 to Q). (iii) Each station is visited exactly once and its request is completely fulfilled as a result of this visit.(iv) The number of bicycles in need of repair at each station p  is given, and the quantities collected at pickup stations can be used to respond to the requests of delivery stations or can be returned directly to the depot; however, bicycles in disrepair cannot be used to meet the requests of delivery stations and need to be returned to the depot.(v) Finally, the sum of requests of the visited stations and the bicycles in disrepair plus the initial load is never negative or greater than Q along the route followed by a vehicle.The formulation for bike-sharing static rebalancing by considering the collection of bicycles in need of repair is given as follows: subject to Objective function (3) minimizes the traveling cost.Constraints (4) require that every node except the depot is visited exactly once.Constraints ( 6) and ( 7) ensure, respectively, that at most m vehicles leave the depot, and that all vehicles that are used return to the depot after completing their route.Constraints (9) impose the initial load of the kth vehicle.The total load leaving the initial depot should be nonnegative in any case; moreover, in case Q  takes a negative value, it should not be lower than this value.This fact is imposed by constraints (10).Constraints (11) impose the final load of the kth vehicle.Constraints (12) state that the total load entering the depot is the number of all collected bicycles in need of repair.Constraints (13) impose the vehicle load after the first station.Constraints (14) impose the vehicle load after station j.Constraints ( 15) and ( 16) specify the upper bounds on the loads.
Constraints (17) state that, for each subset S of vertices, the number of arcs with both their tail and head in S should not exceed the cardinality of S minus the minimum number of vehicles required to serve S.An estimation of the minimum number of vehicles is simply obtained by computing the value of the sum of the demands and the sum of the bicycles in need of repair, dividing it by the vehicle capacity and then rounding up the result.

A Hybrid Algorithm Based on DPSO and VNS
It is intractable to use exact methods such as those shown in Table 1 to solve large, realistic rebalancing problems, because the proposed problem is an NP-hard problem [4].Previous studies [8,13] have also illustrated this point by conducting numerical experiments.Hence, most of the existing studies focused on heuristic and metaheuristic approaches that can produce high-quality solutions within limited computational times [7,8,29,30].Ai  This algorithm combined the ability of the Hopfield Neural Network to reach the nearest point from the initial minimum point towards the descendent direction of gratitude and the advantage of the global search capability of the POS algorithm [35].
Obviously, the static rebalancing problem is a combinational optimization problem, and the solution space is a discrete space made up of a limited number of integral points.Hence, Discrete Particle Swarm Optimization (DPSO) is applicable to solve this kind of problem.Compared with a Genetic algorithm, there is no mutation rate and cross rate parameters in DPSO; compared with the Simulated Annealing Method, there is no cumbersome process involving temperature drop; compared with the Ant Colony algorithm, there is no variety of complex judgment steps and parameter setting.In addition, the formula used to update the speed and position is used to ensure that all the particles converge to the global optimal value.Thus, the DPSO has a strong global searching capability.
However, there are some drawbacks in the DPSO algorithm.First, setting the different parameters will have an obvious effect on the DPSO performance.Second, the DPSO algorithm may easily converge to a local optimum.Hence, to overcome these shortcomings while retaining the advantages, a new hybridization algorithm combining DPSO and Variable Neighborhood Search (VNS) was proposed by Goksal et al. [21].This algorithm can enhance the global search ability of DPSO, overcome the possibility of entrapment in local optimum, and make full use of the local search ability of variable neighborhood search.
The hybrid algorithm combined DPSO and VNS employed here includes four steps: representation of the solution, initializing the discrete particles, updating the positions of particles, and the strengthened local search based on the VNS algorithm.

Representation of the Solution.
Finding a suitable representation of the solution is important.A good representation of the solution can enhance the performance of the DPSO algorithm and decrease the complexity of the algorithm.In this study we used the following procedures.
There are N bicycle stations in the bicycle system, and the request is that the maximum load per route does not exceed the vehicle capacity (Q) and the remaining vehicle volume is sufficiently large to accommodate the bicycles from the next station after collection from or delivery to the last station.Each particle is a solution which contains several routes.The total number of particles is initialized with N = {1, 2, 3, ⋅ ⋅ ⋅ ,  0 } positive integer numbers.Then each particle inserts zero (standing for the depot) under the constraints of the capacity of the vehicle and the space remaining in the vehicle.For instance,  = [1, 3, 6, 5, 0, 8, 11, 2, 4, 0, 7, 10, 9] is a solution, for which the particle has three routes.Route 1 is 0-1-3-6-5-0, route 2 is 0-8-11-2-4-0, and route 3 is 0-7-10-9-0.The cost of each particle is calculated by where C i,j is the cost in arc (i, j), X (k) is the number of X particles representing the bicycle stations, and zero is the depot.

Initialization of the Discrete Particle
Swarm.Commonly, the initial particle swarm is often a random product and we also adapt this format.Particles have different dimensions for different problems.Thus, the revised algorithm for gaining an initial particle swarm is provided in Algorithm 1.

Position and Velocity
Updating Rule for Particles.Generally, the velocity and position of the DPSO entail four basic operations, which are briefly mentioned here.The velocity and position updating rule of a particle is based on the following two equations: (1) The velocity of a particle at iteration t is calculated by using four parts, the position minus, the position multiply, the velocity multiply, and the velocity and position, as shown below.
(2) The position of a particle at iteration t is updated by considering the operation of position plus velocity.The position updating rule is given by where ⊕ is a newly defined operation.

Local Search Based on VNS Algorithm.
As has been proposed in the literature review, there are many neighborhood structures for us to use.In our implementation, we utilize three neighborhood structures, i.e., insert (i, j), swap (i, j), and 2 − Opt(i, j).These neighborhood structures are briefly introduced as follows: Insert(i,j): This structure enables us to randomly produce two positive integer numbers (i and j) limited to the range of the particle, which indicate, respectively, the number of bicycles collected by customers and the position at which the particle is inserted and that both of them can belong to a different route; then the randomly produced number is collected and inserted into a randomly produced position.
Swap(i,j): This structure indicates that a customer i is removed from route 1 and a customer j is removed from route 2. Then these chosen customers cs1 and cs2 are reinserted into different routes, route 2 and route 1, respectively.Moreover, the route and the customer number cannot be adjacent but can be noncontiguous.
2−Opt(i,j): This structure reverses the direction of a path lying between the customers i-1 and j by replacing nonadjacent arcs ( − 1) and (j − 1, ) belonging to the same route with (i − 1,  − 1) and (i, ), respectively.Equation ( 22) is used to update the personal best.
where    is the final personal best particle,  ,  is the updated personal best particle operated by the three neighborhood structures, and  ,  is the original personal best particle without any neighborhood structure operating.The cost function is expressed by (19).
Figure 5 illustrates the application of these neighborhood structures, and the VNS algorithm is shown in Algorithm 2. The hybridization of DPSO with VNS is shown in Algorithm 3.

Input:
The number of bike stations, the cost matrix and the supply and demand per station Output: The initial solution (also known as the initial particle) Begin Initialize the discrete particle swarm based on the population parameter and the dimensional of particles, known as    Loading the base data i.e., the cost matrix and supply and demand per station

Case Study
We assume a fictitious small-scale bicycle system as an illustrative example to show the efficiency of the proposed model and solving method.The system contains 14 bike stations.The daily supply and demand, the number of bicycles in need of repair, and the adjacency matrix for distance serving as cost matrix are given, separately, in Tables 3, 4, and 6.
The hybrid algorithm based on DPSO and VNS for rebalancing bike sharing has the following process.but choosing an appropriate initial swarm can expedite the convergence rate of the algorithm.In order to gain the favorable population, we initialize the discrete particle swarm randomly, belonging to the arrangement   ,   ∈ [1,20],  ∈ [1, ],  ∈ [1, 𝑙𝑒𝑛𝑔𝑡ℎ], and obtain the initial particle

Generating the Initial
According to the size of this fictitious bike-sharing system, we set 20 as the solution scale.Divide the particles according to the constraint condition, and obtain the pattern of particles that was revealed in Table 5. Numbers against asterisk mark denote the depot and the end of one route.

Fitness Evaluation.
The feasible solutions for this system are produced in Section 6.1, so the calculation of these feasible solutions is the main topic of this section.We utilize the fitness value of each particle as an optimized target; the fitness function is a standard for screening particles; hence we choose the reciprocal of the objective function as the fitness function.The specific calculation formula is where   () represents the value of the ℎ data of the ℎ particle,  , represents the vehicle cost (distance) from station i to j,  is the fitness value of the particle.
The following process of the first particle shows the steps to calculate the fitness value.Labeling method with list: Beginning from (0, 0) in the cost matrix, we obey these rules: Odd and even numbers of particles are indicated as rows and columns in the cost matrix, respectively.Further, when the adjacent number in the cost matrix is a cross, it is often the cost of the route.When all the numbers, exactly all the adjacent numbers, have been labeled, this process is complete.Last, the consequence is equal to the sum of all the labeled points.We present a representation of the cost matrix of the first particle in Table 7.
The fitness value is obtained by calculating the remaining particles in this way.The result is shown in Table 8.Numbers against asterisk mark denote the depot and the end of one route.

Calculation of the Historical and Global Optimal
Values of the Particle.The historical and global optimal values are the particle's cognitive and social messages, which have a significant impact on the probability of finding the preferable particle.Hence, the definition for the historical optimal particle is as follows: particles with the best historical fitness and global optimal particle; the best particles with the best historical fitness are mentioned.According to the definition, we obtain all the particles' historical optimal values and the particle swarm's global value at each iteration, as shown in Table 9.
In the first iteration, we initialize the original fitness value of the particles as the personal best and initialize the minimum of the personal best as the global best.The consequence is represented in Table 10.
Table 9: Historically optimal and globally optimal particles.
x  20,2 x  20,3 x   20,2 x   20,3 Based on the particular variable neighborhood structure, we used the personal best as an operation by taking the 2-opt operation structure as an example.The steps and consequence are the following.
The remaining particles were subjected to operation according to the form procedure, and the final result is presented in Table 13.Note: Numbers against asterisk mark denote the depot and the end of one route.Numbers with & mark were subjected to operation by the 2-opt structure.
Then, according to the constraint of the model, we check and recode particles.If the operated particles can satisfy the constraint, we accept these particles; otherwise, we recode the operated particles.The result of checking and recoding can be seen in Table 14.

Particle Updating Rules and Algorithm Termination Condition.
The velocity and position of a particle are updated according to (21) and (22), after which iterative operation occurs.The particles are updated according to the relative operation relating to the position and velocity.Note: Numbers against asterisk mark denote the depot and the end of one route.When the conditions of convergence are met, the operation is complete.Otherwise, return to process in Section 6.1 and implement the iterative operation again.6.6.Computational Result and Analysis.The parameters of the hybridization algorithm of DPSO with VNS are included in Table 16.
The dispatching plan is presented in Table 17 and the dispatching routes are shown in Figure 6.
Computation using the hybridization algorithm of DPSO with VNS produces four routes for dispatching, route 1= average computation time over 40 instances, and number of best known solutions found, the comprehensive performance of hybridization algorithm of DPSO with VNS is the best.For the computational results of the comparison, see Goksal et al. [21].
In this study, we implement Discrete Particle Swarm Optimization (DPSO) and Genetic algorithm (GA) separately over the case study data set to get a more comprehensive view of the performance of the hybridization algorithm of DPSO with VNS.The results are provided in Figures 7 and  8. DPSO is considered in the comparison with the purpose of presenting the performance of VNS.We can see from Figure 7 that the cost of the solution without VNS is 27.07 km.The result of the hybridization algorithm of DPSO with VNS (25.63 km) dropped by 5.3%.GA [15] is a population-based heuristic which can be used to solve the problem like SBRP.Y. Li et al. reported the performance in their study.Thus, in order to make a direct comparison, we run a GA program over the same data set of case study.From Figure 8, we can see that the total cost is 26.33 km, while the hybridization algorithm of DPSO with VNS brings a drop by 2.7%.This analysis indicates that the hybridization algorithm of DPSO with VNS outperforms the other existing heuristics in the SBRP literature.

Concluding Remarks
We quantify the station state using the bicycle net flow by calculating the difference between the inflow and the outflow.The maximum daily demand can be determined by the minimum value on the state curve.It should be noted that this minimum daily demand reveals the imbalance among the bicycle arrival and departure, rather than the real demand of the static rebalancing.
An extended VRPSPD program is developed to model the bike-sharing static rebalancing problem considering the number of bicycles that need repair.We employed a hybrid DPSO-VNS algorithm to solve the proposed model.The computational result shows that the effectiveness of the algorithm is attributed to a combination of the following reasons.First, the idea of vehicle orientation ensures that each route only covers a restricted area.Second, the quality of the solution is improved by the cheapest insertion heuristic and 2-opt method, both of which are applied during the route construction.Third, the DPSO mechanism is capable of generating diverse solutions and maintaining the best solution found during the iterative process.Moreover, this approach is flexible, because it is observed that it can be applied to the related problems by modifying the initial solution and a feasibility check of neighborhood methods.The approach can be easily extended and adjusted by adding or replacing these neighborhood methods.Some aspects may improve the performance of the proposed algorithm, such as the parameter optimization and programming implementation.Although the PSO parameter set used in this study was obtained from a preliminary experiment, it may not be the best one.In addition, the implementation of the algorithm may be further improved.These aspects would be further investigated in future studies.

Figure 1 :
Figure 1: Net flow of typical stations.
Notations : set of vertices, where  0 ⊆ \{0},  ̸ = 0 : set of arcs : number of stations   : bicycles in disrepair at vertex ,   ≥ 0 : set of vehicles : the ℎ vehicle, where  = 1, 2, ⋅ ⋅ ⋅ ,  : number of vehicles : vehicle capacity   : demand at vertex    : cost of the arc (, )  0 : initial load of the ℎ vehicle L 0 : final load of the ℎ vehicle when it returns to the depot L  : load of the ℎ vehicle after vertex ,  ∈  0   : flow of arc (, ), that is the load of the vehicle passing arc (, ), if any, for (, ) ∈    : the total demand   : the space remaining in the vehicle after the arc (, ), if any, for (, ) ∈ Ã   : a binary variable.

Figure 6 :
Figure 6: Dispatching route of the hybridization algorithm of DPSO with VNS.

Table 1 :
Summary of the characteristics of the static BRP in the literature.

Table 2 :
Prediction error analysis of the  , value.Figure 4: Prediction results for the  , value of Mondays by using ARIMA(3,1,3).
[34]Kachitvichyanukul proposed Particle Swarm Optimization (PSO) algorithms for the VRPSPD[31].Gajpal and Abad proposed an Ant Colony System (ACS) algorithm to solve the VRPSPD.However, the ACS is more complicated than other intelligence algorithms, such as PSO algorithms[32].Berbeglia et al. suggested that the problem of VRPSPD falls under the category of a oneto-one pickup and delivery problem[29].Reimann et al. proposed a decomposition approach (D-Ants) for the VRP model[33].Li et al. discovered an Iterated Local Search algorithm, which is based on a metaheuristic.Their results showed that this algorithm is more accurate than others.However, the algorithm is computationally less efficient[34].Liu et al. applied an algorithm for solving the Dynamic VRPSPD model based on POS of a Hopfield Neural Network.
+   (  is the supply account,   is the demand account) Free Space = Capacity -Load (Capacity is the capacity of the vehicle) if Load > Capacity or Free Space < P  O = i − 1 end for i = 1, 2, . .., N do repeat r← r + 1; k ← O  for m = k + 1 to j do Input: Initial vehicle routes Output: Improved vehicle routes by VNS algorithm Begin Initialize sequence of three neighborhood structures (1-insert, 2-swap, 3-2-opt) and randomly produce a positive integer of no more than 3Choose the  ℎ neighbor (S  ) of   ∈ () from these three neighborhood structures and apply  ℎ neighborhood to P and obtain(P  ) if F(P  ) < () then P ←   , F(P) ← F(  ) and apply the remainder of the neighborhood structures in sequence one by one to () and obtain(P  ) if F(P  ) < () then P ←   , F(P) ← F(  ) else delete the  ℎ neighborhood structure and apply the remainder of the neighborhood structures one by one to () and obtain(P  )

Table 3 :
Based data of bike system, DPSO parameters Output: The best optimization solution (routes of the bike system) Begin t ← 1 Initialize the population of the swarm, known as Pop and the relative parameters i.e., max iteration Apply the initial particle swarm algorithm to represent each particle in   Calculate the personal best particle in   and obtain the personal best of each particle, stored in   Calculate the global best particle in   and obtain the global best of each particle, stored in   While (i is not more than the max iteration or stopping criterion is not satisfied) do Daily supply and demand.
Discrete Particle Swarm.Normally, the initial discrete particle swarm is produced randomly, Input:

Table 4 :
Number of bicycles in disrepair.

Table 10 :
Initial fitness value, personal best, and global best of the particles.
Note:    , is the result of the variable neighborhood operation.

Table 12 :
Particles subjected to neighborhood structure operation (2-Opt).: Numbers against asterisk mark denote the depot and the end of one route.Numbers with & mark were subjected to operation by the 2-opt structure. Note
The results are provided in Table15.Subsequently, the algorithm calculates the fitness value, personal best, and global best of the updated particles until |( + 1) − ()|/|( + 1)| ≤ 0.05 or the iterative value exceeds the value of the original iterative step.

Table 16 :
Parameters of the algorithm.