Production and marketing scheduling of natural gas based on table-manipulation method and Lingo software

How to formulate a reasonable natural gas production and marketing operation scheduling strategy to make natural gas production and sales work effectively is an urgent problem to be solved by China’s oil and gas enterprises. Taking a gas company as an example, this paper used linear programming to establish the corresponding mathematical model. Firstly, the problem of imbalance between production and sales is transformed into a balance problem, and then solved by using the table-manipulation method. The Vogel method is chosen to identify the initial basic feasible solution, and then the potential method is used to judge the optimal solution. In the end, the lowest operating cost solution for multiple gas sources is obtained. In addition, the example is solved by Lingo software in this paper, which provides a new method and new ideas for natural gas scheduling management.


Introduction
The problem of natural gas source scheduling is one kind of transportation problems. Compared with other countries, it can be known that China's transportation cost is relatively high, with long transportation time and low transportation efficiency. How to schedule the production and sales of natural gas effectively and reasonably, achieve the balance between production and sales, and make gas supply stable and safe, is an urgent problem for oil and gas enterprises in China [1]. At present, domestic scholars have different research with foreign countries on the production and marketing of natural gas. Domestic scholars focus on the links and internal causes of the balance of production and sales in the natural gas industry chain from a macro perspective. In contrast, the development of foreign natural gas market is relatively mature, the regulation of nature gas production and sales is mainly driven by the market mechanism. Natural gas sellers have become the main players in the market and play an important role in the balance and effective operation of natural gas production and sales. Therefore, foreign scholars focus on the application of linear programming, nonlinear programming and other theoretical methods in natural gas optimal scheduling research. [2].
To solve the problem of natural gas source scheduling, that is, the transportation problem, a corresponding mathematical model is established [3]. If the problem is imbalanced, it will be converted into a balanced problem first [4], and then the problem is solved using the table-manipulation method, and finally get the best solution. With the rapid development of computer technology, Lingo software is gradually applied to solve transportation problems [5]. This paper also attempts to apply lingo software to solve the problem of natural gas source dispatching, providing new methods and new ideas for natural gas dispatch management. [6].

Experiment
This paper takes the natural gas supply station of a gas company which supplying natural gas to several surrounding cities as an analysis object, and tries to find a gas source dispatching scheme with the lowest transportation cost when the gas supply station has no excess gas supply [7].
A gas company decides to supply natural gas to the surrounding city ( ) The annual natural gas demand of the three cities is 320, 250, and 350 ten thousand cubic meters respectively; the maximum supply capacity of the two natural gas supply stations is 400 and 450 ten thousand cubic meters.
As the market is in short supply, after the gas company conducted market research on the three cities, it has decided that the city P 1 develops 0 to 30 units of interruptible users, so as to ensure the gas supply of city P 2 and P 3 is not less than 270 ten thousand cubic meters, to meet the most basic gas needs of all cities. According to the budget of the gas company, the unit gas supply cost of each city j P by the natural gas supply station i Q is shown in Table 1. Demand 320 250 350 --According to the meaning of the question, the linear programming model is established to find the optimal combination schedule [8].The modeling steps are as follows: (1) Let ij X be the amount of natural gas transferred from the i-th natural gas supply station to the j-th surrounding city, then the objective function of the minimum transmission cost is:

Discussion
According to the description of the problem, the total annual natural gas demand of the three cities P 1 , P 2 , P 3 is 320+250+350=920 ten thousand cubic meters; the total supply of the two natural gas supply stations Q 1 , Q 2 is 400+450=850 ten thousand cubic meters. It's shown that the supply is in short supply, so a virtual gas supply station Q 3 is established with a supply of 70 ten thousand cubic meters, and its unit freight rate is shown in Table 2. Table 2. Improved unit natural gas transmission cost Natural gas supply station

Table-manipulation method
There are many methods to determine the initial basic feasible solution, mainly the minimum element method and the Vogel method. The minimum element method is to determine the relationship between production and sales according to the minimum unit freight rate in the transport table, meet the supply and demand first, then eliminate a row or column, and then choose the smallest unit rate from the rest. Repeat the above steps over and over again until the initial feasible solution is given. The basic idea of the Vogel method is to find the difference between the minimum freight and the minor freight. The larger the difference is, the higher the freight will be if the column or row is not transported according to the minimum freight, so the minimum freight transportation plan is obtained at the maximum difference. In contrast with the minimum element method, the Vogel method is closer to the optimal solution. The Vogel method is more effective to obtain the feasible solution of the initial basis [9] in this situation. The steps of applying the Vogel method to this example are as follows: Step 1: Calculate the minimum and minor price difference of each row and each column respectively, then put them in the table.
Step 2: Select the largest value from the row or column difference, and select the smallest element in the row or column in which it is located，and make it as large as possible corresponding to the value of production or sales.
Step 3: Cross out the columns that have already met the sales volume or the rows that have already met the production volume. Repeat steps 1, 2 until the initial base feasible solution is obtained.
The initial feasible solution obtained by the Vogel method is shown in Table 3. Table 3. The ij X value of the optimal result of the gas source delivery combination Natural gas supply station According to the calculation results in table 3, the optimal scheme is: The natural gas supply station Q 1 delivers 1.5 million tons of natural gas to city P 1 and 2.5 million tons of natural gas to P 2 , but don't deliver natural gas to P 3. The natural gas supply station Q 2 delivers 1.4 million tons of natural gas to city P 1 and 3.1 million tons of natural gas to P 3 , but don't deliver natural gas to P 2 .The total cost of the optimal scheme is 146.5 million yuan. Of this amount,, the city 4 P 1 received 2.9 million tons of natural gas, P 2 obtained 2.5 million tons of natural gas, and P 3 obtained 3.1 million tons of natural gas, 400,000 tons more than the minimum.
When the initial base feasible solution is obtained, it is necessary to judge whether it is the optimal solution. Because the transportation problem is a special linear programming, it can be judged by test number. When all the test numbers are greater than or equal to 0, the solution is the optimal solution.
There are two main methods for judging the optimal solution: the closed loop method and the potential method. The closed loop method is to start from the blank space of a non-basis variable and underline along the horizontal direction or the vertical direction. If the numeric grid of the basis variable is encountered, it can turn 90 in any direction until the initial grid. At this time, the initial blank and the numerical grid of the corner jointly constitute the closed loop. However, it is not always easy to find a closed loop. The potential method is more practical than the closed loop method to determine the optimal solution in this case.
The specific steps of the potential method to solve the test number are shown as follows: Step 1: Add a column ( ) at the right end of the production-sales balance table to represent the row potential; add a row ( ) at the bottom of the table to represent the column potential.
Step 2: Set 0 1 = u and use the basis variable test number as 0, that is, to calculate other potential values.
Step 3: Calculate the test number of non-basis variables according to The test number of each non-base variable are obtained by the potential method, as shown in Table  4. Table 4. The process of determining the optimal solution City Therefore, the transportation scheme in table 3 is the optimal scheduling scheme for this problem, with the minimum freight of 146.5 million yuan.

Lingo software solution
Introduced by LINDO Systems of the United States, Lingo can be used to solve nonlinear programming, and also for solving linear and nonlinear equations. Lingo is very powerful. It is the best choice for solving optimization models. In this paper, the software is used for programming to get the results [10].

Conclusion
According to the above analysis, the problem of rational distribution of production and sales between natural gas supply stations and urban natural gas demand can be solved scientifically by using the table-manipulation method and Lingo software, so as to meet the demand of gas supply in various cities and provide reasonable suggestions for pipeline project investment.
Through the solving processes of the above two methods, it can be concluded that: (1) In order to realize the reasonable scheduling of natural gas sources, the optimal scheduling can be calculated by the table-manipulation method to reach the lowest freight rate. Firstly, the imbalanced problem between production and sales is transformed into a balance problem, then establish a model and use the Vogel method to find the initial base feasible solution. Finally, the potential method is used to test whether it is the optimal solution. The table-manipulation method is suitable for solving small-scale transportation problems, which the constraints are few and the input number M and output number N are small. So it can obtain the optimal results quickly.
(2) With the expansion of the problem, using Lingo software can bring convenience to the solution. Lingo software has a simple syntax, a rich library of functions, great readability and ease of use. Using software programming to solve linear programming problems, you only need to input the set definition, objective function, constraints and initial data to calculate the optimal solution. Lingo simplifies the complex calculation process, and the increase in the number of variables in the model will not have a significant impact on the solution speed. This paper proves that the results of Lingo software solution and table operation method are completely consistent, which shows that Lingo software can be used to