Package org.ddolib.examples.misp
Class MispRelax
java.lang.Object
org.ddolib.examples.misp.MispRelax
- All Implemented Interfaces:
Relaxation<BitSet>
Implements a relaxation strategy for the Maximum Independent Set Problem (MISP)
to be used in decision diagram optimization (DDO) algorithms.
This relaxation defines how to merge multiple states and how to adjust transition costs when exploring the relaxed search space.
In this implementation:
- The merged state is computed as the union of all given states, meaning all nodes that are available in at least one state are considered available in the merged state.
- The edge relaxation does not modify the transition cost; it returns the original cost.
-
Constructor Summary
ConstructorsConstructorDescriptionMispRelax(MispProblem problem) Constructs a relaxation for the given MISP problem instance. -
Method Summary
Modifier and TypeMethodDescriptionmergeStates(Iterator<BitSet> states) Merges multiple states into a single relaxed state.doubleAdjusts the transition cost when moving from one state to another in the relaxed space.
-
Constructor Details
-
MispRelax
Constructs a relaxation for the given MISP problem instance.- Parameters:
problem- the Maximum Independent Set problem instance
-
-
Method Details
-
mergeStates
Merges multiple states into a single relaxed state.The merged state is the union of all input states: a node is considered available if it is available in at least one of the states.
- Specified by:
mergeStatesin interfaceRelaxation<BitSet>- Parameters:
states- an iterator over the states to merge- Returns:
- the merged state representing an over-approximation of all input states
-
relaxEdge
Adjusts the transition cost when moving from one state to another in the relaxed space.In this implementation, the relaxation does not modify the cost and simply returns it.
- Specified by:
relaxEdgein interfaceRelaxation<BitSet>- Parameters:
from- the source stateto- the destination statemerged- the merged stated- the decision appliedcost- the original transition cost- Returns:
- the relaxed transition cost (here equal to
cost)
-