Class ALPRanking

java.lang.Object
org.ddolib.examples.alp.ALPRanking
All Implemented Interfaces:
Comparator<ALPState>, StateRanking<ALPState>

public class ALPRanking extends Object implements StateRanking<ALPState>
Ranking heuristic for ALPState objects in the Aircraft Landing Problem (ALP).

This ranking is used to prioritize states when building decision diagrams or exploring the search space. The comparison is done in two steps:

  1. Compare the total number of remaining aircraft to land across all classes.
  2. If the remaining aircraft count is equal, compare the sum of previous landing times on all runways (lower total indicates higher priority).

This heuristic helps solvers decide which states to keep and which to discard during relaxed or bounded search, promoting states closer to completion and with lower cumulative runway occupancy times.

See Also:
  • Constructor Details

    • ALPRanking

      public ALPRanking()
  • Method Details

    • compare

      public int compare(ALPState a, ALPState b)
      Compares two ALP states according to the number of remaining aircraft and the sum of runway previous landing times.
      Specified by:
      compare in interface Comparator<ALPState>
      Parameters:
      a - the first state to compare
      b - the second state to compare
      Returns:
      a negative integer, zero, or a positive integer if a is ranked less than, equal to, or greater than b, respectively