Scheduling and timetabling in practice and theory