Analysis of methods for solving a transport problem with detection in time and conditions for minimizing risk

. The paper formalizes the model of the transport task with the assessment of the risks of cargo transportation. Based on the constructed formal model, requirements are developed for models and methods for assessing the effectiveness of cargo transportation in the presence of risks and risk restrictions. The classical approach to solving the problem is analyzed and criteria are developed for the applicability of certain theoretical solutions in practical problems of ensuring cargo transportation


Introduction
Transport, which, together with energy communications and communications, provides material, energy and information flows, creates the necessary conditions for the existence of modern society, its progressive development and the effective deployment of production forces.World and domestic experience shows that the level, nature and pace of the interconnected development of the above components of the transport infrastructure complex can serve as an indicator of the development of the economy of the country and individual regions.Modern production volumes are colossal and without an extensive and powerful transport complex, effective economic cooperation between regions and individual enterprises is impossible; scientific, industrial and economic unity of the country [1].The relevance of the issues of minimizing risks in cargo transportation continues to grow with the increase in the transport network.In proportion to the growth of cargo transportation, the absolute values of the number of transportations of dangerous goods (posing a threat to the environment), transportations in high-risk conditions (objective or subjective external factors threaten the integrity of the transported cargo), as well as urgent transportation tasks in emergency situations (ensuring the evacuation of residents in disaster areas, etc.).At the same time, it is especially important not only to take into account the risk, which allows analyzing emerging emergency situations when solving the task, but also the tools for predicting such risks, which makes it possible to reduce the loss of material, human and financial resources at all stages of the life cycle of transport facilities [2].

Statement of the problem
Forecasting risks in the transport problem is a complex task of system analysis and includes: • analysis and study of the existing transport network in order to build a formal mathematical model that describes the magnitude of the risk both at the reference points of the network (cities, motor depots, etc.) and on the roads that unite them; • analysis and study of types of risks and their classification in order to build a unified knowledge base for solving the problems of improving the reliability of cargo transportation, taking into account the specifics of transportation and existing experience in these conditions; • development of methods and tools for quantitative risk assessment in order to reduce the losses of the organization when choosing decisions that are ineffective from the standpoint of risk management; • development of a method for constructing optimal routes that meet the set requirements.
Finding the optimal route is a multicriteria optimization problem with respect to a number of parameters [3].Here and below, by a route we mean the solution of the problem of serving n nodes with a transport and returning it to the starting point.The search itself is carried out in the n-dimensional space of all possible routes, which is subject to a number of restrictions, in particular: • the maximum allowable transport time; • the maximum acceptable level of risk during transportation; • the maximum possible cost of transportation.Such restrictions significantly reduce the space of possible solutions.The route optimality criterion is estimated based on a continuous smooth function of the following variables: • route length; • the cost of the route; • the maximum measure of risk on the way; • transport time; • overhead costs.The final form of the function depends on the specifics of the problem being solved and is decisive in the process of making a decision regarding the applicability of one or another proposed route execution algorithm [4].The final form of the function uniquely determines the configuration of the solution space and describes possible directions for searching problems in it.

Construction of a transport network model taking into account risks
To describe the mathematical model of the transport network, we introduce the necessary notation.Let N = {1, 2, ..., n} be the nodal points of the network (depots, service stations, gas stations) [5][6].For a node with number i, we will consider known (predicted) the measure of risk of being in this node ri(t) at the time t = 1, 2, …, T, which corresponds to a specific hour during the day (or a minute with more detailed planning).Risk values are calculated directly by analyzing available statistics, expert assessments, etc.In addition, we will assume that the boundaries zi min and zi max of the maximum allowable time the vehicle is in a given point and the boundaries ai and bi of the possible decrease and increase of this time during the unit of measurement as a percentage of the total time are known.Let us denote the planned location of the vehicle at point i at time t as zi(t), which must meet the conditions: zi min < aizi(t) < zi(t+1) < bizi(t) < zi max .
(1) Denote by xij(t) the maximum allowable flow (volume of cargo transportation) from node i to node j at time t through a transport network with limited line capacity: 0 < xij(t) < xij max .
(2) We will assume that part of the risk of a node is transferred to neighboring nodes that are connected with it, and the share of node i at time t accounts for part of the risk in the volume yi(t).Then the predicted risk values in the node must meet the requirements: zi(t) + Σj kjixji(t) -Σj xij(t) = ri(t) + yi(t), zi(T + 1) = zi.
(3) Under conditions (3), the coefficients kji determine the percentage of risk reduction on the i-j line.The last equality corresponds to periodic (cyclic) processes with period length T. As an economic criterion for the efficiency of the system, we can take the total costs associated with transporting cargo from node 1 to node z within the planning period: t(1, z) < T, S(1, z) → min, (4) where t is a function of time on route 1-z; S is the economic cost of the route.The dynamic model proposed for study in the form ( 1)-( 4) corresponds to the problem of optimizing the flow in the network [7][8][9].This problem can also be attributed to a variety of dynamic transport problems with periodically changing values of vertices and nodes.

Analysis of possible methods for solving the problem
The formulated problem somehow relates to a transport problem with a time limit, on which an additional condition for minimizing the risk is imposed from above.According to the literature [10], methods for solving a transport problem with a time limit, both static and dynamic, can be divided into exact, heuristic and metaheuristic.Next, we consider the methods used in solving the static version of the transport problem with a time limit, adhering to this division.Solving a static transport problem with a time limit is a key element in solving a dynamic transport problem with a time limit, because a dynamic task can be represented as a series of static tasks, where the next static task arises when the parameters of the current task change [11].It should also be noted that only general methods used in various algorithms will be considered, and not the algorithms themselves.Based on these methods, in the future it is possible to synthesize a new algorithm for solving a dynamic transport problem with a time limit.transport problem with a time constraint, like its dynamic variant, belongs to the class of NP-complete problems.Exact methods for solving such a class of problems are based on a complete enumeration of all possible solutions and are inefficient in solving problems of large dimension due to their large time costs (solution time exponentially depends on the dimension of the problem).In conditions of limited time for decision-making, such methods are unacceptable.

Heuristic methods
In heuristic methods for solving the problem, the construction of a route is carried out by sequentially adding new points to the route and checking whether the resulting route has improved [12].If there are a number of clients that need to be served (for example, servicing an ATM network), clients that have not yet been served are added to the current route (inserting clients into the current route).To initialize each new route, the <first= client from among the clients not yet served is selected in a probabilistic manner or according to some criterion (for example, the client most distant from the starting point of the route -the depot) to be included in the current route [13].The remaining clients are then evaluated against some criteria.Accordingly, the best one is selected and added to the current route.
Adding a client to a route must not violate the task constraints (time and risk constraints).If there are no valid clients (unserved clients that can be added to the current route without violating the task constraints), a new route is started.If all clients are included in the routes, there are no unserved clients left, the algorithm ends.

Metaheuristic Methods
Metaheuristic algorithms approach problem solving by forming generalized rules for information processing.All modern metaheuristic approaches can be divided into several categories.

Local Search
Local search is a set of metaheuristic methods, including simulation pruning, deterministic pruning, and taboo search [14][15].This class of metaheuristic algorithms is based on the use of two stages of work.At the initial stage, a route is created (usually one of the heuristic algorithms is used), then a search is carried out in the space closest to the found solution in order to improve the current solution.According to the implementation model of these two stages, the algorithms can be divided into the following subcategories: • one flow of building and improving the route.Advantages: ease of implementation, obviousness of making changes to the route.Disadvantages: inefficient use of modern multiprocessor systems, long operating time, large search space; • one construction thread, several route improvement threads.Advantages: efficient use of multiprocessor systems, the ability to perform distributed computing.Disadvantages: the search is carried out in the vicinity of one solution; if the generated solution is close to the local optimum of the problem solution, then more optimal options near other local optimums will not be found; • multiple build threads, multiple route improvement threads.Advantages: high chance of localizing a large number of local optima (especially when using different algorithms for constructing the original route), parallelism, a high degree of reuse of previously obtained results.Disadvantages: high algorithmic complexity, the need to implement several algorithms within the same logic, a high probability of errors in the practical implementation of algorithms in the system.

Multiple Search
This category includes a group of algorithms aimed at solving a transport problem by using and reusing the memory of previously found solutions [16].The two most prominent representatives are adaptive memory and genetic search.The advantage of this group of algorithms is their significant efficiency (almost always at each iteration, a new solution is more optimal than the old one).However, due to the large use of probabilistic quantities (for example, in a genetic algorithm, the frequency of mutations and crossing over are decisive), mathematically rigorous proof of the convergence of the applied algorithms is difficult or impossible, and in the case of proven convergence, the calculated value is low, which leads to the use of a large number of iterations and, as consequently, significant time to solve the problem.

Learning and self-learning systems
The use of learning and self-learning systems in problems where the construction of an effective solution is weakly formalized makes it possible to find the required solutions without the presence of formalized search criteria [17][18].The most commonly used approaches are neural networks and ant colony algorithms.Such approaches are characterized by the effective use of the advantages of local search (for example, in the ant algorithm, each ant independently solves the problem of finding a local optimum) using shared memory (in the ant algorithm, this memory is implemented through a pheromone trace, in a neural networkin the coefficients of connections between neurons after training).The use of such algorithms can significantly reduce the impact of the convergence problem and reduce the number of iterations compared to implementations based on multiple search.

Section 1.014.3. Possible Algorithm Extensions
There are a number of ideas that can be applied to the algorithms of groups 1-3 in order to optimize them according to one of the criteria, namely: accuracy, speed, simplicity, flexibility [19].Hereinafter, by flexibility we will understand the possibility of adapting the algorithm to new conditions of the problem (transition from a static to a dynamic transport problem, from a random risk function to a continuous one, etc.).Most of these optimizations are aimed at generating a new solution based on existing ones.Examples of such optimizations are: • exchange of neighboring structures.Two solutions that have different route paths from A to B can exchange them in order to obtain a more optimal solution; • exchange of neighboring structures with local optimization.The development of the previous version, during the exchange, a search is made for a local optimum from solutions compiled by combining the graphs of routes from A and B; • chain exclusionsearch for large chains to perform substitutions in algorithms according to the principle proposed earlier; • prohibition timestamps (an approach opposite to the ant anthill algorithm, aimed at assigning <bad= vertices that are included in a very long route of prohibition timestamps for visiting by other <ants= that are in search of a solution=); • aspiration criterion -the ability to violate the formed local or global list of prohibitions in order to search for previously uncovered optima; • continuous diversification -adding penalties to solutions due to the frequency of use of this solution (ensuring maximum coverage of the solution space); • temporal transformation of the graph (using a random assumption that the depot is located at the nearest vertex, when choosing this vertex, the search for the shortest algorithm to the depot); • granularitytransformation of the graph before solving the problemremoval of the longest edges (without disturbing the connectivity of the graph) that exceed a certain threshold (this threshold is described by the granularity function); • adaptive memory (storage of a set of found best solutions, their combination and reoptimization); • directed evolutioncreating a side solution from each found, applying a local search with penalties to long edges, using continuous diversification in order to calculate the optimal parents to form a solutiona "descendant".To conduct a comparative analysis of the algorithms, 20 graphs were created containing from 200 to 500 nodes each, with associated risk functions (random functions) and fixed edge weights.All calculations were performed on a computer running a 4-core Intel Core i7 processor, which allowed algorithms that use multiple threads to find a solution to gain an additional advantage.Two values were measuredthe average deviation from the optimal route (found by exhaustive search), in percent, and the time used (in minutes, processor time).Each test was run 5 times, the average result was entered into the table in order to level the influence of random factors for algorithms that use probabilistic approaches to solving the problem.

Section 1.035.2 Test results
The results of testing the algorithms are shown in Table 1.

Conclusions
Analyzing the table, we can conclude that the use of pure algorithms, described in paragraphs 4.1-4.2 of this article, is not optimal either in time or in terms of the results obtained.Given the presence of significant time constraints in the process of real decision making, classical approaches (whether genetic algorithms, parallel search or ant colony algorithm) are not applicable.However, the use of a combination of these algorithms leads us to a sharp decrease in the search time, which is well demonstrated by the directed evolution algorithm.Even with settings for optimal search (large local search depth, low solution cutoff), the directed evolution algorithm gives a result 2 times faster than the nearest competitor, and using weakened search criteria (local search depth -no more than 4 nodes, 8 best solutions remain) , it is possible to achieve a result in half a minute with an error of less than 10%.Thus, the development of decision-making algorithms in emergency situations using directed evolution algorithms seems to be effective.It is necessary to develop additional restrictions on these algorithms to guarantee their applicability in the tasks of liquidation and assessment of emergency situations.It is necessary to develop a new approach to solve this problem of multiobjective optimization, which has the following properties: • a small or predictable percentage of deadlock decisions; • is the polynomial running time; • is the predicted error value.
The development of such extensions can be based on the use of wave local search algorithms using a knowledge base to cut off invalid solutions.Using a knowledge base that stores pre-calculated solutions for network elements will reduce the system response time when a new task appears, however, testing such an algorithm can be difficult due to the need for a large data set for initial training.Separately, it is necessary to note the prospects of using adaptive memory technologies, since on the test sample this algorithm is the only one that managed to find the optimal solution on all 20 test samples, despite the fact that mathematically rigorous obtaining of the optimal solution by this algorithm is not guaranteed.

Table 1 .
Results of the algorithm.