Package org.ddolib.examples.nolayer.tsp
Class TSPFlb
java.lang.Object
org.ddolib.examples.nolayer.tsp.TSPFlb
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionTSPFlb(TSPProblem problem) Creates a new fast lower bound for the given TSP instance. -
Method Summary
Modifier and TypeMethodDescriptiondoublefastLowerBound(TSPState state) Computes a lower bound on the remaining cost from the given state to reach any valid target state.
-
Constructor Details
-
TSPFlb
Creates a new fast lower bound for the given TSP instance.- Parameters:
problem- the TSP instance to bound
-
-
Method Details
-
fastLowerBound
Description copied from interface:FastLowerBoundComputes a lower bound on the remaining cost from the given state to reach any valid target state.- Specified by:
fastLowerBoundin interfaceFastLowerBound<TSPState>- Parameters:
state- the current state- Returns:
- a lower bound on the remaining cost
-