public class BackwardRecursionImpl extends BackwardRecursion
BackwardRecursion
.Recursion.OptimisationDirection
direction, horizonLength, stateMonitoring, stateSpace, transitionProbability, valueRepository
Constructor and Description |
---|
BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection,
umontreal.ssj.probdist.Distribution[][][] demand,
double[][][] supportLB,
double[][][] supportUB,
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 initializes state space, transition probability and value repository.
|
BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection,
umontreal.ssj.probdist.Distribution[][] demand,
double[][] supportLB,
double[][] supportUB,
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 initializes state space, transition probability and value repository.
|
BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection,
umontreal.ssj.probdist.Distribution[] demand,
double[] supportLB,
double[] supportUB,
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 initializes state space, transition probability and value repository.
|
BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection,
umontreal.ssj.probdist.Distribution[] demand,
double[] supportLB,
double[] supportUB,
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 initializes 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.probdist.Distribution[] demand, double[] supportLB, double[] supportUB, 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
- specifies if this is a mininimisation or a maximisation problemdemand
- the state-independent distribution of random demand in each period, an array of Distribution
.supportLB
- the lower bounds for the state dependent distribution of random demand in each period.supportUB
- the upper bounds for the state dependent distribution of random demand in each period.immediateValueFunction
- the immediate value function.randomOutcomeFunction
- the random outcome function.buildActionList
- the action list builder.idempotentAction
- the idempotent action; i.e. an action that leaves the system in the same state from period t
to period t+1
.discountFactor
- the discount factor in the functional equationsamplingScheme
- the sampling scheme adopted.maxSampleSize
- the maximum sample size.reductionFactorPerStage
- the sample waning exponential state reduction factorhash
- the type of hash used to store the state spacepublic BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection, umontreal.ssj.probdist.Distribution[] demand, double[] supportLB, double[] supportUB, 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
- specifies if this is a mininimisation or a maximisation problemdemand
- the state-independent distribution of random demand in each period, an array of Distribution
.supportLB
- the lower bounds for the state dependent distribution of random demand in each period.supportUB
- the upper bounds for the state dependent distribution of random demand in each period.immediateValueFunction
- the immediate value function.randomOutcomeFunction
- the random outcome function.buildActionList
- the action list builder.idempotentAction
- the idempotent action; i.e. an action that leaves the system in the same state from period t
to period t+1
.discountFactor
- the discount factor in the functional equationsamplingScheme
- the sampling scheme adopted.maxSampleSize
- the maximum sample size.reductionFactorPerStage
- the sample waning exponential state 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 BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection, umontreal.ssj.probdist.Distribution[][] demand, double[][] supportLB, double[][] supportUB, 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
- specifies if this is a mininimisation or a maximisation problemdemand
- the state dependent distribution of random demand in each period, a two-dimensional array of Distribution
, first index is the time period, second index is the state index.supportLB
- the lower bounds for the state dependent distribution of random demand in each period.supportUB
- the upper bounds for the state dependent distribution of random demand in each period.immediateValueFunction
- the immediate value function.randomOutcomeFunction
- the random outcome function.buildActionList
- the action list builder.idempotentAction
- the idempotent action; i.e. an action that leaves the system in the same state from period t
to period t+1
.discountFactor
- the discount factor in the functional equationsamplingScheme
- the sampling scheme adopted.maxSampleSize
- the maximum sample size.reductionFactorPerStage
- the sample waning exponential state reduction factorhash
- the type of hashtable usedpublic BackwardRecursionImpl(Recursion.OptimisationDirection optimisationDirection, umontreal.ssj.probdist.Distribution[][][] demand, double[][][] supportLB, double[][][] supportUB, 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
- specifies if this is a mininimisation or a maximisation problemdemand
- the state and action dependent distribution of random demand in each period, a three-dimensional array of Distribution
, first index is the time period, second index is the action index, third index is the state index.supportLB
- the lower bound of demand supportsupportUB
- the upper bound of demand supportimmediateValueFunction
- the immediate value function.randomOutcomeFunction
- the random outcome function.buildActionList
- the action list builder.idempotentAction
- the idempotent action; i.e. an action that leaves the system in the same state from period t
to period t+1
.discountFactor
- the discount factor in the functional equationsamplingScheme
- the sampling scheme adopted.maxSampleSize
- the maximum sample size.reductionFactorPerStage
- the sample waning exponential state reduction factorhash
- the type of hashtable usedpublic 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.