Optimization of Crude Oil Trade Structure: A Complex Network Analysis

With the contradiction between supply and demand being intensified, the unreasonable crude oil trade structure has become increasingly prominent.)erefore, optimizing the supply and demand structure of the global crude oil trade is an urgent problem, which has become one of the crucial factors affecting the energy strategy and economic development of each country. )is paper builds an optimization model that aims at minimizing crude oil trade costs based on the complex network theory. Meanwhile, an optimal solution generation approach is proposed and developed in this paper. Compared with the preoptimized trade network, the proposed model can effectively reduce the trade cost. By topological analysis of the trade network and its optimal configuration, we obtain that both the preoptimized and optimized crude oil trade networks follow power-law distribution. By using the minimum spanning tree, we find that the major crude oil net exporting countries have the most significant influence and are at the core in the optimized trade structure. )is work focuses on the sustainable development of the global crude oil trade and provides a fresh perspective for the optimal crude oil trade system. Moreover, the methodology and model may be applied in the investigation of optimization for other energy system structures.


Introduction
Currently, as the primary energy source in the world, crude oil is strategically vital to all countries on the earth. e factor endowment and the difference between supply and demand of crude oil resources are critical driving forces for the development of international crude oil trade. Recently, in order to reveal the interaction between the trade countries of the crude oil trading system from the strategic scope, a growing number of scholars and researchers have studied global crude oil trade from the perspective of complex network theory. e basic view is of the research of complex network where the nodes are the countries, and the edges are the trade relationship as a complex network. e relationship between nodes in the trading system in the form of a network is explained. In the past ten years, complex network has become an essential tool for studying complex systems and has been applied in more and more fields [1][2][3][4][5][6][7][8].
Complex network method can analyze the world-wide trade system entirely and partly so as to reveal many new features of the crude oil trade topologically and dynamically. Some studies are related to the characteristics and evolution of international crude oil trade relations [9][10][11]. Yang et al. [9] examined the geography of global crude oil flows and its evolution based on complex network. Xi et al. [10] studied the impact of crude oil trade pattern changes of the Belt and Road countries on each country's GDP based on the complex network and econometric theory. Zhang et al. [11] applied social network to investigate structure characteristics and evolution pattern with petroleum trade data of countries along the Belt and Road Initiative. Some studies are related to trade roles and preferences of cooperation partners [12][13][14]. In Ref. [12], the authors explored whether the countries' local trade pattern can reflect their preferences of selecting trade partners in different commodity's markets. Du et al. [13] applied the top 1 network model to reflect countries' preference in choosing oil trade partners. Zhong et al. [14] showed that a better understanding of the roles of trading countries in the international fossil fuel trade is crucial for trade security and policy optimization. Some studies are related to stability and security of crude oil trade network [15][16][17][18][19][20]. e authors of Ji et al. [15] constructed a global oil trade core network to analyze the overall features, regional characteristics, and stability of the oil trade using complex network theory. Sun et al. [16] constructed weighted and unweighted international oil trade networks based on complex network theory to analyze the stability of the international oil trade network from short-term and long-term aspects. An et al. [17] built a trading-based network model of international crude oil to study the evolution of scales, stability, hierarchy structure, and partition over time. Guan et al. [18] introduced the link prediction approach to assessing potential trade links. ere also exist some studies about the systemic risk in crude oil trade by studying the interaction patterns among the global crude oil import dependency countries [19,20].
Previous researches provide important insights into global crude oil trade, but these works often consider the actual crude oil trade system. Few studies have researched the optimization of crude oil supply and demand structure. Practically, influenced by factors such as long-distance transportation, geographical distribution, and political agreement of crude oil trade, there are poorly functioning supply and demand structures in the actual crude oil trading system. For example, strong dependence on specific countries and routes leads to high trade costs and waste of resources. Based on the existing achievements, this paper focuses on the structural optimization of the global crude oil trading system.
In this way, the structural optimization of the crude oil trade should gain particular attention. is paper proposes an optimization model based on minimizing trade costs. On one hand, this model can satisfy each country's demand for crude oil. On the other hand, it can minimize the cost of crude oil trade. By applying complex network theory and metaheuristic algorithm, the optimal distribution configuration of crude oil between supply and demand countries is obtained, which provides new ideas and perspectives for discussing the optimization of the crude oil trading system. e paper is organized as follows. Section 2 describes a simplified crude oil trade bipartite network model, the optimization model, and the simulated annealing method. Section 3 empirically analyzes the scenario of crude oil interactions between exporters and importers to obtain a reasonable crude oil trade structure. Section 4 discusses the findings and presents conclusions.

Crude Oil Trade Bipartite Network Model.
e global crude oil trade can be divided into supply side and demand side so that the global crude oil trade network can be regarded as a bipartite network. Bipartite network is a graph, whose nodes can be divided into two disjoint and independent sets such that every edge connects a node in one set to one in another set [21]. Bipartite networks are widely used in various fields [22][23][24][25][26][27].
For each country k, net imports M k (Unit: kg) are defined as where M kI and M kE are the import volume and export volume of country k, respectively. In particular, if M k < 0, the country k is a net exporter, and if M k > 0, the country k is a net importer. And if M k � 0, the node k is neither a net importer nor a net exporter. Figure 1 shows an example of crude oil trade bipartite network model. According to equation (1), the trading countries are divided into two sets: one is net exporters, the other one is net importers, and the links reflect the crude oil flow. e weight of the link reflects the volume of crude oil, x ij (x ij ≥ 0, i � 1, 2, . . . , n j � 1, 2, . . . , m), flowing through a directed link connecting from a net exporter i to a net importer j. erefore, for i and j, we have the following balance equations: where 0 ≤ x ij ≤ min −M i , M j . e degree k i of country i is defined as the number of countries that trade with i. Nodes have two different degrees, the in-degree k in , which is the number of incoming edges, and the out-degree k out , which is the number of outgoing edges. e degree distribution is defined as where N k is the number of nodes (countries) with degree k.

Optimization Model.
A stable crude oil market requires to be able to design a model of the optimal trade network structure based on the trade demand and the trade relationship of the net importing countries and the net exporting country for reducing the trade costs. erefore, the problem of reducing the trade costs in crude oil trade is transformed into the topology optimization problem of the bipartite network. In other words, the purpose of the optimization model is to find the optimal configuration for the crude oil trade bipartite network. Combined with the basic knowledge of economics and gravity model theory in international trade [28,29], according to the characteristics of the actual crude oil trade, it is deduced that the crude oil trade costs are proportional to trade volume and geographical distance. erefore, we construct the equation of trade cost: where d ij is the geographical distance between net exporting country i and net importing country j. In equation (5), the unknown variable x ij represents the amount of crude oil flowing from i to j.
In order to determine the optimal configuration of the crude oil trade system, equation (5) is formulated as an optimization model, where the objective function is defined as e constraints of the problem are equations (2) and (3). e feasible solution of the optimization model can help identify which edges are needed to achieve an optimal crude oil trade structure.

Minimum Spanning Tree.
e minimum spanning tree is also called the minimum weight spanning tree. It is a subset that contains all the vertices in the graph and links all the vertices, and the total of these edge weights is minimum in the weighted undirected graph. In this paper, we use Kruskal's algorithm for the minimum spanning tree [30,31]. e process of the algorithm is as follows: (i) Step 1. View each node in the graph as an isolated branch, and sort the edges in descending order by the weights. (ii) Step 2. Traverse the graph once, find the edge with the maximum weight, and ensure that this edge does not loop with the edges that have been added to the minimum spanning tree collection. Add this edge to the minimum spanning tree collection if all conditions are met. Otherwise, continue to traverse the graph to find the next edge with the maximum weight. (iii) Step 3. Recursively repeat step 1, until n − 1 edges are found (if the graph has n nodes, the minimum spanning tree should have n − 1 edges). en, the algorithm terminates, and the minimum spanning tree of the graph is obtained.

Simulated Annealing Method.
Simulated Annealing is a probabilistic technique for approximating the global optimum of a given function. Specifically, it is a metaheuristic to approximate global optimization in a large search space for an optimization problem [32]. Simulated Annealing can be used to find an approximation of a global minimum for a function with a large number of variables [33][34][35]. Simulated annealing algorithm flow chart is shown in Figure 2 [36,37]. We used the sensitivity analysis method to analyze the parameters of the optimization algorithm for solving the crude oil supply and demand network design problem. First, when the maximum number of iterations, the cooling rate, and the termination temperature are fixed, and the initial temperature T 0 is increased from 40 to 500, the solution result and solving time are shown in Figures 3(a) and 3(b). When the initial temperature, cooling rate and termination temperature are fixed, and the maximum number of iterations t max is increased from 600 to 1500, the solution result and solving time are as shown in Figures 3(c) and 3(d).
e number of iterations of the simulated annealing algorithm needs to be large enough to ensure that the algorithm reaches equilibrium. However, if it is too large, it will greatly increase the time spent. Considering the above results and solving time, the selected parameters T 0 � 100, t max � 1000, c � 0.999 are appropriate, the number of solutions reaches 4.6 × 10 6 times, and the termination temperature is T k < 1.
How to generate the solution is an important part of the simulated annealing method. Here, the way for generating the solution is proposed in the following steps:

Start
Set an initial solution x 0 , temperature T k = T 0 , cooling rate c    By repeating the above steps, combined with the Simulated Annealing method, any possible trade process can be simulated. us, the solution obtained must be optimal, and the resulting structure is the optimal configuration. e used code is HS 270900: crude petroleum oils. Geographic distance data (unit: kilometers) is obtained from the website of the CEPII [39]. Table 1 shows the numbers of global crude oil trading countries from 2010 to 2016.

Topological Structure Analysis.
is section represents the application of the model and method described in Section 2 to actual crude oil trade. e optimization model has been run for the global crude oil trade during 2010 and 2016 to yield the optimal bipartite network structure. Table 2 compares the costs of preoptimized and optimized crude oil trade. e results show that the cost of the crude oil trade after optimization is greatly reduced. is confirms the effectiveness of our proposed optimization method.
We take the optimization results of 2010 and 2016 as examples, and the optimized crude oil trade structure for 2010 and 2016 is shown in Figure 4. e dots in Figure 4 represent the countries trading in crude oil. e size and color of the dots reflect the size of the country's in-degree or out-degree. For example, if a node with in-degree (outdegree) � 2, in Figure 4, it is represented by a circle with the second smallest radius, and the color is green. e links with arrows indicate the flow of crude oil. Figures 5 and 6 compare the in-degree, out-degree, and degree distributions of the global crude oil trading network before and after optimization. We find that all the figures reveal "long tail" effect, which is a characteristic of scale-free networks, and the degree distribution follows power-law distribution. It indicates that there are a small number of "hub" trading countries with a high degree of nodes and a large number of "peripheral" trading countries with a low degree of nodes. ese high-degree nodes play an important supporting role in the network. In other words, removing these nodes will cause devastating damage to the system. In the trade network, although the number of nodes in the network has changed, the optimal selection mechanism in the scale-free network cannot be fully reflected, which weakens this feature to a certain extent [40].

e Minimum Spanning Tree Analysis.
e minimum spanning tree of the global crude oil trading network reflects the central relationship between the trading countries. Figures 7 and 8 show the minimum spanning tree for the preoptimized and optimized crude oil trade network. In the minimum spanning tree, the greater the degree of the node (trading country), the stronger its influence in the global crude oil trade. Tables 3 and 4, respectively, show the variance of the top 10 countries with node degrees in the minimum spanning trees of crude oil trade before and after optimization during 2010 and 2016. e countries for Tables 3 and 4 in our selected sample are shown in Table 5. We find that, for the preoptimized crude oil trade, among the top 10 countries, there are both major net exporters (light gray area of the table) and major net importers (white area of the table). And their numbers are almost the same. However, in terms of the optimized crude oil trade, most of the top 10 countries are major net exporters (light gray area of the table). It indicates that, in the crude oil trade before optimization, the major net importers and the major net exporters have an equally important influence. In contrast, in Complexity Table 1: Numbers of crude oil trading countries from 2010 to 2016.   2010  2011  2012  2013  2014  2015  2016  Net exporters  47  48  51  48  52  44  43  Net importers  100  103  98  99  101  99  95  Total  147  151  149  147  153 143 138   Table 3: e variance of the top 10 countries with node degrees in minimum spanning trees of crude oil trade before optimization during 2010 and 2016. e light gray spaces represent the major crude oil exporting countries (see Table 5 for the countries in the selected sample).  Table 4: e variance of the top 10 countries with node degrees in minimum spanning trees of crude oil trade after optimization during 2010 and 2016. e light gray spaces represent the major crude oil exporting countries (see Table 5 for the countries in the selected sample). Top  2010  2011  2012  2013  2014  2015  2016  1  SA  RU  IQ  SA  SA  SA  SA  2  IQ  SA  SA  RU  RU  RU  RU  3  UY  CO  MX  UY  IQ  GA  CO  4  RU  IQ  RU  EC  CO  IQ  GQ  5  KW  EC  ES  US  UY  UY  IQ  6  US  UY  CO  GA  OM  OM  IN  7  CO  YE  IR  IQ  ZA  CO  US  8  QA  IT  GR  QA  CD  MX  BR  9  CM  IR  UY  MA  GT  IR  GA  10  MX  ES  CD  GQ  SD  EC  Complexity 9

Complexity
the optimized crude oil trade, the major net exporting countries are at the core.

Conclusions
In this paper, based on the yearly crude oil trade volume data from 2010 to 2016 and geographic distance data, we propose an optimization methodology based on the complex network approach. is approach allows oil trading countries to be represented as nodes and oil flows as links. e optimal crude oil trade structure has been obtained by fixing the trade volume of each country and minimizing the total trade cost. e resulting feasible solution helps exploit reasonable trade relationships. Compared with the preoptimized trade network, the proposed model can effectively reduce the trade cost. Meanwhile, we find that both the preoptimized and optimized crude oil trade networks follow power-law distribution, which means that most countries have fewer trading partners, while fewer countries have established trade relations with a large number of countries.
Additionally, in order to identify countries with significant influence, the minimum spanning tree analysis has yielded some promising results, which show that, in the crude oil trade before optimization, the major net importers and major net exporters have an equally important influence. However, in the crude oil trade after optimization, the major net exporters have the greatest influences. In other words, they are at the core. e research results provide a fresh perspective for the optimization of the crude oil trade network structure. In addition, the methodology and findings can help policymakers formulate reasonable and effective trade strategies. Further work will focus on the impact of trade preference factor on optimizing the structure of crude oil trade, thus establishing a more realistic and comprehensive optimization model.

Data Availability
e data are available upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.