Package org.ddolib.examples.pdp
Class PDPRanking
java.lang.Object
org.ddolib.examples.pdp.PDPRanking
- All Implemented Interfaces:
Comparator<PDPState>,StateRanking<PDPState>
Implements a state ranking strategy for the Pickup and Delivery Problem (PDP).
This ranking is used to order states during search algorithms, such as DDO or ACS, to prioritize exploration of certain states over others.
Currently, all states are considered equal in rank (compare always returns 0). The commented-out line hints at a possible ranking based on the uncertainty of the vehicle's content, where states with more uncertain content could be ranked differently.
This class implements the StateRanking interface, which allows it
to be plugged into search models for PDP optimization.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
PDPRanking
public PDPRanking()
-
-
Method Details
-
compare
Compares two PDP states to determine their relative rank.- Specified by:
comparein interfaceComparator<PDPState>- Parameters:
o1- the first PDPState to compareo2- the second PDPState to compare- Returns:
- 0 indicating both states are currently considered of equal rank
-