Optimal timetabling with connections in underground railway systems