public class BackwardRecursionImpl extends BackwardRecursion
BackwardRecursion
.Recursion.OptimisationDirection
direction, horizonLength, stateMonitoring, stateSpace, transitionProbability, valueRepository
Constructor and Description |
---|
BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection,
umontreal.ssj.probdistmulti.DiscreteDistributionIntMulti[] demand,
ImmediateValueFunction<State,Action,Double> immediateValueFunction,
RandomOutcomeFunction<State,Action,double[]> randomOutcomeFunction,
Function<State,ArrayList<Action>> buildActionList,
Function<State,Action> idempotentAction,
double discountFactor,
SamplingScheme samplingScheme,
int maxSampleSize,
double reductionFactorPerStage,
HashType hash)
Creates an instance of the problem and initialises state space, transition probability and value repository.
|
BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection,
umontreal.ssj.probdistmulti.DiscreteDistributionIntMulti[] demand,
ImmediateValueFunction<State,Action,Double> immediateValueFunction,
RandomOutcomeFunction<State,Action,double[]> randomOutcomeFunction,
Function<State,ArrayList<Action>> buildActionList,
Function<State,Action> idempotentAction,
double discountFactor,
SamplingScheme samplingScheme,
int maxSampleSize,
double reductionFactorPerStage,
int stateSpaceSizeLowerBound,
float loadFactor,
HashType hash)
Creates an instance of the problem and initialises state space, transition probability and value repository.
|
Modifier and Type | Method and Description |
---|---|
double |
getExpectedCost(double[] initialState) |
double |
getExpectedCost(StateDescriptorImpl stateDescriptor) |
ActionImpl |
getOptimalAction(StateDescriptorImpl stateDescriptor) |
TransitionProbabilityImpl |
getTransitionProbability()
Returns the
TransitionProbability of the stochastic process. |
generateStates, getMonitoringInterfaceBackward, recurse, runBackwardRecursion, runBackwardRecursion, runBackwardRecursionMonitoring, runBackwardRecursionMonitoring
getExpectedValue, getStateSpace, getStateSpace, getValueRepository, setStateMonitoring
public BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection, umontreal.ssj.probdistmulti.DiscreteDistributionIntMulti[] demand, ImmediateValueFunction<State,Action,Double> immediateValueFunction, RandomOutcomeFunction<State,Action,double[]> randomOutcomeFunction, Function<State,ArrayList<Action>> buildActionList, Function<State,Action> idempotentAction, double discountFactor, SamplingScheme samplingScheme, int maxSampleSize, double reductionFactorPerStage, HashType hash)
optimisationDirection
- the direction of optimisation; either OptimisationDirection.MIN
or OptimisationDirection.MAX
demand
- the distribution of random demand in each period, an array of DiscreteDistributionIntMulti
immediateValueFunction
- the immediate value functionrandomOutcomeFunction
- the random outcome functionbuildActionList
- the action list builderidempotentAction
- the idempotent action; i.e. an action that leaves the system in the same state from period t
to period t+1
discountFactor
- the DP stage discount factorsamplingScheme
- the sampling scheme adoptedmaxSampleSize
- the maximum sample sizereductionFactorPerStage
- the sample reduction factorhash
- the type of hash used to store the state spacepublic BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection, umontreal.ssj.probdistmulti.DiscreteDistributionIntMulti[] demand, ImmediateValueFunction<State,Action,Double> immediateValueFunction, RandomOutcomeFunction<State,Action,double[]> randomOutcomeFunction, Function<State,ArrayList<Action>> buildActionList, Function<State,Action> idempotentAction, double discountFactor, SamplingScheme samplingScheme, int maxSampleSize, double reductionFactorPerStage, int stateSpaceSizeLowerBound, float loadFactor, HashType hash)
optimisationDirection
- the direction of optimisation; either OptimisationDirection.MIN
or OptimisationDirection.MAX
demand
- the distribution of random demand in each period, an array of DiscreteDistributionIntMulti
immediateValueFunction
- the immediate value functionrandomOutcomeFunction
- the random outcome functionbuildActionList
- the action list builderidempotentAction
- the idempotent action; i.e. an action that leaves the system in the same state from period t
to period t+1
discountFactor
- the DP stage discount factorsamplingScheme
- the sampling scheme adoptedmaxSampleSize
- the maximum sample sizereductionFactorPerStage
- the sample reduction factorstateSpaceSizeLowerBound
- the maximum size of hashtables used to store the state spaceloadFactor
- hashtable load factor (typically 0.8)hash
- the type of hash used to store the state spacepublic TransitionProbabilityImpl getTransitionProbability()
Recursion
TransitionProbability
of the stochastic process.getTransitionProbability
in class Recursion
TransitionProbability
of the stochastic process.public double getExpectedCost(double[] initialState)
public double getExpectedCost(StateDescriptorImpl stateDescriptor)
public ActionImpl getOptimalAction(StateDescriptorImpl stateDescriptor)
Copyright © 2017–2018. All rights reserved.