Package org.ddolib.examples.nolayer.tsp
Class TSPNoLayerDominanceChecker
java.lang.Object
org.ddolib.examples.nolayer.tsp.TSPNoLayerDominanceChecker
- All Implemented Interfaces:
NoLayerDominanceChecker<TSPState>
Dominance checker for the Travelling Salesperson Problem (TSP). Correctly implements subset
dominance relations across different cardinalities.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new dominance checker with an empty dominance front. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the internally cached states used for dominance checking.booleanupdateDominance(TSPState state, double value) Evaluates if a state can be pruned based on previously seen states.
-
Constructor Details
-
TSPNoLayerDominanceChecker
public TSPNoLayerDominanceChecker()Creates a new dominance checker with an empty dominance front.
-
-
Method Details
-
updateDominance
Description copied from interface:NoLayerDominanceCheckerEvaluates if a state can be pruned based on previously seen states.- Specified by:
updateDominancein interfaceNoLayerDominanceChecker<TSPState>- Parameters:
state- the current state to checkvalue- the objective value associated with reaching the state- Returns:
trueif the state is dominated and should be pruned;falseotherwise
-
clear
public void clear()Description copied from interface:NoLayerDominanceCheckerClears the internally cached states used for dominance checking. This is useful to reset the checker's state between solver iterations.- Specified by:
clearin interfaceNoLayerDominanceChecker<TSPState>
-