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(); // true, since s2.currentTime() is less than s1.currentTime() boolean result = dominance.isDominatedOrEqual(s1, s2);
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MSCTDominance
public MSCTDominance()Creates a new instance of this dominance relation.
-
-
Method Details
-
getKey
Returns a key used for grouping states before applying dominance checks.Only states with the same set of remaining jobs can dominate each other (see
isDominatedOrEqual(org.ddolib.examples.layered.msct.MSCTState, org.ddolib.examples.layered.msct.MSCTState)), so this set is the key: each state is only compared with the states having the same remaining jobs, instead of all the states of its layer. -
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.
This indicates that
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 dominancestate2- the second state, potentially dominating the first- Returns:
trueifstate1is dominated or equal tostate2;falseotherwise
-