Optimal placement of maintenance facilities

The article deals with the placement of service facilities and infrastructure. The most typical statements of problems are given. It is shown that the greatest difficulty is the simultaneous consideration of budget constraints and restrictions on the relative location of objects. It is shown that the application of the method of dynamic programming, in many ways can solve these problems. A heuristic algorithm for solving the problem is proposed. The issue of determining the rational number of objects intended for placement is considered. In this case, the problem reduces to determining the matching of maximum power. A heuristic algorithm is proposed that allows you to determine the required number of objects to be placed.


Introduction
The tasks of placement are connected with the solution of the problems of the best location in certain regions of such service systems as shopping centers, fire protection posts, factories, airports, warehouses, etc.The mathematical structure of the allocation problem is determined by the configuration of the area of admissible points and the quality assessment method placement.Because of this, there are many diverse placement problems, and technical literature is full of methods for solving them.In this section, we shall confine ourselves to considering only such allocation problems for which the domain of admissible points of location of service centers is a certain graph, that is, these centers can be located at some vertex or on some arc of the graph.
The tasks of locating service objects or infrastructure constitute a significant layer of optimization tasks.This set of tasks will be even greater if one considers that resources in any projects can be of two types: non-renewable or material or technical resources or resources of the first type and renewable resources, otherwise called resources of the type of capacity, that is, resources of the second type.
If we consider the procedure for allocating resources of the type of capacity in the project as an allocation task, then the range of tasks covered by this class of optimization tasks will be greatly expanded and, thus, capture a very important aspect of project management technology-the management of the resource allocation process in the project.
The formal statement of the problem is as follows: there is a given amount of resources that must be placed in such a way that all areas that are supposed to use these resources are covered.This task can be represented in the form of a bipartite graph the first layer of vertices of which is the number of resources of the type of capacity expected to be placed, and the second layer of vertices will characterize the locations of possible placement of the objects under consideration [1].

Materials and Methods
Let's consider the most typical tasks related to the location of urban infrastructure.We introduce the basic notation, which makes it possible to formalize the problem under consideration: nnumber of possible placement points; mnumber of objects intended for placement; d iincome or effect obtained from the i-th version of the placement of objects; z icosts necessary for the implementation of the i-th version of the placement of objects; В amount of funds allocated for accommodation; Rthe minimum permissible value of the resulting effect.For further solution, it is necessary to enter a binary variable x i , which is equal to 1 if the object is placed in the i-th point and zero otherwise.In this case, the following most typical problems are possible: Task 1.It is necessary to place the objects in such a way that the total revenue received from this placement is maximum, that is, to find the maximum of the next objective function under constraints: on the number of placed objects on the amount of funds used for accommodation in neighboring locations where (i, j)an arc connecting two points i and j, in which the simultaneous arrangement of objects.The last restriction is a system of inequalities, the number of which is equal to the number of pairs in which adjacent objects are prohibited.
Task 2. It is necessary to place the objects in such a way that the total costs directed to these purposes were minimal, that is, to find the minimum of the next objective function at the same time, as a rule, a restriction on the amount of income received can be used, that is, the effect should be no lower than the specified value In addition to this restriction, restrictions are also used (2), (4).The above problems in the absence of unconventional constraints of the form (2) and (4) will be a classical knapsack problem, the methods of solving which are well investigated [2].For this purpose, the branch and bound method, dynamic programming, the method of dichotomous programming or greedy algorithms can usually be used, as a rule, giving solu-tions in this case close to optimal ones.The main difficulty in solving the problems posed is the need to take into account these limitations (2) and (4).
Let us consider a possible way of taking these constraints into account, based on the natural representation of the problem being solved in the form of a graph.This representation has the positive effect that constraints of type (2) and ( 4) are taken into account at the stage of preparation and formation of initial data on the problem being solved, when it is necessary to express all given conditions in the form of a graph.
The formal statement of the problem is as follows: there is a given amount of resources that must be placed in such a way that all areas that are supposed to use these resources are covered.This task can be represented in the form of a bipartite graph, the first layer of vertices of which represents the number of resources of the capacity type that are supposed to be located, and thus the constraints of type (2) are taken into account, and the second layerthe places where the resources are supposed to be located.The vertices of the first and second layers are connected by arcs.At this stage of graph formation, restrictions of the type (4) are taken into account.Each arc has a weight characterizing the quality of the location of the resource at a particular point.In the event that the number of accommodation facilities is equal to the number of placement points, we have obtained a classical assignment problem, for which the Hungarian algorithm is applicable.
In the general case, the number of vertices of the first and second layers of the obtained bipartite graph is not equal.Then the problem is formulated as follows: in the presented bipartite graph it is necessary to find the maximum matching of the minimum or maximum weight.
A pairing is a set of edges of a graph that do not have common vertices in pairs.The traditional problem of finding a match in a graph implies finding only the edges entering the matching [4].The price of such a choice remains unknown.The finding of this set can be carried out using the Kuhn algorithm (the method of increasing chains) or using the maximum flow problem (the Ford-Falkerson algorithm).
For the case of bipartite graphs, the most preferred way to find the match is the Ford-Falkerson algorithm.
We consider the allocation problem in relation to the problems of planning the development of urban agglomeration.

Results
In several districts of the city, it is necessary to locate service facilities for the population.It can be as objects of the commercial plan, for example, carpets, car-care centers, cafes, etc., and objects of social infrastructure such as schools, polyclinics, kindergartens, etc.And in the case of objects of commercial nature, you can put two types of tasks: the first task is connected with maximizing the revenue received from the location of objects, and the second -minimizing the costs directed to the implementation of a particular accommodation option.It is quite clear that for objects of a social type only the problem of the second type is valid.
The main difficulty in solving this problem lies in the fact that it is necessary to take into account the limitations of two types: budgetary, that is, restriction of the form (3) and restrictions on the number of placed objects (2), and also on the relative positioning of objects of the type (4).
The classical knapsack problem allows us to take into account only the budget type constraint, and problems using graph theory, that is, statements that allow for the consideration of constraints of type ( 2) and (4), do not allow for a budget constraint (3).In this case, the resolution of the contradiction is the possibility of applying dynamic programming methods or methods of dichotomous programming to the type of problems being considered.Con-sider the application of the traditional method of dynamic programming to the problem of locating service facilities in urban areas.In this case, most often you have to deal with the task of the second type, that is, with the task of minimizing the costs of placing objects.
Let in five districts of the city it is necessary to place five facilities for servicing the population, so that the total costs directed for these purposes were minimal.The initial data of the problem are presented in Table 1.We denote by f i (x)the cost function in the case of construction and subsequent operation of x objects in the i-th area of the city, then the value   x Z * k will be the minimum cost of placing x objects in k areas.
Taking into account Bellman's principle of optimality, one can write down the equation of state for a given problem and the functional equation The decision process begins with consideration of the first district of the city, that is, k=1.In this case, the functional Bellman equation is transformed to the form Considering that represents the costs made in the previous step, that is, at the moment when no costs have yet been incurred, it is possible to assume this value to be zero, that is, 1 step.Consider the first district, i. e. k=1.In this case we obtain the following values of the objective function In this case, the row of initial data, corresponding to the area under consideration, is repeated.The received values are saved.The results of the step are more conveniently presented in Table 2.
Let's assume for placement in two districts of the city is assumed one object, i. e. x=1.In this case, only two cases are possible: this single object is located either in the first region or in the second.We estimate both options.If the object will be located in the first area, and in the second area of the objects will not be, the total costs will be: In the event that two objects are expected to be located in two districts of the city, i. e. x=2.This placement is possible in three ways: 1. two objects to be kneaded in the first area, and in the second one not; 2. on one object to place in both the first district of the city and in the second; 3. in the first district of the city not to place any object, and both to place in the second district of the city.Describing these variants of the allocation by means of the Bellman functional equation, we obtain: Similarly, we are considering ways of locating service facilities for cases where three, four and five service facilities are expected to be located in two districts of the city.
For the case x=3, we obtain the functional equation in the following form At x=5 the equation will have the following form Advantages of the dynamic programming method is also that with the increase in the number of objects expected to be placed there is no need to re-read the data received, it is only necessary to supplement them with appropriate calculations for a larger number of objects.Consider the case where ten objects are supposed to be located, but there is a limit on the number of objects in each of the districts.Without loss of generality, we assume that in each region there can be no more than five objects.

MATEC Web of
At х=7, the equation can be written in the following form Similarly, we obtain values for the objective function for х=8, 9 10.
The results of the second step are summarized in Table .3, taking into account only the dominant variants, that is, those whose costs are minimal.
At this step, it is already known how many objects are to be allocated, that is, all five objects should be distributed among the three districts of the city.Therefore, in this case, the number of options for analysis is reduced, that is, it is necessary to consider only the case x=5.In this case, the functional equation can be written in the following form Advantages of the dynamic programming method is also that with the increase in the number of objects expected to be placed there is no need to re-read the data obtained at all subsequent steps, it is only necessary to supplement them with the corresponding calculations for a larger number of objects.Consider the case where ten objects are supposed to be 6 MATEC Web of Conferences 170, 01124 (2018) https://doi.org/10.1051/matecconf/201817001124SPbWOSCE-2017 located, but there is a limit on the number of objects in each of the districts.Without loss of generality, we assume that in each region there can be no more than five objects.
Let x=6, then the Bellman equation takes the following form Consequently, the minimum costs for the placement of 6 service facilities will be 57 units.
At x=7, the functional equation is written down Thus, with the placement of 7 objects, the total costs will increase to 72 units.Let us assume that eight objects are located in the regions under consideration.In this case x=8; and the functional equation is transformed to the form The final result is given in Table 4 below.Thus, the minimum cost for the placement of five facilities in three districts is 46 units.The elements corresponding to the decision are underlined.The final decision on the areas in which the number of objects need to be mixed is obtained by the reverse method.According to the decision, the minimum amount of costs corresponds to the term of the equation, underlined by a double bar.This means that the optimal amount of costs will be provided in the event that in the third district of the city will be placed one object, and four other facilities in the other two districts of the city.Returning to the second step of the algorithm, we find that in the case where four objects are supposed to be placed in two districts of the city, the most profitable in terms of the cost will be the placement of two objects in each district.
For this problem, a heuristic rule can be formulated that gives solutions, or optimal or sufficiently close to them.
Heuristic rule.Select values with the lowest (high) unit cost (income).
Let us apply this rule to the problem already considered.For this purpose, on the basis of the initial data, we calculate the unit costs for the location of one service facility in each district and for each case (that is, the total costs of the source table are divided by the number of objects placed in this case).The results are summarized in Table 5.The analysis of the table shows that the lowest unit costs for the allocation of five objects will refer to the case when one service facility is located in the third district of the city, and in the first and the second two objects, the corresponding table cells are allocated to another color.This will correspond to 46 units of costs (9+18+19=46).
The problem of allocation is to a certain extent connected with another classical problem of combinatorial programming: the problem of covering a set.In the context of the problem of locating service objects and infrastructure, the coverage problem can be considered one of the positional tasks of the allocation problem: what is the minimum number of objects to be located in a given region in such a way that the impact of the placed objects covers the whole area.This problem reduces to the well-known problem of matching, whose solution algorithms are known [6].
To estimate the upper limit of the number of placed objects, the following theorem can be used: Theorem.In a bipartite graph, the matching power, that is, the number of edges entering it, will be equal to the smallest of the number of shares of the original graph.
Taking into account that the upper limit of the number of placed objects can be easily determined for the problem under consideration, it is possible to propose the following heuristic algorithm: Preliminary step.In the adjacency matrix, mark all the cells into which objects can not be placed according to the conditions of the problem.
1 step.Calculate for each row of the transformed adjacency matrix the number of cells in which objects can be positioned and select the row with the smallest number of "free" cells.
2 step.In any of these free cells, place the object, while deleting the corresponding row and the column of the adjacency matrix.
3 step.Check is not strikethrough lines in the adjacency matrix.If so, go back to step 1.If not, then the end of the algorithm.
Let us analyze the application of the proposed algorithm for solving the matching problem in a bipartite graph.We find the largest matching in a bipartite graph whose adjacency matrix has the form shown in Table.6.In this case, the bipartite graph is represented by the

Table 1 .
Initial task data.

Table 3 .
Result 2 steps.Consider the case when all three districts of the city will be used to locate facilities, i. e. k=3.The Bellman equation in this case takes the form

Table 5 .
The result of applying the heuristic rule.