periodic_policy: periodic_policy

periodic_policyR Documentation

periodic_policy

Description

Simulating a periodic policy, different from R,s,S because here order is made at the ordering time without a min(reordering quantity)

Usage

periodic_policy(
  demand,
  mean = FALSE,
  sd = FALSE,
  leadtime,
  service_level,
  initial_inventory_level = FALSE,
  Max = FALSE,
  Review_period,
  shortage_cost = FALSE,
  inventory_cost = FALSE,
  ordering_cost = FALSE,
  distribution = "normal",
  recalculate = FALSE,
  recalculate_windows = FALSE,
  plot = FALSE,
  Backlogs = TRUE
)

Arguments

demand

A vector of demand in N time periods.

mean

average demand in N time periods.default is FALSE and is automatically calculated. otherwise set manually.

sd

standard deviation in N time periods.default is FALSE and is automatically calculated. otherwise set manually.

leadtime

lead time from order to arrival (order to delivery time)

service_level

cycle service level requested

initial_inventory_level

integer,Default is False and simulation starts with min as inventory level

Max

integer,Default is False and max is calculated as a ratio to min,otherwise set manually.

Review_period

Integer, the number of periods where every order is allowed to be made.

shortage_cost

numeric,Default is FALSE shortage cost per unit of sales lost

inventory_cost

numeric,Default is FALSE inventory cost per unit.

ordering_cost

numeric,Default is FALSE ordering cost for every time an order is made.

distribution

distribution to calculate safety stock based on demand distribution, current choices are 'normal' 'poisson','gamma' and negative binomial 'nbinom'

recalculate

Logical, if true the mean and sd is recalculated every period from first period to t,default is FALSE .

recalculate_windows

integer, the min mean and sd windows to recalculate , for example if it is set to 4 mean and sd is calculated from t to t-4,,default is FALSE, if TRUE, recalculate has to be TRUE Also.

plot

Logical, Default is False, if true a plot is generated

Backlogs

Logical, Default is False, if true inventory level accounts for previous lost orders

Details

The Function takes a demand vector, mean of demand ,sd,lead time and requested service level to simulate an inventory system, orders are lost if inventory level is less than requested demand, also ordering is made at day t+1, metrics like item fill rate and cycle service level are calculated. the min is calculated based on a normal distribution or a poisson distribution, also min can be set manually. Max - inventory position is ordered at the period of review

Value

a list of two date frames, the simulation and the metrics.

Author(s)

"haytham omar email: <haytham@rescaleanalytics.com>"

Examples

periodic_policy(demand = rpois(90,9),service_level = 0.9,
leadtime = 10,Review_period = 10,recalculate = TRUE,Backlogs=TRUE)

inventorize documentation built on June 1, 2022, 1:07 a.m.