# A Dynamic Approach to Rebalancing Bike-Sharing Systems

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

#### 2.1. Bike Sharing as a Smart Service

#### 2.2. Traffic Analysis and Rebalancing

## 3. System Model

- At each time frame k, we need to determine the desired state ${m}_{v}^{\u2606}\left(k{T}_{r}\right)$ for each station $v\in \mathcal{V}$. Since we would like to maximize the time until a station becomes either empty or full, ${m}_{v}^{\u2606}\left(k{T}_{r}\right)$ is the inventory level that maximizes the survival time of the station. This is computed by analyzing the historical user data.
- The real rebalancing problem, which consists of identifying which stations are either overcrowded or in shortage of bikes, according to their survival times, and designing the truck routes to perform the bikes pickups and deliveries.

#### 3.1. Survival Time

- We use the Markov property to separate the problem at a frame level; to calculate the transition probabilities in frame $n>0$, it is necessary to compute those at the end of each frame ${n}^{\prime}<n$.
- Within a single frame n, the transition probabilities at slot $k>0$ are derived by elevating the single-step transition matrix of frame n to the power of $k+1$ (since slot indices start from 0).

#### 3.2. Network-Wide Optimization

**Theorem**

**1.**

**Proof.**

Algorithm 1 Rebalancing strategy | |||

1: | Initialize $i=0$, ${\mathcal{V}}^{\prime}=\left\{0\right\}$, $f(\mathcal{H},t)=0$, done $=0$ | ||

2: | Set parameters $\alpha ,\beta ,\gamma ,X$ | ||

3: | Set $\mathbf{S}(t)=[{S}_{1}(t,{m}_{1}^{(\u2300)}),\cdots ,{S}_{\left|\mathcal{V}\right|}(t,{m}_{\left|\mathcal{V}\right||}^{(\u2300)})]$ | ▹ Vector with survival times before rebalancing | |

4: | Set $\sigma ={min}_{w\in \mathcal{V}}\mathbf{S}\left(t\right)$ | ▹ Smallest survival time before rebalancing | |

5: | $\sigma =min\{\sigma ,\gamma \}$ | ▹ Set the survival time threshold | |

6: | Set ${\mathbf{S}}^{\u2606}\left(t\right)=[{S}_{1}^{\u2606}\left(t\right),\cdots ,{S}_{\left|\mathcal{V}\right|}^{\u2606}\left(t\right)]$ | ▹ Vector with optimal survival times for each station $v\in \mathcal{V}$ | |

7: | while ($i<V$) and (done $==0$) do | ▹ Until there are nodes to visit that can improve the net reward | |

8: | $i\leftarrow i+1$ | ||

9: | $v\left(i\right)\leftarrow {argmin}_{w\in \mathcal{V}\backslash {\mathcal{V}}^{\prime}}\mathbf{S}\left(t\right)$ | ▹ Choose unvisited node with smallest survival time | |

10: | ${[\mathbf{S}\left(t\right)]}_{v\left(i\right)}\leftarrow {[{\mathbf{S}}^{\u2606}]}_{v\left(i\right)}\left(t\right)$ | ▹ Update survival time of node $v\left(i\right)$ | |

11: | $\mathrm{reward}\phantom{\rule{4.pt}{0ex}}\leftarrow min\{min\mathbf{S}(t),\gamma \}-\sigma $ | ▹ Update reward | |

12: | Determine rebalancing path $\mathcal{F}$ over ${\mathcal{V}}^{\prime}\cup v\left(i\right)$ | ||

13: | $D\leftarrow $ compute path length of $\mathcal{F}$ | ▹ Compute distance to cover for rebalancing | |

14: | $\mathrm{cos}\mathrm{t}\leftarrow \alpha X+\beta D$ | ▹ Update cost | |

15: | if (reward − cost) $>f(\mathcal{H},t)$ then | ▹ It is worth to include node $v\left(i\right)$ in the rebalancing | |

16: | ${\mathcal{V}}^{\prime}\leftarrow {\mathcal{V}}^{\prime}\cup v\left(i\right)$ | ||

17: | $f(\mathcal{H},t)\leftarrow $ reward − cost | ||

18: | if ${min}_{w\in {\mathcal{V}}^{\prime}}\{{[{\mathbf{S}}^{\u2606}\left(t\right)]}_{w}\}<{min}_{w\in \mathcal{V}\backslash {\mathcal{V}}^{\prime}}\left\{{\left[\mathbf{S}\left(t\right)\right]}_{w}\right\}$ then | ||

19: | done $\leftarrow 1$ | ▹ The optimization function $f(\mathcal{H},t)$ can no longer be increased |

- We use the Euclidean distance between stations as distance metric for the set of edges ${\mathcal{E}}^{2}$. This implies that $d({v}_{i},{v}_{j})\equiv d({v}_{j},{v}_{i})$ for any two stations i and j.
- We consider a single rebalancing vehicle, i.e., $X=1$, with infinite capacity. Notice that this scenario reduces the VRP to the Traveling Salesman problem.

## 4. Data Analysis

#### Traffic Analysis and Simulation

## 5. Results

- The CitiBike data accurately represent the demand for bikes. As discussed in Section 4.1, this may not be strictly true because of the censoring effect, so that the demand patterns in the data represent a lower bound for the real demand.
- Bikes coming from or going to stations that are not considered in the optimization framework because of lack of data are assumed to be new bikes entering the system, or broken bikes exiting it, respectively.
- If a user does not find a bike at their desired station, they simply exit the system and the trip does not happen. If they find a bike at their departure station but do not find a free spot at the arrival station, the bike exits the system.
- At the beginning of every month, the state of each station is reset to the optimal value. Since the dataset does not provide the state of each station, this assumption was necessary to define the initial state of the system.

**Service improvement.**Figure 3 shows the fraction of time that the bike-sharing system spends in a failure state, i.e., either completely full or empty, averaged for each station and for each month of the year. We used this metric instead of the number of service failures because it is less affected by the censoring problem we described in Section 4.1, as requests that could not be fulfilled are not shown and would not be counted in the results.

**Rebalancing costs.**The improvement in the service obviously comes at a cost: the fleet of rebalancing trucks must be deployed several times a day, and a more aggressive rebalancing strategy increases both the number of trips and the total distance that needs to be covered, with higher fuel and personnel costs.

**Evolution of the system over time.**Figure 10 shows the average fraction of time that a station spends in a failure state for 13 September (Tuesday) and 17 September (Saturday) 2016. As shown in Figure 2, the difference between a weekday and a holiday is striking: in the first plot, the two intense demand periods starting around 7 a.m. and 5 p.m. are evident from the steep increase of the failure rate, which is almost entirely absent in the other one. The limitations of the static approach to rebalancing can be clearly seen in the first plot: while the rebalancing operation at 3 p.m. brings the failure rate very close to 0 in the following hour, the system is left to itself during rush hour, and the failure rate quickly rises to match that of the unoptimized system. Even though the dynamic approach also has a peak failure rate at rush hour, it quickly recovers and keeps the system in a better state throughout the day; the bike-sharing system is probably underdimensioned for the peak demand, so it is hard for any rebalancing scheme to avoid failure during rush hour, but the dynamic system still yields a significant improvement. The weekend plot shows a similar pattern for the static approach, with perfect functioning right after rebalancing and a steadily increasing failure rate afterwards. However, the lower and more homogeneous demand makes rebalancing less urgent and decreases the gain of using a dynamic approach.

**Effects of the demand estimation error.**Figure 11 shows the effects of the estimation error in the demand data: we ran the simulations again, giving the system a perfect estimate of the demand for each hour, and used the performance as a benchmark. During the winter months (from November to February), the estimation error leads the system to take far more rebalancing trips (the distance covered on each trip was similar); a quick analysis of historical weather data suggests that the 2016–2017 winter was both considerably warmer and less snowy than previous years; this is the most plausible cause for the difference between the actual demand patterns and the estimates, which relied on data from previous years.

**Critical stations and consequences for system planning**. Figure 13 shows a map of the optimized stations, color-coded based on their failure rate. Green stations have a lower than average failure rate, while the orange ones have an extremely high failure rate. The only red station is the one with the highest failure rate, almost four times the average. The map clearly shows two clusters of congested stations in the Midtown and East Village neighborhoods; although the map was based on the results of the dynamic algorithm with $\beta =0.04$, the same pattern can be seen across all the considered schemes.

## 6. Conclusions

## Author Contributions

## Conflicts of Interest

## References

- Zanella, A.; Bui, N.; Castellani, A.; Vangelista, L.; Zorzi, M. Internet of Things for smart cities. IEEE Int. Things J.
**2014**, 1, 22–32. [Google Scholar] [CrossRef] - Shaheen, S.; Guzman, S.; Zhang, H. Bikesharing in Europe, the Americas, and Asia: Past, present, and future. Transp. Res. Record J. Transp. Res. Board
**2010**, 2143, 159–167. [Google Scholar] [CrossRef] - Midgley, P. The role of smart bike-sharing systems in urban mobility. Journeys
**2009**, 2, 23–31. [Google Scholar] - Kaspi, M.; Raviv, T.; Tzur, M. Detection of unusable bicycles in bike-sharing systems. Omega
**2016**, 65, 10–16. [Google Scholar] [CrossRef] - Ahillen, M.; Mateo-Babiano, D.; Corcoran, J. Dynamics of bike sharing in Washington, DC and Brisbane, Australia: Implications for policy and planning. Int. J. Sustain. Transp.
**2016**, 10, 441–454. [Google Scholar] [CrossRef] - Jiménez, P.; Nogal, M.; Caulfield, B.; Pilla, F. Perceptually important points of mobility patterns to characterise bike sharing systems: The Dublin case. J. Transp. Geogr.
**2016**, 54, 228–239. [Google Scholar] [CrossRef] - Bao, J.; He, T.; Ruan, S.; Li, Y.; Zheng, Y. Planning Bike Lanes based on Sharing-Bikes’ Trajectories. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, 13–17 August 2017; pp. 1377–1386. [Google Scholar]
- O’Mahony, E.; Shmoys, D.B. Data Analysis and Optimization for (Citi) Bike Sharing. In Proceedings of the 29th AAAI Conference on Artificial Intelligence, Austin, TX, USA, 25–30 January 2015; pp. 687–694. [Google Scholar]
- Chiariotti, F.; Pielli, C.; Cenedese, A.; Zanella, A.; Zorzi, M. Bike Sharing as a Key Smart City Service. In Proceedings of the International Conference on Modern Circuits and System Technologies (MOCAST), Thessaloniki, Greece, 7–9 May 2018. [Google Scholar]
- Laporte, G.; Meunier, F.; Calvo, R.W. Shared mobility systems. Q. J. Oper. Res. (4OR)
**2015**, 13, 341–360. [Google Scholar] [CrossRef] - DeMaio, P. Bike-sharing: History, impacts, models of provision, and future. J. Public Transp.
**2009**, 12, 41–56. [Google Scholar] [CrossRef] - Fishman, E.; Washington, S.; Haworth, N. Bike share’s impact on car use: Evidence from the United States, Great Britain, and Australia. Transp. Res. Part D
**2014**, 31, 13–20. [Google Scholar] [CrossRef] - Rojas-Rueda, D.; de Nazelle, A.; Tainio, M.; Nieuwenhuijsen, M.J. The health risks and benefits of cycling in urban environments compared with car use: Health impact assessment study. Br. Med. J.
**2011**, 343, d4521. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Cohen, A.; Shaheen, S. Planning for Shared Mobility; American Planning Association: Chicago, IL, USA, 2016. [Google Scholar]
- Townsend, A.M. Smart Cities: Big Data, Civic Hackers, and the Quest for a New Utopia; WW Norton & Company: New York, NY, USA, 2013. [Google Scholar]
- Benevolo, C.; Dameri, R.P.; D’Auria, B. Smart mobility in smart city. In Empowering Organizations; Springer: Berlin, Germany, 2016; pp. 13–28. [Google Scholar]
- Chiariotti, F.; Condoluci, M.; Mahmoodi, T.; Zanella, A. SymbioCity: Smart cities for smarter networks. Trans. Emerg. Telecommun. Technol.
**2018**, 29, e3206. [Google Scholar] [CrossRef] - Jäppinen, S.; Toivonen, T.; Salonen, M. Modelling the potential effect of shared bicycles on public transport travel times in Greater Helsinki: An open data approach. Appl. Geogr.
**2013**, 43, 13–24. [Google Scholar] [CrossRef] - Martin, E.W.; Shaheen, S.A. Evaluating public transit modal shift dynamics in response to bikesharing: A tale of two US cities. J. Transp. Geogr.
**2014**, 41, 315–324. [Google Scholar] [CrossRef] - Boshoff, D.G. Sustainable Transport Calls for Sustainable Infrastructure. In QUAESTI-Virtual Multidisciplinary Conference; EDIS-Publishing Institution of the University of Zilina: Zilina, Slovakia, 2016; Volume 1, pp. 153–159. [Google Scholar]
- Faghih-Imani, A.; Eluru, N.; El-Geneidy, A.M.; Rabbat, M.; Haq, U. How land-use and urban form impact bicycle flows: Evidence from the bicycle-sharing system (BIXI) in Montreal. J. Transp. Geogr.
**2014**, 41, 306–314. [Google Scholar] [CrossRef] - Buck, D.; Buehler, R. Bike lanes and other determinants of Capital bikeshare trips. In Proceedings of the 91st Transportation research board annual meeting, Washington, DC, USA, 22–26 January 2012; Volume 12, pp. 3539–3550. [Google Scholar]
- Mateo-Babiano, I.; Bean, R.; Corcoran, J.; Pojani, D. How does our natural and built environment affect the use of bicycle sharing? Transp. Res. Part A
**2016**, 94, 295–307. [Google Scholar] [CrossRef] - Kumar, A.; Teo, K.M. A Systems Perspective to Commuter Cycling in Urban Mobility. In INCOSE International Symposium; Wiley Online Library: Hoboken, NJ, USA, 2013; Volume 23, pp. 1282–1294. [Google Scholar]
- Johnson, B.J.; White, S.S. Promoting sustainability through transportation infrastructure? Innovation and inertia in the Kansas City metropolitan area. J. Urban Plan. Dev.
**2010**, 136, 303–313. [Google Scholar] [CrossRef] - Delucchi, M.; Kurani, K.S. How to have sustainable transportation without making people drive less or give up suburban living. J. Urban Plan. Dev.
**2013**, 140, 04014008. [Google Scholar] [CrossRef] - Schuijbroek, J.; Hampshire, R.C.; Van Hoeve, W.J. Inventory rebalancing and vehicle routing in bike sharing systems. Eur. J. Oper. Res.
**2017**, 257, 992–1004. [Google Scholar] [CrossRef] - Morse, P.M. Queues, Inventories and Maintenance: The Analysis of Operational Systems with Variable Demand and Supply; Courier Corporation: North Chelmsford, MA, USA, 2004. [Google Scholar]
- Caggiani, L.; Ottomanelli, M. A dynamic simulation based model for optimal fleet repositioning in bike-sharing systems. Procedia-Soc. Behav. Sci.
**2013**, 87, 203–210. [Google Scholar] [CrossRef] - Vogel, P.; Greiser, T.; Mattfeld, D.C. Understanding bike-sharing systems using data mining: Exploring activity patterns. Procedia-Soc. Behav. Sci.
**2011**, 20, 514–523. [Google Scholar] [CrossRef] - Faghih-Imani, A.; Eluru, N. Incorporating the impact of spatio-temporal interactions on bicycle sharing system demand: A case study of New York CitiBike system. J. Transp. Geogr.
**2016**, 54, 218–227. [Google Scholar] [CrossRef] - Fricker, C.; Gast, N. Incentives and redistribution in homogeneous bike-sharing systems with stations of finite capacity. EURO J. Transp. Logist.
**2016**, 5, 261–291. [Google Scholar] [CrossRef] [Green Version] - Waserhole, A.; Jost, V. Pricing in vehicle sharing systems: Optimization in queuing networks with product forms. EURO J. Transp. Logist.
**2016**, 5, 293–320. [Google Scholar] [CrossRef] - Chemla, D.; Meunier, F.; Calvo, R.W. Bike sharing systems: Solving the static rebalancing problem. Discret. Optim.
**2013**, 10, 120–146. [Google Scholar] [CrossRef] [Green Version] - Ho, S.C.; Szeto, W. Solving a static repositioning problem in bike-sharing systems using iterated tabu search. Transp. Res. Part E
**2014**, 69, 180–198. [Google Scholar] [CrossRef] [Green Version] - Raviv, T.; Tzur, M.; Forma, I.A. Static repositioning in a bike-sharing system: Models and solution approaches. EURO J. Transp. Logist.
**2013**, 2, 187–229. [Google Scholar] [CrossRef] - Di Gaspero, L.; Rendl, A.; Urli, T. Balancing bike sharing systems with constraint programming. Constraints
**2016**, 21, 318–348. [Google Scholar] [CrossRef] - Forma, I.A.; Raviv, T.; Tzur, M. A 3-step math heuristic for the static repositioning problem in bike-sharing systems. Transp. Res. Part B
**2015**, 71, 230–247. [Google Scholar] [CrossRef] - Dell’Amico, M.; Iori, M.; Novellani, S.; Stützle, T. A destroy and repair algorithm for the bike sharing rebalancing problem. Comput. Oper. Res.
**2016**, 71, 149–162. [Google Scholar] [CrossRef] - Dell’Amico, M.; Hadjicostantinou, E.; Iori, M.; Novellani, S. The bike sharing rebalancing problem: Mathematical formulations and benchmark instances. Omega
**2014**, 45, 7–19. [Google Scholar] [CrossRef] - Contardo, C.; Morency, C.; Rousseau, L.M. Balancing a Dynamic Public Bike-Sharing System; CIRRELT: Montreal, QC, Canada, 2012; Volume 4. [Google Scholar]
- Dantzig, G.B.; Wolfe, P. Decomposition principle for linear programs. Oper. Res.
**1960**, 8, 101–111. [Google Scholar] [CrossRef] - Benders, J.F. Partitioning procedures for solving mixed-variables programming problems. Numer. Math.
**1962**, 4, 238–252. [Google Scholar] [CrossRef] - Erdoğan, G.; Battarra, M.; Calvo, R.W. An exact algorithm for the static rebalancing problem arising in bicycle sharing systems. Eur. J. Oper. Res.
**2015**, 245, 667–679. [Google Scholar] [CrossRef] [Green Version] - Kloimüllner, C.; Papazek, P.; Hu, B.; Raidl, G.R. Balancing bicycle sharing systems: An approach for the dynamic case. In Proceedings of the European Conference on Evolutionary Computation in Combinatorial Optimization, Granada, Spain, 23–25 April 2014; pp. 73–84. [Google Scholar]
- Lu, C.C. Robust multi-period fleet allocation models for bike-sharing systems. Netw. Spat. Econ.
**2016**, 16, 61–82. [Google Scholar] [CrossRef] - Brinkmann, J.; Ulmer, M.W.; Mattfeld, D.C. Short-term strategies for stochastic inventory routing in bike sharing systems. Transp. Res. Procedia
**2015**, 10, 364–373. [Google Scholar] [CrossRef] - Espegren, H.M.; Kristianslund, J.; Andersson, H.; Fagerholt, K. The Static Bicycle Repositioning Problem-Literature Survey and New Formulation. In Proceedings of the International Conference on Computational Logistics, Lisbon, Portugal, 7–9 September 2016; pp. 337–351. [Google Scholar]
- Fischer, W.; Meier-Hellstern, K. The Markov-modulated Poisson process (MMPP) cookbook. Perform. Eval.
**1993**, 18, 149–171. [Google Scholar] [CrossRef] - Krinik, A.; Mortensen, C. Transient probability functions of finite birth-death processes with catastrophes. J. Stat. Plan. Inference
**2007**, 137, 1530–1543. [Google Scholar] [CrossRef] - Crawford, F.W.; Suchard, M.A. Transition probabilities for general birth-death processes with applications in ecology, genetics, and evolution. J. Math. Biol.
**2012**, 65, 553–580. [Google Scholar] [CrossRef] [PubMed] - Skellam, J.G. The frequency distribution of the difference between two Poisson variates belonging to different populations. J. R. Stat. Soc. Ser. A
**1946**, 109, 296. [Google Scholar] [CrossRef] [PubMed] - Abramowitz, M.; Stegun, I.A. Handbook of Mathematical Functions; Applied Mathematics Series; U.S. Government Printing Office: Washington, DC, USA, 1966; Volume 55.
- Laporte, G. The vehicle routing problem: An overview of exact and approximate algorithms. Eur. J. Oper. Res.
**1992**, 59, 345–358. [Google Scholar] [CrossRef] - Bellmore, M.; Nemhauser, G.L. The traveling salesman problem: A survey. Oper. Res.
**1968**, 16, 538–558. [Google Scholar] [CrossRef]

**Figure 1.**Map of the bike-sharing stations: red points identify the stations considered in our study.

**Figure 2.**Traffic patterns for the month of July 2015 at station 537 (Lexington Ave. and East 24th St.)

**Figure 8.**Average fraction of time in a failure state (completely empty or full station) for different values of $\alpha $ and $\beta $.

**Figure 9.**Average daily distance covered by rebalancing trucks for different values of $\alpha $ and $\beta $.

**Figure 11.**Average number of rebalancing trips per day with perfect and imperfect demand information, plotted over 12 months.

**Figure 12.**Average fraction of time in a failure state with perfect and imperfect demand information, plotted over 12 months.

**Figure 13.**Map of the bike-sharing stations, color-coded from green (zero failure rate) to red (maximum failure rate).

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Chiariotti, F.; Pielli, C.; Zanella, A.; Zorzi, M.
A Dynamic Approach to Rebalancing Bike-Sharing Systems. *Sensors* **2018**, *18*, 512.
https://doi.org/10.3390/s18020512

**AMA Style**

Chiariotti F, Pielli C, Zanella A, Zorzi M.
A Dynamic Approach to Rebalancing Bike-Sharing Systems. *Sensors*. 2018; 18(2):512.
https://doi.org/10.3390/s18020512

**Chicago/Turabian Style**

Chiariotti, Federico, Chiara Pielli, Andrea Zanella, and Michele Zorzi.
2018. "A Dynamic Approach to Rebalancing Bike-Sharing Systems" *Sensors* 18, no. 2: 512.
https://doi.org/10.3390/s18020512