View source: R/inventorymodelfunction.R
| inventorymodelfunction | R Documentation | 
General function in Inventorymodel package for obtaining the optimal policy by selecting any model and its corresponding parameters.
inventorymodelfunction(model=c("EOQ","EPQ","STI","FOC","MCT","MWHC","MWHC2","MWHCCT"),
n=NA,a=NA,av=NA,d=NA,h=NA,m=NA,r=NA,K=NA,b=NA,c1=NA,c2=NA,
cooperation=c(0,1),allocation=c(0,1))
| model | Model to be selected.  | 
| n | Number of agents in the inventory model. | 
| a | The fixed cost per order. | 
| av | Vector. Transportation costs to each agent. | 
| d | Vector. Deterministic demands per time unit to each agent. | 
| h | Vector. Holding costs to each agent. | 
| m | Vector. Number of orders to each agent(optional). | 
| r | Vector. Replacement rate to each agent. In general, r>d. | 
| K | Vector. Warehouse capacity to each agent. | 
| b | Vector. Shortage cost to each agent. | 
| c1 | Value. Cost of a product from the first supplier. | 
| c2 | Value. Cost of a product from the second supplier. | 
| cooperation | Option to indicate cooperation. If it exists  | 
| allocation | Option to indicate the allocation. If it is required  | 
EOQ, EOQcoo, EPQ, EPQcoo, STI, STIcoo, mct, mfoc, mwhc, mwhc2c and mwhcct.
inventorymodelfunction(model="MCT",n=3,a=400,av=c(300,500,200),d=c(2,2,5),K=c(9,8,7),
cooperation=1,allocation=1)
#MCT model
#Cooperative case
#Two-lines rule
#$`Optimal solution`
#  1 2 3 Coalition     Cost
#  0 0 0         0   0.0000
#  1 0 0         1 155.5556
#  0 1 0         2 225.0000
#  0 0 1         3 428.5714
#  1 1 0        12 225.0000
#  1 0 1        13 500.0000
#  0 1 1        23 642.8571
#  1 1 1       123 642.8571
#
#$`Allocation two-lines rule`
#[1]   0.0000 219.6429 423.2143
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.