View source: R/Sim_base_pois.R
sim_base_pois | R Documentation |
Simulating a Min,max policy or aslo called s,S policy, .
sim_base_pois( demand, lambda, leadtime, service_level, Base = FALSE, shortage_cost = FALSE, inventory_cost = FALSE, ordering_delay = FALSE, ordering_cost = FALSE )
demand |
A vector of demand in N time periods. |
lambda |
rate of demand in N time periods. |
leadtime |
lead time from order to arrival |
service_level |
cycle service level requested |
Base |
Set to False for automatic calculation,else manual input of base. |
shortage_cost |
shortage cost per unit of sales lost. |
inventory_cost |
inventory cost per unit. |
ordering_delay |
logical,Default is FALSE,if TRUE, orders are delayed one period. |
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 based on poisson distribution..
a list of two date frames, the simulation and the metrics.
"haytham omar email: <haytham@rescaleanalytics.com>"
sim_base_pois(demand = rpois(50,8),lambda = 4,leadtime = 4,shortage_cost = 20,ordering_delay=FALSE, Base = FALSE,service_level = 0.70,inventory_cost = 50,ordering_cost=50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.