Last data update: 2014.03.03

R: SMFOC
shapley_mfocR Documentation

SMFOC

Description

Function to calculate the Shapley value for the associated game to a fixed order cost model.

Usage

shapley_mfoc(n = NA, a = NA, d = NA, K = NA)

Arguments

n

Agents in the inventory situation.

a

The fixed cost per order.

d

Vector. Deterministic demands per time unit to each agent.

K

Vector. Warehouse's capacity to each agent.

Value

Shapley value for the associated game to the fixed order cost model.

Examples

shapley_mfoc(n=5,a=200,d=c(1.2,1.4,1.2,1.3,0.4),K=c(6,10,8,8,4))

#[1] "Individual cost"
#[1] "Shapley value"
#[1]  4.000000  6.000000  6.666667  7.916667 15.416667

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/shapley_mfoc.Rd_%03d_medium.png", width=480, height=480)
> ### Name: shapley_mfoc
> ### Title: SMFOC
> ### Aliases: shapley_mfoc
> 
> ### ** Examples
> 
> shapley_mfoc(n=5,a=200,d=c(1.2,1.4,1.2,1.3,0.4),K=c(6,10,8,8,4))
[1] "Individual cost"
[1] "Shapley value"
[1]  4.000000  6.000000  6.666667  7.916667 15.416667
> 
> #[1] "Individual cost"
> #[1] "Shapley value"
> #[1]  4.000000  6.000000  6.666667  7.916667 15.416667
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>