Learn R Programming

InventorymodelPackage (version 1.0.2)

SOC: SOC

Description

Generic function for showing the allocations proposed by SOC rule under a EOQ or EPQ model.

Usage

SOC(n = NA, a = NA, d = NA, h = NA, m = NA, r = NA, s = NA, model = c("EOQ", "EPQ"), cooperation = c(0, 1))

Arguments

n
Number of agents in the inventory model.
a
The fixed cost per order.
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.
s
Vector. Cost of a shortage to each agent.
model
Model to select. EOQ and EPQ models can be considered.
cooperation
Option to indicate cooperation. If it exists cooperation=1 else cooperation=0.

Value

Matrix with number of rows equal to the number of coalitions and n columns. For each coalition or row, the output shows the cost that SOC rule allocates to each player or column.

Examples

Run this code
SOC(n=3,a=600,d=c(500,300,400),h=c(9.6,11,10),m=NA,r=NA,s=NA,model="EOQ",
cooperation=0)

#$"Share the ordering costs rule (individually)"
#[1] 2400.000 1989.975 2190.890

SOC(n=3,a=600,d=c(500,300,400),h=c(9.6,11,10),m=NA,r=NA,s=NA,model="EOQ",
cooperation=1)

#$"Share the ordering costs rule (individually)"
#         1        2        3
#     0.000    0.000    0.000
#  2400.000    0.000    0.000
#     0.000 1989.975    0.000
#     0.000    0.000 2190.890
#  1847.521 1270.171    0.000
#  1772.517    0.000 1477.098
#     0.000 1337.960 1621.770
#  1511.608 1039.230 1259.673

Run the code above in your browser using DataLab