Class PDPRanking

java.lang.Object
org.ddolib.examples.pdp.PDPRanking
All Implemented Interfaces:
Comparator<PDPState>, StateRanking<PDPState>

public class PDPRanking extends Object implements 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 Details

    • PDPRanking

      public PDPRanking()
  • Method Details

    • compare

      public int compare(PDPState o1, PDPState o2)
      Compares two PDP states to determine their relative rank.
      Specified by:
      compare in interface Comparator<PDPState>
      Parameters:
      o1 - the first PDPState to compare
      o2 - the second PDPState to compare
      Returns:
      0 indicating both states are currently considered of equal rank