An algorithm calculates the best way to visit 26 cantons in 24 hours
![Emmanuel Clédat et Dirk Lauinger on the way to the Swiss Train Challenge. ©Alain Herzog/EPFL Emmanuel Clédat et Dirk Lauinger on the way to the Swiss Train Challenge. ©Alain Herzog/EPFL](/image/69070/1108x622.jpg)
Emmanuel Clédat et Dirk Lauinger on the way to the Swiss Train Challenge. ©Alain Herzog/EPFL
A team of EPFL students will take part in the Swiss Train Challenge this Friday. The goal is to set foot in each of Switzerland’s 26 cantons in less than 24 hours – relying solely on the country’s public transport network.
17 hours, 19 minutes – that’s the record set last year by a Ticino-based team for visiting each and every Swiss canton while travelling exclusively by public transport. The Swiss Train Challenge was launched by Swiss broadcast journalist Nicolas Rossé in 2015, who made the journey that year in 19 hours, 46 minutes. But that was before the Gotthard tunnel was open. This Friday, a team of EPFL students including two PhD researchers will aim for the record-breaking time of 16 hours, 54 minutes. And in a first, their itinerary was calculated by an algorithm rather than by hand.
To develop the algorithm, the students first had to download the exact locations of Switzerland’s 22,080 train stations and bus stops as well as the geographical borders of each canton and the full train timetable. They then whittled down the number of train stations to the 110 “significant” ones, i.e., with potentially useful train connections. The next step was to download lists of all trains that go through these stations and their schedules, and see what other stations they go to in order to maximize their utility. This final step is what the students set their algorithm to work on – which it did for no less than ten days before coming up with the optimal itinerary.
The devil is in the detail
“The first (positive) surprise we got from the algorithm’s itinerary was the travel time: 16 hours, 54 minutes. That means we can technically beat last year’s record. Not by much, due to the previous teams’ hard work and the redundancies in the Swiss train network, but by enough,” says Emmanuel Clédat, a PhD student at EPFL’s Geodetic Engineering Laboratory. “The second surprise was how prominently Ticino – the canton in the south that borders Italy – features in the itinerary. We thought it would be the end point of our journey or a separate out-and-back side trip of its own. But instead, it’s a stop on the way to the Canton of Graubünden. That shows that Ticino lies along one of the main routes crossing the country.”
The team will leave from St. Maurice, in the Canton of Valais, at 5:24am and end their journey at Jakobsbad, in the Canton of Appenzell Innerrhoden, at 10:18pm. The itinerary takes advantage of Switzerland’s many cantonal enclaves to shorten travel distances as much as possible. However, the route is strewn with obstacles; for instance, at the Alpnachstad train station, in the Half-canton of Obwalden, the students will have zero minutes to change trains. “The previous winners had to make the journey twice to set their record. We might also have to make a few trial runs before we reach our goal,” says Dirk Lauinger, a PhD student at EPFL’s Risk Analytics and Optimization Chair.
The pleasure of train travel
Lauinger’s thesis is on optimizing interactions between electric vehicles and power grids, while Clédat – his roommate with whom he decided to take part in the Challenge – is studying computer-assisted vision. So neither one of them is performing research related directly to the Challenge. Rather, they are motivated by their appreciation of train travel, as are the other students who will join them in their attempt to set a new record.