Class MSCTDominance
This class defines how two states of the MSCT problem can be compared in terms of dominance.
In this context, a state state1 is said to be dominated or equal to another
state state2 if both states have the same set of remaining jobs to schedule,
and state2 achieves the same or an earlier current time (i.e., a better schedule
in terms of completion time).
The dominance relation is used in search algorithms (such as DDO or A*) to prune suboptimal states — if one state dominates another, the dominated state can be safely discarded without affecting optimality.
Example:
MSCTState s1 = new MSCTState(remainingJobs1, 10); MSCTState s2 = new MSCTState(remainingJobs1, 8); MSCTDominance dominance = new MSCTDominance(); boolean result = dominance.isDominatedOrEqual(s1, s2); // true, since s2.currentTime() is less than s1.currentTime()
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MSCTDominance
public MSCTDominance()
-
-
Method Details
-
getKey
Returns a key used for grouping states before applying dominance checks.In this simple implementation, all states share the same key (always
0), meaning that the dominance check can potentially compare any two states. This can be customized for efficiency in larger problems. -
isDominatedOrEqual
Checks whether the first statestate1is dominated or equal to the second statestate2.A state
state1is dominated bystate2if:- Both states have the same set of remaining jobs to schedule, and
- The current time of
state2is less than or equal to that ofstate1.
state2represents a better (or equivalent) scheduling situation, makingstate1redundant in the search process.- Specified by:
isDominatedOrEqualin interfaceDominance<MSCTState>- Parameters:
state1- the first state to test for dominance.state2- the second state, potentially dominating the first.- Returns:
trueifstate1is dominated or equal tostate2;falseotherwise.
-