|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmdp.MDP<S,A>
jmdp.FiniteMDP<S,A>
public abstract class FiniteMDP<S extends State,A extends Action>
This class should ONLY be used in FINITE horizon problems. It must be extended in order to represent the appropriate structure for each FINITE Dynamic Programming problem. The user must implement at least the functions that have been declared abstract. Itīs also necessary to create one of the extensions of the class Solver. By default, the program includes the FiniteSolver class to solve finite horizon problems. PolicyIterationSolver and ValueIterationSolver are only for infinite horizon problems. To solve the problem follow the instructions in each of the solversī instructions.
FiniteSolver
Field Summary | |
---|---|
protected int |
horizon
Time horizon. |
Fields inherited from class jmdp.MDP |
---|
finite, initial, reporter |
Constructor Summary | |
---|---|
FiniteMDP(States<S> initial,
int horizon)
Creates a new FINITE horizon (MDP) Problem. |
Method Summary | |
---|---|
abstract Actions<A> |
feasibleActions(S i,
int t)
Returns the actions available at this state i and at this stage t . |
double |
finalCost(S i)
This function returns the reward obtained if the last stage ends with the system at state i. |
protected Solver<S,A> |
getDefaultSolver()
The class that extends MDP must define the default solver to use. |
int |
getHorizon()
Returns the time lastStage |
States<S> |
getStates(int t)
All the states that are available at stage t. |
abstract double |
immediateCost(S i,
A a,
int t)
This funtion must return the Immediate cost incurred when taking action a from state i |
abstract double |
prob(S i,
S j,
A a,
int t)
This is the probability of going from state i to state j by taking the action a at stage t. |
abstract States<S> |
reachable(S i,
A a,
int t)
Set of States that can be reached from this state i, at this stage t, after taking the acton a. |
void |
setHorizon(int T)
Sets the time lastStage at which decisions can be taken |
Methods inherited from class jmdp.MDP |
---|
debug, getOptimalPolicy, getOptimalValueFunction, getReporter, getSolver, isFinite, isSolved, operation, printSolution, printSolution, setReporter, setSolver, solve |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int horizon
Constructor Detail |
---|
public FiniteMDP(States<S> initial, int horizon)
initial
- set of initial stateshorizon
- last stage at which actions can be takenMethod Detail |
---|
protected Solver<S,A> getDefaultSolver()
MDP
getDefaultSolver
in class MDP<S extends State,A extends Action>
public abstract double immediateCost(S i, A a, int t)
public abstract double prob(S i, S j, A a, int t)
public abstract States<S> reachable(S i, A a, int t)
public States<S> getStates(int t)
public double finalCost(S i)
public abstract Actions<A> feasibleActions(S i, int t)
public void setHorizon(int T)
public int getHorizon()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |