Description Usage Arguments Value Examples
Supply Avalability Rate (SAR) compare the number of distributors still supplied in a network o the number of distributors in a reference network. Intended to measure the impacts of successive diisruptions on a supply network. Used in robustness assessment process.
1 | SAR(g0, g)
|
g0 |
igraph; the initial supply network. |
g |
igraph; a supply network where every node has a 'type' attribute, which can be "P" (producer), "I" (intermediary), or "D" (distributor). |
A Supply Availability Rate (SAR) between 0 and 1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Generate a theoretical supply network, define producers (P), intermediaries (I)
## and distributors (D) vertices.
library(igraph)
g = make_tree(10)
V(g)[!degree(g, mode="in")]$type = "P"
V(g)[degree(g, mode="in") & degree(g, mode="in")]$type = "I"
V(g)[!degree(g, mode="out")]$type = "D"
V(g)$color = c("green","red","yellow")[factor(V(g)$type, levels=c("P","I","D"))]
plot(g)
## Delete intermediary with highest betweenness and apply cascding disruptions
g2 = delete_vertices(g, V(g)[which.max(betweenness(g))])
g2 = applyCascadingFailures(g2)
plot(g2)
SAR(g, g2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.