An Optimization Model for Simultaneous Periodic Timetable Generation and Stability Analysis