Class MaxCoverRelax
- All Implemented Interfaces:
Relaxation<MaxCoverState>
MaxCoverState in the Maximum Coverage problem.
This class implements Relaxation and defines how multiple states
can be merged into a single relaxed state. It is typically used in
Decision Diagram Optimization (DDO) to reduce the size of the diagram
while maintaining an admissible relaxation.
The relaxation merges states by computing the intersection of their covered items. Additional statistics (total intersection size, number of merges, and number of zero intersections) are tracked for analysis or debugging purposes.
-
Constructor Summary
ConstructorsConstructorDescriptionMaxCoverRelax(MaxCoverProblem problem) Constructs a MaxCover relaxation operator for a given problem instance. -
Method Summary
Modifier and TypeMethodDescriptionmergeStates(Iterator<MaxCoverState> states) Merges a collection of states into a single relaxed state.doublerelaxEdge(MaxCoverState from, MaxCoverState to, MaxCoverState merged, Decision d, double cost) Computes the relaxed cost of a transition between states.
-
Constructor Details
-
MaxCoverRelax
Constructs a MaxCover relaxation operator for a given problem instance.- Parameters:
problem- the MaxCover problem instance
-
-
Method Details
-
mergeStates
Merges a collection of states into a single relaxed state.The merged state covers only the items that are common to all input states (intersection). This ensures the relaxation is admissible, as it does not overestimate coverage.
- Specified by:
mergeStatesin interfaceRelaxation<MaxCoverState>- Parameters:
states- an iterator over the states to merge- Returns:
- a new
MaxCoverStaterepresenting the intersection of the input states
-
relaxEdge
public double relaxEdge(MaxCoverState from, MaxCoverState to, MaxCoverState merged, Decision d, double cost) Computes the relaxed cost of a transition between states.In this implementation, the cost is not modified by the relaxation and is returned as-is.
- Specified by:
relaxEdgein interfaceRelaxation<MaxCoverState>- Parameters:
from- the source stateto- the destination statemerged- the merged state after relaxationd- the decision appliedcost- the original transition cost- Returns:
- the relaxed transition cost (same as input cost)
-