Last data update: 2014.03.03

R: MWHC2C
mwhc2cR Documentation

MWHC2C

Description

This function obtains the associated costs in a model without holding costs and with two differents cost of product. Demands and capacities must be introduced in the order indicated by the ratios d/K. In other case, agents change their position.

Usage

mwhc2c(n=NA,a=NA,b=NA,d=NA,K=NA,c1=NA,c2=NA,cooperation=c(0,1),allocation=c(0,1))

Arguments

n

Agents in the inventory situation.

a

The fixed cost per order.

b

Vector. Shortage cost per unit to each agent.

d

Vector. Deterministic demands per time unit to each agent.

K

Vector. Warehouse's capacity to each agent.

c1

Value. Cost per unit of product from the first vendor.

c2

Value. Cost per unit of product from the second vendor.

cooperation

Option to indicate cooperation. If it exists cooperation=1 else cooperation=0.

allocation

Option to indicate the allocation. If it is required allocation=1 else allocation=0.

Value

A list with the following components:

  • "Optimal policies" A matrix with all possible coalitions in the first column. The second column contains the optimal order to each coalition. Last column indicates the global cost of this optimal order.

  • "GR-rule" A matrix, for each coalition (row), contains the coalition i(S) and allocations proposed by GR-rule.

Examples

mwhc2c(n=3,a=1,b=c(10,10,10),d=c(30,45,46),K=c(30,45,46),c1=3.5,c2=3,cooperation=1,allocation=1)
#$`Optimal policies`
#  Coalitions Optimal orders    Costs
#           0      0.0000000   0.0000
#           1      0.9505864 105.5947
#           2      0.9515422 157.9165
#           3      0.9515838 161.4046
#          12      0.9523090 262.5595
#          13      0.9523241 266.0476
#          23      0.9525115 318.3690
#         123      0.9527470 423.0118
#
#$`GR-rule`
#  Coalition_SxT        1        2        3
#              0   0.0000   0.0000   0.0000
#              1 105.5947   0.0000   0.0000
#              2   0.0000 157.9165   0.0000
#              3   0.0000   0.0000 161.4046
#             12 105.0238 157.5357   0.0000
#             13 105.0188   0.0000 161.0288
#             23   0.0000 157.4352 160.9338
#            123 104.8790 157.3184 160.8144

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/mwhc2c.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mwhc2c
> ### Title: MWHC2C
> ### Aliases: mwhc2c
> 
> ### ** Examples
> 
> mwhc2c(n=3,a=1,b=c(10,10,10),d=c(30,45,46),K=c(30,45,46),c1=3.5,c2=3,cooperation=1,allocation=1)
$`Optimal policies`
  Coalitions Optimal orders    Costs
           0      0.0000000   0.0000
           1      0.9505864 105.5947
           2      0.9515422 157.9165
           3      0.9515838 161.4046
          12      0.9523090 262.5595
          13      0.9523241 266.0476
          23      0.9525115 318.3690
         123      0.9527470 423.0118

$`GR-rule`
  Coalition_SxT        1        2        3
              0   0.0000   0.0000   0.0000
              1 105.5947   0.0000   0.0000
              2   0.0000 157.9165   0.0000
              3   0.0000   0.0000 161.4046
             12 105.0238 157.5357   0.0000
             13 105.0188   0.0000 161.0288
             23   0.0000 157.4352 160.9338
            123 104.8790 157.3184 160.8144

> #$`Optimal policies`
> #  Coalitions Optimal orders    Costs
> #           0      0.0000000   0.0000
> #           1      0.9505864 105.5947
> #           2      0.9515422 157.9165
> #           3      0.9515838 161.4046
> #          12      0.9523090 262.5595
> #          13      0.9523241 266.0476
> #          23      0.9525115 318.3690
> #         123      0.9527470 423.0118
> #
> #$`GR-rule`
> #  Coalition_SxT        1        2        3
> #              0   0.0000   0.0000   0.0000
> #              1 105.5947   0.0000   0.0000
> #              2   0.0000 157.9165   0.0000
> #              3   0.0000   0.0000 161.4046
> #             12 105.0238 157.5357   0.0000
> #             13 105.0188   0.0000 161.0288
> #             23   0.0000 157.4352 160.9338
> #            123 104.8790 157.3184 160.8144
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>