Article View: comp.lang.prolog
Article #808Re: London Underground central area map in Prolog (LONG: 137 lines)
From: Paul D. Crowley
Date: Sun, 06 May 1990 14:51
Date: Sun, 06 May 1990 14:51
47 lines
2296 bytes
2296 bytes
ok@goanna.cs.rmit.OZ.AU (Richard A. O'Keefe) sez in <3155@goanna.cs.rmit.OZ.AU>
>In article <2371@skye.ed.ac.uk>, ken@aiai.ed.ac.uk (Ken Johnson) writes:
[Ken writes about a Prolog database detailing the structure of the
London Underground]
[Richard points out faults]
>It seems to me that a better structure for this data base would be
[map info]
> line(FromStation, ToStation, LineName)
> -- you can get from FromStation to ToStation in one step
> -- by travelling along the line called LineName
Probs: one part of the Central Line looks like this:
South Woodford
----- *-----*--...
Leytonstone / Snaresbrook
...--*-----*---------<
Leyton \ Wanstead
----*-----*--...
Redbridge
In the database this looks like:
line(leyton,leytonstone,central).
line(leytonstone,snaresbrook,central).
line(leytonstone,wanstead,central).
line(snaresbrook,south_woodford,central).
line(wanstead,redbridge,central).
However if you want to get from Wanstead to Snaresbrook you have to
change at Leytonstone.
Or look at Epping, where there's a capacitor-like symbol. Or Monument
and Bank, which are connected by escalator.
The Underground has quite a few special cases waiting to foul up such a
program.
Such a program will need a concept of "Epping trains" and "Hainault via
Newbury Park trains" and "Peak Hours only" and "Westbound" in order to
be really useful.
(A few thoughts from a Londoner who lives in South Woodford and so has
to think about these things.)
--
\/ o\ Paul Crowley aipdc@uk.ac.ed.castle :-| Have a day
/\__/ "The whole is the sum of its parts, plus one or more bugs" aimsm@castle
Technical Details
Message-ID:
<3822@castle.ed.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!mcsun!ukc!edcastle!aipdcReferences:
<2371@skye.ed.ac.uk> <3155@goanna.cs.rmit.OZ.AU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!mcsun!ukc!edcastle!aipdc From: aipdc@castle.ed.ac.uk (Paul D. Crowley) Newsgroups: comp.lang.prolog Subject: Re: London Underground central area map in Prolog (LONG: 137 lines) Message-ID: <3822@castle.ed.ac.uk> Date: 6 May 90 14:51:00 GMT References: <2371@skye.ed.ac.uk> <3155@goanna.cs.rmit.OZ.AU> Reply-To: aipdc@castle.ed.ac.uk (Paul D. Crowley) Organization: Edinburgh University Computing Service Lines: 47