Class PSRanking
- All Implemented Interfaces:
Comparator<PSState>,StateRanking<PSState>
PSState objects within the Production
Scheduling Problem (PSP) search framework.
The PSRanking class implements the StateRanking interface and defines a simple
heuristic ordering between states based on their total remaining demand. This ranking is
typically used by search algorithms such as DDO (Decision Diagram Optimization) to prioritize
which states should be expanded first during the exploration of the search tree.
In this implementation, states with a smaller total demand are considered "better" (i.e., ranked higher), as they represent configurations that are closer to satisfying all production demands.
Note: this ranking heuristic is a simple and potentially suboptimal choice. More advanced heuristics may consider additional aspects such as stocking cost accumulation, changeover penalties, or temporal feasibility.
- 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
-
PSRanking
public PSRanking()Creates a new instance of this ranking.
-
-
Method Details
-
compare
Compares two PSP states based on their total remaining demand.The state with the smaller sum of
previousDemandsvalues (i.e., fewer remaining demands) is considered to have a better rank.- Specified by:
comparein interfaceComparator<PSState>- Parameters:
s1- the firstPSStateto compares2- the secondPSStateto compare- Returns:
- a negative integer if
s1is better thans2, zero if they are equivalent, or a positive integer otherwise
-