• Our booking engine at tickets.railforums.co.uk (powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Strange goings on in Avantix NFM databases?

Status
Not open for further replies.

Death

Established Member
Joined
23 Oct 2006
Messages
1,639
Location
Sat at the control desk of 370666...
Hail all! <D
As some of ye might already know, I'm something of a White-Hat by nature (A Hacker who uses his skills for explorative and law-abiding purposes) and recently I've been having a poke around in the databases supplied with the Avantix NFM CD-ROM (Download) as one of my minor projects has been investigating the possibility of producing a Java version for mobile phones and other Java-enabled portable devices. :)

Anyhow...As the format of the NFM databases isn't one that I'm familiar with (I would imagine it's an Atos Origin proprietry format) I've been having to explore and figure out the databases by hand using hex editors and Windows Notepad.
Whilst doing so, I've come across some rather interesting data inside one of the databases supplied with the application ([AvantixRoot]\server\bobj\lu\data\refdata.dat) - Namely entries for stations right across Europe, assorted bits of NFM restrictions and other blurb (Some of which could be unpublished), one or two "hidden" stations and other rather interesting data! :shock:

I havn't quite figured out the proper format and layout of the database yet, but I've dumped a few samples of some of the data that I've found within (Edits made and carriage returns added for readability) at the end of this post, and anyone else of a technical bent might be able to dig up more interesting stuff than I've found so far. 8)

I havn't had the time to explore the main FAREDATA.DAT database yet (It's a 65Mb file!) but I have a feeling that the stations in REFDATA.DAT reference fare entries (Or offsets in a fare table) in the main database. There might also be more interesting data located in that and MEMDATA.DAT as well, if anyone has the time to look! :)

Either way though, I'd be very interested to know why a lot of those international stations are in there. After all, one cannot buy a straight-up ticket from UK stations to European destinations (Believe me, I've tried getting FNB > HH-Hbf a number of times!) and none of them seem to be available/recognised in Avantix either! :shock:

Finally: If anyone knows where I can find a full reference/description of the database format being used in Avantix, please could they point me to it? It'll speed up my work on figuring out the NFM a fair old bit! :)

Farewell, thanks, and have a lot of phun! <D
>> Death <<
-------------------------------------------------------------------------------
Example station entries (UK):
Code:
70 559500L0270 5596002008060920051108QUEENSTOWN ROAD (BATTERSEA)   QUEENSTOWN ROAD QRB     
70 107200L0270 5597002008061020080610VAUXHALL                      VAUXHALL        VXH     
70 107200L0270 5598009999999920080612LONDON WATERLOO               LONDON WATERLOO WAT     
70 108600L0270 9666009999999920010101LONDON NECROPOLIS             LONDON NECROPLISNEC     
70 559900L0270 5599002008061020080610MALDEN MANOR                  MALDEN MANOR    MAL     
70 560000L0270 5600002008061020080610MORTLAKE                      MORTLAKE        MTL     
70 560100L0270 5601009999999920080612NORTH SHEEN                   NORTH SHEEN     NSH
Example station entries (European):
Code:
80 000900L0280 0049109999999920030813BASEL BAD BF                  BASEL BAD BF    BBBDEBBO
80       L0280 0107109999999920030813HAMBURG HBF                   HAMBURG HBF     HMGDEBEB
80       L0280 0130109999999919940529                              DRESDEN-NEUSTADT301     
80 013010L0280 0130509999999919910101                              DRESDEN HBF     DRE     
80 013050L0280 0131109999999919940529                              BAD SCHANDAU    311     
80 013110L0280 0137109999999919940529                              COSWIG/DRESD    371     
80 013750L0280 0137709999999919940529                              GROSSENH BBF    377
Example NFM text strings:
Code:
15R9M         20080906000120050612          SV SAVER            
15R9M         20080906000220050612                              
15R9M         20080906000320050612Ticket Code:               SVS
15R9M         20080906000420050612Ticket Class:         STANDARD
15R9M         20080906000520050612Ticket Name:             SAVER
15R9M         20080906000620050612Single/Return:          SINGLE
15R9M         20080906000720050612Out Validity:-                
15R9M         20080906000820050612Day -           DATE ON TICKET
15R9M         20080906000920050612Time -               SEE BELOW
15R9M         20080906001020050612Break of Journey:           NO
15R9M         20080906001120050612Pre-Booking Requirement:  NONE
15R9M         20080906001220050612Reservations Compulsory:    NO
15R9M         20080906001320050612Child Discount:            YES
15R9M         20080906001420050612Railcard Discount:         YES
15R9M         20080906001520050612Group Discount:            YES
15R9M         20080906001620050612Refunds:  RETAIL MANUAL PART 1
15R9M         20080906001720050612Out Travel:  AVAILABLE ANY DAY
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

A60K

Member
Joined
26 Jun 2008
Messages
1,030
Location
Kilburn
Can't help on the technical side I'm afraid, but on the German/Dutch stations I think their presence is a legacy from previous through fares via Harwich PQ. I suspect these were abolished sometime after E* started operations.

NXEA still do an 'Any Dutch Station' fare from most (all?) of their stations. These should be priced on Avantix, but I don't have it handy to check.

Other than that, I think the only place outside of the British Isles to still have a through fare is Calais - day returns from a variety of Southern Region stations.
 

Death

Established Member
Joined
23 Oct 2006
Messages
1,639
Location
Sat at the control desk of 370666...
Can't help on the technical side I'm afraid, but on the German/Dutch stations I think their presence is a legacy from previous through fares via Harwich PQ. I suspect these were abolished sometime after E* started operations.
Could be, could be...But the stations above are just a sample from the available data that I grabbed on the fly using a text search for Hamburg Hbf. ;)

Looking through the file shows stations from a wide number of countries including France, Spain, Czechoslovakia and Poland. The latter two being interesting as IIRC they joined the EU after NFM 98 was published - And I think the same data is in the corresponding file for NFM 95 as well, although I've only had a very quick skim of the '95 database so far. :shock:

NXEA still do an 'Any Dutch Station' fare from most (all?) of their stations. These should be priced on Avantix, but I don't have it handy to check. Other than that, I think the only place outside of the British Isles to still have a through fare is Calais - day returns from a variety of Southern Region stations.
Cheers for letting me know about that one mate...I hadn't spotted that yet! 8)
Here's a few other interesting "any station" ones that I just spotted in NFM 95 (I still havn't upgraded at home yet! :roll:) and their numeric codes:
  • 0475 - Any BR Station
  • H443 - Any Dutch Station
  • H164 - Any One Station
  • I444 - Any Southern Train
  • H861 - Any SWT Station
  • I780 - Any Thameslink Station
Although for some reason - Even though I've tried mixing 'n' matching up various journeys with those "Any" tickets - I can't seem to get any of 'em (Except "Any Dutch") to yield a valid fare query! :(

At the risk of going slightly off-topic about those two international fares: Do they both include a suppliment for the ferry travel involved, or must that be bought seperateley? Also, does the "Any Dutch Station" one literally mean any Dutch station and paths to it? :D
If that's the case, then that'll be a much needed alternative to Ryanair for getting to Germany on the cheap - AToC ticket as far as Enschede, then good old Deutsche Bahn the rest of the way! Best of all is that neither charge for using the on-board loos! :lol:

Although I also have to ask...Would Nederlandse Spoorwegen actually accept AToC issued tickets for travel on their services? I know that DBAG issued tickets work on fGW Link services (I bought a BAW-GLD return from HH-Hbf travel centre a while ago, and it worked!) but would it work the other way around? :shock:
 
Last edited:

glynn80

Established Member
Joined
1 Jun 2008
Messages
1,666
At the risk of going slightly off-topic about those two international fares: Do they both include a suppliment for the ferry travel involved, or must that be bought seperateley? Also, does the "Any Dutch Station" one literally mean any Dutch station and paths to it? :D
If that's the case, then that'll be a much needed alternative to Ryanair for getting to Germany on the cheap - AToC ticket as far as Enschede, then good old Deutsche Bahn the rest of the way! Best of all is that neither charge for using the on-board loos! :lol:

Yes it would include the ferry travel as well.

You may also be interested in Eurostar which also offer tickets to Any Dutch stations for a small supplement on top of their Brussels fare (for some tickets it is actually no extra). It literally means any Dutch station but I'm not sure on routeing questions, they don't have a routeing guide in those countries so it most likely any "reasonable" route to your destination.
 

A60K

Member
Joined
26 Jun 2008
Messages
1,030
Location
Kilburn
Agree, any reasonable route will be accepted - I've done some 'creative' travel to Brussels on Belgian Railways using the E* ABS facility without any trouble!

You can of course use E* Any Belgian Station to travel to Germany via Aachen - at Brussels ask for a ticket from Welkenraedt to Aachen to cover the cross-border section which is about €8 return, and, if a weekend, you can get the SWT from Aachen to cover all regional trains in Germany - not quick, but cheap!

I vaguely remember a concept called Euro400 whereby British Rail would issue European TCV tickets to and between the 400 most popular continental destinations - perhaps the stations in the database are related to that? I think London Liverpool Street was one of the last stations to retail these, ceasing around 2004/5.

There's no need for a country to be in the EU to issue TCV tickets, as it's an agreement between the railways themselves. Switzerland for example will issue tickets for ATOC services, along with most other countries' railways. The further east you go the trickier it might get however!
--- old post above --- --- new post below ---
Also meant to say that you shouldn't have any trouble on NS with the ticket not being recognised - they offer the same type of ticket in reverse from Dutch stations :)
 

Sleepy

Established Member
Joined
15 Feb 2009
Messages
1,543
Location
East Anglia
H164 (to J666) is used to print Penalty fare warnings when selling tickets on board by guards on NXEA - this is a Dft requirement on Penalty fare routes.
The any Dutch stations code is for journey via Harwich stena line sailings from any NXEA stations.
 

Ascot

Established Member
Joined
26 Nov 2005
Messages
3,382
Location
Birmingham, UK
Another interesting one is "AMERICAN EXPRESS" as a destination. Guessing for card payments?
 

Death

Established Member
Joined
23 Oct 2006
Messages
1,639
Location
Sat at the control desk of 370666...
You may also be interested in Eurostar which also offer tickets to Any Dutch stations for a small supplement on top of their Brussels fare (for some tickets it is actually no extra). It literally means any Dutch station but I'm not sure on routeing questions, they don't have a routeing guide in those countries so it most likely any "reasonable" route to your destination.
Hmm...Although I admit that I do like Eurostar services quite a lot due to their speed and minor tilting abilities, I normally avoid them because they ask prices that I'm not willing to pay, and they refuse to offer Railcard discounts as well. <(
In this case, the NXEA option seems to be much better value for money...And all I'd be sacrificing for the cost would be a six-hour Channel crossing and slower rolling stock at the British end! 8)

Indeed, the last three Eurostar journeys that I've taken were all booked and paid for at Deutsche Bahn offices, as they were able to offer me a much better price. To be honest, I can't wait for DB to start running ICE through services between St. Pancras and Köln! <D

I vaguely remember a concept called Euro400 whereby British Rail would issue European TCV tickets to and between the 400 most popular continental destinations - perhaps the stations in the database are related to that? I think London Liverpool Street was one of the last stations to retail these, ceasing around 2004/5.
I had noticed that Avantix would only give me a valid fare for "Any Dutch Station" if I put Liverpool St. in as my point of origin. Although I understand that ADS is an NXEC ticket type, I still wonder why I can't get a straight-through lookup from FNB to ADS, given that I can buy a Virgin Value ticket from Farnborough Stns to Manchester and it includes validity for the SWT routes I'd use to reach Euston? :roll::?

There's no need for a country to be in the EU to issue TCV tickets, as it's an agreement between the railways themselves. Switzerland for example will issue tickets for ATOC services, along with most other countries' railways. The further east you go the trickier it might get however!
Ahh...So that would explain why I've been able to buy tickets for my anticipated journeys within the Blackwater Valley from the DB Travelcentre at Hamburg Hauptbahnhof, then! :lol:
What mystifies me though is that DBAG always offer me a better fare than any ATOC company would - Especially as I do not possess a BahnCard at all, but I do possess an NR Railcard! :shock:

H164 (to J666) is used to print Penalty fare warnings when selling tickets on board by guards on NXEA - this is a Dft requirement on Penalty fare routes.
Ah...And there was me trying various combinations of Farnborough Stns > Any [Whatever ToC] station and wondering why it wouldn't work...I thought those destinations were there for voucher use, and for instances where the passenger might need to change their destination at very short notice! :)
If one could use such a ticket though (Say; Farnborough/0260 to Any One Stn/H164) wouldn't that effectively turn the whole destination TOC into an interchange group for the passenger holding that ticket? If so, that could work as a helluva day rover for exploring the whole One, Southern and FCC networks! 8)
 

metrocammel

Member
Joined
11 Aug 2005
Messages
954
Location
Ashton, Lancashire
Another interesting one is "AMERICAN EXPRESS" as a destination. Guessing for card payments?

No, it's referring to American Express travel agencies. Most, if not all BR appointed travel agencies have NLCs, and most of these are included in Avantix. If you type * into the origin or destination box, it will come up with a host of unusual 'names', I've even seen names of Universities in there that have NLCs!

On the subject of the 'Dutch Flyer' ticket, I once had one of these issued by Stena Line, for an 'Any Dutch Station' portion. It was printed on the same Stena Line branded cards as the cabin magnetic key-cards were printed on- but it actually worked thru' the Dutch ticket barriers at Rotterdam.
 
Joined
13 Mar 2009
Messages
36
Location
Crawley
Well, I've had a quick look at the 'REFDATA.DAT' file, and it looks like it contains 18 tables (thought it was 20, but two table names looked blank).

As you've probably guessed the layout is:
header area:
unknown: char(13)
table count: byte(1)
table def area:
table name: char(03)
record length: short
record count: int
table start offset: int

then the table data follows.

Anyway, here's the 18 embeded tables extracted...

I'd love to investigate more, but i've got work to do.
 

Death

Established Member
Joined
23 Oct 2006
Messages
1,639
Location
Sat at the control desk of 370666...
Well, I've had a quick look at the 'REFDATA.DAT' file, and it looks like it contains 18 tables (thought it was 20, but two table names looked blank).

As you've probably guessed the layout is:
header area:
. . unknown: char(13)
. . table count: byte(1)
table def area:
. . table name: char(03)
. . record length: short
. . record count: int
. . table start offset: int
then the table data follows.

Anyway, here's the 18 embeded tables extracted...
I'd love to investigate more, but i've got work to do.
Woah! I was hoping that someone might recognise the database format and tell me what it was, but I wasn't expecting anyone to reverse engineer it! I tried myself, but cracking Binaries is still a relatively new art to me! :shock:

Anyhow...Many thanks for cracking those tables out of the database mate! I'm currently being as busy as a bee trying to get stuff sorted for a trip to Blackpool this weekend, but will take a very deep and interested look at 'em when I get back! 8)

Farewell, and cheers again! <D
 

mickym

New Member
Joined
10 Oct 2010
Messages
3
Well, I've had a quick look at the 'REFDATA.DAT' file, and it looks like it contains 18 tables (thought it was 20, but two table names looked blank).

As you've probably guessed the layout is:
header area:
unknown: char(13)
table count: byte(1)
table def area:
table name: char(03)
record length: short
record count: int
table start offset: int

then the table data follows.

Anyway, here's the 18 embeded tables extracted...

I'd love to investigate more, but i've got work to do.

Hi... I'm interested in the format of these database files... Is your research still available, Mark?

I've just had a brief play with the NFM. It's much simpler than expected. For those into Linux/Unix, the NFM runs fine in WINE, the WINdows Emulator.

The NFM doesn't appear to perform any clever routeing function, seemingly working as a crude look-up tool. It churns out every ticket option for travelling from every Origin to every Destination across the rail network.

Its function is not unlike those triangular tables that are found at the front of road atlases and which show the distance between various towns and cities across the country. There, too, there is no routeing function. Whereas in the atlas table, the journey "weight" is a single parameter of distance in miles or kilometres, the NFM appears to use multiple monetary weights for each journey.

For some while, I have been toying with a postgrad project to discover anomalies in fare pricing due to split ticketing. The data in the NFM are essential to that.

The project would have a large component of programming, probably Java-based.. which would require the fusion and processing of data from the NFM and the NRG, the modelling and implementation of the rail network as a mathematical graph of nodes and edges, and the application of a multi-parameter LCR algorithm, as well as some method for ensuring that the set of discovered journeys using split tickets are via the notoriously complex rules pertaining to "permitted routes" only.. Ultimately, there would also be a web-based engine and a dynamic HTML front-end..

However, some crucial elements of the dataset remain missing.. For example, the national rail timetable no longer lists the distance "edge weight" between adjacent "nodes" or "vertices" in the rail network "graph". Those data are essential for discovering the shortest route, which is always permitted under the rules of the NRG.

This could be a very exciting project, and potentially lucrative.

Anybody interested in collaborating? Mark? Death?

Cheers,
mickym
 
Last edited:

ainsworth74

Forum Staff
Staff Member
Global Moderator
Joined
16 Nov 2009
Messages
27,671
Location
Redcar
Is your research still available, Mark?

It looks like mark hasn't visited these forums for some time (April) so they may well not respond. You could try sending them a PM that might attract their attention assuming they get email notifications and it is still an active email account of theirs.
 

b0b

Established Member
Joined
25 Jan 2010
Messages
1,331
mickym: I'm looking into some similar stuff (very similar stuff!) :D
 

mickym

New Member
Joined
10 Oct 2010
Messages
3
It looks like mark hasn't visited these forums for some time (April) so they may well not respond. You could try sending them a PM that might attract their attention assuming they get email notifications and it is still an active email account of theirs.

Thanks ainsworth... I will do that.. send a couple of PMs to Mark and to Death.

Cheers,
micky
--- old post above --- --- new post below ---
mickym: I'm looking into some similar stuff (very similar stuff!) :D


Hi Bob! That sounds very good! Are you interested in collaborating? As a bit of fun, we worked on a similar routeing problem for London Underground. Re-inventing the wheel that time, so the question of split-ticketing is very new territory for me.

First step would be to code something to serve as a database driver for parsing those NFM database tables. Then a simple user interface and database engine for submitting queries to discover the cost of a journey from Origin A to Destination B.

Then the next stage is probably routeing. Some years ago, Clive Feather, the well known rail buff, built an rail routeing engine which he dubbed "CORE" - Clive's Online Routeing Engine.

The CGI interface to CORE has long since died but the Engine itself is still online and functional via telnet. Clive has not published his code, but today he is calling for a maintainer, so maybe he would release it, especially if he saw the potential.

I've studied the detail documents to the National Routeing Guide, and no individual rule appears that complex, but it is the application of all the rules together, especially the arbitrary easements, which makes it look like a bitch to implement in code..

Problems aside, the permitted routes would be obtained probably as follows:

(i) the shortest route would likely be discovered using Dijkstra's,
(ii) the mapped routes which pass through appropriate routeing point(s) for the origin station and for the destination station, and then
(iii) traced across appropriate maps according to the "yellow pages" routeing codes for the origin and destination routeing points. And finally
(iv) the application of the fare-check rule, and
(v) the application of the set of route easements.. [probably not that order...]

Only then could the Split-Ticketing Engine test each combination of pairs of intermediate stations (i.e. graph nodes) along each route, to find the split-ticketing fare deals.

With the hands of several coders to make light work, I would estimate a month of labour to get it running properly.
 
Last edited:

b0b

Established Member
Joined
25 Jan 2010
Messages
1,331
First step would be to code something to serve as a database driver for parsing those NFM database tables. Then a simple user interface for submitting queries to the database to discover the cost of a journey from Origin A to Destination B.

I've discovered another way: and I'm working on coding up a HTTP REST server that responds with JSON. Since this is all in the Microsoft world, as a Java programmer, C# is "close" but I still struggle with some of the differences. I'm also concerned about other aspects of the code, so I'm not distributing it as of now. sorry :D


Other things I've discovered:

The ATOC Routeing Point Identifier + Permitted Routes documents are fairly easy to parse. This lets you do figure out stuff like this:

What are the permitted maps and changeover points between maps, for a journey between Wimbledon and Gatwick Airport?

Code:
Routes where no fares check applies as the route is valid for all combinations
  [Map: WX, Map: LB]
    [Routeing Point: Clapham Junction]
    [Routeing Point: London Group]
  [Map: PD, Map: CS]
    [Routeing Point: London Group]
    [Routeing Point: Guildford]
    [Routeing Point: Clapham Junction]
  [Map: WX, Map: ††, Map: SC]
    [Routeing Point: London Group, Routeing Point: London Group]
  [Map: WX, Map: SC]
    [Routeing Point: Clapham Junction]
    [Routeing Point: London Group]
  [Map: WX, Map: ††, Map: LB]
    [Routeing Point: London Group, Routeing Point: London Group]
  [Map: PD, Map: ††, Map: SL, Map: LB]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Herne Hill]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Mitcham Junction]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Tulse Hill]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Peckham Rye]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Horsham]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: London Group]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Streatham Group]
  [Map: WX, Map: ††, Map: SL, Map: LB]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Herne Hill]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Mitcham Junction]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Tulse Hill]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Peckham Rye]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Horsham]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: London Group]
    [Routeing Point: London Group, Routeing Point: London Group, Routeing Point: Streatham Group]
  [Map: SC]
  [Map: SL, Map: ††, Map: LB]
    [Routeing Point: London Group, Routeing Point: London Group]
  [Map: SL, Map: ††, Map: SC]
    [Routeing Point: London Group, Routeing Point: London Group]
  [Map: PD, Map: ††, Map: SC]
    [Routeing Point: London Group, Routeing Point: London Group]
  [Map: PD, Map: ††, Map: LB]
    [Routeing Point: London Group, Routeing Point: London Group]


The other thing I've "cracked" is the Routeing guide maps and I've managed to code those into nodes + vertexes. Had to do it by hand, which was yucky indeed but it is essential to do any sort of routing. Took a weekend :lol:

For example: What are the permitted routes on map CL between Shotton and Bolton?

Shotton -> Chester -> Runcorn Group -> Warrington Group -> Wigan Group -> Bolton
Shotton -> Chester -> Hooton -> Runcorn Group -> Warrington Group -> Wigan Group -> Bolton


You can snag the Meridian 2 dataset from data.gov.uk. There are ESRI shapefile for stations + track. This lets you calculate distances and also draw pretty maps. I got a couple of posts in this thread on that:

http://railforums.co.uk/showthread.php?t=36556&highlight=meridian&page=3

Meridian 2 probably includes freight only + not in use track though.


I also happily have an old version of the National Timetable that has mileages but there are notable errors in it...

The National Timetable PDF may be parseable. Unfortuantely I think you need this, to answer 2 questions:
(a) which routes have regular passenger service
(b) which routes have direct service
(c) places to split on route and the frequency of station calls

In addition it might be parseable to extract the entire train times out of it (rather than get a feel for it) ... this may help with split ticket investigation, eg. you might be able to split a ticket into an expensive peak part and switch onto a offpeak ticket somewhere else because of the time you reach the split point ...

The biggest piece of data you're missing is the stations passed through by "fast" services, so either you need to take an optimistic or pessimistic view. Playing with NRE, they seem to take the pessimistic (aka more profitable) view.
--- old post above --- --- new post below ---
edit: I don't think my routeing guide example is processing fares check correctly right now

actually it was after all, both Bath + Dover Priory are routeing points. Here's a more complex example:

Code:
Station: East Midlands Parkway -> Station: Normanton
All mapped routes require a fares check

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Derby Group, to=Routeing Point: Pontefract Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Derby Group[Station: Long Eaton, Station: Spondon, Station: Duffield, Station: Belper, Station: Peartree, Station: Derby] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Pontefract Group[Station: Pontefract Baghill, Station: Pontefract Monkhill, Station: Castleford, Station: Glasshoughton, Station: Pontefract Tanshelf]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Derby Group, to=Routeing Point: Wakefield Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Derby Group[Station: Long Eaton, Station: Spondon, Station: Duffield, Station: Belper, Station: Peartree, Station: Derby] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Wakefield Group[Station: Wakefield Westgate, Station: Wakefield Kirkgate]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Loughborough Group, to=Routeing Point: Wakefield Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Loughborough Group[Station: Barrow upon Soar, Station: Loughborough (Leics), Station: Sileby] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Wakefield Group[Station: Wakefield Westgate, Station: Wakefield Kirkgate]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Chesterfield, to=Routeing Point: Pontefract Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Chesterfield[Station: Chesterfield] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Pontefract Group[Station: Pontefract Baghill, Station: Pontefract Monkhill, Station: Castleford, Station: Glasshoughton, Station: Pontefract Tanshelf]
  [Map: WK]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Chesterfield, to=Routeing Point: Wakefield Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Chesterfield[Station: Chesterfield] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Wakefield Group[Station: Wakefield Westgate, Station: Wakefield Kirkgate]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Nottingham Group, to=Routeing Point: Wakefield Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Nottingham Group[Station: Attenborough, Station: Beeston, Station: Nottingham] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Wakefield Group[Station: Wakefield Westgate, Station: Wakefield Kirkgate]
  [Map: ER]
  [Map: DG, Map: ER]
    [Routeing Point: Nottingham Group]
    [Routeing Point: Lincoln]
    [Routeing Point: Barnetby]
    [Routeing Point: Newark Group]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Nottingham Group, to=Routeing Point: Leeds Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Nottingham Group[Station: Attenborough, Station: Beeston, Station: Nottingham] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Leeds Group[Station: Leeds, Station: Garforth, Station: East Garforth, Station: Cross Gates, Station: Micklefield]
  [Map: ER, Map: LS]
    [Routeing Point: Leeds Group]
    [Routeing Point: York]
    [Routeing Point: Selby]
    [Routeing Point: Scarborough Group]
  [Map: ER]
  [Map: DG, Map: ER]
    [Routeing Point: Nottingham Group]
    [Routeing Point: Lincoln]
    [Routeing Point: Barnetby]
    [Routeing Point: Newark Group]
  [Map: DG, Map: ER, Map: LS]
    [Routeing Point: Nottingham Group, Routeing Point: York]
    [Routeing Point: Nottingham Group, Routeing Point: Selby]
    [Routeing Point: Nottingham Group, Routeing Point: Scarborough Group]
    [Routeing Point: Lincoln, Routeing Point: York]
    [Routeing Point: Lincoln, Routeing Point: Selby]
    [Routeing Point: Lincoln, Routeing Point: Scarborough Group]
    [Routeing Point: Barnetby, Routeing Point: York]
    [Routeing Point: Barnetby, Routeing Point: Selby]
    [Routeing Point: Barnetby, Routeing Point: Scarborough Group]
    [Routeing Point: Newark Group, Routeing Point: York]
    [Routeing Point: Newark Group, Routeing Point: Selby]
    [Routeing Point: Newark Group, Routeing Point: Scarborough Group]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Loughborough Group, to=Routeing Point: Leeds Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Loughborough Group[Station: Barrow upon Soar, Station: Loughborough (Leics), Station: Sileby] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Leeds Group[Station: Leeds, Station: Garforth, Station: East Garforth, Station: Cross Gates, Station: Micklefield]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Chesterfield, to=Routeing Point: Leeds Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Chesterfield[Station: Chesterfield] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Leeds Group[Station: Leeds, Station: Garforth, Station: East Garforth, Station: Cross Gates, Station: Micklefield]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Nottingham Group, to=Routeing Point: Pontefract Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Nottingham Group[Station: Attenborough, Station: Beeston, Station: Nottingham] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Pontefract Group[Station: Pontefract Baghill, Station: Pontefract Monkhill, Station: Castleford, Station: Glasshoughton, Station: Pontefract Tanshelf]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Derby Group, to=Routeing Point: Leeds Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Derby Group[Station: Long Eaton, Station: Spondon, Station: Duffield, Station: Belper, Station: Peartree, Station: Derby] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Leeds Group[Station: Leeds, Station: Garforth, Station: East Garforth, Station: Cross Gates, Station: Micklefield]
  [Map: SY]

Additional routes if the fares check rule passes for Routeing Point Pair, from=Routeing Point: Loughborough Group, to=Routeing Point: Pontefract Group for ticket types SOS,SDS,SVS,CDS
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Routeing Point: Loughborough Group[Station: Barrow upon Soar, Station: Loughborough (Leics), Station: Sileby] to Station: Normanton
Check that the Station: East Midlands Parkway to Station: Normanton fare is not less than the fare from Station: East Midlands Parkway to Routeing Point: Pontefract Group[Station: Pontefract Baghill, Station: Pontefract Monkhill, Station: Castleford, Station: Glasshoughton, Station: Pontefract Tanshelf]
  [Map: SY]
 
Last edited:

John @ home

Established Member
Joined
1 Mar 2008
Messages
5,148
Hi mickym, welcome to the forum!

I wish you lots of luck with the project and offer the following observations:

Shortest route
The Routeing Guide is clear that the shortest route as defined in the National Rail Timetable (NRT) must be used. My interpretation is that this must be used even when its approximations and errors do not measure the actual shortest route. It would be very helpful to receive official confirmation that this interpretation is correct, but obtaining official confirmation on anything related to the Routeing Guide is not a trivial issue. See the amazing routeing question.

I have read that the absence of mileages is temporary and is to be remedied shortly. I can't find the relevant quotation tonight but I will edit this post to include it if it is less elusive tomorrow.

When I need to calculate the shortest route between two stations, I use the RailMiles Mileage Engine to obtain an approximation - it has its own errors when used for routeing purposes because it measures reversals to the junction rather than to the next station. I then measure likely candidates using the last NRT which included mileages. Where the distance is missing, e.g. the two stretches in West Yorkshire recently reopened to passengers by Grand Central, I use Quail.

Calculation of Permitted Routes
the permitted routes would be obtained probably as follows:
... [probably not that order...]
My guess is that the order of performing the calculations in the Routeing Guide is crucial, and unfortunately in many instances the order is not properly defined. All the online booking engines implement slightly different approximations of the Guide and I think these differences are mainly caused by implementing the rules in different orders.

Only then could the Split-Ticketing Engine test each combination of pairs of intermediate stations (i.e. graph nodes) along each route, to find the split-ticketing fare deals.
One of the difficulties is that the best split-ticketing deal may involve tickets to or from stations not along the route. This need to check stations before the origin, beyond the destination, and on various side routes imposes a further level of complexity.

Another difficulty with designing a Split-Ticketing Engine is that the cheapest deal may involve holding more than one valid ticket for part of the journey. For example, the cheapest combination I have found for a flexible Leeds - Bangor return (SVR £60.40) is a Leeds - Frodsham return (SVR £21.00) and a Newton-le-Willows - Bangor return (SVR £25.50), which saves £13.90 and gives the passenger two valid tickets for Newton-le-Willows - Frodsham.

Sending PMs
I will ... send a couple of PMs to Mark and to Death.
You may find that you need to make 5 posts before you are allowed to send or receive PMs.

Do keep us up-to-date as your project progresses.
 

b0b

Established Member
Joined
25 Jan 2010
Messages
1,331
First cut with integrating with NFM07:

Code:
Station: Gravesend -> Station: Elephant & Castle

All mapped routes require a fares check

Testing Fares Check
        compared fare Fare: [_fareCode=SDS, _routeCode=00130, _fare=970] with station fare Fare: [_fareCode=SDS, _routeCode=00130, _fare=970] passes
        compared fare Fare: [_fareCode=SDS, _routeCode=00130, _fare=970] with station fare Fare: [_fareCode=SDS, _routeCode=00130, _fare=970] passes
        compared fare Fare: [_fareCode=SDS, _routeCode=00130, _fare=930] with station fare Fare: [_fareCode=SDS, _routeCode=00130, _fare=970] passes
 result:FaresCheckChecker@30f97aff [a=Station: Gravesend, b=Station: Elephant & Castle, allowedOrigins=[Routeing Point: Gravesend], allowedDests=[Routeing Point: Denmark Hill, Routeing Point: Herne Hill, Routeing Point: London Group], disallowedOrigins=[], disallowedDests=[]]


Additional route allowed by fares check via Routeing Point: Gravesend to Routeing Point: London Group
  [Map: NK]
  [Map: HK]

Additional route allowed by fares check via Routeing Point: Gravesend to Routeing Point: Herne Hill
  [Map: HK, Map: ††, Map: SL]
    [Routeing Point: London Group, Routeing Point: London Group]
  [Map: NK, Map: ††, Map: SL]
    [Routeing Point: London Group, Routeing Point: London Group]

Additional route allowed by fares check via Routeing Point: Gravesend to Routeing Point: Denmark Hill
  [Map: NK]
  [Map: HK, Map: ††, Map: SL]
    [Routeing Point: London Group, Routeing Point: London Group]
  [Map: NK, Map: ††, Map: SL]
    [Routeing Point: London Group, Routeing Point: London Group]
This is one of my new favorite tests. The fares check rule passes for London, using the 00131 not HS1 route. But then some of the routes to London involve HS1, so this shows even after fare checking you still have further fares checking to do.



Here's another one.. East Midland Parkway to Normanton. Fares checking shows that Derby Group and Chesterfield fail the fares check rule for EMD.


Code:
Station: East Midlands Parkway -> Station: Normanton

All mapped routes require a fares check

Testing Fares Check
        compared fare Fare: [_fareCode=SVS, _routeCode=00079, _fare=2230] with station fare Fare: [_fareCode=SVS, _routeCode=00079, _fare=2900] passes
        compared fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] with station fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] passes
        compared fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] with station fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] passes
        compared fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] with station fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] passes
        compared fare Fare: [_fareCode=SOS, _routeCode=00076, _fare=6300] with station fare Fare: [_fareCode=SOS, _routeCode=00076, _fare=6300] passes
 result:FaresCheckChecker@362e3cb1 [a=Station: East Midlands Parkway, b=Station: Normanton, allowedOrigins=[Routeing Point: Nottingham Group, Routeing Point: Loughborough Group], allowedDests=[Routeing Point: Pontefract Group, Routeing Point: Leeds Group, Routeing Point: Wakefield Group], disallowedOrigins=[Routeing Point: Derby Group, Routeing Point: Chesterfield], disallowedDests=[]]


Routeing Point: Chesterfield to Routeing Point: Wakefield Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Nottingham Group to Routeing Point: Wakefield Group
  [Map: ER]
  [Map: SY]
  [Map: DG, Map: ER]
    [Routeing Point: Nottingham Group]
    [Routeing Point: Lincoln]
    [Routeing Point: Barnetby]
    [Routeing Point: Newark Group]

Routeing Point: Chesterfield to Routeing Point: Leeds Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Loughborough Group to Routeing Point: Wakefield Group
  [Map: SY]

Routeing Point: Chesterfield to Routeing Point: Pontefract Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Nottingham Group to Routeing Point: Pontefract Group
  [Map: SY]

Additional route allowed by fares check via Routeing Point: Loughborough Group to Routeing Point: Leeds Group
  [Map: SY]

Routeing Point: Derby Group to Routeing Point: Wakefield Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Loughborough Group to Routeing Point: Pontefract Group
  [Map: SY]

Additional route allowed by fares check via Routeing Point: Nottingham Group to Routeing Point: Leeds Group
  [Map: DG, Map: ER, Map: LS]
    [Routeing Point: Nottingham Group, Routeing Point: York]
    [Routeing Point: Nottingham Group, Routeing Point: Selby]
    [Routeing Point: Nottingham Group, Routeing Point: Scarborough Group]
    [Routeing Point: Lincoln, Routeing Point: York]
    [Routeing Point: Lincoln, Routeing Point: Selby]
    [Routeing Point: Lincoln, Routeing Point: Scarborough Group]
    [Routeing Point: Barnetby, Routeing Point: York]
    [Routeing Point: Barnetby, Routeing Point: Selby]
    [Routeing Point: Barnetby, Routeing Point: Scarborough Group]
    [Routeing Point: Newark Group, Routeing Point: York]
    [Routeing Point: Newark Group, Routeing Point: Selby]
    [Routeing Point: Newark Group, Routeing Point: Scarborough Group]
  [Map: ER]
  [Map: SY]
  [Map: ER, Map: LS]
    [Routeing Point: Leeds Group]
    [Routeing Point: York]
    [Routeing Point: Selby]
    [Routeing Point: Scarborough Group]
  [Map: DG, Map: ER]
    [Routeing Point: Nottingham Group]
    [Routeing Point: Lincoln]
    [Routeing Point: Barnetby]
    [Routeing Point: Newark Group]

Routeing Point: Derby Group to Routeing Point: Pontefract Group is disallowed by fares check rule

Routeing Point: Derby Group to Routeing Point: Leeds Group is disallowed by fares check rule
 

OwlMan

Established Member
Joined
25 Jun 2008
Messages
3,206
Location
Bedworth, Warwickshire
Why are you doing fare checks between Chesterfield & Leeds, Chesterfield - Wakefield etc? These are not part of the "fares rule".

East Midlands routeing points are Chesterfield, Nottingham, Derby & Loughborough.

Normanton's are Leeds, Pontefract & Wakefield.

To find the appropiate routeing points for East Mids P'way we compare the fares below
East Mids Pway - Normanton
Nottingham - Normanton
Chesterfield - Normanton
Derby - Normanton
Loughborough - Normanton
Any of the routeing points whose single fares are equal to or less than the East Midlands - Normanton Fare are appropiate routeing points.
(All four pass if you ignore the via East Coast fares)

The same applies to finding the correct routeing points for Normanton.
Compare the East Mids Pway - Normanton fare with
East Midlands Pway - Leeds
East Mids Pway - Pontefract
East Mids Pway - Wakefield
Any of the routeing points whose single fares are equal to or less than the East Midlands - Normanton Fare are appropiate routeing points.
(Only Wakefield passes if you ignore the via East Coast fares)


You do not use routeing point - routeing point fares.


Peter
 
Last edited:

b0b

Established Member
Joined
25 Jan 2010
Messages
1,331
Peter; you're mis-understanding, its showing the associated routeing points as its trying to figure out which maps are involved.

Here's the output with more debugging, that shows the actuals fares tested..

Code:
Station: East Midlands Parkway -> Station: Normanton

All mapped routes require a fares check

Testing Fares Check
        compared fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3200] with station fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] passes
          Origin RP Routeing Point: Nottingham Group passed fare check due to fare of Station: Attenborough (ATB) to Station: Normanton (NOR)
        compared fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] with station fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] passes
          Origin RP Routeing Point: Loughborough Group passed fare check due to fare of Station: Barrow upon Soar (BWS) to Station: Normanton (NOR)
        compared fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] with station fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] passes
          Destination RP Routeing Point: Pontefract Group passed fare check due to fare of Station: East Midlands Parkway (EMD) to Station: Pontefract Baghill (PFR)
        compared fare Fare: [_fareCode=SOS, _routeCode=00076, _fare=6300] with station fare Fare: [_fareCode=SOS, _routeCode=00076, _fare=6300] passes
          Destination RP Routeing Point: Leeds Group passed fare check due to fare of Station: East Midlands Parkway (EMD) to Station: Leeds (LDS)
        compared fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] with station fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] passes
          Destination RP Routeing Point: Wakefield Group passed fare check due to fare of Station: East Midlands Parkway (EMD) to Station: Wakefield Westgate (WKF)
 result:FaresCheckChecker@269dc6db [a=Station: East Midlands Parkway, b=Station: Normanton, allowedOrigins=[Routeing Point: Nottingham Group, Routeing Point: Loughborough Group], allowedDests=[Routeing Point: Pontefract Group, Routeing Point: Leeds Group, Routeing Point: Wakefield Group], disallowedOrigins=[Routeing Point: Derby Group, Routeing Point: Chesterfield], disallowedDests=[]]


Additional route allowed by fares check via Routeing Point: Loughborough Group to Routeing Point: Wakefield Group
  [Map: SY]

Routeing Point: Derby Group to Routeing Point: Leeds Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Nottingham Group to Routeing Point: Wakefield Group
  [Map: DG, Map: ER]
    [Routeing Point: Nottingham Group]
    [Routeing Point: Lincoln]
    [Routeing Point: Barnetby]
    [Routeing Point: Newark Group]
  [Map: SY]
  [Map: ER]

Routeing Point: Chesterfield to Routeing Point: Pontefract Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Loughborough Group to Routeing Point: Pontefract Group
  [Map: SY]

Routeing Point: Derby Group to Routeing Point: Wakefield Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Loughborough Group to Routeing Point: Leeds Group
  [Map: SY]

Additional route allowed by fares check via Routeing Point: Nottingham Group to Routeing Point: Pontefract Group
  [Map: SY]

Routeing Point: Derby Group to Routeing Point: Pontefract Group is disallowed by fares check rule

Routeing Point: Chesterfield to Routeing Point: Wakefield Group is disallowed by fares check rule

Routeing Point: Chesterfield to Routeing Point: Leeds Group is disallowed by fares check rule

Additional route allowed by fares check via Routeing Point: Nottingham Group to Routeing Point: Leeds Group
  [Map: DG, Map: ER]
    [Routeing Point: Nottingham Group]
    [Routeing Point: Lincoln]
    [Routeing Point: Barnetby]
    [Routeing Point: Newark Group]
  [Map: ER, Map: LS]
    [Routeing Point: Leeds Group]
    [Routeing Point: York]
    [Routeing Point: Selby]
    [Routeing Point: Scarborough Group]
  [Map: SY]
  [Map: ER]
  [Map: DG, Map: ER, Map: LS]
    [Routeing Point: Nottingham Group, Routeing Point: York]
    [Routeing Point: Nottingham Group, Routeing Point: Selby]
    [Routeing Point: Nottingham Group, Routeing Point: Scarborough Group]
    [Routeing Point: Lincoln, Routeing Point: York]
    [Routeing Point: Lincoln, Routeing Point: Selby]
    [Routeing Point: Lincoln, Routeing Point: Scarborough Group]
    [Routeing Point: Barnetby, Routeing Point: York]
    [Routeing Point: Barnetby, Routeing Point: Selby]
    [Routeing Point: Barnetby, Routeing Point: Scarborough Group]
    [Routeing Point: Newark Group, Routeing Point: York]
    [Routeing Point: Newark Group, Routeing Point: Selby]
    [Routeing Point: Newark Group, Routeing Point: Scarborough Group]

Testing Fares Check
compared fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3200] with station fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] passes
Origin RP Routeing Point: Nottingham Group passed fare check due to fare of Station: Attenborough (ATB) to Station: Normanton (NOR)

compared fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] with station fare Fare: [_fareCode=SOS, _routeCode=00079, _fare=3650] passes
Origin RP Routeing Point: Loughborough Group passed fare check due to fare of Station: Barrow upon Soar (BWS) to Station: Normanton (NOR)

compared fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] with station fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] passes
Destination RP Routeing Point: Pontefract Group passed fare check due to fare of Station: East Midlands Parkway (EMD) to Station: Pontefract Baghill (PFR)

compared fare Fare: [_fareCode=SOS, _routeCode=00076, _fare=6300] with station fare Fare: [_fareCode=SOS, _routeCode=00076, _fare=6300] passes
Destination RP Routeing Point: Leeds Group passed fare check due to fare of Station: East Midlands Parkway (EMD) to Station: Leeds (LDS)

compared fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] with station fare Fare: [_fareCode=SVS, _routeCode=00076, _fare=5760] passes
Destination RP Routeing Point: Wakefield Group passed fare check due to fare of Station: East Midlands Parkway (EMD) to Station: Wakefield Westgate (WKF)
 

OwlMan

Established Member
Joined
25 Jun 2008
Messages
3,206
Location
Bedworth, Warwickshire
So why do Derby & Chesterfield fail then?.

EMD - NOR SOS £36.50; SVS £29.00
DBY - NOR SOS £27.50; SVS £22.30
CHD - NOR SDS £8-80


Peter
 
Last edited:

b0b

Established Member
Joined
25 Jan 2010
Messages
1,331
So why do Derby & Chesterfield fail then?.

EMD - NOR SOS £36.50; SVS £29.00
DBY - NOR SOS £27.50; SVS £22.30
CHD - NOR SDS £8-80


Peter

They fail because they are ANY PERMITTED, but the EMD-NOR route is either SHEFFIELD or PETERBOROUGH.

Both the ticket type and routes need to be the same in my code.


I don't know how to handle this right now.
 

mickym

New Member
Joined
10 Oct 2010
Messages
3
Pardon the pun, but you're a long way down the line, Bob! Have you thought about approaching the industry for research funding? I knew this was a complex project, hence the appeal, but never appreciated quite how complex it would be. It was originally a tentative research proposal.. I love the routing side of it, that has been my background recently - network routing, but as an infrequent train user, the railway aspect is almost an unknown to me. It's still a very good project, and no doubt very rewarding. The devil is in the design, by the look of it. I can imagine it would be easy to box yourself in with a dodgy implementation and find you had to throw the whole lot away and start all over.

The scraping or parsing of data from PDF documents, and the manual building of mathematical graphs from maps in the NRG sounds like an absolute nightmare. Not to mention the absent data, like the missing mileages between stations that should be shown in the first page of every timetable.

I said before I'm no rail buff, but how approachable are ATOC? All the data that has been scraped from ATOC's PDF documents must already be available in a more appropriate form, since that is how the industry software will have to use it.

Thank you also to John for all your comments, too. This is one of those problems where a solid knowledge of the rail industry counts for more than anything else. It must be one of the quirkiest industries in the world!

All the very best.. Happy routeing!
micky
 

b0b

Established Member
Joined
25 Jan 2010
Messages
1,331
I said before I'm no rail buff, but how approachable are ATOC? All the data that has been scraped from ATOC's PDF documents must already be available in a more appropriate form, since that is how the industry software will have to use it.

You can buy a copy of the current feed for 600 quid.

http://www.atoc.org/about-atoc/rail-settlement-plan/data-feeds/types-of-data

otherwise you're forced to scrape pdf's to be honest, and you're still short of everything that you need.

I'm not looking to do anything other than maybe help out the forum and the technical challenge of understanding the publically released documentation and implementing the "bob routeing engine" along with the hints we get from "The Manual"....
 

Terrafire

Member
Joined
26 Jul 2010
Messages
74
Glad I found this thread. I've been playing around with Dijkstra implementations for a while, manually inputting tickets (taking years) for potential splitting points. The hurdle I've not managed to cross is extracting the data from Avantix - has anyone got a tool for it/got the data in CSV form? It looks like a couple of people have managed to do that here.

Also, is it just me who's having trouble accessing CORE through telnet? Just getting the 'Could not open connection...' message here.
 

b0b

Established Member
Joined
25 Jan 2010
Messages
1,331
Terrafire: I'm not sure how Avantix data helps you with splitting, you really need timetable data to figure out where likely split points would be, or am I missing something obvious?
 

Terrafire

Member
Joined
26 Jul 2010
Messages
74
True, but often I want to know the absolute cheapest way to get from A to B. In that scenario, I don't mind going out of my way to save the pennies. The timetable data is only necessary if you want to restrict the output to a certain route, and a lot of the time that's not necessary because the best splits are along the sensible route anyway.

The main requirement for working out splits is the fare database; working out sensible splits is a different story!
 
Status
Not open for further replies.

Top