Enum BalkingStrategy

  • All Implemented Interfaces:
    java.io.Serializable

    
    public enum BalkingStrategy
     implements Serializable
                        

    Constants for specifying balking strategies (customer refusal to join queue). Balking occurs when a customer arrives at a queue but decides not to join. The decision can be based on: - QUEUE_LENGTH: Balking probability depends on current queue length - EXPECTED_WAIT: Balking probability depends on expected waiting time - COMBINED: Both conditions are evaluated (OR logic - balk if either triggers) ID values match MATLAB BalkingStrategy constants.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final int id
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      QUEUE_LENGTH

      Balking based on queue length. Uses thresholds mapping queue length ranges to balking probabilities. Example: balk with 50% probability when queue length is between 5-10.

      EXPECTED_WAIT

      Balking based on expected waiting time. Customer estimates waiting time and balks if it exceeds their patience threshold. Requires knowledge of service rate for estimation.

      COMBINED

      Combined balking strategy. Customer balks if EITHER the queue-length threshold OR expected-wait condition triggers. Provides flexibility for complex balking behaviors.

    • Method Summary

      Modifier and Type Method Description
      static BalkingStrategy fromID(int id) Convert numeric ID to BalkingStrategy enum value.
      static String toText(BalkingStrategy strategy) Convert BalkingStrategy to human-readable text.
      static Array<BalkingStrategy> values() Returns an array containing the constants of this enum type, in the order they're declared.
      static BalkingStrategy valueOf(String name) Returns the enum constant of this type with the specified name.
      int getID() Get the numeric ID for this balking strategy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • fromID

         static BalkingStrategy fromID(int id)

        Convert numeric ID to BalkingStrategy enum value.

        Parameters:
        id - numeric balking strategy ID
        Returns:

        corresponding BalkingStrategy enum value

      • toText

         static String toText(BalkingStrategy strategy)

        Convert BalkingStrategy to human-readable text.

        Parameters:
        strategy - the balking strategy
        Returns:

        text description

      • values

         static Array<BalkingStrategy> values()

        Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

        Returns:

        an array containing the constants of this enum type, in the order they're declared

      • valueOf

         static BalkingStrategy valueOf(String name)

        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

        Returns:

        the enum constant with the specified name

      • getID

         int getID()

        Get the numeric ID for this balking strategy. IDs match MATLAB BalkingStrategy constants.

        Returns:

        numeric ID