Taxis are an important transportation mode in many cities due to their convenience and accessibility. In the taxi-dispatching problem, sometimes it is more beneficial for the supplier if taxis cruise in the network after serving the first request to pick up the next passenger, while sometimes it is better that they wait in stations for new trip requests. In this article, we propose a rolling horizon scheme that dynamically optimizes taxi dispatching considering the actual traffic conditions. To optimize passenger satisfaction, we define a limitation for passenger waiting time. To be able to apply the method to large-scale networks, we introduce a clustering-based technique that can significantly improve the computation time without harming the solution quality. Finally, we test our method on a real test case considering taxi requests with personal car trips to reproduce actual network loading and unloading congestion during peak hours.