Computer simulations are frequently used for rail traffic optimization. This approach, referred to as simulation-based optimization, typically employs simulation toolssimulators that are designed to examine railway systems at various levels of detail. Microscopic rail traffic simulators find use when examining rail traffic and the rail infrastructure in great detail. Such simulators typically serve to follow the positions and motions of rail vehicles (trains, locomotives, train cars) and their relocation as well as segments of the rail infrastructure (tracks, switches, track crossings). One of the typical problems to be solved by microscopic simulators within a simulation experiment is to determine the realistic train and shunting routes (within the currently occupied infrastructure) along which the rail vehicles are moved. This requires a suitable rail infrastructure model, associated with algorithms that seek admissible routes for the transfer of the relocation objects. This paper describes novel dynamic route searching algorithms applicable to the relocation of rail vehicles within track infrastructure of railway systems. The infrastructure model is represented by a specific edge-weighted undirected graph. The routes computed by the algorithms coincide with specific shortest walks in the graph, taking into account the particular relocation object lengths. The use of the algorithms within the simulation tools (working at the microscopic level of detail) extends the modelling possibilities when searching for realistic track routes (especially for complicated shunting operations), which contributes to better modelling of complex railway traffic (than in the relevant existing rail traffic simulators) and thus to better application of the results of traffic simulations in practice.INDEX TERMS rail traffic, simulation-based optimizations, single-train shortest routes