jmarkov.jmdp.solvers

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

- java.lang.Object
- - jmarkov.jmdp.solvers.ProbabilitySolver<S,A>

- Type Parameters:
    `S` - State classs
    `A` - Actions class.

      public class ProbabilitySolver<S extends State,A extends Action>
      extends java.lang.Object

  This class is designed to calculate the long run probabilities of infinite horizon problem. It uses Jacobian and Power methods for sparse matrixes. Of course this class is not needed To do this jmdp should pass the problem to JMarkov
  Author:
    Andres Sarmiento and Germán Riaño - Universidad de Los Andes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProbabilitySolver(CTMDP<S,A> problem)` Initializes a new solver for continuous chains and solves the probabilities for the optimal policy.
    `ProbabilitySolver(CTMDP<S,A> problem, DecisionRule<S,A> dr)` Initializes a new solver for continuous chains and solves the probabilities for a particular decision rule.
    `ProbabilitySolver(DTMDP<S,A> problem)` Initializes a new solver for discrete chains and solves the probabilities for the optimal policy.
    `ProbabilitySolver(DTMDP<S,A> problem, DecisionRule<S,A> dr)` Initializes a new solver for discrete chains

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ValueFunction<S>` | `getProbability()`
    `boolean` | `isSolved()`
    `void` | `setGaussSeidel(boolean val)` The GaussSeidel modification of the ValueIteration method is a change that is garanteed to have a performance at least as good as the methods without the modifications.
    `void` | `setJacobi(boolean val)`
    `void` | `solve()` Solves the probabilities

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

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

- - ### Constructor Detail

    - #### ProbabilitySolver

          public ProbabilitySolver(DTMDP<S,A> problem,
                           DecisionRule<S,A> dr)

      Initializes a new solver for discrete chains
      Parameters:
        `problem` - discrete time , infinite horizon problem
        `dr` - decision rule to be evaluated

    - #### ProbabilitySolver

          public ProbabilitySolver(DTMDP<S,A> problem)
                            throws SolverException

      Initializes a new solver for discrete chains and solves the probabilities for the optimal policy.
      Parameters:
        `problem` - discrete time , infinite horizon problem
      Throws:
        `SolverException`

    - #### ProbabilitySolver

          public ProbabilitySolver(CTMDP<S,A> problem,
                           DecisionRule<S,A> dr)

      Initializes a new solver for continuous chains and solves the probabilities for a particular decision rule.
      Parameters:
        `problem` - continuous time , infinite horizon problem
        `dr` -

    - #### ProbabilitySolver

          public ProbabilitySolver(CTMDP<S,A> problem)
                            throws SolverException

      Initializes a new solver for continuous chains and solves the probabilities for the optimal policy.
      Parameters:
        `problem` - continuous time , infinite horizon problem
      Throws:
        `SolverException`

  - ### Method Detail

    - #### isSolved

          public boolean isSolved()

      Returns:
        true if the probabilities were calculated.

    - #### solve

          public void solve()

      Solves the probabilities

    - #### setGaussSeidel

          public void setGaussSeidel(boolean val)

      The GaussSeidel modification of the ValueIteration method is a change that is garanteed to have a performance at least as good as the methods without the modifications. In many problems, specially the ones with many states, the modification can imply a significant improvement. By default it set to true. It provides no significant improvement if used jointly with the ErrorBounds modification.
      Parameters:
        `val` - sets whether or not the GaussSeidel modification will be used.

    - #### setJacobi

          public void setJacobi(boolean val)

      Parameters:
        `val` - true to use jacobi methods

    - #### getProbability

          public ValueFunction<S> getProbability()

      Returns:
        Returns the probability.