Algorithm of optimal management for the efficient use of energy resources

. The paper presents the results of the developed algorithms aimed at optimizing management decision-making by the administration of megalopolises. A mathematical model is obtained within the concept of digital economy. The regulatory action of dispositive decisions is aimed at business entities whose activities are externalized while consuming energy resources. Since any resources are used unevenly throughout the year, the authors apply the methods of the theory of optimal decisions. The criterion is the functional reflection of the balance between the maximum profit, the comfort of living conditions, and the environmental conditions. The results obtained make it possible to take administrative decisions in an optimal way, which reduces the negative effects of externalities and results in the most efficient use of energy resources.


Introduction
Since the end of the 90s of the last century, due to innovations in a lot of segments of industry and transport, as well as to a number of political decisions and process of globalization, both business conditions and people's lifestyle have changed significantly. There are new opportunities to realize human potential, a high degree of freedom, wide resources for the implementation of plans and activities, all these factors are available not only for hardworking people, but also for young generation and the adults. The migration [1] to Europe and other countries has become more active. The employment structure of population has changed and labor mobility has increased. All types of international transport services have become widely available.
The development of the Web 4.0 concept [2] and the widespread penetration of highspeed access to the global Internet have caused qualitative changes in a number of industries. Awareness of modern society, as well as the opportunity to get to any place in the world, including relocation depending on job presence or comfortable living conditions, caused the growth of the HORECA segment, including also intermediary companies for organizing such activities. At the same time, the ecological situation generated by externalities has become significantly worse. Considering the influence of these factors [3] is extremely important for economic forecasts, because the imbalance of market equilibrium, a violation [4] of Pareto efficiency leads to market failure.
There is an acute problem of the lack of reasonable administrative regulation of business that is responsible for the effect of the externalities. Moreover, it is necessary, within the current standard, to prove the existence of an optimal balance [5] between the possible profit of the interested participants and minimization of the damage caused by their activities to environment.
The purpose of this work is a mathematical model [6,7] of the process of the impact of externalities on the common property resource as an environmental asset. This is especially necessary for a non-rivalrous resource. The result was a set of formalisms [8], which allows the using of scientific methods for finding optimal solutions [9,10]. This concept fits into the paradigm of a digital city, providing a stand-alone collection of economic information and a flexible response to operation conditions. This approach provided an acceptable basis for creating an expert system for making administrative decisions in the field of environmental policy.

Materials and Methods
The basis for the study is information about the workload of metropolises [10]. Alpha cities are the centers of attraction for a number of flows, among which the following groups can be distinguished: -Business tourism [11] which also includes the corporate segment of MICE (Meetings, Incentives, Conferences, Exhibitions); -The flow of people that are focused on visiting iconic political events, sports events, holidays, festivals, cultural and social events; -Tourism that could be described according to the GaWC (Globalization and World Cities Research Network) rating, the totality of cities from Alpha to Alpha ++ is most attractive for its sights, POI (place of interest) and historical heritage; -Health tourism (HT), both aimed at treatment and at the use of medical services, since the most qualified medical personnel, modern hospital equipment, research centers are concentrated in large cities. In addition, this type of tourism in many cases is due to a significant difference in procedures cost or the inability to obtain a service because of legislative restrictions in their country; -Migrant workers and accompanying persons due to the presence of high employment prospects in metropolises. It should be borne in mind that accompanying dependents are coming along with the number of expats; -Student migration is a usual situation for most metropolises, since the most significant universities, academies and special educational institutions are also concentrated in major scientific and industrial centers.
On the basis of quantitative data [11], which can be obtained in an automated mode from the periodic reports of enterprises of the HORECA segment, a curve of change in the total additional load on the resources of the city is constructed. This dependence is stochastic, uneven and reflects the seasonality of demand with pronounced annual periodicity. Using the possibilities of mathematical analysis, we decompose this dependence into a Fourier series, in order to decompose its complex form into a series of harmonic components, each of which will be a periodic function. Then systems of Erlangtype differential equations are formed to calculate the dynamics of demand for resources.
An analytical solution is obtained in quadratures that can be scaled for each system of that kind. By superposing the obtained solutions with weights corresponding to the initial decomposition, it becomes possible to obtain an integrated dependence, which serves as the basis for further calculation. Next, the resources of the metropolis need to be formalized in the form of a set of structural subdivisions with limited capacity. Accordingly, we introduce a set of business units of users of these resources and externalities in the form of an impact 2 on the environmental situation. We introduce the functions of the negative impact of users on the environment, as well as the dependence of their profits on the cost of preserving the environment. Next, we compose a system of equations to find the Nash equilibrium, we will look for the result inside the multidimensional situation cube Since this produces a whole set of solutions for which an equilibrium of interests is reached, we correspond to each of them with a seasonal function of resource loading. Based on the dependence of environmental costs, we transform the calculation results into recommendations for administrative regulation, which are necessary for decision-making by the metropolis management.

Basic formulas of the mathematical model
To implement a mathematical model that allows applying the methods of finding optimal solutions, we introduce a number of formalisms. We adopt the following notation: T -the period, which in general can be taken equal to the calendar year. Then you can write the Fourier equation in the form: which gives the dependence of the expectation in separable functions. Next, we derive differential equations by analogy with the Erlang system. To do this, we introduce: () i t  periodic functions reflecting the capabilities of shared resources; () k Et-system status; corresponding probabilities: To solve the problem we make the sequence: and add the condition of the full group: From here, having transformed to a for   and also, having defined initial conditions we will receive the system integrated in quadratures: and also k satisfying the inequality: As a result, we have the expression for calculating () i t  : Similarly, we express: On the basis of this, we search for the optimal solution. To do this, we formulate a general problem. We define n -the number of users of resources. In this case, the load  For the calculation, we find the extremum points from the conditions: Denoting the sum as which will give the desired value Therefore, the extremum is reached at To illustrate the results obtained, we will carry out the calculation on a bounded data dimension.

An example of calculation
We obtain two inequalities that correspond to the equilibrium condition. The first corresponds to the lower boundary: The second reflects the upper bound: After the conversion, we get their final look: The applied administrative regulators are economic in nature [24], they prescribe certain behavior to economic entities, which in a complex reflects on the state of the economic system.

Discussions
The presented mathematical model can serve as the basis for making a number of managerial decisions. Currently, administrations of metropolises use heuristic methods [25] in determining the feasibility of environmental fees. In the same way, the amounts of expenses that must be borne by various members of the business community are assigned. At the same time, there is no dynamic analysis and search for optimal solutions. This is primarily due to the complexity of taking into account many factors, as well as the lack of scientifically based theoretical models that take into account economic indicators. The developed method allows to calculate a balanced benefit to all participants in the activities when accounting for externalities, as well as to choose alternative options. Using the data [26] on the infrastructure of tourist-significant metropolises, we can interpret one of the options for applying the method described as follows. Taking as a basis the rating of the GaWC (Globalization and World Cities Research Network) compiled for the Global city, and highlight the survey data "Euromonitor". We will receive a list of the most visited metropolises of the world, such as Rome, Paris, Athens, Hong Kong, London etc. It was in these cities that the authorities were the first to start working on creating environmental conservation rules and optimizing the load on the common property resource. Since hotels and accommodation facilities in such cities are concentrated near historical centers, POIs, various administrative restrictions are introduced, primarily Ecotax. According to the described method, data on the tourist flow of the metropolis, POI capacity, the influence of externalities are entered into a computer. As a result of calculations using a mathematical model, we obtain data on the intensity of loading, as well as a forecast for saturation of the city's capabilities as a visiting object from the condition of loss of its attractions. In determining the optimal solution, the quality functionality is based on the Frankfurt tables, on data on the maximum permissible load of POIs, utilities, city traffic, law enforcement services and the negative impact on public resources. As recommendations, data [27] for calculating the optimal (averaged) Ecotax value are proposed. Different decision vectors reflect periods of high season and low season visits. In addition, from the analytical solution, you can make a forecast of the degree of satisfaction of tourists, which is important when planning the hiring of additional staff in the service and planning activities of the metropolis.

Conclusions
In modern metropolises, problems of a social and economic nature are also relevant, as well as problems related to the aggravated environmental situation. The effective work of the authorities, administrations should be based on scientifically based methods for solving problems related to environmental economics. One of the main tasks is the effective use of the common property resource. From the point of view of the business analyst, who makes recommendations to the authorities, in this case it is necessary to take into account multidirectional processes. On the one hand, there is an increase in the load on resources and a decline in the quality indicators of the common property resource, while negative externalities should be evaluated. On the other hand, the economy of the metropolis depends on the activities of all types of business, on enterprises that create not only profit and employment, but also adverse environmental consequences. The results obtained in this work, first of all the mathematical model, the developed solution, can serve as the basis of the expert system. Automatic processing of data from tax reporting, registration departments, passenger traffic, allows to integrate this system into the concept of a digital city. Linking results to economic indicators is a part of environmental planning and managerial decision-making.