Different levels of detail can be used to model a railway network when optimizing the timetable. While microscopic models are required to accurately represent the train operations, they are often quite complex and require long computation times. Therefore, macroscopic models are often used instead. Microscopic simulation is then used in a later stage to determine if the timetable is conflict-free. In this work, we examine the impact of the level of detail that is used to model the network on the optimization of the timetable, more specifically on improving the timetable robustness. This way, we obtain more insight into which level of detail is most useful in practice in terms of the quality of the solution and the computation time. To do this, four different network representations with an increasing level of detail are considered. This includes a macroscopic, two mesoscopic and a microscopic representation. For each of these representations, we formulate a mathematical model to optimize the robustness of the timetable. These models are applied to a line on the Swedish network. The results show that including more details in the optimization leads to better solutions compared to optimizing with less details and solving the conflicts in a later stage. Surprisingly, for our experiments, including more details actually led to a significant decrease in the computation times.