examples.jmarkov

## Class QueueMEk1

- java.lang.Object
- - jmarkov.MarkovProcess<S,E>
  - - jmarkov.SimpleMarkovProcess<GeomState<Sub>,E>
    - - jmarkov.GeomProcess<examples.jmarkov.QueueMEk1State,examples.jmarkov.QueueMEk1Event>
      - - examples.jmarkov.QueueMEk1

- All Implemented Interfaces:
    JMarkovElement

      public class QueueMEk1
      extends GeomProcess<examples.jmarkov.QueueMEk1State,examples.jmarkov.QueueMEk1Event>

  This example represents a queueing system with Poisson arrivals at rate lambda' if the system is empty, and a rate lambda otherwise. Costumers require two exponential stages of service: the k-th stage has exponential rate $\mu_k$. A Matrix Geometric Example (Nelson chapter 9).
  Author:
    Julio Goez. Universidad de los Andes.

- - ### Nested Class Summary

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

      `MarkovProcess.Status`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueueMEk1()` Used by GUI
    `QueueMEk1(int lambda1, int lambda2, double[] mu)` Constructs a M/H2(k)/1 queue whit arrival sates lambda1 and lamdda2 and service rates mu1 and mu2.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `active(examples.jmarkov.QueueMEk1State i, int absLevel, examples.jmarkov.QueueMEk1Event e)` The user must extend this method to determine which events are active.
    `java.lang.String` | `description()` This method should be implemented by the subclass to give word description of the model.
    `GeomRelState<examples.jmarkov.QueueMEk1State>[]` | `dests(examples.jmarkov.QueueMEk1State i, int absLevel, examples.jmarkov.QueueMEk1Event e)` Determines the destination set of States when events e occurs.
    `int` | `getNumStages()` The number of possible stages
    `static void` | `main(java.lang.String[] a)` Main method
    `double` | `rate(examples.jmarkov.QueueMEk1State i, int iLevel, examples.jmarkov.QueueMEk1State j, int jLevel, examples.jmarkov.QueueMEk1Event e)`

    - ### Methods inherited from class jmarkov.GeomProcess

      `active, dests, getAMatrices, getBMatrices, getBoundaryStates, getEventRate, getExpectedLevel, getGeometrixSolver, getInitialSol, getMOPsMoment, getNumBoundaryStates, getNumTypicalStates, getRmatrix, getStateClass, getStates, getSteadyState, getSubMatrices, getTypicalStates, getVectorPi0, getVectorPi1, getVectorPi1Mod, isStable, matrixRtoArray, printAll, printStates, rate, reset, setGeometrixSolver, steadyProbabilities`

    - ### 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, getEvents, getEventsRates, getFinalRate, getGenerator, getMaxStates, getMOPIndex, getMOPNames, getMOPNames, getMOPsAvg, getMOPsAvg, getMOPsAvg, getMOPsMoment, getMOPsMoment, getMtjGenerator, getMtjRates, getNumStates, getProgress, getRate, getRates, getRates, getStates, getStatus, getStatusMsg, getSteadyState, getSteadyStateSolver, getTransientSolver, go, goStep, hideGUI, isGenerated, killGUI, label, loadGUI, MOPsToString, MOPsToString, numMOPs, pause, printAll, printDenseMatrix, printDenseMatrix, printEventsRates, printEventsRates, printMOPs, printMOPs, printMOPs, printStates, 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

    - #### QueueMEk1

          public QueueMEk1(int lambda1,
                   int lambda2,
                   double[] mu)

      Constructs a M/H2(k)/1 queue whit arrival sates lambda1 and lamdda2 and service rates mu1 and mu2.
      Parameters:
        `lambda1` - Arrival rate when the system is empty.
        `lambda2` - Arival rate otherwise.
        `mu` - Service rates for the service stages.

    - #### QueueMEk1

          public QueueMEk1()

      Used by GUI

  - ### Method Detail

    - #### getNumStages

          public int getNumStages()

      The number of possible stages
      Returns:
        number of stages.

    - #### active

          public boolean active(examples.jmarkov.QueueMEk1State i,
                       int absLevel,
                       examples.jmarkov.QueueMEk1Event e)

      Description copied from class: `GeomProcess`
      The user must extend this method to determine which events are active.
      Specified by:
        `active` in class `GeomProcess<examples.jmarkov.QueueMEk1State,examples.jmarkov.QueueMEk1Event>`
      Parameters:
        `i` - the current sub state
        `absLevel` - Absolute level of current State i. You should test only whether it is 0 (boundary), 1 or greater than 1. Your code should not behave any different if the level is 2, or 3, etc
        `e` - The event being tested.
      Returns:
        tru if this event occurs
      See Also:
        `SimpleMarkovProcess.active(jmarkov.basic.State, Event)`

    - #### dests

          public GeomRelState<examples.jmarkov.QueueMEk1State>[] dests(examples.jmarkov.QueueMEk1State i,
                                                              int absLevel,
                                                              examples.jmarkov.QueueMEk1Event e)

      Description copied from class: `GeomProcess`
      Determines the destination set of States when events e occurs. It has to be implemented by the subclass.
      Specified by:
        `dests` in class `GeomProcess<examples.jmarkov.QueueMEk1State,examples.jmarkov.QueueMEk1Event>`
      Parameters:
        `i` - current State.
        `absLevel` - absolute level of current State. For QBD this is 0, 1 or 2. Anything above 2 should report the same result.
        `e` - The Event that ocurred.
      Returns:
        The destination States

    - #### rate

          public double rate(examples.jmarkov.QueueMEk1State i,
                    int iLevel,
                    examples.jmarkov.QueueMEk1State j,
                    int jLevel,
                    examples.jmarkov.QueueMEk1Event e)

      Specified by:
        `rate` in class `GeomProcess<examples.jmarkov.QueueMEk1State,examples.jmarkov.QueueMEk1Event>`
      Parameters:
        `i` - current sub state
        `iLevel` - current state's absolute level
        `j` - destination sub state
        `jLevel` - destination level
        `e` - Event
      Returns:
        rate of occurrance

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

    - #### main

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

      Main method
      Parameters:
        `a` - Not used