# plotrule: Plot of an awards vector In ClaimsProblems: Analysis of Conflicting Claims

 plotrule R Documentation

## Plot of an awards vector

### Description

This function plots an awards vector in the set of awards vectors for a claims problem.

### Usage

```plotrule(E, d, Rule = NULL, awards = NULL, set = TRUE, col = "blue")
```

### Arguments

 `E` The endowment. `d` The vector of claims. `Rule` A rule: AA, APRO, CE, CEA, CEL, DT, MO, PIN, PRO, RA, Talmud. `awards` An awards vector. `set` A logical value. `col` The colour.

### Details

Let E≥ 0 be the endowment to be divided and d the vector of claims with d≥ 0 and such that the sum of claims exceeds the endowment.

A vector x=(x1,...,xn) is an awards vector for the claims problem (E,d) if 0≤ x ≤ d and satisfies the balance requirement, that is, x1+…+xn=E the sum of its coordinates is equal to E. Let X(E,d) be the set of awards vectors for the problem (E,d).

A rule is a function that assigns to each claims problem (E,d) an awards vector for (E,d), that is, a division between the claimants of the amount available.

### Value

If set = TRUE, the function creates a new figure plotting both the set of awards vectors for the claims problem and the given awards vector. Otherwise, it just adds to the current picture the point representing the given awards vector. The function only plots one awards vector at a time.

The awards vector can be introduced directly as a vector. Alternatively, we can provide a rule and then the awards vector to be plotted is the one selected by the rule for the claims problem. Therefore, if Rule = NULL it plots the given awards vector. Otherwise, it plots the awards vector selected by the given rule for the claims problem. In order to plot two (or more) awards vectors, draw the first one with the option set = TRUE and add the others, one by one, with the option set = FALSE.

setofawards, allrules

### Examples

```E=10
d=c(2,4,7,8)
plotrule(E,d,Rule=AA,col="red")
# Plotting the awards vector (1,3,5,1) and the AA rule
# First, plot the awards vector (1,3,5,1) and the set of awards
plotrule(E,d,awards=c(1,3,5,1),col="green")
# Second, add the AA rule with the option set=FALSE
plotrule(E,d,Rule=AA,set=FALSE,col="red")
```

ClaimsProblems documentation built on Jan. 12, 2023, 5:13 p.m.