examples.jmarkov

## Class QueueMM2dN

- java.lang.Object
- - jmarkov.MarkovProcess<S,E>
  - - jmarkov.SimpleMarkovProcess<examples.jmarkov.MM2dNState,examples.jmarkov.QMM2dNEvent>
    - - examples.jmarkov.QueueMM2dN

- All Implemented Interfaces:
    JMarkovElement

      public class QueueMM2dN
      extends SimpleMarkovProcess<examples.jmarkov.MM2dNState,examples.jmarkov.QMM2dNEvent>

  This class represents a system with 2 different exponential servers with rates mu1 and mu2, respectively, and arrival rate lambda.
  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
    `QueueMM2dN()` Returns an QueueMM2N object with arrival rate 4.0, service rate of the first server 2.0, service rate of the second server 3.0, probability of choose the first server 0.3 and capacity of 8 customers in the system.
    `QueueMM2dN(double lambda, double mu1, double mu2, double alpha, int N)` Constructs a M/M/2d queue with arrival rate lambda and service rates mu1 and mu 2.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `active(examples.jmarkov.MM2dNState i, examples.jmarkov.QMM2dNEvent 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.MM2dNState>` | `dests(examples.jmarkov.MM2dNState i, examples.jmarkov.QMM2dNEvent e)` Determines the destination set of States when events e occurs.
    `static void` | `main(java.lang.String[] a)` This method just tests the class.
    `double` | `rate(examples.jmarkov.MM2dNState i, examples.jmarkov.MM2dNState j, examples.jmarkov.QMM2dNEvent 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

    - #### QueueMM2dN

          public QueueMM2dN(double lambda,
                    double mu1,
                    double mu2,
                    double alpha,
                    int N)

      Constructs a M/M/2d queue with arrival rate lambda and service rates mu1 and mu 2.
      Parameters:
        `lambda` - Arrival rate
        `mu1` - Server 1 rate
        `mu2` - Server 2 rate
        `alpha` - Probability of an arriving customer choosing server 1 (if both idle)
        `N` - Max number in the system

    - #### QueueMM2dN

          public QueueMM2dN()

      Returns an QueueMM2N object with arrival rate 4.0, service rate of the first server 2.0, service rate of the second server 3.0, probability of choose the first server 0.3 and capacity of 8 customers in the system. Used by GUI

  - ### Method Detail

    - #### active

          public boolean active(examples.jmarkov.MM2dNState i,
                       examples.jmarkov.QMM2dNEvent e)

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

    - #### dests

          public States<examples.jmarkov.MM2dNState> dests(examples.jmarkov.MM2dNState i,
                                                  examples.jmarkov.QMM2dNEvent 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.MM2dNState,examples.jmarkov.QMM2dNEvent>`
      Parameters:
        `i` - current State.
        `e` - The Event that ocurred.
      Returns:
        The destination States

    - #### rate

          public double rate(examples.jmarkov.MM2dNState i,
                    examples.jmarkov.MM2dNState j,
                    examples.jmarkov.QMM2dNEvent 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.MM2dNState,examples.jmarkov.QMM2dNEvent>`
      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)`

    - #### 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.MM2dNState,examples.jmarkov.QMM2dNEvent>`
      Returns:
        A description of the Model
      See Also:
        `JMarkovElement.label()`

    - #### main

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

      This method just tests the class.
      Parameters:
        `a` - Not used