Analysis of the interaction between travel demand and rail capacity constraints