The practice and theory of automated timetabling