deleteIntermediaries: Delete less-important intermediaries of a supply network

Description Usage Arguments Details Value See Also Examples

View source: R/rewiring.R

Description

This function delete intermediaries from a supply network if they are considered as no more important. Deletion can be based on 2 criterias:

bypassing

if the density of links between the suppliers and the customers of an intermediairy node, i.e. its 'supply transitivity', reach a certain level, it is removed. Allows to favor the emergence of short supply chains into a rewiring process (default: Inf).

degree

if the degree of a node falls and is equal or lower to this threshold, it is removed. Allows to favor the emergence of hubs (default: Inf).

Usage

1
deleteIntermediaries(g, tr = Inf, deg = Inf, cuts = FALSE)

Arguments

g

an igraph object; the supply network.

tr

numeric; miinimal supply transitivity threshold below which intermediary is deleted (default: Inf).

deg

numeric; degree under which intermediary is deleted (default: Inf).

cuts

boolean; if FALSE (default), the removal of cut-vertices identified with articulation_points is forbidden.

Details

For safety reasons, only 1 intermediary is deleted Indeed, the deletion of 1 can have cascading consequences on the local indices of the other nodes, and conditions would not be respected anymore.

Value

an igraph object with 1 less intermediary.

See Also

supplyTransitivity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(igraph)
g = make_tree(5)
## Make a transitive closure: all intermediaries are bypassed
m = floydAlgo(g)
m[m>1] = 1 # To adjacency matrix
g = graph_from_adjacency_matrix(m)
plot(g)
# Vertex 2 is bypassed, so deleted
g2 = deleteIntermediaries(g)
plot(g2)

MiloMonnier/supplynet documentation built on Feb. 16, 2021, 8:03 p.m.