jmarkov.jmdp

## Class CT2DTConverter<S extends State,A extends Action>

- java.lang.Object
- - jmarkov.jmdp.MDP<S,A>
  - - jmarkov.jmdp.InfiniteMDP<S,A>
    - - jmarkov.jmdp.DTMDP<S,A>
      - - jmarkov.jmdp.CT2DTConverter<S,A>

- Type Parameters:
    `S` - state
    `A` - action

      public class CT2DTConverter<S extends State,A extends Action>
      extends DTMDP<S,A>

  This class formulates a DTMDP equivalent to a CTMDP.
  Author:
    Andres Sarmiento and Germán Riaño - Universidad de Los Andes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CT2DTConverter(CTMDP<S,A> problem)` Constructor is not public because it should only be invoked by CTMDP in this same package.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `exitRate(S i, A a)` This method calculates the exit rate for a given state and action.
    `Actions<A>` | `feasibleActions(S i)` Returns the set of actions available at this state.
    `double` | `immediateCost(S i, A a)` Cost incurred when taking action a from state i
    `double` | `prob(S i, S j, A a)` Probability of going from state i to state j by taking the action a
    `States<S>` | `reachable(S i, A a)` Set of states that can be reached from this state i, after taking the action a.

    - ### 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

    - #### CT2DTConverter

          public CT2DTConverter(CTMDP<S,A> problem)

      Constructor is not public because it should only be invoked by CTMDP in this same package.
      Parameters:
        `problem` - an infinite horizon continuous time problem

  - ### Method Detail

    - #### exitRate

          public double exitRate(S i,
                        A a)

      This method calculates the exit rate for a given state and action. It sums all rates for all reachable states under that action.
      Parameters:
        `i` - current state
        `a` - current action
      Returns:
        The soujurn rate for a given state and action

    - #### immediateCost

          public final double immediateCost(S i,
                             A a)

      Description copied from class: `DTMDP`
      Cost incurred when taking action a from state i
      Specified by:
        `immediateCost` in class `DTMDP<S extends State,A extends Action>`
      Parameters:
        `i` - Current State
        `a` - Current Action
      Returns:
        The cost incurred per transition

    - #### reachable

          public final States<S> reachable(S i,
                            A a)

      Description copied from class: `DTMDP`
      Set of states that can be reached from this state i, after taking the action a.
      Specified by:
        `reachable` in class `DTMDP<S extends State,A extends Action>`
      Parameters:
        `i` - Current State
        `a` - Action taken
      Returns:
        The reachable states.

    - #### prob

          public final double prob(S i,
                    S j,
                    A a)

      Description copied from class: `DTMDP`
      Probability of going from state i to state j by taking the action a
      Specified by:
        `prob` in class `DTMDP<S extends State,A extends Action>`
      Parameters:
        `i` - Current state.
        `j` - Destination State
        `a` - Action
      Returns:
        The probability.

    - #### feasibleActions

          public final Actions<A> feasibleActions(S i)

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