In this paper we consider the problem of routing trains through railwa
y stations. This problem occurs as a subproblem in a project which the
authors are carrying out in cooperation with the Dutch railways. The
project involves the analysis of future infrastructural capacity requi
rements in the Dutch railway network. Part of this project is the auto
matic generation and evaluation of timetables. To generate a timetable
a hierarchical approach is followed: at the upper level in the hierar
chy a tentative timetable is generated, taking into account the specif
ic scheduling problems of the trains at the railway stations at an agg
regate level. At the lower level in the hierarchy it is checked whethe
r the tentative timetable is feasible with respect to the safety rules
and the connection requirements at the stations. To carry out this co
nsistency check, detailed schedules for the trains at the railway yard
s have to be generated lit this paper we present a mathematical model
formulation for this detailed scheduling problem based on. the Node Pa
cking Problem (NPP). Furthermore, we describe a solution procedure for
the problem, based on a branch-and-cut approach. The approach is test
ed in art empirical study with data from the station, of Zwolle in The
Netherlands.