Mathematical model of network flow control

In this paper, we consider a network whose nodes are regions between which it is necessary to distribute electricity coming from its source. Any power plant is a complex economic system that always combines simple concepts - the need to supply the power plant with the main resource for the production of electricity and the need to sell the generated electricity. In this model, due to the need to sell electricity to two regions, the prices for the sale of electricity do not matter. Profit maximization is achieved by minimizing production costs. The optimal policy for generating electricity in the i-th time period is found.


Introduction
As you know, any power plant produces electricity through the conversion of natural energy. The main task of such power plants is to supply electricity to the regions of the country. The location of the power plant is selected taking into account economic and geographical convenience. Consumers are selected based on the power generated by the power plant and the region's electricity needs. To increase the efficiency and, therefore, maximize the profit of such power plants, the only way is to minimize the cost of generating electricity. To maximize the profit of such power plants, both the cost of generating electricity and the cost of selling are important. They also have to deal with the phenomenon of corruption, since they are competitors for monopolists. Depending on the remoteness of the power plant to the consumer, another problem arises -a loss in the transmission of electricity. These problems are associated with physical phenomena that occur when an electric current flows in a conductor.

Statement of the problem
We describe the general model of production and distribution of electricity. We introduce the basic terms. The primary resource is the material that is needed to generate electricity. Characteristics of the primary resource are: quantity and cost is the purchase or production price of the primary resource by the power plant. Power plant is a set of devices that produce electricity. Characteristics of the power plant are: power is the amount of electricity produced, storage capacity is the amount of the stored IIET-2020 IOP Conf. Series: Materials Science and Engineering 873 (2020) 012036 IOP Publishing doi:10.1088/1757-899X/873/1/012036 2 primary resource. A drive is a part of a power plant in which the primary resource necessary for the production of electricity is accumulated or stored. Characteristics of the drive are: drive capacity is the amount of the stored primary resource. Consumer is a set of devices that consume electricity. Characteristics of the consumer are: demand is the amount of electricity needed, cost is the price at which the power plant sells electricity to the consumer. Corruption is a cost necessary to bribe officials in the process of organizing the delivery of electricity to the consumer and / or arising from the sale of electricity to the consumer. Characteristic of corruption is the coefficient of corruption. Losses are costs incurred in electric current conductors during transmission of electricity to a consumer. Characteristic of losses is the loss coefficient [1][2][3].
We describe the model of production, distribution and transmission of electricity in a general way. There are 1, …, K power plants, 1, …, L primary resources, 1, …, M consumers. Power plants need to spend money on the production of electricity from primary resources. Primary resources are either bought or accumulated in the drive of the power plant, depending on the type of power plant. After production, electricity, through power lines, is transmitted to the consumer. During power transmission, losses occur. Each electricity production-sale transaction corresponds to the i-th loss coefficient. All processes occur in time. The prices of purchase, production, sale depend on time, as well as on the season. Typically, during cold seasons, energy needs increase, and in warm seasons, they decrease. Corruption rates are available that depend on the time period, season, and region in which the consumer is located. For each electricity production and sale transaction, the i-th corruption coefficient corresponds.

Figure 1. Model of electricity production and distribution
The profit of the power plant will be: the cost of selling electricity minus the cost of generating electricity multiplied by the coefficient of corruption multiplied by the coefficient of losses. Based on the source data, it is necessary to decide how to distribute the generated electricity between the regions in order to maximize profits [4][5]. Figure 1 shows a diagram of the resulting model.
The described model includes many subtasks. In this paper, we consider a model for the distribution of electricity between two regions with the following conditions: there is one power station, the capacity of the primary resource storage is limited, consumers are two regions, it is necessary to supply electricity to both regions, 6 periods of production and sale of electricity are considered, the cost of production is known electricity in the i-th period of time, the needs for electricity of the regions in the i-th period of time are known.
The purpose of studying the model is to maximize profits taking into account the source data. In this model, due to the need to sell electricity to two regions, the prices for the sale of electricity do not matter. Profit maximization is achieved by minimizing production costs. The optimal policy for generating electricity in the i-th time period is found [6][7][8][9].

A mathematical model of the distribution of electricity between regions with minimizing costs
We formulate the initial conditions: there is one power plant; the capacity of the primary resource drive is limited, we denote it by S; two regions are consumers of electricity; it is imperative to supply electricity to both regions; 6 periods of time of production and sale of electricity are considered; the cost of electricity production in the i-th time period is known, we denote it by pi; electricity needs of the regions in the i-th time period are known, we denote it by d1i and d2i.
The purpose of studying the model is to maximize profits taking into account the source data [10][11][12].

The formulation of the dynamic programming problem for the distribution of electricity between two regions with minimizing costs
In order for the power plant to be able to fulfill its plan for the supply of electricity, the procurement department must supply the primary resource at the beginning of each time period. Electricity production price pi, where i = 1, 2, 3, 4, 5, 6, and the need of the regions di = d1i + d2i, (i = 1, 2, 3, 4, 5, 6) which is equal to the sum of the needs of each region, are shown in table 1. The capacity of the primary resource drive is limited and must not exceed S. The initial amount of primary resources in the drive allows you to produce power plants 5 units of electricity. After the 6th period, the number of primary resources in the drive should be 0.
It is necessary to decide the volume of purchases of the primary resource at the beginning of each period, so that the total cost of purchases is minimal. We introduce the following notation: si is the number of primary resources in the drive in the period of time i, before purchase ai; ai is the volume of procurement of primary resources in time period i; xi is the balance of primary resources in the drive in the period of time i after purchase ai. Figure 2 shows some solution that is not optimal. Now our task will be to build the optimal solution. 6 ,..., (1) The state of the system at each time interval i can be described as the value si or xi; ai can be calculated from (1); it does not depend on the choice of a variable si or xi. We will make an arbitrary choice xi as a variable.

Figure 2. Some solution that is not optimal
The nature of the problem imposes the following restrictions, with numerical values limited between 0 and S: (4) Moreover, 6 ,..., 2 , 1 , If we take s1=5, then we get a set of restrictions related to xi, which can be written as: (6) The existing problem contains a linear program, which can be stated in the following form: S=50, x0=s1=0, d0=0, x6=35.

 
Notice, that xi usually depends on xi-1 and xi+1. Therefore, the calculation of the period variable of the next one below the considered one will be introduced as a parameter. It should be noted that in certain cases this fact can significantly simplify the optimization process [13][14][15][16].

The procedure for constructing an optimal policy for the distribution of electricity between two regions with minimizing costs
Now suppose that S=50. To find the best purchase policy x where the quantity vi represents the purchase price for the period i. We take x0=5, as indicated in (6). After calculating, we get x6*=35, the amount spent for period 6 has the value: v6(x5, x6) = 649 -11x5. Calculate the boundaries x5 to optimize periods 6 and 5. We get 24 ≤ x5 ≤ 50. Consider the case when periods 5 and 6 are combined.

Results
Thus, as a result, of studying the model, the following results were established: 1. The optimal income in N steps is a linear function, the coefficients of which depend on the cost of production and the amount of electricity produced.
2. In order to find the optimal policy, it is necessary to decide the volume of purchases of the primary resource at the beginning of each period, so that the total cost of purchases is minimal.

Conclusions
As a result, of the work carried out to study the methods of distributing electricity between regions, we came to the conclusion that in certain problems a quick optimal solution can be obtained through intuitive reasoning. But in the case of consideration of more voluminous problems, formalization of mathematical models and finding optimal policies by dynamic programming can significantly simplify calculations and lead to minimization of costs and maximization of profits

Acknowledgment
The work is partially supported by the RFBR grant # 18-01-00796.