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:
FareLocationFilter
checks the journey origin/destination is valid for the fareOperatorFilter
checks the journey has the necessary operators for the fare (TOC specific tickets)RouterFilter
checks the journey follows a path that is valid for the route codeRestrictionFilter
checks the journey against the time and train restrictionsCrossLondonFilter
checks fares for cross London journeys have the cross London marker set or go to a zonal locationFareClassFilter
ensures first class fares are only available on trains with first classGeographicalRailcardRestrictionFilter
applies 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 test
Contributing
Issues and PRs are very welcome.
License
This software is licensed under GNU GPLv3.
Copyright 2018 Linus Norton.
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago