Class TSRelax
java.lang.Object
org.ddolib.examples.talentscheduling.TSRelax
- All Implemented Interfaces:
Relaxation<TSState>
Implementation of a relaxation for the Talent Scheduling problem (TSP).
This class defines how multiple TSState instances can be merged into a single
relaxed state and how edge costs are relaxed in the context of DDO or other
relaxed decision diagrams.
The relaxation is implemented by merging the remaining and maybe scenes from multiple states:
mergedRemainingis the intersection of allremainingScenessets.mergedMaybeis the union of allremainingScenesandmaybeScenes, minus themergedRemainingscenes.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TSRelax
Constructs a new relaxation instance for the given Talent Scheduling problem.- Parameters:
problem- The TSP problem instance associated with this relaxation.
-
-
Method Details
-
mergeStates
Merges multipleTSStateinstances into a single relaxed state.- Specified by:
mergeStatesin interfaceRelaxation<TSState>- Parameters:
states- An iterator over the states to merge.- Returns:
- A new
TSStaterepresenting the merged state.
-
relaxEdge
Returns the relaxed edge cost between two states.In this implementation, the cost is not changed and returned as-is.
- Specified by:
relaxEdgein interfaceRelaxation<TSState>- Parameters:
from- The source state.to- The target state.merged- The merged state if multiple states are combined.d- The decision associated with the edge.cost- The original edge cost.- Returns:
- The relaxed edge cost (here equal to
cost).
-