Similar Items: Optimizing Travel Time and Regenerative Energy for Periodic Timetables