We consider the problem of scheduling the storage and retrieval of containers in the storage area of a container terminal. Some arcs in the underlying directed network must be visited; other arcs may be-but need not be-visited. We can. therefore, consider this problem to be a special case of the directed rural postman problem. We show that this problem can be reformulated as an asymmetric Steiner traveling salesman problem. This reformulation can be efficiently solved to optimality by a combination of optimal assignments in bipartite networks for parts of the problem and dynamic programming for the connections between those parts. © 2009 INFORMS.