View source: R/equal_surplus_division_unions.R
| equal_surplus_division_unions | R Documentation |
Calculate the equal surplus division value in games with a priori unions
equal_surplus_division_unions(
characteristic_func,
union,
n_players = 0,
type = 1
)
characteristic_func |
The characteristic function of the game. It can be
a numeric vector with the value of every coalition, in the order given by
|
union |
List of vectors indicating the a priori unions between the players. |
n_players |
Only used if |
type |
Number indicating the type of equal surplus division value to compute following Alonso-Meijide et al. (2020). Values 1, 2 and 3 are implemented. |
The equal surplus division value for each player
Alonso-Meijide, J. M., Costa, J., García-Jurado, I., & Gonçalves-Dosantos, J. C. (2020). On egalitarian values for cooperative games with a priori unions. Top, 28(3), 672-688.
n <- 3
v <- function(coalition) {
size <- length(coalition)
if (size <= 1) {
return(0)
} else if (size == 2) {
return(10)
} else if (size == 3) {
return(24)
} else {
return(0)
}
}
union <- list(1:2,3)
equal_surplus_division_unions(v,union,n,type = 1)
v <- c(1,1,2,1,2,2,2)
union <- list(c(1,2),c(3))
equal_surplus_division_unions(v, union, type = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.