Fast and Near-Optimal Collision-Free Robot Scheduling On Paths

Duncan Adamson, Nathan Flaherty, Igor Potapov, Paul G. Spirakis, Zamaraeva, Elena

Abstract

In this paper, we address the problem of scheduling a set of robots to complete tasks in a laboratory environment, modeled as a graph, while avoiding collisions. We analyze the dynamic programming algorithm (PA) and present three baselines: an integer programming approach (IP) that yields optimal solutions, a greedy algorithm (GA), and a randomized algorithm (RA). We show that for path graphs, PA, GA, and RA find solutions orders of magnitude faster than IP. Specifically, PA returns optimal results in the vast majority of cases, with an average schedule timespan less than half that of RA and GA. This work demonstrates that PA produces near-optimal schedules while maintaining high computational efficiency.

Introduction

Modern laboratory automation often relies on robots moving along linear tracks to perform sequential tasks such as sample transport or reaction monitoring. Minimizing the total time to complete all tasks—the makespan—is a complex scheduling problem, especially when accounting for collision avoidance. While this problem is NP-hard on general graphs (including 2D grids), this research focuses on path graphs (1D tracks), seeking a balance between the computational cost of exact solutions and the inefficiency of simple heuristics.

Methodology

The study evaluates four distinct algorithmic approaches:

  1. Integer Programming (IP): A novel mathematical formulation that guarantees the absolute fastest schedule. It serves as the ground truth for optimality but is computationally expensive.
  2. Partition Algorithm (PA): A dynamic programming approach that segments the path and assigns tasks to robots. It is optimized to minimize redundant movement and handle stationary robots efficiently.
  3. Greedy Algorithm (GA): A baseline that assigns the nearest available robot to the shortest task.
  4. Randomized Algorithm (RA): A baseline that assigns tasks to robots in a random order, checking for collisions at each step.

Experimental Setup

The algorithms were tested using synthetic datasets designed to mimic real-world laboratory scenarios. Small-scale experiments (DS1) with up to 12 vertices were used to compare performance against the optimal IP baseline. Large-scale experiments (DS2–DS5) involved up to 100 vertices and 50 robots, testing various task and robot distributions, including uniform, clustered, and hotspot scenarios.

Key Results

Schedule Quality and Optimality

The Partition Algorithm (PA) demonstrated exceptional performance in terms of schedule quality. In small-scale tests, PA achieved the optimal solution in 95.1% of cases. Even when not perfectly optimal, the schedules produced by PA were, on average, within 0.4% of the theoretical minimum. In contrast, the Greedy and Randomized baselines produced significantly longer schedules.

Approximation ratio (ρ) across different algorithms as the number of vertices increases. PA remains near-optimal (ρ ≈ 1.0), while GA and RA show increasing inefficiency.

Computational Efficiency

While the IP approach guarantees optimality, it is computationally intensive. As the problem size grows, the runtime for IP increases exponentially. In one instance, IP required over 4 hours to find a solution that the Partition Algorithm calculated in just 0.0006 seconds. PA, GA, and RA all maintained near-instantaneous execution times even as the number of vertices increased.

Total runtime (T) comparison. The IP approach scales exponentially, making it impractical for large systems, whereas PA remains highly efficient.

Performance at Scale

In large-scale experiments, PA consistently outperformed the non-optimal baselines, producing schedules that were less than half the length of those from GA or RA. Simple heuristics like GA were found to be particularly prone to "traffic jams" in clustered scenarios, where a greedy robot might block others from reaching their tasks.

Conclusion

The Partition Algorithm offers a robust and highly efficient solution for robot scheduling on path graphs. It provides near-optimal results while being thousands of times faster than exact mathematical methods. While the problem remains challenging on more complex 2D grids, this work establishes a high-performance foundation for linear laboratory environments and automated tracks.

Summary updated

Abstract

In this paper, we address the problem of scheduling a set of robots to complete tasks in a laboratory environment, modelled as a graph, while avoiding collisions. We analyze the dynamic programming algorithm (PA) introduced in arXiv:2402.12019 and present three baselines for comparison: an integer programming approach (IP) that always yields an optimal solution, a greedy algorithm (GA), and a simple randomized algorithm (RA). We show that for a path graph, PA, GA, and RA find solutions several orders of magnitude faster than IP (the optimal baseline), with PA returning optimal results in the vast majority of cases. Our scaled experiments comparing non-optimal algorithms show that the average schedule timespan produced by PA is less than half that of RA and GA. This outperformance is consistent across varying path lengths, task durations and distributions, number and allocations of tasks and robots, and task-to-robot ratios. This work serves two purposes. First, we present three algorithms for scheduling on line graphs, including a novel integer programming formulation for finding optimal solutions. Second, we demonstrate that PA produces near-optimal schedules that outperform all non-optimal baselines while maintaining a comparable runtime. Code is available at https://github.com/sea26-robots/code.
BibTeX
@misc{adamson2025fast,
  author = {Duncan Adamson and Nathan Flaherty and Igor Potapov and Paul G. Spirakis and Zamaraeva, Elena},
  title = {{Fast and Near-Optimal Collision-Free Robot Scheduling On Paths}},
  year = {2025},
  eprint = {2502.07851},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.07851},
}
Figure