Crossover operators

The pyvrp.crossover module provides operators that are responsible for generating a new Solution offspring from two parent solutions.

selective_route_exchange(parents: tuple[Solution, Solution], data: ProblemData, cost_evaluator: CostEvaluator, rng: RandomNumberGenerator) Solution

This crossover operator due to Nagata and Kobayashi [1] combines routes from both parents to generate a new offspring solution. It does this by carefully selecting routes from the second parent that could be exchanged with routes from the first parent. This often results in incomplete offspring that can then be repaired using a search method.

Parameters:
parents: tuple[Solution, Solution]

The two parent solutions to create an offspring from.

data: ProblemData

The problem instance.

cost_evaluator: CostEvaluator

The cost evaluator used to evaluate the offspring.

rng: RandomNumberGenerator

The random number generator to use.

Returns:

A new offspring.

Return type:

Solution

References

[1]

Nagata, Y., & Kobayashi, S. (2010). A Memetic Algorithm for the Pickup and Delivery Problem with Time Windows Using Selective Route Exchange Crossover. Parallel Problem Solving from Nature, PPSN XI, 536 - 545.