Class TSPFlb

java.lang.Object
org.ddolib.examples.nolayer.tsp.TSPFlb
All Implemented Interfaces:
FastLowerBound<TSPState>

public class TSPFlb extends Object implements FastLowerBound<TSPState>
Fast lower bound for the Traveling Salesman Problem (TSP), using the no-layer modeling API.

The bound sums, for each city that still must be visited (plus the return to the origin), the least-cost edge incident to that city.

  • Constructor Details

    • TSPFlb

      public TSPFlb(TSPProblem problem)
      Creates a new fast lower bound for the given TSP instance.
      Parameters:
      problem - the TSP instance to bound
  • Method Details

    • fastLowerBound

      public double fastLowerBound(TSPState state)
      Description copied from interface: FastLowerBound
      Computes a lower bound on the remaining cost from the given state to reach any valid target state.
      Specified by:
      fastLowerBound in interface FastLowerBound<TSPState>
      Parameters:
      state - the current state
      Returns:
      a lower bound on the remaining cost