We develop a task allocation approach using k-means algorithm and Steiner tree properties to dispatch a platoon of mobile robots in a constrained environment. Our approach increases task-execution efficiency of multiple robots by reducing the response time to each task. It clusters the request points based on the k-means algorithm, then pre-positions the robots at standby locations obtained by considering Steiner trees in their designated clusters. Robots travel along shortest paths to serve requests and have collision avoidance ability. A switching strategy for robots is also presented. By switching designated clusters, robots further shorten the total response time and balance their workloads implicitly. Thus, the total task execution time is reduced. The performance of our approach is evaluated through simulations.