Thoughts on the Algorithmic Submission for a Capacitated Vehicle Routing Problem (CVRP) Solver
High-Level Algorithm Flow
The solver operates as a multi-run, iterative metaheuristic:
- Parametrized ClarkeâWright Construction: A modified ClarkeâWright savings algorithm, where each customer has a unique parameter influencing route formation, constructs an initial solution.
- Parameter Perturbation: Each customerâs parameter is slightly adjusted to explore the solution space.
- Solution Improvement: Local search, employing 2-Opt and inter-route swaps, optimizes the solution built with the new parameters.
- Parameter Acceptance: Uses a Boltzmann-like rule akin to Simulated Annealing to accept or reject the new parameter set, guiding the search in parameter space.
Two distinct runs are performed, starting with node parameters set to 1.0 and 2.0 respectively; the solver retains the best global solution across both runs.
Detailed Logic and Code Steps
Initialization and Feasibility Checks
- Feasibility Heuristic: A quick estimate checks if the instance is overly constrained. If infeasible, the solver aborts. (This is a TIG-specific optimization.)
- Parameter Initialization: Runs are executed twice, initializing all node parameters to 1.0 in the first run, and 2.0 in the second.
Constructing a Route via Savings
-
Create Initial Savings List:
Following the ClarkeâWright logic, for each pair of distinct customers (i, j) , the code stores a potential âmergeâ record if the distance \text{dist}(i, j) is below half the maximum pairwise distance (a filtering step).
-
Recompute and Sort Savings:
A classical ClarkeâWright-like formula is used, but weighted by per-node parameters. In essence:
\text{Savings}(i,j) = (\text{params}[i] + \text{params}[j])\bigl(d_{0i} + d_{j0} - d_{ij}\bigr)
The list is then sorted in descending order of \text{Savings}(i, j) .
-
Create a Solution:
Each customer begins in its own route. Merges are attempted if capacity is not violated and the customers belong to different routes. Routes are finally wrapped with depot 0 at both ends.
Local Search (Postprocessing)
- Intra-route 2-Opt: Eliminates crossing edges to shorten routes.
- Inter-route Swaps: Enumerates beneficial swaps between routes, sorting them by descending improvement. A best-first aggregator applies each feasible swap without conflicts.
Parameter Tuning and Acceptance
-
Neighbor Generation: Slightly perturb each nodeâs parameter within \pm 0.05k , clamping to [1,2] . Increase k if the search stalls.
-
Rebuild + Postprocess: Re-sort the savings list using updated parameters, rebuild routes, then apply local search.
-
Acceptance Criteria: If the new solution is cheaper, accept it. Otherwise, accept with probability \exp(-\Delta / \beta) , where \beta \approx 0.005 \times (\text{current cost}) . This step is analogous to simulated annealing.
-
Updating the Best Solution: If accepted and better than the current best, save it. Each run terminates after 200 iterations or if an early stop is triggered.
Multiple Start Values and Global Best
Once each run (starting at parameter 1.0 and 2.0) is complete, the best solution of the two is returned as the global best.
Relevant Literature and Similar Approaches
ClarkeâWright Savings Heuristic
Clarke and Wright introduced the Savings heuristic, a foundation for numerous VRP approaches. Many variants add a shape parameter (\lambda) or employ multi-parameter expansions to accommodate factors such as demand. However, they typically apply one or two \lambda-like parameters globally. In contrast, this solver assigns distinct parameters to individual nodes.
Randomised Savings / GRASP-Style Approaches
Randomised Savings methods and GRASP-like (Greedy Randomised Adaptive Search Procedure) heuristics typically inject randomness directly into the merge selection process. Here, the code indirectly randomises merges by altering per-node parameters.
GRASP can be thought of as a multi-start local search, in which each initial solution is generated using one greedy randomised heuristic and improved by local search - similar to the logic followed in this code.
Simulated Annealing or Metropolis Acceptance
Simulated Annealing has been widely applied to VRPs, often accepting worse solutions probabilistically to escape local minima. The current solver follows a similar principle but applies it at the parameter level: the entire solution is reconstructed using new node parameters and optimised before deciding on acceptance. Deterministic annealing variants, as in , use a similar acceptance formula based on the cost.
Perturbation to Explore Solution Space
A key strategy in the literature is to perturb problem data so that conventional construction heuristics, like Clarke & Wright, can avoid becoming trapped in suboptimal configurations. For instance, proposed a hybrid GA that lightly randomises customer coordinates, akin to using node-specific multipliers rather than altering real-space coordinates. Both approaches rely on small stochastic shifts to steer solutions away from local optima, aligning with the ânoisingâ concept of perturbing instance data to broaden exploration. While modifies coordinates and this code adjusts per-node parameters, both exploit the principle that shifting input data can yield significantly different (and often better) routes.
Iterated Local Search / Multi-start
Iterated Local Search for CVRP repeatedly perturbs a locally optimal solution, applies local search to find a new local optimum, and then uses an acceptance criterion to decide whether to move to the new solution or stay with the previous one, ultimately aiming to explore a wider solution space and find better solutions.
This solverâs repeated parameter perturbations, route reconstruction, local search and acceptance reflect the core ideas of Iterated Local Search (ILS) or multi-start heuristics, albeit with a parameter-space focus rather than direct route manipulations.
Aggregator-Based Multi-Route Swaps
The best-first aggregator for inter-route swaps is reminiscent of Large Neighborhood Search (LNS) and Variable Neighborhood Search (VNS), which also seek to find larger-scale improvements. Filtering the savings list by distance (only merges below half the max pairwise distance) parallels large-scale VRP strategies that emphasize âpromisingâ edges.
Main papers of interest
The paper by Pichpibul & Kawtummachai enhances the classical ClarkeâWright (CW) heuristic by randomly reordering its savings list through a two-phase probabilistic selection. By avoiding the purely greedy ordering, it escapes local minima more effectively. A separate route post-improvement step (consisting of simple move and swap operations, both intra- and inter-route) further refines solutions.
The paper by Morgan et. al. perturbs the traditional CW heuristic by altering customer coordinates before applying conventional heuristics. Conceptually, this mirrors per-node parameter tuning, since both methods inject randomness into the underlying savings calculations. By repeating these slight variations, solutions are diversified and local optima avoided, an idea closely related to ânoisingâ and multi-start frameworks.
Potential Novel and Inventive Features
- Per-Node Parameters: A separate parameter for each node offers fine-grained control, surpassing typical global-parameter expansions.
- Parameter-Space SA Acceptance: The solver accepts a newly rebuilt solution based on a Boltzmann-like probability, but at the parameter level.
- Global Aggregator Local Search: Ranks all feasible inter-route swaps in descending order of improvement, applying multiple high-gain moves in one pass.
- Integrated Approach: Combining node-wise parameters, local search, and SA-style acceptance in a unified scheme. Its effectiveness hinges on how well these components synergize to produce competitive CVRP solutions relative to existing methods.
Summary
This research presents a new solver for the Capacitated Vehicle Routing Problem (CVRP) that combines a constructive heuristic (modified ClarkeâWright) with a metaheuristic framework (parameter-space simulated annealing) that incorporates local search. The solver iteratively perturbs parameters, reconstructs the solution using the constructive heuristic, applies local search (2-Opt and inter-route swaps) to improve the reconstructed solution, and then uses a Simulated Annealing-like acceptance criterion on the parameters to guide the search.
The main potentially novel and inventive innovations include:
- Node-Specific Parametrization: Leverages classical savings but extends it with per-node parameters instead of a single global parameter. Each nodeâs parameter is perturbed to diversify route construction.
- Acceptance in Parameter Space: A simulated annealing-like acceptance criterion operates on the parameters, not directly on the route. This parameter-space acceptance is not typically found in traditional route-based Simulated Annealing.
- Aggregator-Based Local Search: The solver performs both intra-route 2-Opt and an aggregator-based multi-route swap that batches and ranks potential inter-route exchanges in descending order of cost savings, enabling multiple high-gain moves in a single pass.
Whether these features rise to the level of a âbreakthroughâ depends on how effectively they outperform classical heuristics and whether the synergy can be demonstrated to be a true advance versus a recognizable extension of known methods. However, the codeâs node-based parameter tuning, aggregator local search, and cost-scaling acceptance represent an interesting and possibly novel integration within the CVRP heuristic toolbox.