user
Ignacio Sevillano Muñoz
AI Researcher and Python Developer, Atos

Bicycle-sharing is a convenient and environmentally-friendly mode of transportation, but users face one common challenge: the availability of bicycles at their desired station. In this post, we will not only introduce our new service but also delve into the theory behind it.

bike sharing

In our bike availability forecast service, we typically focus on predicting the number of available bikes at a station. However, one potential enhancement to the service would be to incorporate data on the arrival and departure rates of bikes at a station. This would provide even more detailed insights into the dynamics of bike usage and could lead to even more accurate predictions of bike availability.

Our model considers bike stations are waiting queues, where bikes are the "people" waiting, to be attended. Just like in a queue, the number of available bicycles at a station can fluctuate based on factors such as time of day and events happening in the area. This is where our bike availability forecast service comes into play.

This approach is related to Poisson distributions, a statistical concept commonly used in queue management systems. Poisson distributions can be used to model the probability of a certain number of events occurring within a given time period. In our case, the events are the arrival and departure of bikes at a station and the period is the 15-minute time slot. By modeling the arrival and departure rates of bikes at a station using Poisson distributions, we can make more accurate predictions about bike availability.

To predict these rates, we use XGBoost models including factors such as weather conditions, events happening in the city, and the time of day. This approach is based on the idea that the usage of bikes throughout the day is not independent, but rather follows certain patterns. For example, is also useful to consider the morning rates as a predictor of the afternoon rates.

Once we have predicted the arrival and departure rates of bikes at a station, we can use this information to recover the bike availability at any given time. To do this, we first need to know the availability of bikes at a specific time, such as the availability in the morning.

 

Given the availability in the morning, we can calculate the bike availability at any other time by considering the predicted arrival and departure rates for that time. The calculation is based on the following equation:

Availability(t) = Availability(t-1) + Arrival Rate(t) - Departure Rate(t)

where:

  • Availability(t) is the availability of bikes at time t.
  • Arrival Rate(t) is the predicted arrival rate of bikes at time t.
  • Departure Rate(t) is the predicted departure rate of bikes at time t.

By applying this equation for each time slot, we can calculate the bike availability for the entire day. Using a sophisticated version of that equation, we can use this information to recover the bike availability at any given time

In conclusion, our bike availability forecast service utilizes advanced machine-learning algorithms and time-series forecasting techniques to predict the arrival and departure rates of bikes at a station. This information allows users to plan their bicycle trips with greater confidence, knowing that the bikes they need will be available when and where they need them. It also helps to promote sustainable transportation and aids in the efficient management of bike-sharing systems by providing insights into high-demand areas and potential areas for expansion.