examples.jmdp

## Class ProbsExample

- java.lang.Object
- - jmarkov.jmdp.MDP<S,A>
  - - jmarkov.jmdp.InfiniteMDP<S,A>
    - - jmarkov.jmdp.DTMDP<InvLevel,Order>
      - - examples.jmdp.ProbsExample

-     public class ProbsExample
      extends DTMDP<InvLevel,Order>

  Basic example to show convergence of probabilities with probability solver.
  Author:
    German Riano. Universidad de los Andes. (C) 2006

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProbsExample(States<InvLevel> initial)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Actions<Order>` | `feasibleActions(InvLevel i)` Returns the set of actions available at this state.
    `double` | `immediateCost(InvLevel i, Order a)` Cost incurred when taking action a from state i
    `static void` | `main(java.lang.String[] args)`
    `double` | `prob(InvLevel i, InvLevel j, Order a)` Probability of going from state i to state j by taking the action a
    `States<InvLevel>` | `reachable(InvLevel i, Order 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

    - #### ProbsExample

          public ProbsExample(States<InvLevel> initial)

      Parameters:
        `initial` - Initial inventory level

  - ### Method Detail

    - #### immediateCost

          public double immediateCost(InvLevel i,
                             Order a)

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

    - #### prob

          public double prob(InvLevel i,
                    InvLevel j,
                    Order 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<InvLevel,Order>`
      Parameters:
        `i` - Current state.
        `j` - Destination State
        `a` - Action
      Returns:
        The probability.

    - #### reachable

          public States<InvLevel> reachable(InvLevel i,
                                   Order 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<InvLevel,Order>`
      Parameters:
        `i` - Current State
        `a` - Action taken
      Returns:
        The reachable states.

    - #### feasibleActions

          public Actions<Order> feasibleActions(InvLevel i)

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

    - #### main

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

      Parameters:
        `args` -