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
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.
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?
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
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
Is this trip planning code something that you'd consider open-sourcing
and/or allow to be adapted for other cities?
Joe
> 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.
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?
>
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
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
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.
> > - Show quoted text -- Hide quoted text -
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