public class MarkingHeuristicsNet
extends java.lang.Object
HeuristicsNet
object.Constructor and Description |
---|
MarkingHeuristicsNet(HeuristicsNet net,
java.util.Random generator)
Builds an initial marking for a given
HeuristicsNet object. |
Modifier and Type | Method and Description |
---|---|
boolean |
endPlace()
Indicates if the "end place" of
HeuristicsNet object is
marked |
int |
fire(org.deckfour.xes.classification.XEventClass event,
org.deckfour.xes.model.XTrace trace,
int eventPositionInTrace)
Executes an activity linking to a given event in a log trace.
|
HNSubSet |
getCurrentEnabledElements()
Retrieves the current enabled activities for this current marking.
|
int |
getCurrentNumEnabledElements()
Retrieves the number of currently enabled activities at this marking.
|
int |
getNumberTokens()
The number of tokens that this marking currently contains
|
int |
getNumTokensEndPlace()
Retrieves the number of tokens in the "end place" of the
HeuristicsNet object of this marking |
boolean |
isEnabled(int activity)
Checks if an activity is enabled at this marking.
|
java.lang.String |
printCurrentMarking()
Creates a string representation of this marking
|
boolean |
properlyCompleted()
Indicates if this marking is in a proper completion state
|
void |
reset()
Sets this marking to its initial state
|
public MarkingHeuristicsNet(HeuristicsNet net, java.util.Random generator) throws java.lang.NullPointerException
HeuristicsNet
object.net
- heuristics net object to which this marking will refer togenerator
- random generator used when modifying this markingjava.lang.NullPointerException
- if any input or output set of the given
HeuristicsNet
object is null
public void reset()
public java.lang.String printCurrentMarking()
public int getNumberTokens()
public boolean properlyCompleted()
true
if this marking is a proper completion state,
false
otherwisepublic boolean endPlace()
HeuristicsNet
object is
markedtrue
if the end place of is marked,
false
otherwisepublic int getNumTokensEndPlace()
HeuristicsNet
object of this markingpublic int fire(org.deckfour.xes.classification.XEventClass event, org.deckfour.xes.model.XTrace trace, int eventPositionInTrace)
event
- event linking to an activity to be fired.trace
- process instance (or trace) where the element to be fired iseventPositionInTrace
- position of the event in the process instancepublic boolean isEnabled(int activity)
activity
- identifier of the activity to check.true
if the activity is enabled at the this marking,
false
otherwise.public HNSubSet getCurrentEnabledElements()
public int getCurrentNumEnabledElements()