Receding-horizon optimal control for container transfer in intermodal terminals