gb-rail-validation v1.6.1
British Rail Fare Validation
This library will validate journeys against British Rail fares using the restrictions data from DTD.
The rules around journey/fare validity are very specific to British rail and are not useful for other data sets.
The main outputs from this library are the repositories for loading restrictions and the filters that can be applied. The following filters are available:
FareLocationFilterchecks the journey origin/destination is valid for the fareOperatorFilterchecks the journey has the necessary operators for the fare (TOC specific tickets)RouterFilterchecks the journey follows a path that is valid for the route codeRestrictionFilterchecks the journey against the time and train restrictionsCrossLondonFilterchecks fares for cross London journeys have the cross London marker set or go to a zonal locationFareClassFilterensures first class fares are only available on trains with first classGeographicalRailcardRestrictionFilterapplies additional restriction codes for certain railcards (e.g. SRN, FAM) in certian areas.
The JourneyFareValidator provides an interface to validate outward and return journeys.
Testing
npm testContributing
Issues and PRs are very welcome.
License
This software is licensed under GNU GPLv3.
Copyright 2018 Linus Norton.
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago