Last data update: 2014.03.03

R: Inventorygames
inventorygamesR Documentation

Inventorygames

Description

Generic function to show the associated cost game to a EOQ or EPQ model.

Usage

inventorygames(n = NA, a = NA, d = NA, h = NA, m = NA, r = NA, s = NA, 
model = c("EOQ", "EPQ"))

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.

Value

The characteristic function of the assoaciated cost game is calculated to model EOQ or EPQ.

Examples

inventorygames(n=3,a=600,d=c(500,300,400),h=c(9.6,11,10),model="EOQ")

#    1 2 3 Coalition Order cost
#    0 0 0         0      0.000
#    1 0 0         1   2400.000
#    0 1 0         2   1989.975
#    0 0 1         3   2190.890
#    1 1 0        12   3117.691
#    1 0 1        13   3249.615
#    0 1 1        23   2959.730
#    1 1 1       123   3810.512

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(InventorymodelPackage)
Loading required package: e1071
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/InventorymodelPackage/inventorygames.Rd_%03d_medium.png", width=480, height=480)
> ### Name: inventorygames
> ### Title: Inventorygames
> ### Aliases: inventorygames
> 
> ### ** Examples
> 
> inventorygames(n=3,a=600,d=c(500,300,400),h=c(9.6,11,10),model="EOQ")
     1 2 3 Coalition Order cost
[1,] 0 0 0         0      0.000
[2,] 1 0 0         1   2400.000
[3,] 0 1 0         2   1989.975
[4,] 0 0 1         3   2190.890
[5,] 1 1 0        12   3117.691
[6,] 1 0 1        13   3249.615
[7,] 0 1 1        23   2959.730
[8,] 1 1 1       123   3810.512
> 
> #    1 2 3 Coalition Order cost
> #    0 0 0         0      0.000
> #    1 0 0         1   2400.000
> #    0 1 0         2   1989.975
> #    0 0 1         3   2190.890
> #    1 1 0        12   3117.691
> #    1 0 1        13   3249.615
> #    0 1 1        23   2959.730
> #    1 1 1       123   3810.512
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>