examples.jmarkov

## Class QueueMMKdN

- java.lang.Object
- - jmarkov.MarkovProcess<S,E>
  - - jmarkov.SimpleMarkovProcess<examples.jmarkov.QueueMMKdNState,examples.jmarkov.QueueMMKdNEvent>
    - - examples.jmarkov.QueueMMKdN

- All Implemented Interfaces:
    JMarkovElement

      public class QueueMMKdN
      extends SimpleMarkovProcess<examples.jmarkov.QueueMMKdNState,examples.jmarkov.QueueMMKdNEvent>

  This class represents is a system with K different exponential servers with rates mu1, mu2, etc, respectively, and arrival rate lambda. A customer that finds more then one server idle chooses according to relative intensities alpha1, alpha2, etc. The probability of choosing idle server k will be given by alpha(k) / sum( alpha(j)), where the sum is over the set of idle servers.
  Author:
    Germán Riaño. Universidad de los Andes.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class jmarkov.MarkovProcess

      `MarkovProcess.Status`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueueMMKdN()` Returns an QueueMMKdN object with arrival rate 1.0, service rates of 2.0, 3.0 and 4.0; and capacity of 8 customers in the system.
    `QueueMMKdN(double lambda, double[] mu, double[] alpha, int N)` Constructs a M/M/Kd queue with arrival rate lambda and service rates mu, relative probabilities of choosing each server alpha

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `active(examples.jmarkov.QueueMMKdNState i, examples.jmarkov.QueueMMKdNEvent e)` Determines the active events.
    `java.lang.String` | `description()` This method should be implemented by the subclass to give word description of the model.
    `States<examples.jmarkov.QueueMMKdNState>` | `dests(examples.jmarkov.QueueMMKdNState i, examples.jmarkov.QueueMMKdNEvent e)` Determines the destination set of States when events e occurs.
    `static void` | `main(java.lang.String[] a)` Main Method.
    `double` | `rate(examples.jmarkov.QueueMMKdNState i, examples.jmarkov.QueueMMKdNState j, examples.jmarkov.QueueMMKdNEvent e)` Returns the rate to go from State i to j when Event e occurs.

    - ### Methods inherited from class jmarkov.SimpleMarkovProcess

      `activeTransitions`

    - ### Methods inherited from class jmarkov.MarkovProcess

      `addMOP, allToString, canGo, clearMOPs, debug, debug, debug, denseMatrixToString, denseMatrixToString, eventRatesToString, eventsRatesToString, generate, getDebugLevel, getDebugReporter, getEventClass, getEventNames, getEventRate, getEvents, getEventsRates, getFinalRate, getGenerator, getMaxStates, getMOPIndex, getMOPNames, getMOPNames, getMOPsAvg, getMOPsAvg, getMOPsAvg, getMOPsMoment, getMOPsMoment, getMOPsMoment, getMtjGenerator, getMtjRates, getNumStates, getProgress, getRate, getRates, getRates, getStateClass, getStates, getStates, getStatus, getStatusMsg, getSteadyState, getSteadyStateSolver, getTransientSolver, go, goStep, hideGUI, isGenerated, killGUI, label, loadGUI, MOPsToString, MOPsToString, numMOPs, pause, printAll, printAll, printDenseMatrix, printDenseMatrix, printEventsRates, printEventsRates, printMOPs, printMOPs, printMOPs, printStates, printStates, reset, resetResults, setDebugLevel, setDebugReporter, setMaxStates, setMOPs, setSteadyStateSolver, setTransientSolver, showGUI, statesLableMaxWidth, statesToString, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jmarkov.basic.JMarkovElement

      `equals`

- - ### Constructor Detail

    - #### QueueMMKdN

          public QueueMMKdN(double lambda,
                    double[] mu,
                    double[] alpha,
                    int N)

      Constructs a M/M/Kd queue with arrival rate lambda and service rates mu, relative probabilities of choosing each server alpha
      Parameters:
        `lambda` - Arrival rate
        `mu` - Server rates
        `alpha` - Relative probability of an arriving customer choosing each server.
        `N` - Max number in the system

    - #### QueueMMKdN

          public QueueMMKdN()

      Returns an QueueMMKdN object with arrival rate 1.0, service rates of 2.0, 3.0 and 4.0; and capacity of 8 customers in the system. Used by GUI

  - ### Method Detail

    - #### active

          public boolean active(examples.jmarkov.QueueMMKdNState i,
                       examples.jmarkov.QueueMMKdNEvent e)

      Determines the active events.
      Specified by:
        `active` in class `SimpleMarkovProcess<examples.jmarkov.QueueMMKdNState,examples.jmarkov.QueueMMKdNEvent>`
      Parameters:
        `i` - The current State
        `e` - The current Event.
      Returns:
        True if the Event is Active.

    - #### dests

          public States<examples.jmarkov.QueueMMKdNState> dests(examples.jmarkov.QueueMMKdNState i,
                                                       examples.jmarkov.QueueMMKdNEvent e)

      Description copied from class: `SimpleMarkovProcess`
      Determines the destination set of States when events e occurs. It has to be implemented by the subclass.
      Specified by:
        `dests` in class `SimpleMarkovProcess<examples.jmarkov.QueueMMKdNState,examples.jmarkov.QueueMMKdNEvent>`
      Parameters:
        `i` - current State.
        `e` - The Event that ocurred.
      Returns:
        The destination States

    - #### rate

          public double rate(examples.jmarkov.QueueMMKdNState i,
                    examples.jmarkov.QueueMMKdNState j,
                    examples.jmarkov.QueueMMKdNEvent e)

      Description copied from class: `SimpleMarkovProcess`
      Returns the rate to go from State i to j when Event e occurs. This is called only if Event `e` is indeed active and j is a valid destination.
      Specified by:
        `rate` in class `SimpleMarkovProcess<examples.jmarkov.QueueMMKdNState,examples.jmarkov.QueueMMKdNEvent>`
      Parameters:
        `i` - Current state
        `j` - Destination State
        `e` - The occuring event
      Returns:
        The rate at which the system goes from i to j when e occurs.
      See Also:
        `SimpleMarkovProcess.dests(State, Event)`

    - #### main

          public static void main(java.lang.String[] a)

      Main Method. This asks the user for parameters and tests the program.
      Parameters:
        `a` - Not used

    - #### description

          public java.lang.String description()

      Description copied from class: `MarkovProcess`
      This method should be implemented by the subclass to give word description of the model. For example it should say: Queueing system with 2 servers and exponential arrivals with rate 50 per hour.
      Specified by:
        `description` in interface `JMarkovElement`
      Specified by:
        `description` in class `MarkovProcess<examples.jmarkov.QueueMMKdNState,examples.jmarkov.QueueMMKdNEvent>`
      Returns:
        A description of the Model
      See Also:
        `MarkovProcess.description()`