1 Introduction

Oil and gas pipelines are key parts of oil and gas distribution and form the backbone of the national network that connects the east to the west and the north to the south (Brito and Almeida 2009). The problem of safe pipeline operation has become increasingly prominent with the rapid development of oil and gas pipelines (Jamshidi et al. 2013). Integrity management technology must be adopted to improve the safe operation of oil and gas pipelines. Oil and gas pipeline risk evaluation is the key to integrity management. Its main purpose is to analyze the risk of pipelines scientifically for division into different levels as the basis of scientific decision-making for pipeline inspection and maintenance. Therefore, studying oil and gas pipeline risk evaluation and establishing effective risk evaluation models are important to ensure the implementation of pipeline integrity management.

Scholars have conducted more than 30 years of research on oil and gas pipeline risk evaluation and have transformed pipeline risk evaluation from qualitative to quantitative. In the 1970s, the Kent method (Muhlbauer 2014; Han and Weng 2011), failure modes and effects analysis, and fault tree analysis (FTA) (Dong and Yu 2005; Bersani et al. 2010) were introduced for the qualitative or semiquantitative risk evaluation of oil and gas pipelines. Then, pipeline companies in several developed countries in Europe began to formulate standards for pipeline risk evaluation, established an information database of risk evaluation, developed practical evaluation software, and gradually constructed various adaptability evaluation models. Therefore, the accuracy and intelligence of risk evaluation technology have improved. Recent studies have introduced mathematical methods, such as the probabilistic model, Bayesian network, and fuzzy synthesis model, for quantitative risk analysis (QRA) to transcend traditional evaluation methods. For example, Ma et al. (2013) used GIS to quantitatively evaluate the risk of an urban natural gas pipeline network. Their proposed QRA includes the comprehensive evaluation of pipeline network failure probability, the quantitative analysis of accident consequences, and the evaluations of individual and social risks. El-Abbasy et al. (2014) predicted the condition of offshore oil and gas pipelines by using artificial neural network models. Their models presented an average percent validity of more than 97% when applied to the validation dataset. Seo et al. (2015) proposed a standardized procedure for risk evaluation based on failure probability. The procedure is based on the consequence of the failure estimation of a time-variant corrosion model and burst strength for corroded subsea pipelines. Moreover, it integrates design, inspection, and maintenance plans for the pipeline system. Lu et al. (2015) considered the flammability of natural gas and the difficulty of leakage detection. They combined a risk matrix with a bow-tie model and proposed a comprehensive risk evaluation method to evaluate the risk of natural gas pipelines. Guo et al. (2016a, b) considered the flammability of natural gas and put forward a risk evaluation method based on cloud inference. The proposed model includes multiple factors, such as third-party damage, corrosion, design flaws, and biological erosion. The cloud inference method can solve the fuzziness and randomness problem of mutual conversion between qualitative conceptualization and quantitative description in the risk evaluation of natural gas pipelines. In the same year, Guo et al. proposed a comprehensive risk evaluation model for long-distance oil and gas pipelines based on a fuzzy Petri net (FPN). They used an example to prove that the risk evaluation method based on the FPN model is suitable for long-distance oil and gas pipelines. Wu et al. (2017) employed a Bayesian network to analyze natural gas pipeline network accidents probabilistically. Their results indicate that the proposed framework can provide realistic consequence analysis because it considers conditional dependency in the evolution of accidents in natural gas pipeline networks. Wang et al. (2017) proposed an advanced two-step method to analyze the failure probability of buried urban gas pipelines. First, the model of logical faults is developed in accordance with the operational, material, and environmental parameters that can affect failure. Second, the logical model is transformed into a Bayesian network model. This novel approach can reveal the relationship between failure factors and update failure probability on the basis of changes in operational and environmental conditions.

Workers at home and abroad have promoted the development of oil and gas pipeline risk evaluation technology and ensured the safe operation of oil and gas pipelines. However, in general, comprehensive oil and gas pipeline risk evaluation remains in the exploratory stage. Exploring and studying the multiple factors involved in oil and gas pipeline accidents and establishing a comprehensive oil and gas pipeline risk evaluation model are necessary. Developing effective comprehensive risk evaluation models is crucial to ensure the implementation of pipeline integrity management. The basic principle underlying comprehensive evaluation is the combination of multiple individual indexes into a comprehensive index. However, the correlation of evaluation indexes and the subjectivity of the weight index are difficult to avoid in the comprehensive evaluation of multiple indexes. In view of this difficulty, we combined an improved analytic hierarchy process (AHP) with an improved technique for order preference by similarity to an ideal solution (TOPSIS) to build a comprehensive risk evaluation model for oil and gas pipelines. TOPSIS is a comprehensive analysis method with multiple attributes. Numerous risk factors, such as corrosion, external interference, and design, can be considered, and pipeline construction and testing data and other data accumulated by pipeline companies can be directly used in risk evaluation. The index weight for pipeline risk evaluation is computed on the basis of the improved AHP. This approach weakens the subjective impact of the multi-index comprehensive evaluation system and renders weight allocation reasonable.

The AHP–TOPSIS model has been widely used in economics, management, and other fields with good results. Lin et al. (2008) used AHP and TOPSIS in a customer-driven product design process that helps designers systematically consider relevant design information and effectively identify key design objectives and optimal conceptual alternatives. Patil and Kant (2014) used the AHP–TOPSIS model to rank the solutions of knowledge management (KM) adoption in a supply chain (SC) to provide a systematic decision support tool with increased accuracy and effectiveness. The tool was applied in the gradual implementation of KM solutions in a SC to increase success rate. Karahalios (2017) used the AHP–TOPSIS model to help guide ship operators select ballast water treatment systems and conducted a case study to demonstrate the application potential of the model.

Hence, we can conduct oil and gas pipeline risk evaluation by using the improved AHP–TOPSIS model. First, the barrier model and fault tree analysis are used to establish the index system for pipeline risk evaluation based on the five important factors of corrosion, external interference, material/construction, natural disasters, and function and operation. Next, the index weight for pipeline risk evaluation is computed by the improved AHP based on the five-scale method. Then, the closeness coefficient matrix is calculated by the improved TOPSIS. Finally, the weight and the closeness coefficient are combined to determine the risk level of oil and gas pipelines.

The improved AHP–TOPSIS model for oil and gas pipeline comprehensive risk evaluation can eliminate the overlap and subjectivity of information for risk evaluation indexes. At the same time, it can sort and classify pipelines in accordance with risk and provide decision-making support to pipeline enterprises for the safe management of pipelines.

2 Methodology

2.1 An improved AHP

AHP is a qualitative or quantitative decision-making analysis method. It is based on the decomposition of decision-making-related elements into objective, criterion, and attribute levels. It is a hierarchical weight decision analysis method that was proposed by the American operational researcher Saaty in 1971. Various methods have been derived from AHP after years of development. These methods include improved AHP, fuzzy AHP, and gray AHP and have their own implementation scope in accordance with the actual situation of the study. We find that improved AHP is appropriate for calculating the index weight for oil and gas pipeline risk evaluation by consulting a large amount of the existing literature (Xie et al. 2012; Aminbakhsh et al. 2013; Chen et al. 2014; Acharya et al. 2017). Its advantage hinges on the ability of the quasi-uniform consistency matrix that has been transformed by the comparison matrix to satisfy the consistency condition. This ability eliminates the need to perform consistency check and greatly reduces the number of iterations. Improved AHP has been widely applied in numerous fields, such as metallurgy, transportation, and other industries, with good results.

In general, AHP uses the nine-scale method or the three-scale method to construct the comparison matrix for distinguishing the importance of indexes. However, the vagueness of the judgment boundary when using the nine-scale method in practical applications complicates making a strict distinction between the relative importance of two factors. The judgment boundary is excessively simple, however, when using the three-scale method. Thus, the relative importance of the distinction between the two factors is low. Therefore, the nine-scale method and the three-scale method have certain limitations in practical applications.

The following hypotheses are consistent with people’s psychological habits: Two “slightly important” complexes are equal to an “obviously important” complex; two “obviously important” complexes are equal to a “strongly important” complex; and two “strongly important” complexes are equal to an “extremely important” complex. Therefore, people divide importance into five levels when they compare the relative importance of two factors: equally important, slightly important, obviously important, strongly important, and extremely important. An improved AHP based on the five-scale method is proposed. This method avoids the problem of the fuzzy boundary of the nine-scale method in comparison matrix construction and overcomes the simplicity of the three-scale method. The five-scale method has reasonable logic and a simple form. These characteristics facilitate the comparison of the relative importance of the two factors by experts.

The steps for the use of improved AHP based on the five-scale method are as follows (Okada et al. 2008; Sun et al. 2017).

Step 1 Establish a hierarchical structure that is divided into objective, criteria, and attribute levels.

Step 2 Establish the comparison matrix An×n and assign each element aij in accordance with the five-scale method. The principle of assignment by the five-scale method is shown in Table 1.

Table 1 Principle of assignment by the five-scale method

Step 3 Compute the importance ranking index ri as follows:

$$ r_{i} = \sum\limits_{j = 1}^{n} {a_{ij} } \;\;( i = 1,2, \ldots ,n) $$
(1)

where ri is the importance ranking index, and aij is the element of the comparison matrix An×n.

Step 4 Compute the judgment matrix Bn×n, and each matrix element is bij as follows:

$$ b_{ij} = \left\{ {\begin{array}{*{20}l} {\frac{{r_{i} - r_{j} }}{{r_{\hbox{max} } - r_{\hbox{min} } }} \times (k_{m} - 1) + 1} \hfill & {r_{i} \, \ge \, r_{j} } \hfill \\ {\left[ {\frac{{\left| { \, r_{i} - r_{j} \, } \right|}}{{r_{\hbox{max} } - r_{\hbox{min} } }} \times (k_{m} - 1) + 1} \right]^{ - 1} } \hfill & {r_{i} \, < \, r_{j} } \hfill \\ \end{array} } \right.\quad ( i, \, j = 1, \, 2, \ldots ,n) $$
(2)

where bij is the element of the judgment matrix Bn×n, ri is the importance ranking index of index i, rj is the importance ranking index of index j, rmax is the maximum value of the importance ranking index, and rmin is the minimum value of the importance ranking index. km is defined as follows:

$$ k_{m} = \frac{{\hbox{max} \left\{ {r_{i} } \right\}}}{{\hbox{min} \left\{ {r_{i} } \right\}}}\quad (i = 1,2, \ldots ,n) $$
(3)

Step 5 Compute the optimal transfer matrix Cn×n, and each matrix element is cij, as follows:

$$ c_{ij} = \frac{1}{n}\sum\limits_{k = 1}^{n} { \, \left( {\lg \frac{{b_{ik} }}{{b_{jk} }}} \right)\quad } (i,j = 1,2, \ldots ,n) $$
(4)

where cij is the element of the optimal transfer matrix Cn×n, and bij is the element of the judgment matrix Bn×n.

Step 6 Compute the quasi-optimal consistent matrix Dn×n, and each matrix element is dij as follows:

$$ d_{ij} = 10^{{c_{ij} }} \quad ( i,j = 1,2, \ldots ,n) $$
(5)

where dij is the element of the quasi-optimal consistent matrix, and cij is the element of the optimal transfer matrix Cn×n.

Step 7 Compute the eigenvector of the maximum eigenvalue for matrix Dn×n. Then, the weight ωi of each factor can be obtained after normalization. The weight vector that is composed of the weight of each factor is as follows:

$$ \omega = \left( {\omega_{1} ,\omega_{2} , \ldots ,\omega_{n} } \right)^{\text{T}} $$
(6)

where w is the weight vector.

2.2 TOPSIS and its improvement

2.2.1 Principle of TOPSIS

TOPSIS was first proposed by Hwang and Yoon. It is an approaching ideal point solution and is commonly used to solve multivariate optimization problems in multiple attribute decision-making. We can obtain the adjacent degree between each solution. This approach is the standard for evaluating the solution by determining the Euclidean distance between each solution and the positive/negative ideal solution. TOPSIS has been widely used in economics, medicine, agriculture, energy, and other industries with good results (Hatami-Marbini and Kangi 2017; Patil and Kant 2014).

Assuming that i (i = 1, 2, , m) decision-making units (DMUi) and j (j = 1, 2, , n) evaluation indexes exist, the weight of the j evaluation index is ωj, and the value of j evaluation index for the i decision unit is defined as pij. In accordance with this assumption, we introduce the modeling of TOPSIS as follows (Karahalios 2017; Wang and Chang 2007; Wang et al. 2009):

Step 1 Construct the initial evaluation matrix Pm×n, and each matrix element is pij.

Step 2 Compute the normalized decision matrix Nm×n, and each matrix element is nij as follows:

$$ n_{ij} = {{p_{ij \, } } \mathord{\left/ {\vphantom {{p_{ij \, } } { \, \sqrt {\sum\limits_{i = 1}^{m} {p_{ij}^{2} } } }}} \right. \kern-0pt} { \, \sqrt {\sum\limits_{i = 1}^{m} {p_{ij}^{2} } } }}\quad (i = 1 \, ,2, \ldots ,m;\;j = 1,2, \ldots ,n) $$
(7)

where nij is the normalized value of pij, and pij is the value of the j evaluation index for the i decision unit.

Step 3 The weighted normalized decision matrix Vm×n is computed as follows:

$$ \varvec{V}_{m \times n} = \varvec{N}_{m \times n} \varvec{W}_{n \times n} $$
(8)

where Vm×n is the weighted normalized decision matrix, Nm×n is the normalized decision matrix, and Wn×n is a weight matrix composed of ωj.

Step 4 Compute the positive ideal solution V+ and the negative ideal solution V as follows:

$$ \begin{aligned} V^{ + } = \left\{ {\upsilon_{1}^{ + } ,\upsilon_{2}^{ + } , \ldots ,\upsilon_{n}^{ + } } \right\} = \left\{ {\left( {\hbox{max} \upsilon_{ij} \left| {j \in I} \right.} \right),\left( {\hbox{min} \upsilon_{ij} \left| { \, j \in I^{ * } } \right.} \right)} \right\}\quad (i = 1,2, \ldots ,m;\; \, j = 1, \, 2, \ldots ,n) \hfill \\ V^{ - } = \left\{ {\upsilon_{1}^{ - } ,\upsilon_{2}^{ - } , \ldots ,\upsilon_{n}^{ - } } \right\} = \left\{ {\left( {\hbox{min} \upsilon_{ij} \left| { \, j \in I} \right.} \right),\left( {\hbox{max} \upsilon_{ij} \left| { \, j \in I^{ * } } \right.} \right)} \right\}\quad (i = 1, \, 2, \ldots ,m;\;j = 1,2, \ldots ,n) \hfill \\ \end{aligned} $$
(9)

where V+ is a positive ideal solution, and V is a negative ideal solution. I is a benefit index, and I* is a cost index. Large benefit indexes are indicative of superior targets. Small cost indexes are indicative of superior targets.

Step 5 Compute the distance of the target value from the positive/negative ideal solution as follows:

$$ \begin{aligned} d_{i}^{ + } = \sqrt { \, \sum\limits_{j = 1}^{n} { \, \left( {\upsilon_{ij} - \upsilon_{j}^{ + } } \right)}^{2} } \quad (i = 1,2, \ldots ,m;\; \, j = 1,2, \ldots ,n) \hfill \\ d_{i}^{ - } = \sqrt { \, \sum\limits_{j = 1}^{n} { \, \left( {\upsilon_{ij} - \upsilon_{j}^{ - } } \right)}^{2} } \quad (i = 1,2, \ldots ,m;\; \, j = 1,2, \ldots ,n) \hfill \\ \end{aligned} $$
(10)

where \( d_{i}^{ + } \) is the distance between the target value and the positive ideal solution, \( d_{i}^{ - } \) is the distance between the target value and the negative ideal solution, vij is the weighted normalization value of pij, \( v_{j}^{ + } \) is the positive ideal solution, and \( v_{j}^{ - } \) is the negative ideal solution.

Step 6 Compute the closeness coefficient of the DMUi as follows:

$$ r_{i}^{*} = {{ \, d_{i}^{ - } } \mathord{\left/ {\vphantom {{ \, d_{i}^{ - } } { \, \left( {d_{i}^{ + } + d_{i}^{ - } } \right)}}} \right. \kern-0pt} { \, \left( {d_{i}^{ + } + d_{i}^{ - } } \right)}}\quad (i = 1,2, \ldots ,m) $$
(11)

where \( r_{i}^{ * } \) is the closeness coefficient of each solution, \( d_{i}^{ + } \) is the distance between the target value and the positive ideal solution, and \( d_{i}^{ - } \) is the distance between the target value and the negative ideal solution.

2.2.2 Improved TOPSIS

We have improved TOPSIS as follows to render its applicability in the risk evaluation of oil and gas pipelines:

  1. (1)

    The method for determining the positive/negative ideal solution is improved. The positive/negative ideal solution in the traditional TOPSIS is determined, as shown in Eq. (9). The positive ideal solution V+ of each index corresponds to the optimal value of each index in each scheme, and the negative ideal solution V of each index corresponds to the worst value of each index in each scheme. Relative deviations exist in the evaluation results if this method is directly used to determine the positive/negative ideal solution in the risk evaluation of oil and gas pipelines.

    Therefore, when TOPSIS is applied for the risk evaluation of oil and gas pipelines, the positive ideal solution of each index should correspond to the value of the optimal condition of the pipeline, and the negative ideal solution of each index should correspond to the value of the worst condition of the pipeline. For example, for the minimum burial depth, a parameter that affects external disturbance factors, the deepest height buried in the construction phase is the optimum value of the minimum burial depth, and the lowest depth exposed during the pipeline is the worst value of the minimum burial depth. Generally, the worst value is 0. The calculated distances from the risk of each oil and gas pipeline to the positive ideal solution and the negative ideal solution, respectively, show the extent of the deviation of the current condition of the pipeline from the optimal condition and the worst condition. Therefore, small distances from the positive ideal solution and large distances from the negative ideal solution indicate that oil and gas pipelines are at low risk.

  2. (2)

    The normalization equation for the benefit/cost index is improved. The processing of index normalization in the traditional TOPSIS is shown in Eq. (7). The calculation is complicated, and finding the normalized value is difficult. Moreover, Eq. (7) shows that the normalization of the benefit index and the cost index is not distinguished. Thus, the type of the normalized value is non-uniform. Therefore, when TOPSIS is applied for the risk evaluation of oil and gas pipelines, the benefit index and cost index are processed by using different normalization equations, which are unified into the benefit index, and a standardized decision matrix is obtained. The improvement of the normalization of benefit index and cost index is shown in Eq. (12).

    $$ \begin{aligned} n_{ij} = {{\left( { \, p_{ij} - \, p_{j}^{b} } \right)} \mathord{\left/ {\vphantom {{\left( { \, p_{ij} - \, p_{j}^{b} } \right)} {\left( { \, p_{j}^{a} - p_{j}^{b} } \right)}}} \right. \kern-0pt} {\left( { \, p_{j}^{a} - p_{j}^{b} } \right)}}\quad (i = 1,2, \ldots ,m;\;j = 1,2, \ldots ,n) \hfill \\ n_{{_{ij} }}^{*} = {{\left( { \, p_{j}^{b} - p_{ij} } \right)} \mathord{\left/ {\vphantom {{\left( { \, p_{j}^{b} - p_{ij} } \right)} {\left( { \, p_{j}^{b} - p_{j}^{a} } \right)}}} \right. \kern-0pt} {\left( { \, p_{j}^{b} - p_{j}^{a} } \right)}}\quad (i = 1,2, \ldots ,m;\;j = 1,2, \ldots ,n) \hfill \\ \end{aligned} $$
    (12)

    where nij is the normalized value of the benefit index, and \( n_{ij}^{*} \) is the normalized value of the cost index. When oil and gas pipelines are in the optimal condition, \( p_{j} = p_{j}^{a} \), when oil and gas pipelines are in the worst condition, \( p_{j} = p_{j}^{b} \), and pij is the measured value.

2.3 Improved AHP–TOPSIS model

The improved AHP–TOPSIS model combines improved AHP with improved TOPSIS, a comprehensive evaluation method. First, we use improved AHP to compute the index weight. Then, we apply TOPSIS to compute the closeness coefficient of each DMU. Finally, we combine the weight and closeness coefficient to determine the evaluation results.

3 Improved AHP–TOPSIS model for the risk evaluation of oil and gas pipelines

3.1 Index system for oil and gas pipeline risk evaluation

We construct the index system of oil and gas pipeline risk evaluation from the perspective of the classification of causes of oil and gas pipeline accidents. The division of the causes of pipeline accidents differs across countries or organizations because of differences in environment and management. As shown in Fig. 1, we establish the model of oil and gas pipeline failure on the basis of barrier theory in accordance with the international classification of pipeline accidents and the current research on oil and gas pipeline accidents and in terms of the five important factors that determine the safety conditions of the oil and gas pipelines: corrosion, external interference, material/construction, natural disasters, and function and operation (Shahriar et al. 2012; Lu et al. 2015; Huang et al. 2010).

Fig. 1
figure 1

Model of oil and gas pipeline failure based on barrier theory

The model of oil and gas pipeline failure based on barrier theory shows that corrosion, external interference, material/construction, natural disasters, and function and operation are the main precipitating factors that lead to pipeline accidents. Although these risk factors chronically exist in the pipeline system, they do not necessarily lead to the occurrence of pipeline accidents. Pipeline accidents result when the organizational defects of multiple levels of an accident-causing factor combine simultaneously or successively occur. Therefore, only the risk evaluation of oil and gas pipelines based on multi-risk indexes can ensure the accuracy and rationality of the evaluation results.

We use the failure model of oil and gas pipelines to identify the top and middle events, and FTA is used to analyze the loopholes in the barrier to construct the index system of oil and gas pipeline risk evaluation. The index system is illustrated in Fig. 2. The oil and gas pipeline accidents are the objective level, the first-level index of oil and gas pipeline risk evaluation is the criterion level, and the second-level index oil and gas pipeline risk evaluation is the attribute level.

Fig. 2
figure 2

Index system of oil and gas pipeline risk evaluation

3.2 Dataset of oil and gas pipeline risk evaluation

The quantitative value of the second-level index of risk evaluation is unreliable in the calculation of oil and gas pipeline risk evaluation model, and the data used for oil and gas pipeline risk evaluation should include the five major risk factors: corrosion, external interference, material/construction, natural disasters, and function and operation. As shown in Table 2, we finally obtain the dataset for oil and gas pipeline risk evaluation on the basis of a large body of data on construction, inspection, and other processes accumulated by pipeline companies.

Table 2 Dataset for oil and gas pipeline risk evaluation

The collected data are valid only if the following two conditions are met:

Condition 1 Time consistency. Some data will change over time. For example, the condition of external anticorrosive coating only represents the condition of oil and gas pipelines during a certain period of time. The sample data for use in the risk evaluation must be representative of the current conditions of the oil and gas pipelines. Otherwise, some data items should be deleted.

Condition 2 Spatial consistency. Oil and gas pipelines are widely distributed and have large regional differences, and operating parameters may change because of geographical changes. The collected sample data must reflect the characteristics of pipelines.

3.3 Model for the comprehensive risk evaluation of oil and gas pipelines

In this study, an improved AHP–TOPSIS model is applied to evaluate the risk conditions of oil and gas pipelines. The multi-segment pipeline i (i = 1, 2, , m) constitutes the decision-making unit of the multi-attribute decision problem. The criterion level indexes j (j = 1, 2, , 5), i.e., corrosion, external interference, material/construction, natural disasters, and function and operation constitute the set of the indexes of decision-making problems.

Step 1 Improved AHP is used to compute the index weight for pipeline risk evaluation, and the weight of the indexes of the criterion level constitutes the weight vector ω.

Step 2 Improved TOPSIS is applied to compute the closeness coefficient of the index of each pipeline risk evaluation, and the closeness coefficient of the index in the criterion level of each pipe segment constitutes the judgment matrix Rm×5. First, the initial judgment matrix of each index of the criterion level is established in accordance with the actual data of the evaluation dataset in Table 2. The normalized decision matrix is obtained by using Eq. (12). Then, the closeness coefficient of each index of the criterion level is calculated by using Eqs. (9)–(11). Finally, the closeness coefficient of the index on the criterion level of each pipe segment constitutes the judgment matrix Rm×5 of pipeline risk evaluation.

Step 3 The result vector Q of oil and gas pipeline risk evaluation is calculated. The judgment matrix Rm×5 is combined with the weight vector ω to obtain the result vector Q of oil and gas pipeline risk evaluation as follows:

$$ \varvec{Q} = \varvec{R}_{m \times 5} \times \omega $$
(13)

3.4 Evaluation of oil and gas pipeline risk level

Given that the KENT method combines the failure possibilities and consequences of pipelines and divides the risk of pipelines into five levels, we treat the quantitative interval (0, 1) of the evaluation object equally. The evaluation object divides the risk of oil and gas pipelines into five levels: extremely high risk, high risk, medium risk, low risk, and extremely low risk. The risk level of oil and gas pipelines is classified as shown in Table 3. The risk level of each oil and gas pipelines is determined in accordance with the quantitative value.

Table 3 Correspondence table for quantitative value and risk level of oil and gas pipelines

4 Casing the risk evaluation of oil and gas pipelines

We perform empirical research by using a long-distance pipeline with a length of 4.142 km as a sample. The basic condition of this pipeline is shown in Table 4.

Table 4 Basic condition of the pipeline

In comprehensive risk evaluation, the long-distance pipeline is divided into four segments, namely, population density, soil conditions, coating selection, and crossover.

4.1 Compute the weight of risk evaluation index

We use improved AHP based on the five-scale method and consult experts and field technicians to determine the weight of the risk index for the long-distance pipeline. Here, we take the criterion level P as an example to describe the process of weight determination.

Step 1 We compare the relative importance of the two factors based on the ratio of the number of oil and gas pipeline accidents caused by each risk factor (the criterion level indexes) to the total number of oil and gas pipeline accidents (objective level) and the basic conditions of the evaluated pipelines to establish a comparison matrix of criterion level P.

First, the contribution of the number of oil and gas pipeline accidents caused by each risk factor to the total number of oil and gas pipeline accidents is determined. We have collected data on 37 major pipeline leaks reported during 2003–2016 (excluding urban gas pipelines) in China and compiled the number of accidents on the basis of the criterion level indexes of oil and gas pipeline risk evaluation. We find that seven pipeline accidents were caused by corrosion, 20 by external interference, three by material/construction, four by natural disasters, and three by function and operational damage. Figure 3 shows the contribution of the number of oil and gas pipeline accidents caused by each risk factor to the total number of oil and gas pipeline accidents, that is, the percentage of the accident factors of oil and gas pipelines.

Fig. 3
figure 3

Percentage of oil and gas pipeline accident factors

Then, we analyze the basic condition of the evaluated pipelines (see Table 4).

Finally, we combine the percentage of oil and gas pipeline accident factors and the basic conditions of the evaluated pipelines. Then, we use the five-scale method to compare the relative importance of the two factors to obtain the comparison matrix A5×5, as shown in Table 5.

Table 5 Comparison matrix A5×5

Step 2 The important ranking index is computed in accordance with Eq. (1). r1 = 13.3333, r2 = 19, r3 = 6.5333, r4 = 2.967, r5 = 3.9500, rmax = 19, rmin = 2.9667.

Step 3 The judgment matrix B5×5 is computed in accordance with Eq. (2), as shown in Table 6.

Table 6 Judgment matrix B5×5

Step 4 The optimal transfer matrix C5×5 is computed in accordance with Eq. (4), as shown in Table 7.

Table 7 Optimal transfer matrix C5×5

Step 5 The quasi-optimal consistent matrix D5×5 is computed in accordance with Eq. (5), as shown in Table 8.

Table 8 Quasi-optimal consistent matrix D5×5

Step 6 The computed maximum eigenvalue of the pseudo-optimal matrix D5×5 is 4.9999. The corresponding eigenvectors are (0.4441, 0.8637, 0.1814, 0.0993, 0.1181)T. After normalization, we obtain the weighted value of the first-level index: (0.2602, 0.5061, 0.1063, 0.0582, 0.0692).

Similarly, in accordance with the index system of oil and gas pipeline risk evaluation (Fig. 2), we can obtain the weight of corrosion, external interference, material/construction, natural disasters, and function, and operation. Finally, the weight of the risk evaluation index of the long-distance pipeline is computed, and the results are shown in Table 9.

Table 9 Weight of risk evaluation index for the long-distance pipeline

4.2 TOPSIS for comprehensive index evaluation

Here, we use corrosion factor as an example in comprehensive index evaluation.

Step 1 We collect the actual data of the corrosion factor from the five segments of the pipeline as shown in Table 10.

Table 10 Dataset of the corrosion factor

Step 2 We combine the data with the actual situation to determine the values that correspond to the optimal/worst conditions of this pipeline (Table 11).

Table 11 Optimal/worst conditions corresponding value of the corrosion factor

Step 3 The actual data of the corrosion factor are normalized in accordance with Eq. (12) to obtain the normalized decision matrix N4×4 of the corrosion factor, as shown in Table 12.

Table 12 Normalized decision matrix N4×4 of the corrosion factor

Step 4 In accordance with Eq. (8), the normalized decision matrix N4×4 of the corrosion factor is multiplied by the weight matrix W4×4 of the corrosion factor, where W4×4 is shown in Table 13, to obtain the weighted normalized decision matrix V4×4 of the corrosion factor, as shown in Table 14.

Table 13 Weight matrix W4×4 of the corrosion factor
Table 14 Weighted normalized decision matrix V4×4 of the corrosion factor

Step 5 In accordance with Eqs. (10) and (11), we compute the distance and the closeness coefficient of the corrosion factor with the positive/negative ideal solution (the values of the positive/negative ideal solution for each factor, as shown in Table 15). Similarly, in accordance with the index system of oil and gas pipeline risk evaluation (Fig. 2), we obtain the distance and the closeness coefficient of the remaining four factors as shown in Table 16.

Table 15 Positive/negative ideal solution of the criteria level indexes
Table 16 Results of criteria level indexes

4.3 Comprehensive risk evaluation of oil and gas pipelines

The weight of the criterion level indexes constitutes the vector ω = (0.2602, 0.5061, 0.1062, 0.0582, 0.0692)T in accordance with the improved AHP. The criterion matrix R4×5 constructed by using the closeness coefficient of the criterion level of the five section pipelines is obtained through TOPSIS, as shown in Table 17.

Table 17 Criterion matrix R4×5 of the criteria level

The comprehensive vector Q of evaluation objects can be obtained in accordance with Eq. (13). The risk level of each pipeline segment can be obtained in accordance with the correspondence table for the quantitative value and risk level of oil and gas pipelines (Table 3). The specific risk evaluation results are shown in Table 18.

Table 18 Risk evaluation results of oil and gas pipelines

The evaluation results show that pipe section 1 has medium risk. Safety measures must be taken immediately, and operation control procedures must be established to reduce risk to within a reasonable range. Pipe sections 2, 3, and 4 have low risks but should be checked regularly to prevent pipeline accidents.

4.4 Model verification

The evaluation results of the AHP–TOPSIS model are verified through the adjustment factors method. First, the failure probability of the oil and gas pipelines is evaluated by using the adjustment factor method, and the total failure probability of each pipeline segment is calculated. Then, the failure probability level is determined in accordance with the Norwegian pipeline quantitative risk evaluation standard (DNV-RP-F107), as presented in Table 19.

Table 19 Failure probability level of each pipe based on adjustment factors

The evaluation results of the two methods for pipe segments 1, 3, and 4 are identical. The AHP–TOPSIS model calculated a medium risk level for pipe segment 1, which theoretically has level 3 risk. The calculation based on adjustment factors provided a medium failure probability level for pipe segment 1, which theoretically has level 3 risk. The risk level calculated by the AHP–TOPSIS model for pipe sections 3 and 4 is low. These pipe sections, however, theoretically have level 2 risk. The failure probability level calculated by the adjustment for pipe sections 3 and 4 is low. Nevertheless, these pipe sections theoretically have level 2 risk. As illustrated in Fig. 4, among the four samples, the results of three samples are consistent.

Fig. 4
figure 4

Comparison of calculation results between improved AHP–TOPSIS model and adjustment factors method

The AHP–TOPSIS model is different from other models for oil and gas pipeline risk evaluation. Nevertheless, the consistency between the results of the proposed AHP–TOPSIS model for oil and gas pipeline risk evaluation and those of previous research methods indicates that the risk evaluation of oil and gas pipelines based on the AHP–TOPSIS model is accurate and feasible and has certain theoretical value.

5 Conclusion

The empirical analysis results obtained by using a long-distance pipeline as an example show that the results for oil and gas pipeline risk evaluation provided by the improved AHP–TOPSIS model are consistent with the actual situation. This consistency is crucial for formulating the measures of risk management for oil and gas pipelines. The proposed method also provides a new system for engineering decision-making in the risk evaluation of oil and gas pipelines.

In this study, we apply improved TOPSIS for the risk evaluation of oil and gas pipelines. Our approach is innovative and has the following three advantages:

First, a barrier model and FTA are used to establish the index system of oil and gas pipeline risk evaluation by considering five important factors that determine the safety condition of oil and gas pipelines: corrosion, external interference, material/construction, natural disasters, and function and operation. Risk evaluation based on this index system avoids the use of a single index or several indexes that result in the low reliability of the evaluation results.

Second, the five-scale method avoids the fuzzy judgment boundary of the nine-scale method and overcomes the simplicity of the judgment boundary of the threefold method in matrix construction. Therefore, the improved AHP based on the five-scale method is more operable in practical application.

Finally, improving TOPSIS improved the normalized equation of the benefit/cost index and the definition of positive/negative ideal solutions and made the method applicable for the comprehensive evaluation of oil and gas pipeline risks. The analysis of the example shows that the improved TOPSIS is effective for oil and gas pipeline risk evaluation, and the results of the evaluation are comprehensive, reasonable, and scientific.

However, the model in this study has the following limitations: The influence of human factors cannot be completely removed when constructing comparison matrices by using the improved AHP. In addition, universally accepted criteria for the classification of risk factors for oil and gas pipelines do not exist. Therefore, the evaluation index dataset selected in this work requires further improvement. Hence, future research could begin from the following two aspects: First, big data techniques, such as artificial neural network, support vector machine, decision tree, and random forest algorithm, can be used to compute the weight of the evaluation index given their high objectivity and rationality. Second, research on the risk factors of oil and gas pipelines should be strengthened to establish a comprehensive index dataset of oil and gas pipeline risk evaluation.