What's new – 17th March

It’s Sunday, which means I’m at the end of several hours of coding. OpenTrainTimes 2.1.3 has been unleashed with one new feature and several bug-fixes:

  • The Schedule Validity calendar has returned – when you’re looking at a schedule, click the ‘Functions’ button and select ‘Show validity calendar’
  • Trains that call more than once (for example, where a train calls at Barnes, runs via Hounslow and calls at Barnes again later) now appear correctly in a location page
  • TSR information has been updated and now looks more like the data in the Weekly Operating Notice
  • TOC codes are now shown in Working Timetable (WTT) mode when showing only arrivals or departures
  • Castle Yard (Northampton) is now included on the Wolverton – Rugby map

What's new – 13th March

I’ve taken the opportunity to fix a couple of things mid-week, and also launch a surprise new map:

  • Sharnbrook Junction is now correctly drawn on the Bedford – Kentish Town map
  • New signalling diagram – there’s a new map of Bletchley – Bedford (Marston Vale), complete with level crossings, signal aspects and routes
  • Internet Explorer 10 compatibility has been improved slightly and the feedback button has been fixed on IE10
  • Ledburn Junction and Bourne End Junction on the Kings Langley – Wolverton map had some berths accidentally removed – these have now been put back
  • Minor updates – the TD Status page now shows the train describers at Glasgow and Thrumpton
  • Willesden Junction now has two berths on platform 4, as trains can reverse there

Enjoy!

What's new – 10th March

It seems like ages since I last posted here, but I’ve not been sitting idle.

OpenTrainTimes 2.1.1 went live a few minutes ago, and here are the changes:

  • From/To filtering – you can now search for trains that have come from, or go to, another location. Click the “Trains” link at the top of the page, then click “By location, date and time”
  • The Bedford – Kentish Town map now extends up to the fringe with Leicester and include Sharnbrook Junction
  • Allowances for trains are now shown correctly where half-minutes are involved
  • Facility icons are now shown in schedule pages – you can see Sleeper trains, catering and reservation statuses
  • West Coast Mainline maps have been extended up past Rugby and several bugs have been fixed thanks to a few eagle-eyed people – thank you!
  • VSTP schedules will be appearing soon – there’s a lot of work that’s gone in to integrating the functionality for them in to the site, and I’m hoping to make another minor release before the end of the week

Until next time – enjoy 🙂

OpenTrainTimes 2.1 is here

It’s been a long time coming, but OpenTrainTimes 2.1 is here.

The biggest change, and the one that’s taken weeks of effort, is that the timetable database is faster, and I’ve been able to introduce some new features surrounding it:

  • You can search for arrivals, departures or all trains at a location
  • The Functions link on a location page will allow selection of a 24-hour time window
  • Train schedule pages have been reworked in Working Timetable (WTT) mode

Whilst it’s not quite as fast as I’d like it to be, I am working on making it even faster.

There are a few things that are currently missing, as I haven’t been able to re-implement them in time – namely the route maps for trains and the facilities and technical tabs – but I am working on these now and hope to have them back in a few days, along with several more features (including real-time data) in the coming weeks.

As always (and I say this every time) – thank you to everyone for your feedback and suggestions. Please try out the new site and let me know your comments and suggestions.

Where we are, and where we're going

Freight trains are now on the site, albeit with the headcode masked out in schedules, and with a scrambled placeholder on the real-time maps.

As I predicted, this resulted in a massive spike in traffic to the site which has all but disappeared as most people are using other sites such as www.realtimetrains.co.uk. Although it doesn’t have all the polish of OpenTrainTimes, it real-time information and is fast.

So why isn’t OpenTrainTimes as fast as RealTimeTrains?

There are two reasons.

First, the database format I use is robust and mature, but isn’t as fast as I want it to be. I’m in the process of re-engineering the database to be much quicker – something I hoped to launch today, but as I have a full-time consultancy job and an awesome lady in my life, I don’t have much time during the week to sit down and write code. I also underestimated the amount of time it would take to convert the existing database, so I’m running a bit behind schedule.

The new database format is denormalised – something that makes it quick to read, but slightly more difficult to update unless you’ve architected your system properly. Whilst testing, I found I could bring up all the trains at Clapham Junction in a single day in around 2 seconds. It takes more than 30 seconds to do this in the current system. Good news!

I’m hoping to launch the restructured, quicker database, some time this week (possibly next Sunday) once I’ve made sure everything works better than it currently does.

The second reason is that the amount of money I spend on hosting the site is small. The reason www.realtimetrains.co.uk is lightning fast is due, in part, to the fact it’s running on a system that is many times more powerful than I have at my disposal.

I could throw money at the problem, but I have rent, bills and savings. I could introduce adverts on to the site, but given the user base, few people are likely to click them and they’d make the site look ugly – something I’ve tried to avoid. Or I could ask people to donate, or subscribe – but this changes the game entirely and means that I’m obliged to provide a certain level of service.

What’re you going to do?

I’m pinning my hopes on the restructured database making things faster – which means I can work on putting more real-time data on the site. However, if it doesn’t speed things up, then I’m considering throwing in the towel and just showing statistics and real-time track maps. There’s not much point in having the largest and most visibile part of the site being the slowest and most resource intensive!

What else are you planning

After the new database is in place, and if it’s fast enough, I’ll be able to launch a bunch of new features such as email and instant message alerting, tracking trains in real-time and being able to click on the signalling maps to bring up schedule information. Just about everything I want to do relies on having a fast timetable database underneath the site, so it’s a critical thing to get right.

I’ve also got some other ideas up my sleeve which aren’t ready for the public eye yet, as they involve data which isn’t yet open and available to the public.

So – fingers crossed and let’s everything goes to plan!

What's New – 27th January

Hello, Sunday – it’s time to launch the changes, fixes and improvements!

This week’s highlights:

  • Signalling diagrams now include Kings Cross (in beta). From around 11am on Monday 28th January, the Hatch End – Kings Langley, Kings Langley – Wolverton, Wolverton – Rugby and Acton Wells Junction – Stratford maps will be showing signal aspects and routes set from signals.
  • Freight schedules will be back on the site from Tuesday 29th January, although train reporting numbers (headcodes) won’t be available for reasons of confidentiality. Freight movements will also appear on the signalling maps, with an anonymous placeholder to replace the headcode.
  • RTPPM statistics, as pointed out by a couple of people, were incorrect and were counting late trains twice. This is now fixed.

Looking forwards, updates to the site will be every fortnight for the foreseeable future – a week isn’t quite long enough to get everything done. To whet your appetite, here’s what’s on the cards:

  • Signalling diagrams – I’m hoping to extend the WCML maps up to Coventry and Nuneaton, as well as adding Kings Cross and parts of the ECML, and Waterloo
  • Faster timetable lookups – at the moment, I’m putting a lot of work in to making timetable and schedule lookups faster. It’s a big job, but one that underpins several other things I have planned
  • Real-time train information – discussions are under-way to get predictions and actual arrival/departures on the site.

That’s it for now – the next update to the site will be on Sunday 10th February!

What's New – 13th January

First, an apology. Some of the real-time functionality on the site broke several times this week, and I’ve spent a chunk of development time looking to exactly what happened and how to prevent it happening in the future. I’m reasonably confident I’ve fixed it, but time will tell.

This week, I’ve been working on statistics. The statistics page now has three pie charts:

  • Real-time PPM shows the number of trains across the network which are on-time, late or very late. This data comes straight from Network Rail.
  • Right Time shows the number of trains which arrived at their destination early, or within 59 seconds of their schedule arrival time. This is calculated within OpenTrainTimes.
  • Cancellations shows a breakdown of the reasons for cancellations across the entire network.

The stats are reset at 2am each day, so this evening, the cancellation statistics won’t reflect reality until tomorrow morning.

Admittedly, it’s not much – but given I started a new job this week, you can probably forgive me.

In the coming weeks, I’m hoping to expand the amount of real-time statistics on the site, as well as import historical data so you can look at past performance.

Let me know what you think.

What's New – 6th January

Happy New Year to you all! We’re back with another Sunday night update.

There’s not much to report this week – I have a few features still in development and, rather than releasing them in to the wild right now, I want to wait and see how they perform in staging this week.

This week’s updates are:

  • The slippy map is using Ordnance Survey data, as well as data from OpenStreetMap until I can get railway network data from Network Rail
  • You can now link to specific locations on the map – click ‘Permalink’ and copy and paste the URL from your browser
  • The signalling maps and slippy map load properly on Windows 8/Internet Explorer 10 – although the ‘feedback’ button is still incorrectly positioned. If anyone knows how I can fix this, please get in touch
  • A few hundred missing location names have been entered in to the database, so you shouldn’t see trains to CLPHMJ1 any more
  • Signalling maps now show the number of people viewing the map at the same time as you

Until next week, have fun and keep sending in your feedback!

What's New – 23rd December

There are two important updates to the site this week.

First, the Kings Langley – Wolverton map includes the new signalling being commisioned at Bletchley over Christmas. The fast lines are due to be back in operation on Thursday 27th December, and the slow lines on Monday 31st December.

Second, the the Wolverton – Northampton – Rugby map now includes Rugby station.

As usual, there are a bunch of minor things that I’ve fixed based on feedback:

  • Signalling maps are fixed in Internet Explorer 9
  • The (more…) links on the PPM Detail pages now work on Apple devices
  • Routes and track circuits aren’t displayed on signalling where the information isn’t yet available
  • The ‘help’ buttons now work again
  • The globe icon on the front page now works
  • Some missing signals have been added to maps

Over the Christmas break, I’ll be working on more real-time statistics and historical data – but not until after I’ve eaten plenty of turkey, Brussels sprouts and Christmas pudding!

Happy Christmas!

What's New – 16th December

The last week has flown by once again. The fact that there are only four items of note is no reflection on the amount of work I seem to have done – drawing out maps and sanity-checking them takes ages.

Enjoy!