A matching-based heuristic algorithm for school bus routing problems

Ali Shafahi, Zhongxiang Wang, Ali HaghaniarXiv 2018

Abstract

The School Bus Planning Problem (SBPP) is a complex optimization challenge traditionally split into routing and scheduling phases. This paper presents the Minimum Cost Matching with Post Improvement (MCMPI) algorithm, a two-stage heuristic that bridges the gap between these phases by incorporating trip compatibility into the routing objective. Experimental results demonstrate that MCMPI can reduce bus fleet requirements by up to 25% compared to standard benchmarks, solving large-scale problems with thousands of stops in minutes.

The School Bus Planning Challenge

The SBPP is computationally difficult because it involves two distinct but interdependent subproblems: routing and scheduling. Routing focuses on designing efficient paths to pick up students for a single school, while scheduling sequences these trips so a single bus can serve multiple schools throughout the morning or afternoon.

A common pitfall in existing approaches is the "decomposition gap." A routing plan optimized solely for distance or trip count at one school may result in trips that are incompatible for scheduling—for instance, ending too far from the next school's starting point or at a time that prevents a bus from making a subsequent trip.

The integrated school bus planning process showing the relationship between routing, scheduling, and surrogate objectives.

The MCMPI Algorithm

To address this, the authors propose the MCMPI algorithm, which utilizes a "look-ahead" strategy during the routing phase to ensure generated trips are "compatible" for future scheduling.

Minimum Cost Matching (MCM) Trip Generation

The first stage generates initial trips using an insertion-based heuristic. Unlike greedy algorithms that add one stop at a time, MCM formulates the simultaneous insertion of multiple un-routed stops into existing trips as a bipartite matching problem. This is solved optimally in polynomial time using the Hungarian (Munkres) algorithm.

Crucially, the insertion cost function includes a "surrogate objective" that accounts for trip compatibility. By penalizing trips that are difficult to link with others based on remaining vehicle capacity and travel time, the algorithm produces a routing plan that is inherently more "schedulable."

Visual representation of the matching-based insertion process for un-routed stops.

Post-Improvement (PI) Refinement

The initial solution is further refined through a hybrid of Simulated Annealing (SA) and Tabu Search (TS). This stage employs a "chain exchange" mechanism to move stops between trips, aiming to consolidate under-utilized routes. The SA component allows the algorithm to escape local optima, while the Tabu list prevents cycling through recent moves.

Experimental Results and Insights

The algorithm was evaluated on standard benchmarks (Park et al., 2012) and large-scale synthetic datasets containing up to 300 schools and 6,000 stops.

  • Efficiency and Scalability: MCMPI solved the largest test cases in approximately 6 minutes. While exact mathematical solvers can find optimal solutions for small problems (up to 30 stops), they become computationally intractable as size increases.
  • Performance Gains: The algorithm outperformed existing state-of-the-art methods in 20 out of 24 benchmark scenarios. On average, the method reduced fleet sizes by 5-7%, with peak savings reaching 25% under flexible time constraints.
  • The "Look-Ahead" Advantage: By using a surrogate cost in the routing step that acts as a proxy for the final bus count, the algorithm avoids the inefficiencies inherent in traditional distance-minimizing heuristics.

Conclusion

By integrating scheduling metrics directly into the routing phase via a matching-based heuristic, the MCMPI algorithm significantly improves the efficiency of school bus operations. While the current model assumes deterministic travel times, future work could incorporate uncertainty (e.g., traffic variability) and optimize school bell times to unlock even greater fleet utilization.

Summary updated

BibTeX
@misc{shafahi2018matching,
  author = {Ali Shafahi and Zhongxiang Wang and Ali Haghani},
  title = {{A matching-based heuristic algorithm for school bus routing problems}},
  year = {2018},
  eprint = {1807.05311},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.05311},
}
Figure