actionrwd.dampen
actionrwd.dampen, function
def process actionrwd.dampen(
dispersion: number,
alpha: number,
stockOnHand: number,
timeIndex: number,
baseline: number,
samples?: number,
seed?: number) : zedfunc
Returns a zedfunc giving the probability that the kth unit of upstream demand is already covered by downstream stock, based on the ISSM demand model.
dispersion: variance divided by mean for the demand model.alpha: update speed of the hidden level in the ISSM model.stockOnHand: downstream stock on hand per location.timeIndex: ordering of periods within each downstream item.baseline: expected demand per period at downstream level.samples: number of simulated trajectories (default is 2500).seed: optional random seed for reproducibility.
Examples
table Items = with
[| as Id, as Dispersion, as Alpha |]
[| "sku", 2.0, 0.2 |]
table Loc = with
[| as Id |]
[| "store1" |]
[| "store2" |]
table DownItems = cross(Items, Loc)
DownItems.StockOnHand = 2
table Periods = extend.range(3 into DownItems)
Periods.Baseline = 5
Items.StockOffHand = actionrwd.dampen(
TimeIndex: Periods.N,
Baseline: Periods.Baseline,
Dispersion: Items.Dispersion,
Alpha: Items.Alpha,
StockOnHand: DownItems.StockOnHand)
Items.StockOffHandAt1 = valueAt(Items.StockOffHand, 1)
show table "Stock off hand" with
Items.Id
Items.StockOffHandAt1
This produces the following table:
| Id | StockOffHandAt1 |
|---|---|
| sku | 0.4476393 |
Remarks
Use the returned zedfunc as stockOffHand in
actionrwd.reward to account for downstream buffers in
two-echelon systems.