Matrix-based discrete event control of automated material handling systems