J.P. Larocque (jp_larocque) wrote,
J.P. Larocque
jp_larocque

  • Mood:
  • Music:

Public transit trip planning

So. I believe an update is in order.

On my own time, I've been writing a trip-planner for the bus system in Spokane. What this means is, you plug in a starting point, an ending point, and either what time you're leaving, or what time you want to be there by. The trip-planner tells you how to get to the nearest stop, which buses to take, which transfers to make.

The trip-planner is also smart enough to tell you if it would be faster to get off bus X, walk a few blocks, and catch bus Y. The trip-planner plans the most optimal trip. The trip-planner is infallible.

I'm writing this in Common Lisp. Represent.

The street data comes from the City of Spokane. The bus scheduling and path information came from a contact at the Spokane Transit Authority. Dijkstra's algorithm, while accounting for the time-of-day to get to any known vertex, is used to find the shortest route. When I enter the proper optimization phase, I'll consider A*.

The bus route data is very labor-intensive to import. It'll be at least a few days before I can get all the routes in. Therefore, and also because the trip-planner may go down at any moment, display crazy incorrect data, and slow down my workstation immensely (10-60 seconds per query!), it is not yet public. Here's a screen-shot and a static copy of one particular trip, though:

The STA says they'll have their own trip-planner opened up Real Soon Now. I hope to beat them to it.

Tags: lisp, trip planner
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments