Inspiration
At rush hour, bikeshare stations near dorms run empty while campus stations fill up, and rebalancing vans are often dispatched on a hunch. We wanted the van to go where the data says, using statistical process control. We built and tested it on simulated Ithaca networks.
What it does
Bikeshare Dispatch checks every station at every reading (every 10–15 minutes) and helps the dispatcher decide:
- Right now: which stations need the van and how many bikes to move. Empty or full now or within the hour = HIGH priority; outside 20–80% of the docks or a control-chart signal = MEDIUM.
- Every night: each station's 6 AM starting level. From week 1's morning flow, the station riders leave most starts at 80% full and the one they arrive at most at 20%.
- SPC charts: each station's I-MR control chart with the eight tests, so a dispatcher can tell an ordinary rush from a real problem (an event, a crowd, a broken dock).
The home page has four tabs on one clock: About, Map and dispatch (a 3D map with a rush-hour time bar), Redistribution and SPC charts.
How we built it
- Statistics (Python): the chart point is each station's rider net flow minus the usual flow for that time slot, so the normal rush is never a false alarm. I-MR limits: sigma = average moving range / 1.128, limits = centre ± 3 sigma, learned from the last 7 clean days (readings beyond 3 sigma removed, then recomputed). The van judges its rules against week 1's fixed limits.
- Data: our own simulator of three Ithaca networks (Poisson rentals by station and time of day). It has a van-free baseline week, a policy week, and an event day with a planted slow drain and crowd, so we know the right answer.
- App: a FastAPI back end, and a React + MapLibre/three.js 3D map with Plotly charts. The statistics are tested Python functions with known-answer tests.
Challenges we ran into
- Merging four teammates' branches with two different rule sets (Western Electric rules 1–4 for the van, the course's eight tests on the charts).
- Small bike counts that depend on the previous reading make the chart flag 6–9% of normal readings, so we teach "one flag means look, repeated flags mean act".
- Defining rush hour from data: slots where riders move at least 1.5× the day's average number of bikes, learned from week 1.
Accomplishments that we're proud of
- Out-of-range readings fell by about three quarters: 607 to 165 in Collegetown and 838 to 213 downtown.
- In Collegetown, the chart caught both planted problems inside their windows (slow drain at 11:15, crowd at 18:15).
What we learned
Charting the deviation from the usual pattern, not raw counts, is what makes SPC work for something with a built-in daily rhythm. We also learned that honest validation matters: our overnight rule helps commuter cities but made the leisure-heavy waterfront worse (186 to 238).
What's next for Battery Ninjas
Fit the overnight rule to each city's demand, have the van act on all eight tests, plug in real GBFS station feeds, and host the tool publicly instead of running it locally.
Log in or sign up for Devpost to join the conversation.