hybrid_policy: Hybrid

hybrid_policyR Documentation

Hybrid

Description

Simulating a Min Max periodic policy, diffirent from R,s,S because here order is made in case the Inventory position reaches min or the ordering period comes . 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 whenever inventory position reaches min or at the period of review

Usage

hybrid_policy(
  demand,
  mean = FALSE,
  sd = FALSE,
  leadtime,
  service_level,
  initial_inventory_level = FALSE,
  min = FALSE,
  Max = FALSE,
  Min_to_max = 0.6,
  Review_period,
  shortage_cost = FALSE,
  inventory_cost = FALSE,
  ordering_cost = FALSE,
  distribution = "normal",
  recalculate = FALSE,
  recalculate_windows = FALSE,
  plot = FALSE,
  Backlogs = FALSE
)

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

min

integer,Default is False and min is calculated based on mean,demand and lead time unless set manually

Max

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

Min_to_max

numeric, the ratio of min to max calculation , default 0.6 but can be changed 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

Value

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

Author(s)

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

Examples

hybrid_policy(demand = rpois(90,8),leadtime = 6,Review_period = 10,service_level = 0.8)

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