plotallocations: Graphical representation of the contribution vectors within...

View source: R/plotallocations.R

plotallocationsR Documentation

Graphical representation of the contribution vectors within the NS set

Description

plotallocations generates a graphical representation of the contribution vectors inside the NS set in 1D, 2D, and 3D (available only when there are 2, 3, or 4 agents).

Usage

plotallocations(
  c,
  contributions,
  dimension = NULL,
  representation = "projection",
  col = NULL,
  colors = NULL,
  agents_names = NULL,
  labels = TRUE,
  contributions_names = NULL,
  tol = 1e-06
)

Arguments

c

A numeric cost vector.

contributions

A list containing different cost allocation vectors.

dimension

A character string that specifies the dimension of the graphic. Possible values are "1D", "2D", and "3D". By default, the dimension is chosen based on the number of agents: "1D" for 2 agents, "2D" for 3 agents, and "3D" for 4 agents.

representation

A character string indicating which NS set and allocations are displayed. Possible values are "real", "projection", and "both". By default, representation = "projection".

col

A character string reflecting the color tone of the NS set. By default, the color tone "dodgerblue" is used.

colors

A vector that indicates the colors used to represent each contribution vector. By default, a color palette of different shades is used.

agents_names

A vector defining the name assigned to each agent. By default, the names follow a sequence of natural numbers, starting from 1.

labels

A logical value indicating whether the coordinates of the points and the plot title should be displayed. By default, labels = TRUE.

contributions_names

A vector defining the name assigned to each cost allocation vector. By default, and whenever labels = TRUE, the Cartesian coordinates of each point are displayed.

tol

Tolerance level for evaluating compliance with the NS constraint.

Details

For each c\in C^N let H(c)=\{x\in\mathbb{R}:x(N)=c_n\} be the hyperplane of \mathbb{R}^N given by all the vectors whose coordinates add up to c_n. A cost allocation for c\in C^N is a vector x\in H(c) such that 0\leq x\leq c. The component x_i is the contribution requested from agent i. Let X(c) be the set of cost allocations for c\in C^N.

A basic requirement is that at an allocation x\in X(c) on group N'\subset N of agents would subsidize the other agents by contributing more than what the group would have to pay on its own. The no-subsidy constraint for the group N'\subset N is x(N')\geq \text{max}\{c_j:j\in N'\}. The set of cost allocations for c\in C^N that satisfy the no-subsidy constraints, the no-subsidy set for short, is given by:

NS(c)=\{x\in X(c):x(N')\leq\text{max}\{c_j:j\in N'\}, \text{ for all } N'\subset N\}

= \{x\in \mathbb{R}^N:x\geq 0, \ x(N)=c_n, \ x_1+\dots+x_i\leq c_i,\text{ for all }i\in N\backslash \{n\}\}

Thus, the no-subsidy correspondence NS assigns to each c\in C^N the set NS(c).

A rule is a mapping \mathcal{R}:C^N\rightarrow \mathbb{R}^N which associates with each problem c\in C^N a contribution vector \mathcal{R}(c)\in X(c). In other words, a rule is a mechanism that, for each airport problem, selects an allocation vector belonging to its no-subsidy set.

Value

Only if the number of agents is 2, 3, or 4 will a plot be generated displaying the NS set and all cost allocation vectors.

References

Bernárdez Ferradás, A., Mirás Calvo, M. Á., Quinteiro Sandomingo, C., and Sánchez-Rodríguez, E. (2025). Airport problems with cloned agents. [Preprint manuscript].

González-Díaz, J., Mirás Calvo, M. Á., Quinteiro Sandomingo, C., and Sánchez-Rodríguez, E. (2016). Airport games: the core and its center. Mathematical Social Sciences, 82, 105–115.

Mirás Calvo, M. Á., Quinteiro Sandomingo, C., and Sánchez-Rodríguez, E. (2020). The boundary of the core of a balanced game: faces games. International Journal of Game Theory, 49(2), 579-599.

See Also

NSset, NScheck, comparisonallocations

Examples

# Projected SEC rule, CEC rule and SM rule for 3 agents
c <- c(5, 10, 20) # Cost vector
plotallocations(c, list(SECrule(c), CECrule(c), SMrule(c)), "2D",
"projection", contributions_names = c("SEC", "CEC", "SM"))

# Real an projected SM rule and PRIOR rule for 3 agentes
c <- c(1, 2, 3) # Cost vector
SM <- SMrule(c)
PRIOR <- PRIORrule(c, order = c(2, 3, 1))
plotallocations(c, list(SM, PRIOR), "3D", "both")

# Projected CEB rule and weighted CEB rule for 4 agents
c <- c(3, 3, 3, 10) # Cost vector
w <- c(1, 4, 8, 2) # Weight vector
CEB <- basicrule(c, "CEB")
wCEB <- weightedrule(c, w, "CEB")
plotallocations(c, list(CEB, wCEB), contributions_names = c("CEB", "wCEB"))


AirportProblems documentation built on June 8, 2025, 10:49 a.m.