Package org.ddolib.examples.alp
Class ALPRanking
java.lang.Object
org.ddolib.examples.alp.ALPRanking
- All Implemented Interfaces:
Comparator<ALPState>,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:
- Compare the total number of remaining aircraft to land across all classes.
- 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 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
-
ALPRanking
public ALPRanking()
-
-
Method Details
-
compare
Compares two ALP states according to the number of remaining aircraft and the sum of runway previous landing times.- Specified by:
comparein interfaceComparator<ALPState>- Parameters:
a- the first state to compareb- the second state to compare- Returns:
- a negative integer, zero, or a positive integer if
ais ranked less than, equal to, or greater thanb, respectively
-