Sometimes it takes an outsider to point out the idiosyncrasies of a city.

Scott McMillan has lived in Melbourne for 29 years, but it was his German girlfriend Eva who asked the question: Why do Melbourne's City Loop trains change direction?

"Eva asked me why it changed during the day, as this seemed strange and really hard to understand," he said.

"Being German, logic is very dear to her heart."

Loading

So why the change?

Metro Trains network planning general manager Huw Millichip said the City Loop's early-afternoon about-face was all because of Parliament.

Parliament train station, that is.

"It's really a historical legacy," he said.

"The original reason was there was a very significant growth in employment at that Parliament end when the City Loop was originally constructed.

"Most of the demand originated out of Parliament and Flinders Street stations."

So rather than make the majority of customers sit through the entire five-station loop, the decision was made to drop them off first in the morning and pick them up last in the afternoon.

Think of it like a busy school run in a packed family minivan; the frazzled parent would drop off the bulk of the kids to the primary school first, breathe a sigh of relief, stretch out in the newly acquired space and take the remaining child to day care.

Huw Millichip says timetabling is often like completing a Sudoku puzzle. ( ABC Radio Melbourne: Nicole Mills )

But just like children, the city grows up and over the years its schedule has changed.

No longer are nine-to-five workers concentrated around Parliament station, as more and more people access offices in the new Docklands precinct which is serviced by Southern Cross station at the opposite end of the city.

"In the past few years there's been a big swing towards the west of the CBD, hence why we're looking at now different options for serving that in the future," Mr Millichip said.

Here's what changes, and when

There are four train tracks in Melbourne's City Loop.

Three of them change direction between 12:30pm and 1:00pm.

The other, which services trains entering the loop at Jolimont station, was changed in 2008 and now always travels clockwise.

"That doesn't reverse direction," Mr Millichip said.

"We've had some positive feedback around that because it is more logical for those passengers."

This man is not the only one left scratching his head. ( ABC Radio Melbourne: Nicole Mills )

Avoiding collisions and confusion

It's not as simple as picking a time and saying, "right, now everyone go back the other way".

Mr Millichip said it took a bit of time to "flush out the loop".

"We need to take all the trains out, and then after the last one has gone in the AM direction, we can start running in the PM direction," he said.

"So for a short period of time you'll see on some lines trains just terminate at Flinders Street; that's while we're waiting for those last trains to come through the loop before we can start running them in the other direction."

What it means for commuters is there's a short window between 12:30pm and 1:00pm when there's a gap in some services.

Some Reddit users have found they've been caught out on their lunchbreak, shooting across the city easily but unable to get back in time to avoid their bosses' wrath.

"Because the Hurstbridge and Mernda lines always go in the clockwise direction, you can always go from Southern Cross to Flagstaff at all times — you just can't always come back the other way," Mr Millichip said.

The ultimate Sudoku

There's a lot of things to consider when building a train timetable.

There will soon be seven different types of trains on the Melbourne network, but not all trains are capable of travelling on all suburban lines.

Different rolling stock also have a different number of doors, so planners need to build accurate "dwell time" into the timetable, depending on how long it should take to load and unload passengers on that particular train.

Parliament isn't the busiest station in the network, but its users are concentrated around peak times. ( ABC Radio Melbourne: Nicole Mills )

There's also a limited number of platforms at Flinders Street; they don't want trains crossing in front of each other to access spare platforms, there are bottlenecks where multiple lines converge into one, single-line tracks where trains can't pass each other — and the list goes on.

But for Mr Millichip and his team, there's excitement in the challenge.

"If you like maths, it's fun," he said.

"There's some very, very smart mathematical people thinking through those, and they probably do have the Sudoku in their head."

And just like Sudoku, he said the trick was locking in the non-negotiable parts of the puzzle first and building around that.

"For example, a train out of Altona is one of the first trains we timetable because that one's very constrained because of the way it needs to work through the Altona loop because it's a single-line section," he said.

"When that train gets to North Melbourne, it then effectively dictates the position of all the other trains that come through North Melbourne.

"We've got other similar constraints along the network, so that's the way you need to build it up progressively with the most constrained trains in there first — which is [regional provider] V/Line and some of our branch lines — and then build the others on top of that."

What this Sudoku method means is for lines with the least amount of constraints, their trains may not be evenly spaced.

It's why some stations may have two trains departing in the space of five minutes and then a much longer gap before the next one.

"Unfortunately for those people, that line is the least constrained so it tends to be the one we do later in the process," he said.

"The reality is a change we want to make in Swan Hill, five hours away, can affect the way the inner core works. That's how intertwined the network is."

Metropolitan and regional trains use parts of the City Loop. ( ABC Radio Melbourne: Nicole Mills )

Computer simulation helps

Any planned network changes, including the decision to keep one City Loop track running clockwise all day, would be put through a computer simulation before being rolled out.

The program takes four years of data, applies it to the new timetable, and then determines how well it would perform.

"So we know historically we get X number of trespass events a day, we get X number of wheelchair delay events, we get X number of train failures — everything that happens on the network is in the computer," Mr Millichip said.

"So it says, well, if nothing else changed but we changed the timetable, what is the impact? How well does it perform relative to how it performed in the past 12 months?"

Mr Millichip said with the introduction of the new Metro Tunnel, which is due for completion in 2025, large timetable changes, which previously happened on average once every two years, could start to happen more regularly.

"There's this huge cascading benefit by putting that tunnel in," he said.

"There's phenomenal growth on our network, we want more passengers to use the network, we want it to be a viable, reliable service at all times of the day and optimising the infrastructure we've got and the services we've got is quite satisfying when you actually get that uplift in capacity and performance."

So will there come a time when City Loop lines no longer change direction in the middle of the day?

"We will continue to review that over time, but really it's about managing demand and demand is very heavy at Parliament going in the morning and coming out in the afternoon.

"Flinders Street is still the busiest station, but Parliament has a very high demand in the peak periods.

"[Reversing the loop] helps us manage the flow through the stations relatively well through the peaks. If it went the other way, we'd have to rethink how that happens, but that's not to say we aren't thinking about those opportunities in future."