Round the network trip
How long would it take?
Jonathan Street
About me
- Volunteered to give a talk on Capital Bikeshare
- Never used Capital Bikeshare
Capital Bikeshare
- 441 stations
- 3k+ bikes
- 11k trips/day
How big is it?
What does big even mean?
How long would it take to visit every station?
What do we need?
- Location of each station
- Distance between each station
- Optimization to find shortest route
Station locations
System data is downloadable
Live station feed has location, # bikes, etc in xml
Distance between stations
- As the crow flies . . . easy
- As the cyclist cycles . . . hard
Distances needed
Distances asymmetrical so need every combination
441 * 441 = 194481
Google is out . . . too slow/expensive
Open data and open source software
Fortunately there are options for both data and software to create our own solution
Open source software
- All data stored in a postgresql database
however . . .
Open source software
- Own data format
- C API and HTTP REST API
- Fast
- Found every station
OSRM
Includes distance matrix option
Also includes solver for shortest trip
- 264.6 miles (425.9 kilometres)
- 32 hours, 10 minutes
Next steps?
- Divide into multiple trips and optimize
- Minimize station-to-station durations over 30 minutes
- Custom map styles