Re: simple london underground query system



On Tue, 08 Aug 2006 18:02:33 +0200, sheddy <andysheard@xxxxxxxxxxxxxx> wrote:

Hello everyone,

I'm trying to teach myself prolog by attempting to program a system
that stores information about stations on one london underground line
and allows the user to ask simple questions. For example, how many
stops from station x to station y? How long will it take to get to
station x from station y? Which stations allow me to connect to line x?
and which one is closest?

The information i need to store is the station name (obviously), the
time it takes to travel between one station and the next (e.g. 3 mins)
and the names of the lines that the station interchanges with (e.g.
circle or northern). Some stations can interchange with more than one
line but then some don't interchange with any.

How would i go about this? I did some very basic prolog during a-level
computing and that was a few years ago now.

Any pointers would be greatly appreciated!

Represent the network with a series of facts like:

connection(FromStation,ToStation,TimeNeeded).
....

station(StationName,Line,And,All,The,Other,Data,You,May,Need).
....

Then the queries you want to do are simple graph algorithms
that you can find in any graph algorithm or operation research
book (and some prolog manuals too).

Cheers
P.


--
Anything below this line is being added by the newsserver
.



Relevant Pages

  • simple london underground query system
    ... I'm trying to teach myself prolog by attempting to program a system ... that stores information about stations on one london underground line ... stops from station x to station y? ... Some stations can interchange with more than one ...
    (comp.lang.prolog)
  • Re: simple london underground query system
    ... I'm trying to teach myself prolog by attempting to program a system ... stops from station x to station y? ... The information i need to store is the station name, ... numbers instead of the atomic names in the segment clauses. ...
    (comp.lang.prolog)
  • any kind souls who know haskell?
    ... that stores information about stations on one london underground line ... stops from station x to station y? ... The information i need to store is the station name, ... Some stations can interchange with more than one ...
    (comp.lang.functional)
  • Re: simple london underground query system
    ... I'm trying to teach myself prolog by attempting to program a system ... that stores information about stations on one london underground line ... stops from station x to station y? ...
    (comp.lang.prolog)
  • Re: Routes in london crossing without any interchange
    ... Both cross each other ... > walk at any nearest station to get from one line to the other. ... It depends on what you count as in interchange. ... Wharf LU and Canary Wharf DLR are shown as an interchange, ...
    (uk.railway)