Algorithms for Scheduling of Train Maintenance