public class CattleGrowth extends FiniteMDP<examples.jmdp.AnimalWeight,examples.jmdp.AnimalActions>
| Constructor and Description |
|---|
CattleGrowth(int[] initialWeight,
int horizon,
double[][][] keep,
double[][][] forage,
double[] preciomx,
double forageCost)
Builds a cattle Weight problem with the given initial weight.
|
CattleGrowth(int[] initialWeight,
int horizon,
java.lang.String keepFile,
java.lang.String forageFile,
double[] preciomx,
double forageCost) |
| Modifier and Type | Method and Description |
|---|---|
Actions<examples.jmdp.AnimalActions> |
feasibleActions(examples.jmdp.AnimalWeight st,
int t)
Returns the actions available at this state i and at this stage
t .
|
double |
finalCost(examples.jmdp.AnimalWeight i)
This method returns the cost incurred if the last stage ends
with the system at state i.
|
double |
getValue(int initWeight) |
double |
immediateCost(examples.jmdp.AnimalWeight i,
examples.jmdp.AnimalActions a,
int t)
This function must return the Immediate cost incurred when
taking action a from state i
|
static Jama.Matrix |
loadJamaMatrix(java.lang.String fileName) |
static void |
main(java.lang.String[] a)
Small test program
|
double |
prob(examples.jmdp.AnimalWeight pesoactual,
examples.jmdp.AnimalWeight pesofuturo,
examples.jmdp.AnimalActions a,
int t)
This is the probability of going from state i to state j by
taking the action a at stage t.
|
States<examples.jmdp.AnimalWeight> |
reachable(examples.jmdp.AnimalWeight arg0,
examples.jmdp.AnimalActions arg1,
int t)
Set of States that can be reached from this state i, at this
stage t, after taking the acton a.
|
defaultFinalCost, getHorizon, getStatesdebug, debug, debug, getDebugLevel, getOptimalPolicy, getOptimalValueFunction, getReporter, getSolver, isFinite, isSolved, operation, printSolution, printSolution, setDebugLevel, setReporter, setSolver, solvepublic CattleGrowth(int[] initialWeight,
int horizon,
double[][][] keep,
double[][][] forage,
double[] preciomx,
double forageCost)
initialWeight - horizon - keep - forage - preciomx - forageCost - public CattleGrowth(int[] initialWeight,
int horizon,
java.lang.String keepFile,
java.lang.String forageFile,
double[] preciomx,
double forageCost)
throws java.io.FileNotFoundException,
java.io.IOException
initialWeight - horizon - keepFile - forageFile - preciomx - forageCost - java.io.IOExceptionjava.net.URISyntaxExceptionjava.io.FileNotFoundExceptionpublic double finalCost(examples.jmdp.AnimalWeight i)
FiniteMDPfinalCost in class FiniteMDP<examples.jmdp.AnimalWeight,examples.jmdp.AnimalActions>i - Ending stateFiniteMDP.finalCost(jmarkov.basic.State)public double getValue(int initWeight)
throws SolverException
initWeight - SolverExceptionpublic double immediateCost(examples.jmdp.AnimalWeight i,
examples.jmdp.AnimalActions a,
int t)
FiniteMDPimmediateCost in class FiniteMDP<examples.jmdp.AnimalWeight,examples.jmdp.AnimalActions>i - Current statea - Actiont - Current time stagepublic Actions<examples.jmdp.AnimalActions> feasibleActions(examples.jmdp.AnimalWeight st, int t)
FiniteMDPfeasibleActions in class FiniteMDP<examples.jmdp.AnimalWeight,examples.jmdp.AnimalActions>st - Current Statet - Time stagepublic double prob(examples.jmdp.AnimalWeight pesoactual,
examples.jmdp.AnimalWeight pesofuturo,
examples.jmdp.AnimalActions a,
int t)
FiniteMDPpublic States<examples.jmdp.AnimalWeight> reachable(examples.jmdp.AnimalWeight arg0, examples.jmdp.AnimalActions arg1, int t)
FiniteMDPpublic static Jama.Matrix loadJamaMatrix(java.lang.String fileName)
throws java.io.IOException
fileName - Name of the text file with the datajava.io.IOExceptionjava.net.URISyntaxExceptionjava.io.IOExceptionpublic static void main(java.lang.String[] a)
throws SolverException,
java.io.FileNotFoundException,
java.net.URISyntaxException,
java.io.IOException
a - Not usedSolverExceptionjava.io.IOExceptionjava.net.URISyntaxExceptionjava.io.FileNotFoundException