# Research on Supply Chain Network Resilience: Considering Risk Propagation and Node Type
## 3 Supply Chain Network Risk Propagation Model and Resilience Metric
### Supply Chain Network Risk Propagation Model
#### 3.1.1 Supply Chain Networks with Tunable Parameters  
SCNs are a complex network of enterprises with different types, such as suppliers, manufacturers, retailers, and distributors. Here, enterprises correspond to nodes and the business relationships between enterprises correspond to the adjacency relationships between nodes (i.e., edges). Accordingly, the SCN is described as a network, \(G=(N,E)\). \(N\) is the set of all node enterprises and is defined as  
\[N=S\,\cup M\,\cup R\,\cup D \tag{1}\]  
where \(S\) is the set of suppliers, \(M\) is the set of manufacturers, \(R\) is the set of retailers, and \(D\) is the set of distributors. \(E\) is the edge set. We can change the ratio of various node types in the SCN by adjusting the numbers of \(S\), \(M\), \(R\), and \(D\). The BA model [63] is capable of generating BA scale-free networks whose degree distributions are power-law distributions with a fixed scalar index. But the clustering coefficient of a BA scale-free network is close to 0 and cannot be adjusted. The HK model [64], which can generate networks with different clustering coefficients and the same scalar index, has been widely used. To obtain SCNs with different clustering coefficients, different scalar indices, and different node-type ratios, we extend the HK model as follows. _Step 1_**Initial state**: the initial state of an SCN contains \(m_{0}\) fully connected nodes. _Step 2_**Network evolution**: At each step, a new node \(i\) with \(m\) (\(\leq\)\(m_{0}\)) edges is added. Firstly, the new node \(i\) is connected to an old node \(j\) already existing in the SCN in a preferential attachment (PA) to produce the first edge. The PA rule is a node-degree-first connection mechanism [63]. When a new node is added to the network, the probability of picking node \(j\) (denoted as \(\prod(k_{j})\)) is proportional to the degree \(k_{j}\) of node \(j\), as shown:  
\[\prod(k_{j})=\frac{k_{j}}{\sum_{i}k_{i}} \tag{2}\]  
Then, triad formation (TF) connections are made with probability \(p\) or PA connections are established with probability \(1-p\), adding the remaining \(m-1\) edges. Finally, we repeat _Step 2_ until N nodes are formed in the network. The TF rule is to select a node in the network, which is selected according to Equation (2), and then add a connection between one of its pairs of unconnected neighbors. The clustering coefficients are calculated using the triangle counting method [65]. In Equation (3), \(R_{i}\) is the number of relationships between a node and its neighbors (i.e., the number of triangles), \(U_{i}\) is the number of neighboring nodes, and \(c_{i}\) is the clustering coefficient of the current node. \(C\) in Equation (4) is the overall average clustering coefficient. \[c_{i}=\frac{2R_{i}}{U_{i}(U_{i}-1)} \tag{3}\]  
\[C=\frac{\sum_{i}^{N}c_{i}}{N} \tag{4}\]  
_Step 3_**Adjustable scalar indices**: First, an SCN is created based on creating a sequence of degrees obeying a power-law distribution with parameter \(e\) controlling the scalar indices, according to the method of configuring the model graph. Then, the self-loops and duplicate edges are removed from the network. Equation (5) is a network whose degrees \(k\) obey a power-law distribution and \(e\) is the scalar index:  
\[P(k)=k^{-\epsilon} \tag{5}\]  
_Step 4_**Adjustment of the ratio of node types and the type of initial risk node**: First, each node in an SCN is numbered. The ratio between node types is the ratio between companies of each type in the SCN. Then, a corresponding number of nodes is assigned to each type of enterprise from the SCN in proportion to the node type. Each node is assigned a node type. The different types of nodes can be distinguished by the node numbers. Nodes of the relevant node type are selected for infection according to the node numbers to achieve an initially adjustable type of initial risk node. _Step 5_**Termination condition**: The average clustering coefficient and the scalar index of the generated network are calculated at this time.