Class PSRelax
- All Implemented Interfaces:
Relaxation<PSState>
The PSRelax class defines how multiple PSState objects
can be merged into a single relaxed state during the search process.
Relaxation is a key component of the DDO algorithm, enabling the merging
of similar or compatible states to reduce the size of the search graph
while preserving admissibility.
In this implementation, the relaxation rule merges states by:
- Taking the earliest time index among all merged states;
- Taking the minimum value of
previousDemandsfor each item type, effectively under-approximating remaining demands; - Setting the machine to the
PSProblem.IDLEstate, as the specific pigment context is lost during merging.
The resulting relaxed state is less constrained (hence "relaxed"), which allows the solver to reason over fewer states while maintaining lower-bound consistency.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PSRelax
Constructs a relaxation operator associated with a given PSP problem.- Parameters:
problem- thePSProbleminstance that defines the scheduling parameters, costs, and demands.
-
-
Method Details
-
mergeStates
Merges multiple PSP states into a single relaxed state.The merging process:
- Takes the minimum time index among the given states;
- For each item type, takes the smallest (earliest) previous demand index;
- Sets the resulting state to the idle production mode.
- Specified by:
mergeStatesin interfaceRelaxation<PSState>- Parameters:
states- an iterator over thePSStateinstances to be merged- Returns:
- a new relaxed
PSStaterepresenting the merged configuration
-
relaxEdge
Returns the relaxed transition cost between two PSP states.In this simple implementation, the relaxation does not alter the transition cost and simply returns the original value. More advanced relaxations could, however, modify this cost to tighten the lower bounds.
- Specified by:
relaxEdgein interfaceRelaxation<PSState>- Parameters:
from- the originating stateto- the destination statemerged- the merged (relaxed) stated- the decision leading to the transitioncost- the original transition cost- Returns:
- the (possibly modified) transition cost after relaxation
-