Trip planer needs a home

2 views
Skip to first unread message

Logi Vidarsson

unread,
Feb 16, 2007, 7:06:25 PM2/16/07
to Toronto Transit Camp
Hi All

Ive coded up a trip planer for the TTC network (yes, includes busses,
streetcars and the subway). Some assumptions were made along the way,
but it is a good starting point.

At the moment it does searches in about a second or two, given any two
station pairs (or for busses/streetcars major intersections) it
returns the "quickest route" between the two points.

It needs a home on the net somewhere, preferably at a place thats ok
with CGI-scripts and a c++ shell program running in the background?
Any suggestions for inexpensive web-hosts?

Best

Logi

Rick Innis

unread,
Feb 16, 2007, 9:52:53 PM2/16/07
to torontotr...@googlegroups.com
Ive coded up a trip planer for the TTC network (yes, includes busses,
streetcars and the subway). Some assumptions were made along the way,
but it is a good starting point.

Cool. 

It needs a home on the net somewhere, preferably at a place thats ok
with CGI-scripts and a c++ shell program running in the background?
Any suggestions for inexpensive web-hosts?

When you say "In the background" do you mean as a daemon? I doiubt there's many hosters who will allow that. If the C++ bit can run as a CGI program, then I'm happy to host it on my happy dreamhost all you can eat hosting plan.

R.


Logi Vidarsson

unread,
Feb 17, 2007, 10:07:02 AM2/17/07
to Toronto Transit Camp
Hi Rick

Yes, the c++ part runs as a demon in the background. The reason is
that reading and parsing in the schedule information is very time
consuming (20-30 s), so without the demon bit, it is very difficult
to keep the run time down on each request. Im looking into memory
dump options, but at best that would be a cgi-script runing a c++
program, would you be more willing to host something like that?

Best

Logi

Kieran Huggins

unread,
Feb 17, 2007, 1:16:22 PM2/17/07
to Toronto Transit Camp
Hi Logi,

I'm sure we could find a home for you within our project somewhere
(openTTC.ca)

I'll send you some more details off-list.

Cheers,
Kieran

Joe Hughes

unread,
Feb 20, 2007, 10:44:28 AM2/20/07
to Toronto Transit Camp, wi...@onnyturf.com
Hi Logi,

Is this trip planning code something that you'd consider open-sourcing
and/or allow to be adapted for other cities?

Joe

Rick Innis

unread,
Feb 20, 2007, 12:13:33 PM2/20/07
to torontotr...@googlegroups.com

On 17-Feb-07, at 10:07 AM, Logi Vidarsson wrote:

> Yes, the c++ part runs as a demon in the background. The reason is
> that reading and parsing in the schedule information is very time
> consuming (20-30 s), so without the demon bit, it is very difficult
> to keep the run time down on each request. Im looking into memory
> dump options, but at best that would be a cgi-script runing a c++
> program, would you be more willing to host something like that?

Running a C++ program as a CGI wouldn't be a problem.

Are you storing the schedule info as textfiles and parsing them each
time you need them? There are probably some ways to optimize that.

R.

Scott Tadman

unread,
Feb 21, 2007, 6:24:39 PM2/21/07
to torontotr...@googlegroups.com
I'm also curious if the data used for the calculations would be made
available under the same kind of policy.

On Feb 20, 2007, at 10:44 AM, Joe Hughes wrote:

> Is this trip planning code something that you'd consider open-sourcing
> and/or allow to be adapted for other cities?
>

Kieran Huggins

unread,
Feb 22, 2007, 11:43:55 AM2/22/07
to Toronto Transit Camp
We've met with Logi and found his trip planner a temporary home, with
plans for a more permanent location.

The data we're all compiling (which he's now using as a source) will
be made available for download, as well as through an API in the near
future.

The data still needs some "grooming" and the API code isn't finished
yet. You can follow our progress (and join us!) at http;//
forums.openttc.ca

Logi Vidarsson

unread,
Feb 24, 2007, 11:14:51 AM2/24/07
to Toronto Transit Camp
At the moment the ttc-schedules are parsed into text files that
summarize each trip, Id be more than happy to share that info,

When the daemon is started it reads in all these route files and
constructs a graph,

the daemon then takes a nap until a route is requested from the cgi-
script

Check it out, its up temporarily on gabes server at:

http://red.pwd.ca/tripplanner/

Best

Logi

Joe S.

unread,
Feb 26, 2007, 12:19:50 PM2/26/07
to Toronto Transit Camp
I just want to say this is pretty cool. It really makes me salivate at
the possibilities.

I'm sure you've already noticed this, but I found that putting my work
commute in for a quick test, I did notice one curious kink -- I've
discovered that it you tell it you want to go to, say, "Finch &
McCowan", you'll get different directions than if you say you want to
go to "McCowan & Finch".

Overall, though, this is a great start.

Joe.

> > >> but it is a good starting point.- Hide quoted text -
>
> - Show quoted text -

Joe S.

unread,
Feb 26, 2007, 2:19:47 PM2/26/07
to Toronto Transit Camp
On further reflection, regardless of how much better this gets, you
should keep a version like this and pitch it as "TTC dérive"... how to
get where you're going in an unusual/random/erratic way... some of the
routes it's given me would make for interesting journies that I'd've
never thought of.


Joe.

> > - Show quoted text -- Hide quoted text -

Logi Vidarsson

unread,
Mar 30, 2007, 12:23:41 PM3/30/07
to Toronto Transit Camp
Thanks Joe, and sorry for not spotting your post sooner

I have updated the TTC trip planner quite a bit since then, Ive added
in a search capability for addresses, where the system will find the 4
closest stations to an adress (thanks a bunch google maps;), Id
appreicate it if more people could give it a try as Im sure that there
are still some bugs in it left to find...

Best

Logi

Reply all
Reply to author
Forward
0 new messages