Class Router

All Implemented Interfaces:
Serializable, Copyable

public class Router extends StatefulNode implements Serializable
A node that routes jobs without imposing any delay
See Also:
  • Field Details

    • cap

      protected int cap
    • numberOfServers

      protected int numberOfServers
    • schedPolicy

      protected SchedStrategyType schedPolicy
    • schedStrategy

      protected SchedStrategy schedStrategy
  • Constructor Details

    • Router

      public Router(Network model, String name)
      Creates a new router node that routes jobs without delay. Uses FCFS scheduling and a single server by default.
      Parameters:
      model - the network model to add this router to
      name - the name for this router node
  • Method Details

    • getSchedStrategy

      public SchedStrategy getSchedStrategy()
      Gets the scheduling strategy used by this router.
      Returns:
      the scheduling strategy
    • getServiceProcess

      public Distribution getServiceProcess(JobClass jobClass)
      Gets the service distribution for a specific job class.
      Parameters:
      jobClass - the job class to query
      Returns:
      the service distribution for the job class
    • setSchedPolicy

      public void setSchedPolicy(SchedStrategyType schedPolicy)
      Sets the scheduling policy type for this router.
      Parameters:
      schedPolicy - the scheduling policy type (PR for preemptive, NP for non-preemptive)
    • setService

      public void setService(JobClass jobClass, Distribution distribution)
      Sets the service distribution for a specific job class.
      Parameters:
      jobClass - the job class to configure
      distribution - the service distribution to set