Algorithm of rescue units logistic support planning in the process of regional life safety systems development

The problem of resource support planning in the process of reforming and developing rescue units of regional life safety systems is highlighted in this research. The absence of methods that allow optimizing the required amount of rescue equipment of the region in accordance with the optimal safety criterion is emphasized. Formulated the task of optimizing the safety criterion with the parameter of the number of rescue equipment and limitation in the form of logistical support capability. According to the results of previous studies, the algorithm and its software were developed for implementation in relation to planning of logistic support of rescue units (in the context of providing rescue equipment), which allows to determine the index of the optimal number of rescue units. The developed algorithm was tested on the example of administrative-territorial units of Lviv region, which showed its effectiveness.


Іntroduction
The processes of change of the administrative-territorial structure in the country in accordance with the Strategy of reforming the state administration give rise to changes in the system of protection of the population from emergency situations. As it is known, the functions of prevention and response to emergencies of various nature are assigned to the State Emergency Service of Ukraine (SES). According to [1] system protecting the population from emergencies ZAZ Mr. aye changes by reforming existing and c t Rennes new pro with iynyh rescue units (central Subordinates) and volunteer rescue units ( local Subordinates). We have defined the proper combination of professional rescue units of the Emergency Situations of Ukraine and voluntary fire brigades (teams), which is focused on a certain administrative-territorial unit (united territorial community) as a regional system of life safety.
As reform processes existing and creation of new rescue units require the number of parameters for their optimal functioning. One of the key indicators of the operation is the optimal number of rescue equipment, to be dispersed in the rescue 's formation 's designated area. Of course, there are a number of other indicators, for example, types of rescue equipment, staffing structure of rescue units, personnel and its qualifications, etc. However, in this research we will focus only on determining the optimal index of rescue equipment for the purpose of planning the logistics of rescue units. Experience has shown that during the reform processes of the SES of Ukraine, attention to identifying and analyzing material resource needs in accordance with the needs of the region (in the context of providing rescue equipment) is often neglected. As a rule, the number of rescue equipment is determined in accordance with the requirements of [2] , which boils down to the adoption of a stable structure of rescue formation (the number of rescue equipment) in accordance with a certain category . This approach does not allow for a differentiated approach to determining the required amount of rescue equipment depending on the needs of the studied region and contradicts the coordination functions of logistics. In our opinion, the amount of rescue equipment should be optimal to the indicator of its demand, expressed, for example, as a safety criterion. Adjusting this ratio should be done by optimization. However, before formulating such a task, a brief overview of the scientific achievements in the research field is given.
Scientific concepts on optimization of time and content of operations on the example of milk collection in logistic systems of agricultural production are reflected in work [3]. The authors presented a range of studies under different conditions of transportation operations. The article presents an algorithm for matching the content of work performed in logistic systems of milk collection with production conditions. The authors proved the feasibility of daily planning and coordination of the content of works and production conditions in the logistics and milk collection system.
The issue of cost optimization for finding flexible supplier networks in the process of supply chain management is reflected in [4], where the authors present a model of strategic and operational decision-making in the process of cargo delivery. The problem of prompt decision-making in integrated transport networks is considered in [5]. The importance of horizontal cooperation in the supply chain management process for small and medium-sized freight carriers in the area of unloaded transportation is demonstrated in the article.
Scientific works [4,5] have significant scientific results and on solving optimization problems in the field of transport logistics. However, in these works, all optimization methods are not focused on the problems of logistical support and the study of resource requirements at the planning stage. Planning issues are considered in [6,7]. In particular, in scientific work [6], recommendations were formulated and the process of their implementation was described for joint planning of logistic connection of two separate business units. With regard to scientific work [7], the authors studied the variety of actions and features of decision-making in the process of planning activities. The complexity of the process of planning difficult work is highlighted in the paper, and based on the theory of management it is hypothesized that in order to solve more complex problems it is necessary to expand the range and variety of actions. Research findings show that increasing task complexity, with no time constraint, leads to a variety of actions in the planning process. However, this work does not consider the harmonization of parameters that change will affect the efficiency of the planning process.
The review of scientific advances in both transportation logistics and logistics planning can continue for a long time. However, most research is focused on solutions and applications that are not related to safety. It t th further review of scientific papers focus on issues of logistics nd ensure it rescue units.
Scientific papers [8,9] focus on the study of restructuring of regional fire extinguishing systems. Much attention is paid to finding methods of determining the optimal locations of rescue groups, their staffing Second structures and and equipment. However, these studies did not address the issue of logistical support for rescue equipment, depending on the needs of the region being studied. The number of rescue equipment for newly formed rescue units was adopted by the authors in accordance with the existing standards, depending on the defined criterion of threats of the research region. Another scientific work [10] reveals the features of formation of zones of responsibility rescue units within the administrative unit, but a question of logistics support and planning, the required number of missing equipment is available. Other work by the author team [11] examines innovative mechanisms for the allocation of resources to ensure the effective functioning and development of spheres and civil protection. However, the aforementioned work outlines the mechanisms for allocating resources for the functioning of the socioeconomic component, and there is no issue of resource provision for rescue equipment.
It is worth mentioning the scientific work [12], which highlights innovative approaches to the creation of rescue formations to protect forests from fires. The described mechanisms take into account the peculiarities of the functioning of the designed rescue units, but they do not take into account the features of the resource.
So, reviewed scientific papers that focus on the research processes of regional development life safety systems, largely covering the methods and mechanisms for planning logistics support rescue units in the condition 's reform and restructuring. And those works that are relevant to the issue of resource support is not the answer to the question: how to determine the optimal number of rescue equipment and to distribute it between the rescue units of the researched region at the stage of material resources planning. Part of this issue is encountered in previous scientific papers, in particular [13], which discusses a differentiated approach to determining the structure of the rescue team and its equipment depending on the features of the region. The result of this work is the development of an information system structure to support managerial decision-making. In addition, the system itself does not contain methods, models and mechanisms for determining the optimal number of rescue equipment, which causes the continuation of these studies.
Therefore, according to the results of the analysis of the investigated branch, no method was found that allowed to determine the optimal number of rescue equipment in the process of development of the regional life safety system. In order to determine the volume of resources Software search optimization method, which consists in the settlement value of "safety of the regioneconomic feasibility is used". As you know, the optimization process is to find the best option and most profitable relationships. It is proposed to determine the optimal amount of rescue equipment basised of standards for its demand. The output is the number of calls to rescue units per unit of time (the need to involve rescue equipment). In order to determine the normative number of rescue equipment in previous studies [14], it was proposed to use queuing methods. In [14] a detailed review of methods of queuing theory was carried out and the possibility of its application was established to determine the index of the optimal number of rescue equipment to support managerial decision making in the development of regional life safety systems.
Considering the stated problems, the existing achievements in the field of research and the results of previous research in the work set a goal: to implement a method of optimizing the amount of rescue equipment in the form of an algorithm for identifying and analyzing the needs of material resources (in the context of providing rescue equipment) at the planning stage, provided achieving the optimum value of the safety criterion. To accomplish this, you must complete the following tasks:  to formulate the task of optimizing the amount of rescue equipment of the studied region;  implement a method of optimizing the number of rescue equipment based on queuing theory in the form of an algorithm with subsequent software implementation using Java;  to research the effectiveness of the developed algorithm on the example of determining the optimal number of rescue equipment for the united territorial communities of Lviv region (Ukraine).

Theoretical study
In the process of finding the best value for the safety criterion and the amount of rescue equipment in the region, it is necessary to formulate an optimization problem that includes the criteria and optimizations, parameters and their limitations. As for the criterion, as indicated, it is a safety criterion, presented in the form of a conditional meter, which varies in the range 0…1 and characterizes the probability of refusal to respond immediately to an emergency event due to the absence of free (not activated) rescue equipment. And on the possibility of timely response depends on the criterion of safety of citizens of the region. The parameter y for the optimization problem is the number of rescue units (technicians) in the studied region. Changing this setting can affect the efficiency of the process (increasing the safety criterion). And finally, the restrictions that are related to the economic component and affect the ability to logistically provide rescue units of the studied region. Of course, increasing the number of rescue equipment to the maximum will maximize the safety criterion, but this tendency entails an increase in staffing, an increase in the area of premises and maintenance costs, an increase in the cost of training of personnel. Therefore, in the outlined optimization problem, the main limitation is the ability to provide logistics. Accordingly, the optimization process will be to find the best (most favorable) ratio of safety criterion and the amount of rescue equipment, taking into account the indicator of logistical capacity.
The mathematical model of the optimization problem is described in detail in [14], but for a better understanding of the developed algorithm and its sequence, we will conduct its abstract review (review of the main stages). As stated in the previous article proposed method of optimizing presented two version. The first is the case when the number of calls to rescue units, and therefore the required rescue equipment, is considered as a multi-channel queuing system with an unlimited queue. Arrives simultaneously several challenges involved in rescue equipment to respond to them until the number of calls would not exceed the number of available engineer units in the investigated area. In this case, all other calls form a queue.
In the second embodiment, we consider the case when the analyzed system has only one channel of service. In this case, with the increased intensity of calls (orders to the system), denials of service may occur, which is not acceptable for the rescue sector.
Adapted optimization method involves 14 steps. Let's look at them in more detail.
1. In determining the actual number of service channels N k . The number of service channels is assumed to be equal to the number of functioning rescue units in all existing units in the studied region.
2. To determine the density of the order flow for execution λ .
3. Determining intensity of orders within one for a guiding channel service (Rescue department) μ. Given the known values of the intensity of calls (execution orders) and the intensity of their execution, it becomes possible to build a graph of the states of operation of the system. Figure 1 shows, for example, a graph of the states of operation of the regional safety system, with those two service channels, ie two rescue units in all units of the researched region. 5. Determining the probability that all channels of the system are free, that is, no rescue department is involved in performing tasks assigned to P 0 .
6. Determination of the probability that the number of channels of the system k is involved in order fulfillment, which reflects the probabilistic indicator of the demand for rescue units in the studied region P k.
7. Verification of the results of the probability calculation. If all the previous calculations are correct, the sum of the probabilities P 0 and all P k should be as close as possible to 1.
8. To determine the downtime of the system per unit time t pr . 9. In order to determine the likelihood of refusal to accept the order P vid , which describes the fact of simultaneous involvement of all rescue departments of the researched region.
10. Calculation relative system capacity queuing q. 11. Determining actual Q and a nominal Q Н productivity (throughput) system queuing.
12. Determining expectation number of orders, which are both serviced M(k). This point of the proposed method is crucial, since the calculation of the maximum number of simultaneous orders should make the decision to increase or decrease the number of rescue units, and therefore units of rescue equipment.
13. Determination of probability of formation of conditional queue for execution of orders P ch. Of course, the concept of the queue for the case under study is an unacceptable indicator, so the probability of its formation must be determined for the overall characteristics of the system. In the case of a queue for the execution of orders in the real system, rescue departments adjacent to the study areas are involved.
14. In case of positive significance likelihood of queues is necessary to determine the total duration of existence queue for change t ch .
Based on the calculations, a decision is made regarding the need to optimize the safety criterion. The value of the safety criterion is inversely proportional to the calculated value of P ch . Accordingly, the higher the probability of queue formation, and therefore the likelihood of failure to respond immediately to an emergency, the safety criterion decreases. This stimulates the regulation of optimization processes by varying the parameters, and in our case , the service channels to meet all the needs of the system. If the likelihood of queues is close to zero, the criterion of increasing safety and necessity of varying parameters and zoom Annie channel s service is absent. If the parameters are varied (increase or decrease in the number of service channels), it is necessary to determine the probable value of the safety criterion of the upgraded system by performing a recalculation. In the case of optimal results of verification calculations, the number of maintenance channels should be increased by the value that was laid down for their carrying out.
Taking into account the abstract presentation of the optimization method, which is based on the statistical methods of calculating the parameters of queuing systems, the algorithm of logistical planning of an unusual amount of rescue equipment has been developed, which can be used in the development of regional life safety systems. Algorithm is the original version for writing application language Java with a view automated calculations.   Fig. 3. Continuation of the algorithm of planning of logistic support of rescue formations (determination of the index of optimum number of rescue equipment of a multichannel system) Next, consider the option of functioning of the regional life safety system as a single-channel queuing system, that is, in the studied region on the balance of rescue units is only one rescue department. The scheme of such a system has the form of a graph of states whose order execution rates do not depend on the vertex number (Fig. 4). In this case, due to the increased intensity of order receipt, refusals of service may occur, and thus the safety criterion will be invalid. In practice, such a situation encourages the involvement of subdivisions of neighboring regions. In the course of solving the optimization problem for a single-channel system, the following steps of the proposed method should be performed [14]: 1. Similarly to the previous case, the calculation begins with determining the input stream density λ, the order execution rate μ and the summary order execution density α.
2. Determining the probability of the system being in the unloaded state P 0 .
3. Determination of the duration spine work (use) system t v .
4. Determining the idle time of the system without work t pr .
5. Determination of the working time ratio of the system C t. 6. Determination probably spine formation queue of orders (call) and the total duration of its existence during the shift of P ch , t ch .
7. Determining the probability of refusal to execute orders due to the presence of too large queue P vid .
8. Determining the relative bandwidth the spine system capable q.
9. Determination of real and nominal Q, Q H spine productive system.

Determination lengths and the queue of orders M(r) and central duration rear waiting time M(t ch ) .
Similarly, the previous version, based on the calculations determined values of safety criteria and decide on necessities rear change parameters (increase service channels). In the case of a decision to increase the service channels, the control calculations shoul d be made by the first method. Figures 5 and 6 are presented as algorithm logistical planning to ensure single-channel systems, life safety.   Fig.6. Continuation of the algorithm in planning logistics software rescue units (determination of the optimal number of rescue vehicles single-channel system)

Approbation of research results
In order to determine the effectiveness of the adapted optimization method and the algorithm based on it, it was tested by performing the calculations based on empirical studies. As objects of observation selected three administrative units of Lviv region t and the analysis of the intensity of the involvement of existing rescue units. The list of objects of observation includes the Slavic United Territorial Community (# 1), the union of 13 settlements around the city of Chervonograd and the village of Sosnovka in the Lviv region (# 2) and the Sikhiv administrative district of the city of Lviv (# 3). The main initial parameters for the calculation include: the number of rescue units and equipment available in the research region; density of order flow; intensity of order fulfillment. The results of the empirical studies are summarized in Table 1. Carrying out the calculations in accordance with the proposed algorithm, it is established that the probability of queues and orders formation in # 1 is 52 %, # 2 -32%, # 3 -35%. According to the results obtained, the safety criterion for # 1 is 0.48, # 2 is 0.68, and # 3 is 0.65. Considering the results of the calculations in accordance with the above algorithm, it is necessary to make a decision on the planning of the resource provision of rescue units (in the context of providing rescue equipment). The results obtained indicate that the safety criterion for # 2 and # 3 is a valid value, unlike # 1. In the latter case, the decision should be made to increase the number of rescue equipment (service channels) and to recalculate with the changed parameter.
For clarity, we present a graphical dependence of the change of the safety criterion of the investigated regions on the parameter of the amount of rescue equipment concentrated for servicing these regions (Fig. 7). Approbation algorithm demonstrated by the existing units, but its main purpose is to implement the planning material s resource s in the creation, restructuring, reform and development of the rescue forces at the regional level. The calculations are inconclusive for making recommendations for restructuring the regional emergency services, it is not taking into consideration Fire first and manmade first load and region. The economic and social component of the region also remains unaddressed. The presented results only demonstrate the effectiveness of the proposed method of optimizing the safety criterion and the number of rescue equipment of the investigated region. The developed algorithm is proposed for systematic use as one of the methods of decision support for the development of regional life safety systems.

Conclusions
1. On the basis of a detailed study of the issue of planning processes for logistical support of rescue units at the stage of their reforming, the lack of a differentiated approach to determining the optimal number of rescue equipment depending on the needs of the region, which led to the formulation of the task of optimizing the safety criterion and the number of rescue technology and the condition of rescue technology. 2. With the help of algorithmic representation of mathematical calculations , the method of optimization of the number of rescue equipment was implemented, based on the statistical methods of ting the parameters of queuing systems, to identify and analyze the needs of logistical support of rescue units of regional life safety systems. 3. By adopting the developed algorithm , its effectiveness was established on the example of optimization of the safety criterion and the indicator of the optimal number of rescue equipment for certain territorial communities of Lviv region (Ukraine).