public interface EfficientPetrinetSemantics extends PetrinetSemantics
The original
PetrinetSemantics
interface is also supported, but using methods of this interface might not
lead to the best performance.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
EfficientPetrinetSemantics.PlaceVisitor
Visitor style interface to iterate through places
|
| Modifier and Type | Method and Description |
|---|---|
Marking |
convert(byte[] marking)
convert a primative int array to a marking object based on the internal
index representation of the petri net's places.
|
byte[] |
convert(Marking marking)
allows to convert a given marking to an equivalent int array based on the
internal index representation of the petri net's places.
|
void |
directExecuteExecutableTransition(Transition transition)
Executes (fires) a transition.
|
boolean |
equalMarking(byte[] marking1,
Marking marking2) |
boolean |
equalOrLessMarking(byte[] marking1,
Marking marking2) |
org.processmining.models.semantics.ExecutionInformation |
executeExecutableTransition(Transition toExecute)
For better performance, use method
directExecuteExecutableTransition(Transition) instead. |
void |
forEachMarkedPlace(EfficientPetrinetSemantics.PlaceVisitor placeVisitor)
Visits each place that is marked with one or more tokens.
|
void |
forEachPlace(EfficientPetrinetSemantics.PlaceVisitor placeVisitor)
Visits each place.
|
java.util.Collection<Transition> |
getExecutableTransitions()
For better performance, use method
isEnabled(Transition)
instead. |
int |
getIndex(Place place) |
int |
getIndex(Transition transition) |
byte[] |
getMissingTokensToEnable(int transitionIndex) |
byte[] |
getMissingTokensToEnable(Transition t)
figures out whether a certain transition t is missing any tokens to be
fired.
|
Place |
getPlace(int placeIndex) |
byte[] |
getState() |
Marking |
getStateAsMarking()
Creates a new
Marking object with the current marking. |
Transition |
getTransition(int index) |
boolean |
isEnabled(int transitionIndex) |
boolean |
isEnabled(Transition transition) |
boolean |
isMarked(byte[] marking,
Place place) |
void |
setState(byte[] state)
Sets the state to the supplied state (marking).
|
void |
setStateAsMarking(Marking marking)
Sets the state to the supplied marking.
|
void directExecuteExecutableTransition(Transition transition)
transition - boolean equalMarking(byte[] marking1,
Marking marking2)
marking1 - marking2 - boolean equalOrLessMarking(byte[] marking1,
Marking marking2)
marking1 - marking2 - org.processmining.models.semantics.ExecutionInformation executeExecutableTransition(Transition toExecute) throws org.processmining.models.semantics.IllegalTransitionException
directExecuteExecutableTransition(Transition) instead.executeExecutableTransition in interface org.processmining.models.semantics.Semantics<Marking,Transition>toExecute - org.processmining.models.semantics.IllegalTransitionExceptionvoid forEachMarkedPlace(EfficientPetrinetSemantics.PlaceVisitor placeVisitor)
placeVisitor - void forEachPlace(EfficientPetrinetSemantics.PlaceVisitor placeVisitor)
placeVisitor - java.util.Collection<Transition> getExecutableTransitions()
isEnabled(Transition)
instead.getExecutableTransitions in interface org.processmining.models.semantics.Semantics<Marking,Transition>int getIndex(Place place)
place - getState()int getIndex(Transition transition)
transition - byte[] getMissingTokensToEnable(Transition t)
t - transition to firebyte[] getMissingTokensToEnable(int transitionIndex)
Place getPlace(int placeIndex)
placeIndex - of the placebyte[] getState()
Marking getStateAsMarking()
Marking object with the current marking.MarkingTransition getTransition(int index)
index - of the transitionboolean isEnabled(Transition transition)
transition - boolean isEnabled(int transitionIndex)
boolean isMarked(byte[] marking,
Place place)
marking - obtained with getState()place - of the netvoid setState(byte[] state)
state - void setStateAsMarking(Marking marking)
marking - byte[] convert(Marking marking)
marking - of the petri net used wihtin semanticsMarking convert(byte[] marking)
marking - to transform (int arr)