org.processmining.exporting.petrinet.cpnexport.HLImplementation
Class HLActivity

java.lang.Object
  extended by org.processmining.exporting.petrinet.cpnexport.HLImplementation.HLActivity
All Implemented Interfaces:
java.lang.Cloneable, HighLevelActivity

public class HLActivity
extends java.lang.Object
implements HighLevelActivity

Represents some standalone activity that can be filled with simulation information.
A set of these activities can be exported by a plugin and later combined with aggregate information from other plugins.

Author:
arozinat, rmans
See Also:
HLActivitySet

Constructor Summary
HLActivity(HLActivitySet parent, java.lang.String name)
          Default constructor.
 
Method Summary
 void addDataAttribute(HighLevelDataAttribute att)
          Adds a new data attribute to this activity.
 java.lang.Object clone()
          Makes a shallow copy of the object
 java.util.List<HighLevelDataAttribute> getDataAttributes()
          Retrieves the list of data attributes available for this activity.
 Distribution getExecutionTime()
          Retrieves the distribution of the execution time for this activity.
 int getFrequencyDependency()
          Sets the frequency dependency specified for this activity.
 HighLevelGroup getGroup()
          Retrieves the group for this activity.
 java.lang.String getName()
          Retrieves the name of the activity
 Distribution getSojournTime()
          Retrieves the distribution of the sojourn time for this activity.
 Distribution getWaitingTime()
          Retrieves the distribution of the waiting time for this activity.
 java.lang.Object partialClone()
          Partially clones the object.
 void removeAllDataAttributes()
          Removes all data attributes from this activity.
 boolean removeDataAttribute(HighLevelDataAttribute att)
          Removes the given data attribute from this activity.
 boolean removeGroup(HighLevelGroup group)
          Removes the given group from this activity.
 void setExecutionTime(Distribution dist)
          Provides a distribution of the execution time for this activity.
 void setFrequencyDependency(int freq)
          Adds a frequency dependency to this activity.
 void setGroup(HighLevelGroup group)
          Defines a group for this activity.
 void setName(java.lang.String name)
          Sets the name of the activity
 void setParentProcess(HighLevelProcess parent)
          Sets the parent process of the highlevelactivity.
 void setSojournTime(Distribution dist)
          Provides a distribution of the sojourn time for this activity.
 void setWaitingTime(Distribution dist)
          Provides a distribution of the waiting time for this activity.
 java.lang.String toString()
          Returns the name of the highlevelactivity
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.processmining.framework.models.hlprocess.HighLevelActivity
equals, hashCode
 

Constructor Detail

HLActivity

public HLActivity(HLActivitySet parent,
                  java.lang.String name)
Default constructor.

Parameters:
parent - HLActivitySet the activity set based simulation model
Method Detail

setParentProcess

public void setParentProcess(HighLevelProcess parent)
Description copied from interface: HighLevelActivity
Sets the parent process of the highlevelactivity.

Specified by:
setParentProcess in interface HighLevelActivity
Parameters:
parent - HighLevelProcess the parent process

clone

public java.lang.Object clone()
Makes a shallow copy of the object

Specified by:
clone in interface HighLevelActivity
Overrides:
clone in class java.lang.Object
Returns:
Object the cloned object

partialClone

public java.lang.Object partialClone()
Partially clones the object. All the timing information is cloned. However, the group that is attached to this object will not be cloned and for the data attributes a new EMPTY list will be created

Specified by:
partialClone in interface HighLevelActivity
Returns:
Object the partially cloned object

addDataAttribute

public void addDataAttribute(HighLevelDataAttribute att)
Description copied from interface: HighLevelActivity
Adds a new data attribute to this activity. Note that if this data attribute had already been added to this process before, it will not be added again.

Specified by:
addDataAttribute in interface HighLevelActivity
Parameters:
att - the attributed to be added

getDataAttributes

public java.util.List<HighLevelDataAttribute> getDataAttributes()
Description copied from interface: HighLevelActivity
Retrieves the list of data attributes available for this activity.

Note that this list should be consistent with (i.e., a sub set of) the data attributes available at the process level (if there is an enclosing process for this activity).

Specified by:
getDataAttributes in interface HighLevelActivity
Returns:
the list of HighLevelDataAttribute objects representing the attributes provided by this activity. If no data attributes have been set an empty list needs to be returned

getExecutionTime

public Distribution getExecutionTime()
Description copied from interface: HighLevelActivity
Retrieves the distribution of the execution time for this activity.
The execution time is defined as the time from the starting an activity until its completion.

Conflict: Note that there is a semantic conflict between

Specified by:
getExecutionTime in interface HighLevelActivity
Returns:
the distribution of the execution time. In the case that no execution time has been set a default distribution has to be returned.
See Also:
HighLevelActivity.getWaitingTime(), HighLevelActivity.getSojournTime(), HighLevelProcess.getTimeUnit()

getFrequencyDependency

public int getFrequencyDependency()
Description copied from interface: HighLevelActivity
Sets the frequency dependency specified for this activity.
This relates to the (relative) frequency of chosing this activity if it is involved into an alternative split.

Conflict: Note further that there is a semantic conflict between

Specified by:
getFrequencyDependency in interface HighLevelActivity
Returns:
the frequency dependency specified for this activity. If no frequency dependency has been set a default value needs to be returned.
See Also:
HighLevelProcess.getDataDependencies(), HighLevelProcess.getProbabilityDependencies()

getGroup

public HighLevelGroup getGroup()
Description copied from interface: HighLevelActivity
Retrieves the group for this activity.
Note that if no group is set, every resource can execute this activity. Note further that we assume that every activity is executed by only one resource.

Specified by:
getGroup in interface HighLevelActivity
Returns:
the group of resources that may execute this activity if available. Null otherwise

getSojournTime

public Distribution getSojournTime()
Description copied from interface: HighLevelActivity
Retrieves the distribution of the sojourn time for this activity.
The sojourn time is defined as the waiting time + the execution time.

Conflict: Note that there is a semantic conflict between

Specified by:
getSojournTime in interface HighLevelActivity
Returns:
the distribution of the sojourn time. In the case that no sojourn time has been set a default distribution has to be returned.
See Also:
HighLevelActivity.getExecutionTime(), HighLevelActivity.getWaitingTime(), HighLevelProcess.getTimeUnit()

getWaitingTime

public Distribution getWaitingTime()
Description copied from interface: HighLevelActivity
Retrieves the distribution of the waiting time for this activity.
The waiting time is defined as the time from the point where an activity is enabled (that is, ready to be started) until its actual start.

Conflict: Note that there is a semantic conflict between

Specified by:
getWaitingTime in interface HighLevelActivity
Returns:
the distribution of the waiting time. In the case that no waiting time has been set a default distribution has to be returned.
See Also:
HighLevelActivity.getExecutionTime(), HighLevelActivity.getSojournTime(), HighLevelProcess.getTimeUnit()

removeAllDataAttributes

public void removeAllDataAttributes()
Description copied from interface: HighLevelActivity
Removes all data attributes from this activity.

Specified by:
removeAllDataAttributes in interface HighLevelActivity

removeDataAttribute

public boolean removeDataAttribute(HighLevelDataAttribute att)
Description copied from interface: HighLevelActivity
Removes the given data attribute from this activity.

Specified by:
removeDataAttribute in interface HighLevelActivity
Parameters:
att - the attribute to be removed
Returns:
true if the data attribute was found and removed, false otherwise

removeGroup

public boolean removeGroup(HighLevelGroup group)
Description copied from interface: HighLevelActivity
Removes the given group from this activity.

Specified by:
removeGroup in interface HighLevelActivity
Parameters:
group - HighLevelGroup the group to be removed
Returns:
boolean true if the group was found and removed, false otherwise.

setExecutionTime

public void setExecutionTime(Distribution dist)
Description copied from interface: HighLevelActivity
Provides a distribution of the execution time for this activity.
The execution time is defined as the time from the starting an activity until its completion.

Conflict: Note that there is a semantic conflict between

Specified by:
setExecutionTime in interface HighLevelActivity
Parameters:
dist - the distribution of the execution time
See Also:
HighLevelActivity.setWaitingTime(Distribution), HighLevelActivity.setSojournTime(Distribution), HighLevelProcess#setTimeUnit()

setFrequencyDependency

public void setFrequencyDependency(int freq)
Description copied from interface: HighLevelActivity
Adds a frequency dependency to this activity.
This relates to the (relative) frequency of chosing this activity if it is involved into an alternative split.

Conflict: Note further that there is a semantic conflict between

Specified by:
setFrequencyDependency in interface HighLevelActivity
Parameters:
freq - the frequency dependency to be added
See Also:
HighLevelProcess#addDataDependency(DataDependency), HighLevelProcess#addProbabilityDependency(ProbabilityDependency)

setGroup

public void setGroup(HighLevelGroup group)
Description copied from interface: HighLevelActivity
Defines a group for this activity.
Note that if no group is set, every resource can execute this activity. Note further that we assume that every activity is executed by only one resource.

Specified by:
setGroup in interface HighLevelActivity
Parameters:
group - the group of resources that may execute this activity

setSojournTime

public void setSojournTime(Distribution dist)
Description copied from interface: HighLevelActivity
Provides a distribution of the sojourn time for this activity.
The sojourn time is defined as the waiting time + the execution time.

Conflict: Note that there is a semantic conflict between

Specified by:
setSojournTime in interface HighLevelActivity
Parameters:
dist - the distribution of the sojourn time
See Also:
HighLevelActivity.setExecutionTime(Distribution), HighLevelActivity.setWaitingTime(Distribution), HighLevelProcess#setTimeUnit()

setWaitingTime

public void setWaitingTime(Distribution dist)
Description copied from interface: HighLevelActivity
Provides a distribution of the waiting time for this activity.
The waiting time is defined as the time from the point where an activity is enabled (that is, ready to be started) until its actual start.

Conflict: Note that there is a semantic conflict between

Specified by:
setWaitingTime in interface HighLevelActivity
Parameters:
dist - the distribution of the waiting time
See Also:
HighLevelActivity.setExecutionTime(Distribution), HighLevelActivity.setSojournTime(Distribution), HighLevelProcess#setTimeUnit()

setName

public void setName(java.lang.String name)
Description copied from interface: HighLevelActivity
Sets the name of the activity

Specified by:
setName in interface HighLevelActivity
Parameters:
name - String the name

getName

public java.lang.String getName()
Description copied from interface: HighLevelActivity
Retrieves the name of the activity

Specified by:
getName in interface HighLevelActivity
Returns:
String the name of the activity

toString

public java.lang.String toString()
Description copied from interface: HighLevelActivity
Returns the name of the highlevelactivity

Specified by:
toString in interface HighLevelActivity
Overrides:
toString in class java.lang.Object
Returns:
String the name of the highlevelactivity