We’ve been working on the AGMS Controller for some time now with the QueenslandRail contract and lots of good stuff has gone into it. However, we recently added station and timetable reporting (On-Time-Running) which has been an interesting piece of work.
Both AGMS systems run on the North Coast line and Mount Isa line in Queensland and given the vast distances of the journeys (> 1000km) the train journeys run over night. We needed to come up with a system that would first track the vehicles through configured locations (stations) and actively determine what timetable the vehicle was running too. This would be relatively easy if we just consider the existing vehicles and their simple timetables, but we wanted to make the system capable of handling the suburban system if required (as QueenslandRail have a pretty basic method of determining On-Time-Running….and potentially fudgable!!!!!).
The resultant system needed to handle the following circumstances:
- running through the night and into the next day;
- tracking late trains to the correct timetable, as the suburban timetables run every 15 minutes on some lines;
- handling missing a station (bad GPS, loss of power etc…);
- handle trains that don’t complete the expected run (break-down, turn-back);
The timetable matching algorithm was based on a number of parameters that scored each timetable as each station was reached. If any one timetable matched a number of criteria (score over 50% being one), then it was determined to be the correct timetable and emailed out an End of Run Report (see the screenshot below)
The system primarily used our configurable StateEngine library to implement 2 continuously running process. The first was one process to take incoming GPS data, match it to configured stations and fire events to inform subscribers that a station had been reached. The second process subscribed to the station event and used this information to compile and score all of the configured timetables within the system, with the ultimate goal of firing a timetable complete event.