Class CheapestInsertion

java.lang.Object
com.graphhopper.jsprit.core.algorithm.recreate.AbstractInsertionStrategy
com.graphhopper.jsprit.core.algorithm.recreate.CheapestInsertion
All Implemented Interfaces:
InsertionStrategy

public final class CheapestInsertion extends AbstractInsertionStrategy
True Best Insertion (Cheapest Insertion) as defined in VRP literature.

This algorithm repeatedly:

  1. Evaluates ALL unassigned jobs at ALL possible positions
  2. Selects the (job, position) pair with the globally minimum insertion cost
  3. Inserts that job
  4. Repeats until all jobs are inserted or no feasible insertion exists

This differs from BestInsertion which processes jobs in random order, inserting each at its best position (Sequential/Random Order Insertion).

Time complexity: O(J² × R × P) where J = jobs, R = routes, P = positions per route. This is more expensive than random order insertion but typically produces better solutions.

Author:
schroeder