examples.jmdp

## Class AccessControlv2

- java.lang.Object
- - jmarkov.jmdp.MDP<S,A>
  - - jmarkov.jmdp.InfiniteMDP<S,A>
    - - jmarkov.jmdp.DTMDP<S,A>
      - - jmarkov.jmdp.DTMDPEv<TandemQueues,Admit,TandemEvent>
        - - examples.jmdp.AccessControlv2

-     public class AccessControlv2
      extends DTMDPEv<TandemQueues,Admit,TandemEvent>

  The present example describes a two station tandem queuing system, with capacity b1 in the first queue and b2, in the second. We must decide whether on an optimal admission control policy based on the cost of rejecting an arrival at the first station vs. admitting it and then a loss occurring at the second station.
  Author:
    Daniel Silva

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AccessControlv2(States<TandemQueues> init, double c1, double c2, double lambda, double mu1, double mu2, int b1, int b2)` Builds a AccessControlv2

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Events<TandemEvent>` | `activeEvents(TandemQueues i, Admit a)` Set of events that are active from state i given that action a is taken.
    `Actions<Admit>` | `feasibleActions(TandemQueues i)` Returns the set of actions available at this state.
    `double` | `immediateCost(TandemQueues i, Admit a, TandemEvent e)` Cost incurred received when the current state is i, the action taken is a and event e occurs.
    `static void` | `main(java.lang.String[] args)` This method just tests the class.
    `double` | `prob(TandemQueues i, TandemEvent e)` Conditional Event probability.
    `double` | `prob(TandemQueues i, TandemQueues j, Admit a, TandemEvent e)` Conditional destination probability.
    `States<TandemQueues>` | `reachable(TandemQueues i, Admit a, TandemEvent e)` Set of reachable states from state i given that action a is taken and event e occurs.

    - ### Methods inherited from class jmarkov.jmdp.DTMDPEv

      `immediateCost, prob, reachable`

    - ### Methods inherited from class jmarkov.jmdp.DTMDP

      `getSteadyStateProbabilities, setProbabilitySolver, solve`

    - ### Methods inherited from class jmarkov.jmdp.InfiniteMDP

      `getAllStates, getNumStates, getSolver`

    - ### Methods inherited from class jmarkov.jmdp.MDP

      `debug, debug, debug, getDebugLevel, getOptimalPolicy, getOptimalValueFunction, getReporter, isFinite, isSolved, operation, printSolution, printSolution, setDebugLevel, setReporter, setSolver, solve`

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

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

- - ### Constructor Detail

    - #### AccessControlv2

          public AccessControlv2(States<TandemQueues> init,
                         double c1,
                         double c2,
                         double lambda,
                         double mu1,
                         double mu2,
                         int b1,
                         int b2)

      Builds a AccessControlv2
      Parameters:
        `c1` - Cost of refusing to admit an arriving customer
        `c2` - Cost of losing a customer at the second station
        `b1` - Capacity of first station
        `b2` - Capacity of second station
        `lambda` - Arrival rate to the system
        `mu1` - Service rate of station 1
        `mu2` - Service rate at station 2

  - ### Method Detail

    - #### activeEvents

          public Events<TandemEvent> activeEvents(TandemQueues i,
                                         Admit a)

      Description copied from class: `DTMDPEv`
      Set of events that are active from state i given that action a is taken.
      Specified by:
        `activeEvents` in class `DTMDPEv<TandemQueues,Admit,TandemEvent>`
      Parameters:
        `i` - current state
        `a` - action taken
      Returns:
        set of events that can occur

    - #### reachable

          public States<TandemQueues> reachable(TandemQueues i,
                                       Admit a,
                                       TandemEvent e)

      Description copied from class: `DTMDPEv`
      Set of reachable states from state i given that action a is taken and event e occurs.
      Specified by:
        `reachable` in class `DTMDPEv<TandemQueues,Admit,TandemEvent>`
      Parameters:
        `i` - current state
        `a` - action taken
        `e` - event that occurs
      Returns:
        set of reachable states.

    - #### feasibleActions

          public Actions<Admit> feasibleActions(TandemQueues i)

      Description copied from class: `InfiniteMDP`
      Returns the set of actions available at this state.
      Specified by:
        `feasibleActions` in class `InfiniteMDP<TandemQueues,Admit>`
      Parameters:
        `i` - Current State
      Returns:
        set of Actions that can be taken at this state.

    - #### immediateCost

          public double immediateCost(TandemQueues i,
                             Admit a,
                             TandemEvent e)

      Description copied from class: `DTMDPEv`
      Cost incurred received when the current state is i, the action taken is a and event e occurs.
      Specified by:
        `immediateCost` in class `DTMDPEv<TandemQueues,Admit,TandemEvent>`
      Parameters:
        `i` - current state
        `a` - action taken
        `e` - event that occurs
      Returns:
        reward

    - #### prob

          public double prob(TandemQueues i,
                    TandemQueues j,
                    Admit a,
                    TandemEvent e)

      Description copied from class: `DTMDPEv`
      Conditional destination probability. Probability of reaching state j given that the current state is i, the action taken is a and the event that occurs is e.
      Specified by:
        `prob` in class `DTMDPEv<TandemQueues,Admit,TandemEvent>`
      Parameters:
        `i` - current state
        `j` - state to reach
        `a` - action taken (given)
        `e` - event that occurs (given)
      Returns:
        Conditional probability

    - #### prob

          public double prob(TandemQueues i,
                    TandemEvent e)

      Description copied from class: `DTMDPEv`
      Conditional Event probability. Probability that event e occurs given that the current state is i.
      Specified by:
        `prob` in class `DTMDPEv<TandemQueues,Admit,TandemEvent>`
      Parameters:
        `i` - current state
        `e` - event that occurs
      Returns:
        Conditional probability

    - #### main

          public static void main(java.lang.String[] args)
                           throws SolverException

      This method just tests the class.
      Parameters:
        `args` - Not used
      Throws:
        `SolverException`