Description Usage Arguments Value Related Functions Author(s) References Examples
View source: R/CostSharingGame.R
Create a list containing
all information about a specified cost sharing game:
The user may specify the cost function of a cost allocation
problem. A corresponding savings game will be calculated.
The savings game specified by the game vector v
will work like an ordinary TU game.
1 | costSharingGame(n, Costs)
|
n |
represents the number of players |
Costs |
A vector containing the costs each coalition has to pay |
A list with three elements representing the specified cost sharing game (n, Costs, Game vector v)
costSharingGameValue, costSharingGameVector
Jochen Staudacher jochen.staudacher@hs-kempten.de
Johannes Anwander anwander.johannes@gmail.com
Peleg B. and Sudhoelter P. (2007) Theory of cooperative games, 2nd Edition, Springer, pp. 14–16
Maschler M., Solan E. and Zamir S. (2013) Game Theory, Cambridge University Press, pp. 667–668
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(CoopGame)
costSharingGame(n=3, Costs=c(2,2,2,3,3,3,4))
#Example with 3 students sharing an appartment:
#-------------------------------
#| costs | A | B | C |
#- -----------------------------
#|single | 300 | 270 | 280 |
#|appartment | | | |
#-------------------------------
#
#Appartment for 2 persons => costs: 410
#Appartment for 3 persons => costs: 550
#Savings for all combinations sharing appartments
library(CoopGame)
(vv <- costSharingGame(n=3, Costs=c(300,270,280,410,410,410,550)))
#Output:
#$n
#[1] 3
#$Costs
#[1] 300 270 280 410 410 410 550
#$v
#[1] 0 0 0 160 170 140 300
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.