|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmdp.solvers.Solver<S,A>
jmdp.solvers.AbstractFiniteSolver<S,A>
jmdp.solvers.FiniteSolver<S,A>
public class FiniteSolver<S extends State,A extends Action>
This class belongs to the set of default solvers included in the jmdp package. It extends Solver and should only be used on FINITE horizon problems. The objective function of the solver is to minimize the the total cost. The result is a deterministic optimal policy for the given structure.
Field Summary |
---|
Fields inherited from class jmdp.solvers.Solver |
---|
policy, printProcessTime, printValueFunction, problem, solved, valueFunction |
Constructor Summary | |
---|---|
FiniteSolver(FiniteMDP<S,A> problem)
Initialized the solver with the given getProblem(). |
Method Summary | |
---|---|
java.lang.String |
bestPolicy(S initial)
Prints out the policy |
double |
future(S i,
A a,
int t)
This method calculates the expected value of valueFunction for the current state i and a specified action a at the given stage t. |
long |
getProcessTime()
|
Solution<S,A> |
solve()
Called to solve the problem. |
java.lang.String |
toString()
The sub classes must return the Solver name. |
Methods inherited from class jmdp.solvers.AbstractFiniteSolver |
---|
getProblem |
Methods inherited from class jmdp.solvers.Solver |
---|
getOptimalPolicy, getOptimalValueFunction, getValueFunction, isSolved, printSolution, printSolution, setPrintProcessTime, setPrintValueFunction |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FiniteSolver(FiniteMDP<S,A> problem)
problem
- The problem to be solved.Method Detail |
---|
public final Solution<S,A> solve()
Solver
solve
in class Solver<S extends State,A extends Action>
public final double future(S i, A a, int t) throws java.lang.NullPointerException
java.lang.NullPointerException
public java.lang.String bestPolicy(S initial)
initial
-
public final long getProcessTime()
getProcessTime
in class Solver<S extends State,A extends Action>
public java.lang.String toString()
Solver
toString
in class Solver<S extends State,A extends Action>
Solver.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |