Fast and Safe Scheduling of Robots

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

Abstract: In this paper, we present an experimental analysis of a fast heuristic algorithm that was designed to generate a fast, collision-free schedule for a set of robots on a path graph. The experiments confirm the algorithm's effectiveness in producing collision-free schedules as well as achieving the optimal solution when all tasks assigned to the robots are of equal duration. Additionally, we provide an integer linear programming formulation that guarantees an optimal solution for this scheduling problem on any input graph, at the expense of significantly greater computational resources. We prove the correctness of our integer linear program. By comparing the solutions of these two algorithms, including the time required by the schedule itself, and the run time of each algorithm, we show that the heuristic algorithm is optimal or near optimal in nearly all cases, with a far faster run time than the integer linear program.

Introduction

In modern automated laboratories, "robotic chemists" move between stations to perform experiments. This creates a complex coordination problem: how do we assign tasks to robots and plan their movements to minimize the total time (makespan) while ensuring they never occupy the same space or "cross" each other on narrow tracks?

While Multi-Agent Pathfinding (MAPF) is a well-studied field, this research tackles a more specific and difficult variant. Unlike standard MAPF, where an agent just needs to reach a destination, these robots must stay at a task location for a specific duration (e.g., to complete a chemical reaction). The authors focus on path graphs (linear topologies), which are common in lab settings but still computationally challenging when multiple robots and tasks are involved.

Methodology

The researchers compared four distinct approaches to solve this scheduling problem:

  1. Integer Programming (IP): A novel mathematical formulation that guarantees the absolute fastest (optimal) schedule. However, like many exact solvers, it becomes prohibitively slow as the number of robots and tasks increases.
  2. Partition Algorithm (PA): A dynamic programming approach that splits the path into segments, assigning a set of contiguous tasks to each robot. The authors introduced three specific updates to the original PA to prevent collisions with stationary robots.
  3. Greedy Algorithm (GA): A baseline that prioritizes assigning the shortest tasks to the nearest available robots.
  4. Randomized Algorithm (RA): A baseline that assigns tasks to robots in a random order to test if "smart" heuristics actually provide value.

To stress-test these algorithms, several synthetic datasets were generated, ranging from small-scale instances (DS1, up to 12 vertices) for ground-truth comparison to large-scale scenarios (DS2–DS5, up to 100 vertices and 50 robots) simulating various task distributions and bottlenecks.

Performance Comparison

The experimental results highlight a significant efficiency-optimality tradeoff. The Partition Algorithm (PA) proved to be "practically optimal." In 95.1% of small-scale cases, it found the exact same solution as the IP solver, and on average, its schedules were only 0.04% longer.

Figure 3: Performance metrics on DS1 comparing the probability of non-optimality ($P_{opt}$), the ratio of schedule length to optimal ($\rho$), and total computation time ($T$).

As shown in the figure above, while the IP solver guarantees optimality ($\rho = 1.0$), its runtime ($T$) grows exponentially with the number of vertices, taking over 4 hours in some 12-vertex cases. In contrast, the PA maintains near-optimal performance with a runtime of roughly 0.0006 seconds—thousands of times faster than the exact solver.

Key Insights

  • The "Stationary Robot" Trap: A major challenge in robot scheduling is the "blocker." A robot that finishes its tasks early might sit still and block the only path for others. The updates to the PA specifically address this by ensuring robots are assigned tasks in a way that minimizes "dead time" blocking.
  • Greedy Isn't Always Good: In crowded scenarios (DS5), the Greedy Algorithm actually performed worse than the Randomized Algorithm. This is because greedy choices can lead to local bottlenecks, whereas randomization naturally spreads the workload.
  • Scalability: PA showed excellent scalability in large-scale tests, producing schedules less than half the length of those from Greedy or Randomized baselines. It effectively utilized additional robots to reduce total time, whereas the greedy approach often saw times increase with more robots due to congestion.

Conclusion and Future Work

The primary limitation of this study is its focus on path graphs. While paths are fundamental building blocks, real-world labs often involve grids or more complex topologies. The authors provide NP-hardness results for grids, suggesting that while PA works perfectly for lines, general graphs will require more sophisticated heuristics. Future work may involve using the PA as a sub-routine for larger graphs, breaking complex floor plans into linear segments that can be solved efficiently.

Code Availability: The authors have released their code and dataset generation tools at https://github.com/sea26-robots/code.

Summary updated

Abstract

In this paper, we present an experimental analysis of a fast heuristic algorithm that was designed to generate a fast, collision-free schedule for a set of robots on a path graph. The experiments confirm the algorithm's effectiveness in producing collision-free schedules as well as achieving the optimal solution when all tasks assigned to the robots are of equal duration. Additionally, we provide an integer linear programming formulation that guarantees an optimal solution for this scheduling problem on any input graph, at the expense of significantly greater computational resources. We prove the correctness of our integer linear program. By comparing the solutions of these two algorithms, including the time required by the schedule itself, and the run time of each algorithm, we show that the heuristic algorithm is optimal or near optimal in nearly all cases, with a far faster run time than the integer linear program.
BibTeX
@misc{adamson2025fast,
  author = {Duncan Adamson and Nathan Flaherty and Igor Potapov and Paul G. Spirakis},
  title = {{Fast and Safe Scheduling of Robots}},
  year = {2025},
  eprint = {2502.07851},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.07851},
}
Figure