Class Activity

All Implemented Interfaces:
Serializable, Copyable

public class Activity extends LayeredNetworkElement
An Activity represents an individual processing step or service operation within a Task in a layered queueing network.

Activities are the fundamental units of work that define what processing happens when a request is served by a task. They encapsulate:

  • Resource demands (CPU time, I/O operations, etc.)
  • Service calls to other tasks (synchronous and asynchronous)
  • Processing logic and execution flow
  • Binding relationships with entries that trigger them

Key characteristics:

  • Host demand: The computational resources required on the processor
  • Service calls: Requests made to other tasks during execution
  • Call ordering: Whether calls are made deterministically or stochastically
  • Entry binding: Which entry point triggers this activity
  • Reply activity: Whether this activity sends replies back to callers

Activities can make both synchronous calls (blocking until response) and asynchronous calls (fire-and-forget) to other task entries. They are connected through ActivityPrecedence relationships to form complex execution graphs.

See Also:
  • Field Details

    • hostDemand

      protected Distribution hostDemand
    • hostDemandMean

      protected double hostDemandMean
    • hostDemandSCV

      protected double hostDemandSCV
    • parent

      protected Task parent
    • boundToEntry

      protected String boundToEntry
    • callOrder

      protected String callOrder
    • syncCallDests

      protected Map<Integer,String> syncCallDests
    • syncCallMeans

      protected Matrix syncCallMeans
    • asyncCallDests

      protected Map<Integer,String> asyncCallDests
    • asyncCallMeans

      protected Matrix asyncCallMeans
    • scheduling

      protected Matrix scheduling
    • thinkTime

      protected Distribution thinkTime
    • thinkTimeMean

      protected double thinkTimeMean
    • thinkTimeSCV

      protected double thinkTimeSCV
    • phase

      protected int phase
  • Constructor Details

  • Method Details

    • asynchCall

      public Activity asynchCall(Entry asynchCallDest, double asynchCallMean)
    • asynchCall

      public Activity asynchCall(String asynchCallDest, double asynchCallMean)
    • asynchCall

      public Activity asynchCall(Entry asynchCallDest)
    • asynchCall

      public Activity asynchCall(String asynchCallDest)
    • boundTo

      public Activity boundTo(Entry entry)
    • boundTo

      public Activity boundTo(String entry)
    • on

      public Activity on(Task parent)
    • repliesTo

      public Activity repliesTo(Entry entry)
    • setCallOrder

      public Activity setCallOrder(String callOrder)
    • setHostDemand

      public void setHostDemand(double hostDemand)
    • setHostDemand

      public void setHostDemand(Distribution hostDemand)
    • setParent

      public void setParent(Task parent)
    • setThinkTime

      public void setThinkTime(Distribution thinkTime)
    • setThinkTime

      public void setThinkTime(double thinkTime)
    • getThinkTime

      public Distribution getThinkTime()
    • getThinkTimeMean

      public double getThinkTimeMean()
    • getThinkTimeSCV

      public double getThinkTimeSCV()
    • getHostDemand

      public Distribution getHostDemand()
    • getHostDemandMean

      public double getHostDemandMean()
    • getHostDemandSCV

      public double getHostDemandSCV()
    • getCallOrder

      public String getCallOrder()
    • getBoundToEntry

      public String getBoundToEntry()
    • getPhase

      public int getPhase()
      Get the phase number for this activity. Phase 1: activities before the reply is sent Phase 2: activities after the reply is sent (post-reply processing)
      Returns:
      The phase number (1 or 2)
    • setPhase

      public Activity setPhase(int phase)
      Set the phase number for this activity. Phase 1: activities before the reply is sent Phase 2: activities after the reply is sent (post-reply processing)
      Parameters:
      phase - The phase number (must be 1 or 2)
      Returns:
      This activity for method chaining
    • synchCall

      public Activity synchCall(Entry synchCallDest, double synchCallMean)
    • synchCall

      public Activity synchCall(String synchCallDest, double synchCallMean)
    • synchCall

      public Activity synchCall(Entry synchCallDest)
    • synchCall

      public Activity synchCall(String synchCallDest)
    • getParent

      public Task getParent()
    • getSyncCallDests

      public Map<Integer,String> getSyncCallDests()
    • getSyncCallMeans

      public Matrix getSyncCallMeans()
    • setSyncCallMeans

      public Activity setSyncCallMeans(Matrix syncCallMeans)
    • setSyncCallMeans

      public Activity setSyncCallMeans(double syncCallMean)
    • getAsyncCallDests

      public Map<Integer,String> getAsyncCallDests()
    • getAsyncCallMeans

      public Matrix getAsyncCallMeans()
    • setAsyncCallMeans

      public Activity setAsyncCallMeans(Matrix asyncCallMeans)
    • setAsyncCallMeans

      public Activity setAsyncCallMeans(double asyncCallMean)