Class Place

All Implemented Interfaces:
Serializable, Copyable

public class Place extends Station implements Serializable
A place within a stochastic Petri net / queueing Petri net model.

By default a Place is an ordinary place (tokens are immediately available to the output transitions, modelled by a ServiceTunnel pass-through server). When a service process is assigned via setService(JobClass, Distribution), the place becomes a queueing place (QPN semantics): incoming tokens are served in an embedded queue under the place's scheduling strategy and, on completion, move to a depository from which they become available to the output transitions according to the departure discipline.

See Also:
  • Field Details

    • schedStrategies

      protected HashMap<JobClass,SchedStrategy> schedStrategies
    • queueing

      protected boolean queueing
      True once a service process has been assigned, i.e. this is a queueing place.
    • serviceProcesses

      protected HashMap<JobClass,Distribution> serviceProcesses
      Per-class service (queue) processes of the embedded queue; empty for ordinary places.
    • departureDiscipline

      protected HashMap<JobClass,DepartureDiscipline> departureDiscipline
      Per-class departure discipline of the depository.
  • Constructor Details

  • Method Details

    • init

      public void init()
    • setClassCapacity

      public void setClassCapacity(JobClass jobclass, int capacity)
    • setSchedStrategy

      public void setSchedStrategy(JobClass jobClass, SchedStrategy strategy)
    • setService

      public void setService(JobClass jobClass, Distribution distribution)
      Assigns a service process to a token color, turning this ordinary place into a queueing place. The embedded queue serves tokens under the place's scheduling strategy; the first such call installs the concrete server section for that strategy.
      Overrides:
      setService in class ServiceNode
      Parameters:
      jobClass - the token color (job class)
      distribution - the service-time distribution of the embedded queue for this color
    • installQueueServer

      protected void installQueueServer()
      Installs the concrete server section matching the place's scheduling strategy, replacing the default ServiceTunnel pass-through used by ordinary places.
    • isQueueing

      public boolean isQueueing()
      Returns:
      true if this place is a queueing place (has an embedded queue).
    • getService

      public Distribution getService(JobClass jobClass)
    • setDepartureDiscipline

      public void setDepartureDiscipline(JobClass jobClass, DepartureDiscipline discipline)
    • getDepartureDiscipline

      public DepartureDiscipline getDepartureDiscipline(JobClass jobClass)
    • setNumberOfServers

      public void setNumberOfServers(int numberOfServers)
      Description copied from class: Station
      Sets the number of servers at this station.
      Overrides:
      setNumberOfServers in class Station
      Parameters:
      numberOfServers - the number of servers (use Integer.MAX_VALUE for infinite servers)
    • setMarking

      public void setMarking(int marking)
      Alias for StatefulNode.setState(int) using Petri-net terminology: sets the initial token marking of this place.
      Parameters:
      marking - initial number of tokens
    • setMarking

      public void setMarking(Matrix marking)
      Alias for StatefulNode.setState(jline.util.matrix.Matrix) using Petri-net terminology: sets the initial per-class token marking of this place.
      Parameters:
      marking - initial token counts per class