Description Usage Arguments Value Examples
Given a graph with at least one minimum cost arborescence,
the maRules
function divides the cost of the
arborescence among the agents according to "Bird" and "ERO"
rules.
1 |
nodes |
vector containing the nodes of the graph, identified by a number that goes from 1 to the order of the graph. |
arcs |
matrix with the list of arcs of the graph. Each row represents one arc. The first two columns contain the two endpoints of each arc and the third column contains their weights. |
rule |
denotes the chosen allocation rule: "Bird" or "ERO". |
show.data |
logical value indicating if the function
displays the console output ( |
maRules
returns a matrix with the agents and their
costs. It also prints the result in console.
1 2 3 4 5 6 7 |
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Loading required package: optrees
Minimum cost arborescence
Rule: Bird
----------------
Agent Cost
2 5
3 6
4 4
----------------
Total = 15
Minimum cost arborescence
Rule: ERO
----------------
Agent Cost
2 5
3 6
4 4
----------------
Total = 15
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.