View source: R/Sim_minmax_normal.R
sim_minmax_normal | R Documentation |
Simulating a Min,max policy or aslo called s,S policy, .
sim_minmax_normal( demand, mean, sd, leadtime, service_level, Max, shortage_cost = FALSE, inventory_cost = FALSE, ordering_cost = FALSE )
demand |
A vector of demand in N time periods. |
mean |
average demand in N time periods. |
sd |
standard deviation in N time periods. |
leadtime |
lead time from order to arrival |
service_level |
cycle service level requested |
Max |
Max quantity for order up to level |
shortage_cost |
shortage cost per unit of sales lost |
inventory_cost |
inventory cost per unit. |
ordering_cost |
ordering cost for every time an order is made. |
The Function takes a demand vector, mean of demand ,sd,lead time and requested service level to simulate and 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.
a list of two date frames, the simulation and the metrics.
"haytham omar email: <haytham@rescaleanalytics.com>"
sim_minmax_normal(demand=rpois(80,6),mean=6,sd=0.2,leadtime=5,service_level=0.95,Max=25, shortage_cost= FALSE,inventory_cost=FALSE,ordering_cost=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.