Rolling stock needs regular maintenance in a maintenance facility. Rolling stock from different fleets are routed to maintenance facilities by interchanging the destinations of trains at common stations and by using empty drives. We consider the problem of locating maintenance facilities in a railway network under uncertain or changing line planning, fleet planning, and other uncertain factors. These uncertainties and changes are modeled by a discrete set of scenarios. We show that this new problem is NP-hard and provide a two-stage stochastic programming and a two-stage robust optimization formulation. The second-stage decision is a maintenance routing problem with similarity to a minimum cost-flow problem. We prove that the facility locat...