|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmarkov.jmdp.MDP<S,A>
jmarkov.jmdp.FiniteMDP<S,A>
S
- States classA
- Actions classpublic 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 jmarkov.jmdp.MDP |
---|
finite, initial, reporter |
Constructor Summary | |
---|---|
FiniteMDP(S initial,
int horizon)
Creates a finite horizon MDP. |
|
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 cost incurred 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. |
protected void |
setHorizon(int T)
Sets the time lastStage at which decisions can be taken |
Methods inherited from class jmarkov.jmdp.MDP |
---|
debug, debug, debug, getDebugLevel, getOptimalPolicy, getOptimalValueFunction, getReporter, getSolver, isFinite, isSolved, operation, printSolution, printSolution, setDebugLevel, 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 takenpublic FiniteMDP(S initial, int horizon)
initial
- a initial statehorizon
- horizon.Method 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)
i
- Current statea
- Actiont
- Current time stage
public abstract double prob(S i, S j, A a, int t)
i
- Current statej
- Destination statea
- Action takent
- Current time stage
public abstract States<S> reachable(S i, A a, int t)
i
- Current statea
- Action takent
- Time stage
public States<S> getStates(int t)
t
- time stage
public double finalCost(S i)
i
- Ending state
public abstract Actions<A> feasibleActions(S i, int t)
i
- Current Statet
- Time stage
protected void setHorizon(int T)
public int getHorizon()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |