C
- The class implementing the cost structure. To be able to detect
which cost is better, it needs to implement Comparable.public class ReplayStateExpander<C extends ReplayCost & java.lang.Comparable<? super C>> extends java.lang.Object implements org.processmining.framework.util.search.NodeExpander<ReplayState<C>>
Constructor and Description |
---|
ReplayStateExpander(ReplaySettings<C> settings,
org.processmining.models.graphbased.directed.petrinet.Petrinet net,
org.processmining.models.semantics.petrinet.PetrinetSemantics semantics,
java.util.Map<org.processmining.models.graphbased.directed.petrinet.elements.Transition,? extends java.lang.Object> map,
ReplayCostAddOperator<C> addOperator)
Create the state expander.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<ReplayState<C>> |
expandNode(ReplayState<C> state,
org.processmining.framework.plugin.Progress progress,
java.util.Collection<ReplayState<C>> unmodifiableResultCollection)
Expands a state.
|
void |
processLeaf(ReplayState<C> leafState,
org.processmining.framework.plugin.Progress progress,
java.util.Collection<ReplayState<C>> resultCollection)
Required by the interface, but not used here.
|
public ReplayStateExpander(ReplaySettings<C> settings, org.processmining.models.graphbased.directed.petrinet.Petrinet net, org.processmining.models.semantics.petrinet.PetrinetSemantics semantics, java.util.Map<org.processmining.models.graphbased.directed.petrinet.elements.Transition,? extends java.lang.Object> map, ReplayCostAddOperator<C> addOperator)
settings
- The settings to use.net
- The net to replay the traces in.semantics
- The semantics to use while replaying the traces in the net.map
- The map which tells which transitions match which objects in
the traces.addOperator
- The add operator for adding to a cost.public java.util.Collection<ReplayState<C>> expandNode(ReplayState<C> state, org.processmining.framework.plugin.Progress progress, java.util.Collection<ReplayState<C>> unmodifiableResultCollection)
expandNode
in interface org.processmining.framework.util.search.NodeExpander<ReplayState<C extends ReplayCost & java.lang.Comparable<? super C>>>
state
- The state to expand.progress
- The progress indicator to pass on to the
MultiThreadedSearcher.unmodifiableResultCollection
- Required by the interface, but not used here.public void processLeaf(ReplayState<C> leafState, org.processmining.framework.plugin.Progress progress, java.util.Collection<ReplayState<C>> resultCollection)
processLeaf
in interface org.processmining.framework.util.search.NodeExpander<ReplayState<C extends ReplayCost & java.lang.Comparable<? super C>>>
leafState
- The node that was found to be a leaf by the expandNode method
(i.e. the expandNode method returned and empty collection)progress
- The progress indicator provided to the searcher in which this
expander is registered. The expander may increment the
progress, but it should check for cancellation, especially
when doing long computations.resultCollection
- The collection to which to add the leaf node. More advanced
computations are allowed here, i.e. the resultCollection can
be changed. Note however that this requires syncrhonization on
the collection, as calls to this method are not thread-safe.