jmarkov.jmdp.solvers
Class RelativeValueIterationSolver<S extends State,A extends Action>

java.lang.Object
  extended by jmarkov.jmdp.solvers.Solver<S,A>
      extended by jmarkov.jmdp.solvers.AbstractInfiniteSolver<S,A>
          extended by jmarkov.jmdp.solvers.AbstractAverageSolver<S,A>
              extended by jmarkov.jmdp.solvers.RelativeValueIterationSolver<S,A>
Type Parameters:
S - States class.
A - Actions class.
All Implemented Interfaces:
JMarkovElement

public class RelativeValueIterationSolver<S extends State,A extends Action>
extends AbstractAverageSolver<S,A>

This class solves the average cost criteria for infinite horizon problems

Author:
Andres Sarmiento and Germán Riaño - Universidad de Los Andes

Field Summary
 
Fields inherited from class jmarkov.jmdp.solvers.Solver
policy, printProcessTime, printValueFunction, problem, solved, valueFunction
 
Constructor Summary
RelativeValueIterationSolver(CTMDP<S,A> problem)
          Creates a new solver for a continuous time, infinite horizon problem.
RelativeValueIterationSolver(CTMDP<S,A> problem, double factor)
          Creates a new solver for a continuous time, infinite horizon problem to be solved with the modified relative value iteration method.
RelativeValueIterationSolver(DTMDP<S,A> problem)
          The constructor method exclusively receives a discrte time infinite horizon problem of the type DTMDP.
RelativeValueIterationSolver(DTMDP<S,A> problem, double factor)
          Creates a new solver for the given discrete time, infinite horizon problem.
 
Method Summary
 long getIterations()
           
 long getProcessTime()
           
 java.lang.String label()
          The sub classes must return the Solver name.
 void setFactor(double factor)
          Sets the factor for the modified relative value iteration method.
 void setPrintValueFunction(boolean val)
          Option to print the final value function for each state.
 Solution<S,A> solve()
          Called to solve the problem.
 
Methods inherited from class jmarkov.jmdp.solvers.AbstractInfiniteSolver
getDiscreteProblem, getProblem, printSolution
 
Methods inherited from class jmarkov.jmdp.solvers.Solver
description, getOptimalPolicy, getOptimalValueFunction, getValueFunction, isSolved, printSolution, setPrintProcessTime, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jmarkov.basic.JMarkovElement
equals
 

Constructor Detail

RelativeValueIterationSolver

public RelativeValueIterationSolver(DTMDP<S,A> problem)
The constructor method exclusively receives a discrte time infinite horizon problem of the type DTMDP.

Parameters:
problem - the structure of the problem of type InfiniteMDP

RelativeValueIterationSolver

public RelativeValueIterationSolver(DTMDP<S,A> problem,
                                    double factor)
Creates a new solver for the given discrete time, infinite horizon problem. It uses the modified relative value iteration method. For details, consult the User's Manual. The factor helps avoiding periodicity in the chain.

Parameters:
problem - problem
factor - factor

RelativeValueIterationSolver

public RelativeValueIterationSolver(CTMDP<S,A> problem)
Creates a new solver for a continuous time, infinite horizon problem.

Parameters:
problem - continuous time, infinite horizon problem

RelativeValueIterationSolver

public RelativeValueIterationSolver(CTMDP<S,A> problem,
                                    double factor)
Creates a new solver for a continuous time, infinite horizon problem to be solved with the modified relative value iteration method.

Parameters:
problem - continuous time, infinite horizon problem
factor -
Method Detail

setPrintValueFunction

public void setPrintValueFunction(boolean val)
Description copied from class: Solver
Option to print the final value function for each state. It is set to false by default.

Overrides:
setPrintValueFunction in class Solver<S extends State,A extends Action>
Parameters:
val - True if the value function is to be reported.

setFactor

public void setFactor(double factor)
Sets the factor for the modified relative value iteration method.

Parameters:
factor - A number between 0 and 1.

label

public java.lang.String label()
Description copied from class: Solver
The sub classes must return the Solver name.

Specified by:
label in interface JMarkovElement
Specified by:
label in class Solver<S extends State,A extends Action>
Returns:
A String label.
See Also:
Solver.toString()

solve

public Solution<S,A> solve()
Description copied from class: Solver
Called to solve the problem. This method MUST write the local variable policy and valueFunction.

Specified by:
solve in class Solver<S extends State,A extends Action>
Returns:
The solution Object taht contains the plicy and value fuenction.

getProcessTime

public final long getProcessTime()
Specified by:
getProcessTime in class Solver<S extends State,A extends Action>
Returns:
Returns the processTime.

getIterations

public final long getIterations()
Specified by:
getIterations in class AbstractInfiniteSolver<S extends State,A extends Action>
Returns:
Returns the iterations.