Breaking routes into packages

The epic currently is: make it faster to generate a list of departures at a given stop. That’s what I’ve been working on basically since christmas.

I have two different approaches that I want to use at the same time. One is breaking the timestables into separate “packages” such that when you’re interested in data for, say, Silkeborg, you don’t have to look through the data for Roskilde or Aabenraa. I made a rough division by packaging each transit company separately but it was too coarse. It does mean that to look up departures at a stop in Silkeborg you only have to look at Midttrafik, but that’s still a lot. The problem is, it’s hard to divide things further because if you want to split the data further into, say, Midttrafik-west and Midttrafik-east, where do you draw the line between them? You don’t want too many routes crossing the division between the packages, the more self-contained the packages are the better.

Anyway so I spent a couple of days making a program that crunches all the schedules and figures out some good places to split the packages geographically without too many routes crossing between divisions. The map above shows the result – different colors represent different packages. So Fyn is split in two basically through Odense, Sønderjylland is split in three strips, Midtjylland is split into four parts (they’re hard to see) etc.

The other approach to save information while building departure tables to make future operations faster. That won’t make it faster the first time you look at a stop but it will make it faster the next time, and possibly the first time you look a stops near a stop you’ve already looked at. I want that information to be saved even when the phone is off and it took a while to figure out how and where to do that. But that’s sorted out too now.

The used iPhone I bought arrived a while ago and now I’ve started using it, and have made my MacBook ready for development. I’m an android guy but if I want to make an iOS app I should get used to how an iPhone works. So I’ve switched to it as my primary phone. It’s okay.

I’m still not sure of what to call the app. I’m not happy with the current name, næste stop. I considered køreklar, it sounds better but I’m still not super happy. My latest idea was A til B which I like the sound of. But I’ll have to ask some people what they think.

This week I want to finish splitting up data and set up proper testing of departure lists for stops. Then I can start running comprehensive tests which will help me get the implementation right.