Class Source

All Implemented Interfaces:
Serializable, Copyable

public class Source extends Station implements Serializable
An abstraction of the external world jobs in open classes come from
See Also:
  • Field Details

  • Constructor Details

    • Source

      public Source(Network model, String name)
      Creates a new source node in the specified network. Initializes arrival processes for all job classes with Disabled distribution.
      Parameters:
      model - the network model to add this source to
      name - the name for this source node
  • Method Details

    • containsJobClass

      public boolean containsJobClass(JobClass jobClass)
      Checks if this source has an arrival process configured for the specified job class.
      Parameters:
      jobClass - the job class to check
      Returns:
      true if an arrival process exists for this job class, false otherwise
    • getArrivalDistribution

      public Distribution getArrivalDistribution(JobClass jobClass)
      Gets the arrival distribution for a specific job class.
      Parameters:
      jobClass - the job class to query
      Returns:
      the arrival distribution, or Disabled if none configured
    • getArrivalProcess

      public final Distribution getArrivalProcess(JobClass jobClass)
      Gets the arrival process distribution for a specific job class. This is an alias for getArrivalDistribution.
      Parameters:
      jobClass - the job class to query
      Returns:
      the arrival distribution, or Disabled if none configured
    • getSchedStrategy

      public SchedStrategy getSchedStrategy()
      Gets the scheduling strategy for this source node. Sources always use EXT (external) scheduling strategy.
      Overrides:
      getSchedStrategy in class Station
      Returns:
      the scheduling strategy (always SchedStrategy.EXT)
    • printSummary

      public void printSummary()
      Description copied from class: Node
      Prints a summary of this node's configuration to the console.
      Overrides:
      printSummary in class Node
    • removeArrivalProcess

      protected void removeArrivalProcess(JobClass jobClass)
      Removes the arrival process for a specific job class.
      Parameters:
      jobClass - the job class whose arrival process should be removed
    • setArrival

      public void setArrival(JobClass jobClass, Object distribution)
      Sets the arrival distribution for a specific job class. If distribution is null or Disabled, sets class capacity to 0. If a Workflow is provided, it will be converted to a PH distribution.
      Parameters:
      jobClass - the job class to configure
      distribution - the arrival distribution or workflow to set
    • setArrivalProcess

      public void setArrivalProcess(ServiceBinding arrivalProcess)
      Sets the arrival process using a service binding. Removes any existing arrival process for the same job class.
      Parameters:
      arrivalProcess - the service binding defining the arrival process