THE USE OF MACHINE LEARNING IN SITUATIONAL MANAGEMENT IN RELATION TO THE TASKS OF THE POWER INDUSTRY

. The article discusses the application possibilities of machine learning methods (artificial neural networks (ANN) and genetic algorithms (GA) to form management actions when applying the concept of situational management for intelligent support of strategic decision-making on the development of energy. At the first stage, the application of ANN to classify extreme situations in the energy sector, to select the most effective management actions (preventive measures) in order to prevent a critical situation from developing into an emergency. Genetic algorithms are proposed to be used to determine the weighting coefficients for training ANN. An algorithm for constructing a classifier based on a neural network and a demonstration task using data on generation and consumption of the


INTRODUCTION
In connection with the spread of the concepts of Smart Grid [1] and digital energy [2], both, the application of modern information and telecommunication technologies and the improvement of the technological infrastructure, and the development decisions of which are strategic, are relevant. At present, the issue of improving the technology of intelligent decision-making support to minimize the risk of adverse situations is an urgent one of the promising approaches in this direction is the use of machine learning technologies that have shown good results in other areas [3][4][5]. The team represented by the authors proposed to use the concept of situational management for intelligent support for making such decisions, and to use a method based on the synthesis of artificial neuron nets (ANN) [6][7] and genetic algorithms (GA) [8][9][10] to select management actions (or a sequence of preventive measures). The primary task in this case is the classification of extreme situations (ExS) in the energy sector in accordance with the scale "norm -pre-crisis (critical situations) -crisis (emergency situations)". Timely recommendations on the selection of preventive measures (management actions) can prevent the transition of critical situations to emergency and allow you to return to the normal state of energy systems (ES). The article considers the modern interpretation of the concept of situational management and its interpretation on the example of studies to assess the state of the fuel and energy complex of Russia. Genetic algorithms are proposed to be used to determine weight coefficients when training ANN [9][10][11]. An algorithm for constructing a classifier based on a neural network and the results of solving the demonstration task using data on generation and consumption of the United Electric Power System of Siberia using the developed prototype software module are presented.

SITUATIONAL MANAGEMENT
The concept of situational management was proposed by D.A. Pospelov and developed by him and his students in 70-80 years. last century [12]. At that time, it was not possible to fully realize it, both because of the insufficient power of computer technology and the unsatisfactory level of development of the theory and practice of artificial intelligence. The decline in interest in situational management in Russia that occurred in the 90s, in addition to an objective change in external economic and political conditions, can be explained both by the "winter of artificial intelligence" that has come and the difficulties that developers have encountered when trying to build models of complex management objects using the proposed approach. Nevertheless, at present, a new round of interest in this area can be noted, which is reinforced by the availability of more advanced technology and the emergence of new methods and approaches (Intelligent Computing), including methods of semantic modeling [13].
In [14], the idea of the situational management is used, the essence of which is the choice of managerial decisions taking into account the current situation from a certain set of admissible (typical, standard) control actions. In this case, the current situation C is understood as the totality of the current state of the object (state vector X) and its external environment (disturbance vector F). Then C = <X, F>. The concept of the complete situation S = <C, G> is also introduced, where C is the current situation, G is the control goal. In turn, the control goal G can be represented as the target situation Gg, to which the existing current situation should be brought. Then S = <C, Gg>. Assuming that the current situation C belongs to some class Q ', and the target (given) situation Gg belongs to the class Q' ', we seek a control (control action vector U) that belongs to the set of admissible controls Ωu and provides the required transformation of one class of situations into another : Thus, situational management acts as a mapping: matching the pair "current situation -target situation", the desired result is control U. In other words, in situational management, the problem of choosing control actions is reduced to an adequate assessment of the state of the object and environment (which is complicated by the presence of uncertainty factors), assigning the corresponding current situation to one of the typical classes and choosing such a control (from a certain set of alternatives), which leads to the achievement of the management goal (the target situation) [12]. Currently, this concept is proposed for use in operational management. The authors proposed to use it for strategic management in the energy sector, which is justified by the example of studies on the development of the country's fuel and energy complex taking into account energy security requirements [13,15].

THE PROBLEM OF CHOOSING CONTROL ACTIONS IN SITUATIONAL MANAGEMENT
In fig. Figure 1 shows the general scheme of studies of energy security (EB) problems from the point of view of situational management, or, in other words, assessing the state of the fuel and energy complex under the conditions of possible scenarios of EB threats taking into account preventive measures aimed at increasing the level of EB. Let us compare this scheme with the approach described above [14]. Here S0 is the initial state of FEC, can be considered as the current situation С; Ei -scenarios of possible extreme situations in case of ES-threats realization (similar external influences F); Ap , Aq , Al -a set of preventive, operational and liquidation activities to prevent, neutralize or mitigate the effects of an emergency situation (can be seen as a set of related controls U)); Sj -the FEC state after the emergency (realization of ES-threats) , taking into account a set of implementation activities and / or ; Sk -FEC state after liquidation measures ( and can be seen as analogous to the corresponding target situation Gg)).
Until recently, the selection of management actions in these studies and the assessment of the effectiveness of the proposed solutions were carried out mainly by expert means.
In the works of Gerget O.M. [16][17][18][19] a bionic model of management actions was proposed, which is based on the synthesis of artificial neural networks, a genetic algorithm and a method of generalized indicator , which allows to increase the efficiency of decision-making on the choice of management action. Bionic models are understood as mathematical models built on the principle of functioning and organization of biosystems [16]. The bionic approach has been successfully applied in the field of medicine [17]. Authors, together with O.M. Gerget, proposed to adapt this approach to the tasks of the energy sector.
To evaluate and predict the effect of the application of management actions, it is proposed to use a bionic model based on a combination of the generalized indicator method, neural networks (NS) [6] and the genetic algorithm (GA) [8]. Figure 2 shows the concept of the choice of management actions using machine learning. Thus, each object of study is described by a bionic model of the form <NS, GA, I, A>, where A are model tuning algorithms. The synthesis in bionic models of neural, genetic and informational (generalized indicator method) systems allows systems to exchange information and transmit the values of their characteristics as input influences. In our case, the evaluation of the effect of the application of management actions on the basis of the bionic model can be used for a comprehensive assessment of the functional state of the system taking into account management actions, depending on the a priori information received regarding the classification of the object of study in one of the classes of critical situations: normal, pre-crisis, crisis. The generalized indicator method is associated with the determination of the homeostatic properties of the system and is not used for our tasks at this stage. Below are the results of a study of the possibility of applying the bionic approach in the tasks of the electric power industry.

ASSESSMENT OF THE POSSIBILITY OF USING NEURAL NETWORKS FOR THE CLASSIFICATION OF EXTREME SITUATIONS IN THE ENERGY SECTOR
We formulate a specific task, which will illustrate the possibility of using neural networks to classify extreme situations in the energy sector. The task will be related to the generation and consumption of electricity in the unified energy system (UES) of Siberia. The UES system of Siberia is located on the territory of the Siberian Federal District and partly on the Far Eastern Federal District. The operational zone of the ODE of Siberia covers 12 subjects of the Russian Federation: Altai, Buryatia, Tuva and Khakassia Altai, Transbaikal and Krasnoyarsk Territories; Irkutsk, Kemerovo, Novosibirsk, Omsk and Tomsk regions. It includes 10 regional energy systems: Altai, Buryat, Chita, Irkutsk, Krasnoyarsk, Novosibirsk, Omsk, Tomsk, Khakass, Kuzbass. At the same time, the Altai energy system unites the Republic of Altai and the Altai Region, Krasnoyarsk -Krasnoyarsk Region and the Tyva Republic . As shown above, the choice of preventive measures is necessary to prevent a critical situation from becoming emergency. In order to take advantage of them in time, it is proposed to use neural networks for the timely classification of extreme situations (ExS). This means that the algorithm will be divided into 2 stages: 1) forecasting the parameters of the situation; 2) classification of the situation according to the predicted parameters Having received information about the possible (since the network is capable of making mistakes) occurrence of an extreme situation, knowing the class to which the ExS belongs and the date of its occurrence, through the operation of the genetic algorithm, it is possible to form a set of preventive measures that are distributed according to the time principle: from the current day to the day of occurrence of the ExS, naturally, taking into account risks and assumptions. To build a classifier based on neural networks, you must perform the following steps: • data preprocessing; • choice of network topology; • choice of methods for determining the number of hidden layers; • selection of methods for determining the number of neurons in hidden layer; • selection of methods for initializing initial weights, etc.; • selection of network learning algorithm; • selection of network performance assessment methods. The algorithm for constructing a classifier based on neural networks is shown in Fig. 3. This algorithm can also be used to build a neural network that solves the prediction problem. In this case, the output of the neural network will be the predicted value of the indicator, and not the type of class.
One of the key stages in the operation of a neural network is the learning process with the aim of selecting weighting factors. The mathematical formulation of the problem of training a neural network is to minimize the objective function of the error of a neural network. The widespread gradient descent method [20] has several drawbacks (low convergence rate, high number of a priori indicators, the problem of a local minimum). An alternative to the gradient descent method is a genetic algorithm to minimize the cost function of a neural network, which is based on the principle of natural selection and avoids many problems at the stage of network training [16]. It is also possible to use the genetic algorithm to solve the problem of selecting a sequence of management actions in which the deviation of the predicted value of the integrated assessment of the ECO (or a separate indicator of the electric power system) from the desired (the required value of the indicator) is minimal/

DEMO EXAMPLE TO ILLUSTRATE THE POSSIBILITIES OF USING ANN
Formulation of the problem. It is necessary to predict the ratio of generation to electricity consumption for 7 days in advance and classify forecasting results. The number of situations classes are three -normal, pre-crisis, crisis. The data for the training sample (time series) were taken from 01.01.2013 to17.06.2019. A population of 2359 objects for training the network was formed. Each object is described by 2 parameters (features): date and amount of electricity production (MW * day) (Fig. 4). The entire sample was normalized in the range from 0 to 1. The network with 6 inputs and one output is trained on the resulting set.
To develop a prototype of the software module, the direct signal propagation architecture for the neural network was chosen, consisting of 4 layers: input layer, 2 hidden layers, output layer. The input layer consists of 6 neurons, the first hidden layer ˗ of 5 neurons, the second hidden layer ˗ of 3 neurons, the output layer ˗ 1 neuron. As a learning algorithm, it was proposed to use the genetic algorithm and the back propagation algorithm of the error, and then compare their results. As a function for activating hidden layers, a sigmoid function is used. Prototype development tools: Python programming language; development environment for software implementation PyCharm. Fig. 4. Initial data for a demo example.

THE RESULTS OF CALCULATING WITH THE PROTOTYPE OF SOFTWARE MODULE
The training of ANNs using a genetic algorithm is based on the idea of natural selection in living nature. In this model, the role of genes is played by sets of numbers, in our case, these are the weights of the neural network. Mutation occurs by changing the weight coefficient by a random value. The range and probability of mutation are given by the initial values, but they can also mutate during evolution. Crossing occurs by randomly mixing the neurons of two ANNs. Thus obtained, a new ANN takes place in the population. The task of the genetic algorithm is to minimize the objective function. As the objective function, the average error of the neural network is used. GA parameters: minimum number of individuals in a population are 5; maximum number of individuals in a population are 30; initial number of places in the population are 10; probability of mutation is 0.1; mutation level is 0.5. In the table. 1, fig. 5 and tab. 2, fig. 6 shows, respectively, the results of the prototype for both cases. Comparison of tables and graphs allows us to conclude that the results are comparable, which confirms the possibility of using a genetic algorithm to determine the weight coefficients of ANNs.

CONCLUSION
The possibility of using machine learning methods in the implementation of the concept of situational management, as applied to the tasks of the electric power industry, has been tested. In order to select a sequence of control actions, it is proposed to use a bionic model