Package jline.lang

Class OpenSignal

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    
    public class OpenSignal
    extends OpenClass implements Serializable
                        

    An open signal class representing special customers in G-networks and related models.

    OpenSignal is a specialized OpenClass that can have special effects on queues they visit. Unlike regular customers that simply receive service, signals can:

    • Remove jobs from destination queues (NEGATIVE signals)
    • Reset queue states (CATASTROPHE signals)
    • Trigger reply actions (REPLY signals)

    For closed networks, use ClosedSignal instead.

    Reference: Gelenbe, E. (1991). "Product-form queueing networks with negative and positive customers", Journal of Applied Probability

    • Constructor Detail

      • OpenSignal

        OpenSignal(Network model, String name, SignalType signalType, int priority, DiscreteDistribution removalDistribution, RemovalPolicy removalPolicy)
        Creates a new open signal class with full configuration for batch removal.
        Parameters:
        model - the network model to add this class to
        name - the name for this signal class
        signalType - the type of signal (NEGATIVE, CATASTROPHE, or REPLY)
        priority - the priority level for signals in this class
        removalDistribution - the distribution for number of jobs to remove (null for exactly 1)
        removalPolicy - the policy for selecting which jobs to remove
      • OpenSignal

        OpenSignal(Network model, String name, SignalType signalType, int priority)
        Creates a new open signal class with the specified type and priority.
        Parameters:
        model - the network model to add this class to
        name - the name for this signal class
        signalType - the type of signal (NEGATIVE, CATASTROPHE, or REPLY)
        priority - the priority level for signals in this class
      • OpenSignal

        OpenSignal(Network model, String name, SignalType signalType)
        Creates a new open signal class with the specified type and default priority (0).
        Parameters:
        model - the network model to add this class to
        name - the name for this signal class
        signalType - the type of signal (NEGATIVE, CATASTROPHE, or REPLY) - REQUIRED
    • Method Detail

      • setSignalType

         void setSignalType(SignalType signalType)

        Sets the signal type for this signal class.

        Parameters:
        signalType - the new signal type
      • getTargetJobClass

         JobClass getTargetJobClass()

        Gets the associated job class.

        Returns:

        the JobClass associated with this signal, or null if none

      • getRemovalDistribution

         DiscreteDistribution getRemovalDistribution()

        Gets the removal distribution for this negative signal.

        The removal distribution determines how many positive customers are removed when this signal arrives at a queue. If null, exactly one customer is removed (default G-network behavior).

        Returns:

        the removal distribution, or null for single removal

      • setRemovalDistribution

         void setRemovalDistribution(DiscreteDistribution removalDistribution)

        Sets the removal distribution for this negative signal.

        Parameters:
        removalDistribution - the distribution for number of removals
      • getRemovalPolicy

         RemovalPolicy getRemovalPolicy()

        Gets the removal policy for this negative signal.

        The removal policy determines which customers are selected for removal when this signal arrives at a queue.

        Returns:

        the removal policy (RANDOM, FCFS, or LCFS)

      • setRemovalPolicy

         void setRemovalPolicy(RemovalPolicy removalPolicy)

        Sets the removal policy for this negative signal.

        Parameters:
        removalPolicy - the policy for selecting customers to remove
      • forJobClass

         OpenSignal forJobClass(JobClass jobClass)

        Associates this signal with a job class.

        For REPLY signals, this specifies which job class's servers will be unblocked when this signal arrives.

        Parameters:
        jobClass - the JobClass to associate with this signal
        Returns:

        this OpenSignal instance (for method chaining)

      • getTargetJobClassIndex

         int getTargetJobClassIndex()

        Gets the index of the associated job class.

        Returns:

        the index of the associated JobClass, or -1 if none

      • isCatastrophe

         boolean isCatastrophe()

        Returns whether this signal is a catastrophe (removes all jobs).

        Returns:

        true if signalType is CATASTROPHE

      • printSummary

         void printSummary()

        Prints a summary of this open signal class configuration.