A method and system for task allocation in fire rescue considering robot failure
By optimizing robot task allocation through Boolean constraints and optimization algorithms, the problem of low efficiency caused by robot malfunctions in fire rescue was solved, enabling efficient rescue in complex fire scenes and reducing risks and losses.
Patent Information
- Application Number
- CN202411469663.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-10-21
AI Technical Summary
Existing methods for assigning robot tasks in fire rescue fail to effectively account for robot malfunctions, resulting in low rescue efficiency and an inability to meet the timeliness requirements of complex fire scenes.
Boolean constraints are used to describe the task, Dijkstra's algorithm is used to preprocess the shortest path, and the task encoding is optimized by combining the discretized Northern Eagle optimization algorithm. In case of robot failure, an auction algorithm is used to redistribute the task to ensure the shortest path and shortest distance.
It improves the efficiency of robot rescue, reduces the risks at fire scenes, reduces casualties and property losses, saves rescue time, and is suitable for task allocation in complex fire scenarios.
Smart Images

Figure CN119443601B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of robots, and particularly relates to a task allocation method and system considering robot failure in fire rescue. BACKGROUND
[0002] With the rapid development of artificial intelligence technology and the actual needs of social production, robots have been widely applied, such as cooperative combat robots in the military field, inspection robots in the environmental detection field, and fire-fighting robots in the rescue field. The fire rescue field is very special, and the requirements for robots are more urgent. The investment of robots in the fire rescue field can effectively reduce the casualties of firefighters and improve the efficiency and stability of rescue. Task allocation is the premise of determining whether robots can complete the allocated tasks reasonably and efficiently. For example, after a fire occurs, robots first need to allocate tasks reasonably to complete the search and rescue tasks and the fire extinguishing tasks of trapped personnel in time. The robot task allocation method refers to considering the initial state, reasonably allocating tasks to each robot according to the number and location distribution of tasks, and then planning an effective path from the starting point to each task point while avoiding obstacles according to the obtained task sequence, and the path of the entire robot system is as short as possible.
[0003] In recent years, the research on robots in the field of fire fighting and rescue has gradually become a hot spot, but the existing methods consider simple tasks, have low solving efficiency, and do not consider the failure of robots in the process of executing the allocated tasks, which cannot meet the urgent requirements of rescue task complexity and timeliness. Tasks with Boolean constraints mainly include the logic of and, or, and not, which can realize some complex advanced task descriptions, such as requiring robots to execute the search and rescue tasks of trapped personnel and the fire extinguishing tasks in the process of executing tasks, selectively executing the task of closing the gas valve, and avoiding some areas affected by fire that cannot be passed through. SUMMARY
[0004] The application aims to overcome the low efficiency of existing robots in fire rescue, and proposes a task allocation method and system considering robot failure in fire rescue.
[0005] To achieve the above-mentioned purpose, the application adopts the following technical solutions:
[0006] A task allocation method considering robot failure in fire rescue, comprising the following steps:
[0007] The global environment of fire rescue is divided to obtain a divided fire rescue environment, and after the robots existing in the divided fire rescue environment are initialized, the tasks of the robots are described in a formalized manner using Boolean constraints to obtain a task description of the robots with Boolean constraints;
[0008] After the adjacency matrix of the task cells in the divided fire rescue environment is constructed, the shortest path and the shortest distance between the task cells are obtained by preprocessing using Dijkstra algorithm.
[0009] After the initial task coding of the task description with Boolean constraints of the robot is performed, an initial task coding mode is obtained, and all tasks are allocated to each robot according to the initial task coding mode;
[0010] The initial task coding mode is iterated and updated by using the discretized Northern Hawk optimization algorithm to perform the Northern Hawk optimization operation, and the optimal task coding sequence and the shortest path are obtained.
[0011] After decoding the optimal task coding sequence, the shortest path and the shortest distance of each robot are calculated by combining the shortest path and the shortest distance between the task cells obtained by preprocessing.
[0012] When the robot fails, the global fire rescue environment is updated, the tasks left by the robot when it fails are redistributed to the non-faulty robots using the auction algorithm, and the shortest path of each robot and the total distance of all robots before and after the failure are output.
[0013] Further, the task of the robot includes a route task of the robot, and the route task of the robot includes a task, or a task and a non-task;
[0014] The task indicates a task that the robot must perform in the global fire rescue environment;
[0015] The task indicates a task that the robot selectively performs in the global fire rescue environment;
[0016] The non-task indicates a task area that the robot always avoids in the global fire rescue environment;
[0017] The task description with Boolean constraints of the robot is as follows:
[0018]
[0019] wherein, is the task with Boolean constraints of the robot, is the task, y o indicates the number of tasks that the robot must perform in the global fire rescue environment; is the non-task; indicates the task that the robot selectively performs in the global fire rescue environment, is the a o th group of tasks, specifically, a task is selected from the set to be executed, For the a i group or task.
[0020] Further, the adjacency matrix is as follows:
[0021]
[0022] Wherein, M is an n x n symmetric adjacency matrix, the adjacency matrix M stores the distance relationship between the task cells in the divided fire rescue environment, d h,y ∈R≥0 represents the distance between adjacent cells c h and c y (h≠y), if d h,y =-∞, then the cells c h and c y are not adjacent or cannot pass through;
[0023] The shortest path l h and the shortest distance d y between adjacent cells c h,y and c h,y are calculated by Dijkstra algorithm, and the non-task cells in the adjacency matrix are deleted.
[0024] Further, the initial task code is as follows:
[0025] Code=(C y ;C u )
[0026]
[0027] Wherein, Code represents the initial task code;
[0028] C y represents the task cell in the divided fire rescue environment that meets the robot route task, c p,q ∈Π q is the mapping of a certain task cell in the route task;
[0029] C u represents the task cell in the divided fire rescue environment that meets the robot end task; c up ∈π p is the mapping of a certain task cell in the end task;
[0030] 0 represents the end of the current robot route task, and the tasks are assigned in turn from the first robot; all robots need to complete y o +a o route tasks and k end tasks, and the end tasks are randomly assigned to k robots, y oa represents the number of tasks that the robot must perform in the global environment of fire rescue o k represents the number of tasks that the robot selectively performs in the global environment of fire rescue, and k represents the number of robots in the divided fire rescue environment.
[0031] Further, the objective function of the discretized northern falcon optimization algorithm is as follows:
[0032]
[0033] X i For each individual in each iteration process, a set of task encodings, and the objective function value For encoding X i The sum of the shortest distances of each robot in the task process is initially set to N individuals.
[0034] The discretized northern falcon optimization algorithm uses the generation value corresponding to the task cell to calculate and update, and the generation value is the average of the Euclidean distance from the initial cell to the task cell. The task cell and its corresponding generation value in the encoding are as follows:
[0035]
[0036] Where g p,q is the generation value of the task cell c p,q , f p is the generation value of the terminal task cell , and p=1,...,k, k is the number of robots.
[0037] Further, the discretized northern falcon optimization algorithm is used to update the initial task encoding using the northern falcon optimization operation to obtain the optimal task encoding sequence and the shortest path, which is:
[0038] Update the generation value corresponding to each task cell in the encoding, and sort them in ascending order and then uniformly distribute them to each robot, which is updated by identification stage update and pursuit stage update.
[0039] In the identification stage, the objective function value is Where X i is the current individual, and the N individuals with the smallest objective function in the current population are selected as reference individuals X N best After the identification stage update, the objective function value satisfies The identification stage update is performed using the following formula: x i,j new1 = x i,j+r*(b i,j -I*x i,j ), where x i,j is the current individual X i The cost value corresponding to the jth position of the task cell, b i,j is the cost value corresponding to the optimal individual at the task cell j position, r is a random number between [0, 1], and I is randomly 1 or 2;
[0040] The updated individual in the identification stage is X i new1 , if the current individual is the optimal individual, it is directly retained;
[0041] In the pursuit phase, after combining the Cauchy variation method to update the pursuit phase, the pursuit phase update is performed using the following formula: i,j new2 =x i,j +δ i +G*(2*r-1)*x i,j, Among them, δ i According to the Cauchy distribution The random disturbances generated, Where w is the current number of iterations, W is the total number of iterations, and the individual after the pursuit phase is updated is X i new2 ;
[0042] The discretized Northern Goshawk optimization algorithm updates the following parameters after completing the task encoding iteration:
[0043] Updated optimal coding individual: Code best =Code;
[0044] The optimal task sequence for robot p:
[0045] The path corresponding to the optimal task sequence:
[0046] in, c p,1 and are the initial cell, the first path task cell and the nth path task cell of robot p respectively. p Pathway task cells, is the terminal task cell;
[0047] The shortest distance of robot p:
[0048] The optimal objective function value:
[0049] Further, the auction algorithm comprises the following steps:
[0050] The cost matrix V is constructed as follows:
[0051]
[0052] Wherein, o is the number of remaining path tasks after the failure, z is the number of remaining robots after the failure, the matrix V stores the cost of the remaining robot p to the remaining task Π a And the cost between each remaining task ;
[0053] The bidding cost table is established, and the bidding of the robot to the task is initialized to 0, as shown in the following formula:
[0054]
[0055] The first round of z robots bids for o tasks, and the minimum bid is set to The second task Π2 is allocated to the first robot r1, as shown below:
[0056]
[0057] In the next round of bidding, the position of the first robot r1 in the cost matrix is updated to the bidding of the second robot to the task Π2 position, and the bidding of the remaining robots remains unchanged. In the second round of bidding, there are o-1 tasks, and the minimum bid is set to The first task Π1 is allocated to the second robot r z , as shown below:
[0058]
[0059] Repeat the above process until all tasks are allocated. The end task is bid for, and the corresponding completed task and sequence of each robot after failure are obtained. The bidding for the end task is as follows:
[0060]
[0061] A task allocation system considering robot failure in fire rescue, comprising:
[0062] A Boolean constraint description module for tasks is used to divide the global environment of fire rescue to obtain a divided fire rescue environment. After initializing the robots existing in the divided fire rescue environment, the tasks of the robots are formally described using Boolean constraints to obtain the task description of the robots with Boolean constraints;
[0063] The task cell shortest path and shortest distance module is configured to, after constructing an adjacency matrix for the divided fire rescue environment, obtain the shortest path and shortest distance between each task cell by using Dijkstra algorithm for preprocessing.
[0064] The initial task allocation module is configured to, after encoding the task description and end point task of the robot with Boolean constraints to obtain an initial task encoding mode, allocate all tasks to each robot according to the initial task encoding mode.
[0065] The initial task encoding optimization module is configured to, after using the discretized Northern Hawk optimization algorithm to perform Northern Hawk optimization operation iteration and update task encoding on the initial task encoding mode, obtain an optimal task encoding sequence and shortest path.
[0066] The shortest path and shortest distance module of the computer robot is configured to, after decoding the optimal task encoding sequence, obtain the shortest path and shortest distance of each robot by combining the shortest path and shortest distance between each task cell obtained by preprocessing.
[0067] The robot failure task re-allocation module is configured to, when the robot fails, update the global environment of the fire rescue, re-allocate the remaining tasks of the robot when the robot fails to the non-failed robot by using an auction algorithm, and output the shortest path of each robot before and after failure and the total distance of all robots.
[0068] An electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the task allocation method for fire rescue considering robot failure when executing the computer program.
[0069] A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the task allocation method for fire rescue considering robot failure.
[0070] Compared with the prior art, the present application has the following beneficial technical effects:
[0071] The fire rescue task allocation method considering robot failure provided by the application makes the robot have the shortest moving distance under the premise of meeting the rescue task requirements, thereby effectively improving the robot rescue efficiency, reducing the fire scene risk, reducing personnel casualties and property losses, saving rescue time, and having good application prospect and practical significance. The tasks considered in the fire scene are relatively complex, the complex tasks can be described using a Boolean constraint, and the execution order of the tasks is random, which is essentially a kind of combinatorial optimization problem. Different tasks selected by the robot and different orders in the process of executing the tasks have a great influence on the moving distance of the robot, therefore, it is of great significance to consider how the robot reasonably selects the tasks, how the robot reasonably selects the order of executing the tasks, and how the robot selects the effective path to avoid obstacles. The application first stores the optimal path and the shortest distance between each cell through Dijkstra algorithm preprocessing; secondly, the tasks meeting the Boolean constraint are randomly generated through task coding, and the optimal coding individual, the optimal objective function value, and the optimal path of each robot are obtained through the discrete Northern Hawk optimization algorithm; further considering that the robot fails at any time, then updating the robot set and the task set, and storing the information before the failure; using the auction method to allocate the remaining tasks after the failure, finally considering the two parts before and after the failure, finding the corresponding shortest moving path and optimal path, which can be tested on the Gazebo simulation software; the method provided by the application can quickly find the optimal task sequence, the optimal task path and the corresponding shortest distance, greatly improving the robot rescue efficiency, and can effectively reduce the casualty rate of the fire personnel while completing the complex task requirements instead of human beings, and has good practical application prospect and practical significance.
[0072] Further, the method provided by the application is mainly designed for the task requirements in the field of fire rescue, and also has good application prospect in other rescue fields which have high requirements for robot system robustness considering robot failure. BRIEF DESCRIPTION OF DRAWINGS
[0073] The drawings described herein are only for illustrative purposes, and are not intended to limit the scope of the present application in any way. In addition, the shapes and scale sizes of the components in the drawings are only illustrative, and are used to help understand the application, and are not specific limitations on the shapes and scale sizes of the components. In the drawings:
[0074] Figure 1 The flow chart of the fire rescue task allocation method considering robot failure of the application.
[0075] Figure 2 The structural diagram of the fire rescue task allocation system considering robot failure of the application.
[0076] Figure 3 An electronic device diagram of a task allocation method considering robot failure in fire rescue according to an embodiment of the present application.
[0077] Figure 4 A flow chart of a task allocation method considering robot failure in fire rescue according to an embodiment of the present application.
[0078] Figure 5 An initial environment of a robot in Gazebo simulation in embodiment five.
[0079] Figure 6 A corresponding grid map of a robot in embodiment five.
[0080] Figure 7 An environment map of a robot failure in Gazebo simulation in embodiment five.
[0081] Figure 8 A corresponding optimal path diagram of a robot in a grid map in embodiment five.
[0082] Figure 9 A flow chart of an operating process using the Northern Goshawk algorithm in embodiment five. DETAILED DESCRIPTION
[0083] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.
[0084] Embodiment one
[0085] Referring to Figure 1 A task allocation method considering robot failure in fire rescue, comprising the following steps:
[0086] The global environment of fire rescue is divided to obtain a divided fire rescue environment. After the robots existing in the divided fire rescue environment are initialized, a task description of the robots with Boolean constraints is obtained by using Boolean constraints to formally describe the tasks of the robots;
[0087] After an adjacency matrix is constructed for the task cells in the divided fire rescue environment, the shortest paths and the shortest distances between the task cells are obtained by preprocessing through the Dijkstra algorithm;
[0088] The initial task coding mode is obtained after initial task coding of the task description with Boolean constraints of the robot, and all tasks are allocated to each robot according to the initial task coding mode;
[0089] The optimal task coding sequence and the shortest path are obtained by using the discretized northern hawk optimization algorithm to perform northern hawk optimization operation iteration and update task coding on the initial task coding mode;
[0090] After decoding the optimal task coding sequence, the shortest path and the shortest distance of each robot are calculated by combining the shortest path and the shortest distance between each task cell obtained by preprocessing;
[0091] When the robot fails, the global environment of fire rescue is updated, the tasks left by the robot when it fails are redistributed to the non-faulty robots using the auction algorithm, and the shortest path and the total distance of all robots before and after failure are output.
[0092] The task of the robot includes the path task of the robot, and the path task of the robot includes a task, or a task and a non-task;
[0093] The task represents a task that the robot must perform in the global environment of fire rescue;
[0094] Or the task represents a task that the robot selectively performs in the global environment of fire rescue;
[0095] The non-task represents a task area that the robot always wants to avoid in the global environment of fire rescue;
[0096] The task description with Boolean constraints of the robot is as follows:
[0097]
[0098] wherein, is the task with Boolean constraints of the robot, is the task, y o represents the number of tasks that the robot must perform in the global environment of fire rescue; is the non-task; represents a task that the robot selectively performs in the global environment of fire rescue, is the a o group or task, specifically, a task selected from the set to be executed, is the a i group or task.
[0099] The adjacency matrix is as follows:
[0100]
[0101] wherein M is an n x n symmetric adjacency matrix, the adjacency matrix M stores the distance relationship between the task cells in the divided fire rescue environment, d h,y ∈R≥0 represents the distance between adjacent cells C h and c y (h≠y), if d h,y =-∞, then the cell c h and c y are not adjacent or cannot pass through;
[0102] The shortest path l h and the shortest distance d y between adjacent cells c h,y and c h,y are calculated by Dijkstra algorithm, and the non-task cells in the adjacency matrix are deleted.
[0103] The initial task code is as follows:
[0104] Code=(C y ;C u )
[0105]
[0106] wherein Code represents the initial task code;
[0107] C y represents the task cell in the divided fire rescue environment that meets the robot route task, c p,q ∈Π q is the mapping of a certain task cell in the route task;
[0108] C u represents the task cell in the divided fire rescue environment that meets the robot end task; c up ∈π p is the mapping of a certain task cell in the end task;
[0109] 0 represents the end of the current robot route task, and the tasks are assigned to the robots from the first robot in turn; all robots need to complete y o +a o route tasks and k end tasks, the end tasks are randomly assigned to the k robots, y o represents the number of tasks that the robot must perform in the global fire rescue environment, a o represents the number of tasks that the robot selectively performs in the global fire rescue environment, and k represents the number of robots in the divided fire rescue environment.
[0110] The objective function of the discretized northern goshawk optimization algorithm is as follows:
[0111] X i For each individual in the iteration process, a set of tasks is encoded, and the objective function value is the encoding X i The sum of the shortest distances of each robot in the task process is initially set to N individuals.
[0112] The discretized northern goshawk optimization algorithm uses the generation value corresponding to the task cell to calculate and update, and the generation value is the average of the Euclidean distances of the robots from the initial cell to the task cell. The task cell and its corresponding generation value in the encoding are as follows:
[0113]
[0114] Where g p,q is the generation value of the way task cell c p,q , and f p is the generation value of the terminal task cell , where p = 1,..., k, and k is the number of robots.
[0115] The initial task encoding is updated using the northern goshawk optimization operation of the discretized northern goshawk optimization algorithm to obtain the optimal task encoding sequence and the shortest path, which is as follows:
[0116] The generation value corresponding to each task cell in the encoding is updated, sorted in ascending order, and then evenly distributed to each robot. The update consists of the identification stage update and the pursuit stage update.
[0117] In the identification stage, the objective function value is where X i is the current individual, and the N individuals with the smallest objective function in the current population are selected as reference individuals X N best After the identification stage update, the objective function value satisfies The identification stage update is performed using the following formula: x i,j new1 = x i,j + r*(b i,j - I*x i,j ), where x i,j is the generation value corresponding to the jth position of the task cell in the current individual X i , b i,j is the generation value corresponding to the jth position of the task cell in the reference optimal individual, r is a random number between 0 and 1, and I is randomly selected as 1 or 2.
[0118] The updated individual in the identification stage is X i nevw1 , if the current individual is the optimal individual, it is directly retained;
[0119] In the pursuit phase, after combining the Cauchy variation method to update the pursuit phase, the pursuit phase update is performed using the following formula: i,j new2 =x i,j +δ i +G*(2*r-1)*x i,j , where δ i According to the Cauchy distribution The random disturbances generated, Where w is the current number of iterations, W is the total number of iterations, and the individual after the pursuit phase is updated is X i new2 ;
[0120] The discretized Northern Goshawk optimization algorithm updates the following parameters after completing the task encoding iteration:
[0121] The discretized Northern Goshawk optimization algorithm updates the following parameters after completing the task encoding iteration:
[0122] Updated optimal coding individual: Code best =Code;
[0123] The optimal task sequence for robot p:
[0124] The path corresponding to the optimal task sequence:
[0125] in, c p,1 and are the initial cell, the first path task cell and the nth path task cell of robot p respectively. p Pathway task cells, is the terminal task cell;
[0126] The shortest distance of robot p:
[0127] The optimal objective function value:
[0128] The auction algorithm includes the following steps:
[0129] The cost matrix V is constructed as follows:
[0130]
[0131] Wherein, o is the number of remaining approach tasks after failure, z is the number of remaining robots after failure, the matrix V stores the cost between the remaining robot p and the remaining task Π a The cost between each remaining task
[0132] The bidding cost table is established, and the bidding of the robot to the task is initialized to 0, as shown in the following formula:
[0133]
[0134] The first round of z robots bids for o tasks, and the minimum bidding is set to The second task Π2 is allocated to the first robot r1, as shown below:
[0135]
[0136] In the next round of bidding process, the position of the first robot r1 in the cost matrix is updated to the bidding of the second robot to the task Π2 position, and the bidding of the remaining robots remains unchanged. In the second round of bidding, there are o-1 tasks, and the minimum bidding is set to The first task Π1 is allocated to the second robot r z , as shown below:
[0137]
[0138] Repeat the above process until all tasks are allocated. The end task is bid for, and the corresponding completed task and sequence of each robot after failure are obtained. The bidding of the end task is as shown in the following formula:
[0139]
[0140] Example two
[0141] Referring to Figure 2 , a task allocation system considering robot failure in fire rescue includes:
[0142] The task Boolean constraint description module is used to divide the global environment of fire rescue to obtain the divided fire rescue environment. After the robots existing in the divided fire rescue environment are initialized, the task of the robot is formally described using Boolean constraint to obtain the task description of the robot with Boolean constraint;
[0143] The task cell shortest path and shortest distance calculation module is used to construct an adjacency matrix for the task cells in the divided fire rescue environment, and then the shortest path and shortest distance between the task cells are obtained by preprocessing using Dijkstra algorithm;
[0144] An initial task allocation module is configured to encode the task description with Boolean constraints and the end task of the robot to obtain an initial task encoding mode, and allocate all tasks to each robot according to the initial task encoding mode;
[0145] An initial task encoding optimization module is configured to perform a northern hawk optimization operation iteration on the initial task encoding mode using a discretized northern hawk optimization algorithm, and update the task encoding to obtain an optimal task encoding sequence and a shortest path;
[0146] A computer robot shortest path and shortest distance module is configured to decode the optimal task encoding sequence, and calculate the shortest path and shortest distance of each robot by combining the shortest path and shortest distance between each task cell obtained by preprocessing;
[0147] A robot failure task re-allocation module is configured to update the global environment of fire rescue when the robot fails, re-allocate the remaining tasks of the robot to the non-failed robots using an auction algorithm, and output the shortest path of each robot before and after failure and the total distance of all robots.
[0148] Embodiment three
[0149] Referring to Figure 3 An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the task allocation method considering robot failure in fire rescue described in embodiment one when executing the computer program.
[0150] Embodiment four
[0151] A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the task allocation method considering robot failure in fire rescue described in embodiment one.
[0152] Embodiment five
[0153] Referring to Figure 4 A task allocation method considering robot failure in fire rescue includes the following steps:
[0154] Step one: model and divide the environment of the robot, initialize the robot set and task position, and give the task description with Boolean specification;
[0155] Step two: propose a coupled solution method, construct an adjacency matrix, obtain the shortest path and distance between each task cell through a preprocessing algorithm, and save;
[0156] Step three: task coding, all tasks in the initial task set are assigned to each robot;
[0157] Step four: extract coding information, calculate the shortest path and shortest distance corresponding to each robot in the coding;
[0158] Step five: design a coding method to optimize the northern hawk algorithm;
[0159] Step six: update the initial task coding by using the northern hawk optimization algorithm, and output the optimal task coding sequence and the shortest path;
[0160] Step seven: consider the robot failure and update the environment;
[0161] Step eight: use the auction method to reassign the remaining tasks to the remaining robots;
[0162] Step nine: output the shortest path of each robot before and after failure and the total shortest distance of the system.
[0163] Step one is: first, the global environment of the fire rescue considered is rasterized, divided into n grid units, represented by C={c1, c2,..., c n};R={r1, r2,..., r k} represents the existence of k robots in the environment; represents the initial unit position of the robot, where c s ∈C, k robots correspond to k initial cells, and the environment Ω is divided into Π task areas, Π represents the task, π represents the end task, T u ={π1, π2,..., π k} is the end task set; Boolean constraint describes three types of tasks: "and", "or", and "not", respectively represented by T y , T a , T e ;
[0164] Boolean constraint "and task": represents the task that must be executed by the robot in the environment, represented by set , y o represents the number of tasks that must be executed, and the Boolean constraint "and task" can be represented as:
[0165] Boolean constraint "or task": represents the task that can be selected to be executed by the robot in the map environment, represented by set , where a o represents the number of selective tasks that need to be executed, As The first group of "or tasks" of the robot system is selected from the set to execute, The a o th group of "or tasks" of the robot system is selected from the set to execute, the i o th group of "or tasks" described by the Boolean constraint can be represented as:
[0166] The Boolean constraint "non-task": represents the task area that the robot always needs to avoid in the map environment, which is represented by the set , where there are e o task areas that need to be prohibited, the "non-task" described by the Boolean constraint can be represented as:
[0167] The Boolean specification of the above T y , T a , T e task groups can be described as:
[0168] Step two is to use Dijkstrs algorithm to obtain the shortest path and distance between the n grid cells obtained by preprocessing, which is: first use the adjacency matrix M to store the distance relationship between the cells in the environment, M is an n x n symmetric matrix, represented as:
[0169]
[0170] where d h,y ∈R≥0, represents the distance between adjacent cells c h and c y (h≠y), if c h and c y are not adjacent or cannot pass, then the distance d h,y =-∞, the shortest path l h and the shortest distance d h,y between cells c y and c h,y are calculated by Dijkstra algorithm and stored, and the "non" task cells are removed from the adjacency matrix and no longer considered.
[0171] Step three is that T y and T a are tasks that need to be executed by the robot, represented by T=T y ∪T a , T u represents the end task of the robot; it needs to be considered that T y , T aand the terminal task T u Assigned to k robots, in order to distinguish the path tasks of different robots, the number 0 is used as a separator to indicate the end of the path task of the current robot, and tasks are assigned in sequence starting from the first robot. Code = (C y ; C u ) represents the unit that satisfies the robot's path task and terminal task, where According to the encoding method of the task, the robot system needs to complete y o +a o path tasks and k terminal tasks, the terminal tasks are randomly assigned to k robots, c p,q ∈Π q is the mapping of a cell in the pathway task, c up ∈π p A mapping to a cell in the endpoint task.
[0172] Step 4 is as follows: extract the task encoding method of step 3 to obtain the order in which each robot performs the task in sequence, such as the path task unit of the p-th robot is The terminal task unit is Insert the initial position of the robot p and the end position cell Call the data stored in the preprocessing method in step 2 to obtain the detailed path of the robot p Task Sequence and the shortest distance
[0173]
[0174] Step 5 is as follows: The encoding method of the method of this embodiment is to start from the task set T y 、T a And the terminal task set T u Randomly select task cells in the algorithm, generate a set of initial codes, and then consider using the improved Northern Goshawk Optimization Algorithm (I_NGO) for iteration and update. The initial population has N individuals, X = [X1, X2, ... X N ], the corresponding objective function Each of the X i Corresponding to a set of codes, i = 1, 2, ...,, the objective function value Specifically, the code X i The sum of the shortest distances of each robot in the process of performing the task, that is, the total shortest distance of the robot system, X iFor each individual in each iteration process, a set of tasks is encoded; the fitness value corresponding to the task cell is used for calculation and update in the algorithm update process, and the fitness value is the average of the Euclidean distance from the initial cell to the task cell for k robots, and are the horizontal and vertical coordinates of the robot r p respectively, and are the horizontal and vertical coordinates of the task cell , and are the horizontal and vertical coordinates of the terminal task cell , so the fitness value of the task cell , can be expressed as: the fitness value of the terminal task cell , p is: where p = 1,..., k, k is the number of robots, and the task cell and its corresponding fitness value in the encoding are as follows:
[0175]
[0176] Step six is: the initial random generation of N encoding individuals is improved by the northern hawk algorithm optimization operation, mainly including two stages of identification and pursuit. From the first iteration, the current individual X i , i = 1,..., N, corresponds to the objective function value is the sum of the shortest distances of all robots in the system; select the N individuals with the smallest objective function in the current population X N best as the reference individual, and use the formula x i,j new1 = x i,j + r * (b i,j - I * x i,j ) for update, and the objective function value satisfies where x i,j is the fitness value corresponding to the jth position of the task cell of the current individual X i , b i,j is the fitness value corresponding to the jth position of the task cell of the optimal individual, r is a random number between 0 and 1, and I is randomly taken as 1 or 2; the updated individual in the identification stage is X i new1 ; if the current individual is the optimal individual, it is directly retained; in the pursuit stage, the method of Cauchy mutation is used to increase the disturbance to further improve the quality of the solution and jump out of the local optimum, and the formula x i,j new2 = xi,j + δ i + G * (2 * r - 1) * x i,j Update, the updated individual is X i new2 Where δ i is according to Cauchy distribution Random disturbance generated, Where w is the current iteration number, W is the total iteration number; After the operation, the fitness value corresponding to each task cell in the code is updated, and after sorting in ascending order, it is uniformly distributed to each robot in turn. After the algorithm iteration is completed, the following operations are performed to update:
[0177] Updated optimal encoding individual: Code best = Code; The optimal task sequence of robot p: The path corresponding to the optimal task sequence: The shortest distance: The optimal objective function value:
[0178] Step seven is: assuming that at time t, robot i fails, k robots, the probability P1(t) of any 1 robot failing satisfies the exponential distribution Where w is the current iteration number, W is the total iteration number, and a is a coefficient; In practice, under the premise that one robot fails, the probability of subsequent robot failure is small; Therefore, the probability of k robot failure is expressed as: Where ζ k = 0.1 k In order to meet the task completion, at least one robot must not fail, so the probability of all robots in the robot system failing can be expressed as: P all = P1×P2×…P k ≈ 0.
[0179] Update the robot set after failure, R 1 is the set of robots that have failed, The remaining robot set is R 2 = R\R1, T 1 is the set of completed path tasks, T 2 Indicates the set of unfinished path tasks, specifically T 2 = T\T 1 , Considering that the end task is the last execution, the remaining few robots correspond to the few end tasks after failure; For example: the pth robot fails, corresponding to the completed path Task sequence Total distance The initial position set of the robot after failure is updated as
[0180] Step eight is specifically: after failure, the remaining tasks are allocated to the remaining robots using the method of auction, assuming that there are o path tasks and z robots remaining after failure, a cost matrix V is constructed:
[0181]
[0182] The cost of the new cell position of the robot after failure to the remaining task cell position is stored And the cost between each task cell position Start the auction algorithm, first establish the bidding cost table, initialize the robot's bid for the task to 0, as follows:
[0183]
[0184] The first round has z robots bidding for o tasks, assuming that the minimum bid is Then task Π2 is allocated to the corresponding robot r1, as follows:
[0185]
[0186] The method of this embodiment performs tasks in a certain order, and in the next round of bidding process, the position of r1 to Π2 position is updated, and the rest of the robots do not bid for the task, and the corresponding bid remains unchanged. Start the second round of bidding, there are o-1 tasks left, assuming that the minimum bid is Task Π1 is allocated to the corresponding robot r z , as follows:
[0187]
[0188] Repeat the above process until all tasks are allocated, and then bid for the end task, as follows:
[0189]
[0190] Finally, the corresponding completed tasks of each robot after failure can be obtained And the sequence, the p+1th robot:
[0191] The corresponding completed path And the shortest distance after failure
[0192] Step nine is specifically: if only robot i fails during task completion, the shortest path is l pbest = l p 1 + 0, the shortest distance is d best p = d 1 p + 0, specifically The shortest path and distance corresponding to the robot p+1 are l p+1 best = l p+1 1 + l p+1 2 and d p+1 best = d p+1 1 + d p+1 2 , specifically
[0193] The total objective function F of the robot system best = d best 1 +... + d best p + d best p+1 +... + d best k .
[0194] The following is a specific example of task allocation for three robots in a fire rescue environment considering faults, using a task allocation method considering robot faults in fire rescue:
[0195] Step one: model and divide the environment of the robot, initialize the robot set and task position and give the task description with Boolean specification; In this embodiment, the initial environment map of the robot is as shown in Figure 5 , the initial grid map of the robot is as shown in Figure 6 , C = {c1, c2,..., c 100}, three robots, represented by set R = {r1, r2, r3}, divide the environment into 20 areas, represented by Ω = {Π1, Π2,..., Π 20}, where T s = {Π 18 : r1; Π 19 : r2; Π 20 : r3} represents that the robots start from cells c 98 , c 99 , c 100 , respectively, T u = {π 15 , π 16 , π 17represents the area where the robot needs to stay finally 15 , π 16 , π 17 The area contains the following cells as shown in Table 1:
[0196] Table 1 The area contains the following cells as shown in Table 1:
[0197] Area Cell Area Cell [Pi1] [c3, c4, c5, c 13 , c 14 , c 15 ]]> 11 ]]> c 18 ]]> [Pi2] <![CDATA[c 19 ,c 20 ,c 29 ,c30]]> ∏ 12 ]]> c 38 ]]> ∏3 <![CDATA[c 58 ,c 59 ,c 60 ,c 68 ,c 69 ,c 70 ]]> ∏ 13 ]]> c 53 ]]> [Pi4] c 81 ,c 82 ,c 83 ,c 91 ,c 92 ,c 93 ]]> 14 ]]> c 85 ]]> [Pi5] c 17 ]]> 15 ]]> ∏6 c 39 ]]> ∏ 16 ]]> c 11 ]]> [Pi7] c 63 ]]> 17 ]]> c 21 ]]> [Pi8] c 86 ]]> ∏ 18 ]]> c 98 ]]> [Pi9] c 31 ,c 41 ]]> <![CDATA[Π 19 ]]> c 99 ]]> 10 ]]>
[00100] c 35 , c 36 ]]> 20 ]]> c 100 ]]>
[0198] The route task representation is as follows:
[0199] "and task": set T y ={Π1,Π2,Π3,Π4,Π5,Π6,Π7,Π8}, which represents that the robot must perform 8 tasks, and the Boolean constraint description of "and task" is: Π1∧Π2∧Π3∧Π4∧Π5∧Π6∧Π7∧Π8; "or task": set wherein represents that the robot has 1 group of tasks to be selected for execution, and a task is randomly selected from for execution, and the Boolean constraint description of "or task" is: Π9VΠ 10 ; "not task": set T e ={Π 11 ,Π 12 ,Π 13 ,Π 14}, which represents that the robot always avoids the above 4 areas during the execution of the task, and the Boolean constraint description of "not task" is: The Boolean specification of all tasks is:
[0200]
[0201] Step 2: A coupled solving method is proposed, an adjacency matrix is constructed, the shortest path and distance between each task cell are obtained through a preprocessing algorithm, and data storage is performed; the adjacency matrix M in this embodiment is a 10x10 symmetric matrix, the distance between adjacent cells is 1, the distance from any cell to the cells contained in the forbidden area is set to -∞; the distance between adjacent non-connected cells is also -∞; first, the adjacency matrix M can be written from the grid map of Figure 6
[0202] M(1,1)=0, M(1,2)=1, M(1,11)=1,...M(17,7)=1, M(17,18)=-∞, M(17,16)=1, M(17,27)=1, M(18,17)=-∞, M(18,8)=-∞, M(18,28)=-∞, M(18,19)=-∞,...,M(57,56)=1, M(57,47)=1, M(57,67)=1, M(57,58)=-∞,...,M(99,100)=1;
[0203] Secondly, using Dijkstra algorithm, the shortest path l between each cell except the forbidden area is obtained h,y and the corresponding shortest distance d h,y The data obtained in this embodiment is shown in Table 2:
[0204] Table 2: The shortest path l between each cell h,y and the corresponding shortest distance d h,y
[0205]
[0206] From the above data, when the robot is assigned to the task, the corresponding optimal path can be obtained, that is, the task and the path are coupled and associated, and repeated calculation is not required, which greatly saves the allocation efficiency.
[0207] Step three: task encoding, all tasks of the initial task set are assigned to each robot; in this embodiment, the tasks include eight must-perform tasks, one group of optional-perform tasks, and three end-point tasks; first, each robot randomly selects a task cell from the must-perform task area; second, one task cell is randomly selected from the one group of optional-perform tasks, and then randomly assigned to any robot; further, a random end-point task cell is given to each robot; finally, a zero separator is inserted, such as a randomly generated task code: Code=(C y ,C u )=[86,83,63,0,58,39,31,0,20,17,3,0], [21,11,1]; indicating that the first robot needs to perform ∏8, ∏4, ∏7, π 17 in turn, the second robot needs to perform ∏3, ∏6, ∏9, π 16 in turn, and the third robot needs to perform ∏2, ∏5, ∏1, π 15 in turn. It should be noted that the first position in C y cannot be a zero separator, the last position must be a zero separator, and there cannot be two zero separators adjacent to each other, so as to constrain each robot to perform tasks.
[0208] Step four: extract the encoding information, calculate the shortest path and the shortest distance corresponding to each robot in the encoding; in this embodiment, the initial position of each robot is: {c 98 : r1; c 99 : r2; c 100 : r3}, decoding the encoding [86, 83, 63, 0, 58, 39, 31, 0, 20, 17, 3, 0], [21, 11, 1] of step three, the path task cell that r1 needs to visit in turn is: c 86 , c 83 , c 63 , and the end task cell is c21;
[0209] Step two is called to get the task sequence corresponding to r1 Optimal path: σ1(c 98 , c 21 ) = c 98 , c 88 , c 87 , c 86 , c 76 , c 75 , c 74 , c 73 , c 83 , c 73 , c 63 , c 21 Shortest distance Other robots are the same as above.
[0210] Step five: design an encoding method to discretize the northern hawk optimization algorithm; in this embodiment, three robots, the task area executed by the robot includes 33 task cells, as shown in Table 1; the generation value of each task cell is the average of the Euclidean distance from the initial cell position c 98 , c 99 , c 100 to the task cell position and the end cell position, as shown in Table 3 below:
[0211] Table 3 Generation value of each task cell
[0212]
[0213] In this embodiment, as considering the above-mentioned step randomly generated an encoding Code = [86, 83, 63, 0, 58, 39, 31, 0, 20, 17, 3, 0], [21, 11, 1], the corresponding generation value is: [3.17, 6.08, 6.72, 0, 4.2, 6.06, 10.01, 0, 8.1, 8.28, 10.84, 0], [10.64, 11.33, 12.06], and in the subsequent algorithm iteration update process, the generation value corresponding to each task cell is used for calculation.
[0214] Step six: the initial task encoding is improved by the northern hawk optimization operation, and the update of the task encoding is completed; the optimal task encoding sequence and the shortest distance are output; see Figure 9 ; in this embodiment, the initial randomly generated hawk individual number is 30, and the optimization operation is performed on all individuals, for example, the encoding of the current reference individual X3 is [70, 0, 39, 63, 14, 19, 17, 0, 91, 86, 31, 0], [1, 11, 21], and the generation value obtained from Table 3 is [3.26, 0, 6.06, 6.72, 9.46, 8.04, 8.28, 0, 8.0, 3.17, 10.01, 0], [12.06, 11.33, 10.64], and the corresponding target function value is The encoding of the optimal individual X2 of the current population is [82, 39, 30, 0, 86, 17, 0, 58, 63, 5, 41, 0], [11, 21, 1], the generation value is [6.06, 0, 6.72, 9.88, 3.11, 7.24, 8.04, 8.28, 6.0, 0, 3.17, 0], [11.33, 10.64, 12.06], and the corresponding target function value is Therefore, the reference individual needs to be updated in the direction of the optimal individual, the generation value of the encoding is used for calculation, and is sequentially assigned to each robot from small to large, to obtain the updated individual X1 new2 The encoding of the updated individual X1 is [19, 17, 70, 39, 63, 0, 86, 0, 91, 14, 31, 0], [11, 21, 1], and the updated target function value is In this embodiment, the above-mentioned operation is continuously performed until a better solution is obtained, in the 248th iteration:
[0215] Encoding individual: Code best = Code = [93, 0, 86, 68, 63, 41, 0, 39, 29, 17, 13, 0], [11, 21, 1];
[0216] The optimal task sequence of the robot:
[0217]
[0218] Optimal path:
[0219] σ1 best = c 98 , C 97 , C 96 , C 95 , c 94 , C 93 , C 83 , C 73 , c 63 , c 62 , C 52 , C 42 , C 32 , c 22 , C 12 , c 11 ;
[0220] σ2 best = c 99 , c 89 , c 88 , c 87 , c 86 , c 76 , c 66 , c 67 , c 68 , c 67 , c 66 , c 65 , c 64 , c 63 , c 62 , c 52 , c 42 , c 41 , c 31 , c 32 , c 22 , c 21 ;
[0221] σ3 best = c 100 , c 90 , c 80 , c 79 , c 78 , c 68 , c 58 , c 59 , c 49 , c 39 , c 29 , c 28 , c 27 , c 17 , c 16 , c 26 , c 25 , c 24 , c 14 , c13 , c 12 , c2, c1;
[0222] Shortest distance: d1 best = 15; d2 best = 21; d3 best = 22;
[0223] Optimal objective function value of the system: The 12th individual is the optimal individual.
[0224] Step seven: considering that the robot fails, the environment is updated; the environment map after failure is shown in Figure 7 In this embodiment, the robot speed is 1, at t = 8, robot 2 fails, wherein R 1 = {r2}, the remaining robots R 2 = {r1, r3};
[0225] Path completed before failure:
[0226] σ 1 1 = c 98 , c 97 , c 96 , c 95 , c 94 , c 93 , c 83 , c 73 , c 63 ;
[0227] σ 1 2 = c 99 , c 89 , c 88 , c 87 , c 86 , c 76 , c 66 , c 67 , c 68 ;
[0228] σ 1 3 = c 100 , c 90 , c 80 , c 79 , c 78 , c 68 , c 58 , c 59 , c 49 ;
[0229] Total distance before failure
[0230] The initial position set of the robot after failure is updated to: Ts z = {c 63 : r1; c 49 : r3}, the completed tasks T 1 = {Π4, Π8, Π3}, the remaining tasks T 2 = {Π7, Π9, Π6, Π2, Π5, Π1}.
[0231] Step eight: reassign the remaining tasks to the remaining robots using the method of auction;
[0232] In this embodiment, there are 6 path tasks and 2 robots remaining after the failure, the position of the failure T s 2 = {c 63 : r1; c 49 : r3}, T 2 = {Π7, Π9, Π6, Π2, Π5, Π1}, R 2 = {r i , r3}, T u 2 = {π 15 , π 16 , π 17}; the cost matrix is V:
[0233]
[0234] Start the auction algorithm, initialize the robot's bid for the task to 0, as follows:
[0235]
[0236] The first round has 2 robots bidding for 6 tasks, the minimum bid is 0, then assign task Π7 to the corresponding robot r1, as follows:
[0237]
[0238] The second round of bidding, there are still 5 tasks, the minimum bid is 1, assign task Π6 to the corresponding robot r3, as follows:
[0239]
[0240] The third round of bidding, there are still 4 tasks, the minimum bid is 1, assign task Π2 to the corresponding robot r3, as follows:
[0241]
[0242] The fourth round of bidding, there are still 3 tasks, the minimum bid is 2.2, assign task Π5 to the corresponding robot r3, as follows:
[0243]
[0244] The fifth round of bidding, there are still 2 tasks, the minimum bid is 2.8, assign task Π9 to the corresponding robot r1, as follows:
[0245]
[0246] The sixth round of bidding, there is still 1 task, the minimum bid is 3.6, assign task Π1 to the corresponding robot r1, as follows:
[0247]
[0248] At this time, the way task has been allocated, start to allocate 3 end tasks, the minimum bid is 2, assign task π 16 to the corresponding robot r1, assign task π 17 to the corresponding robot r3, as follows:
[0249]
[0250] The tasks of each robot after the last failure are as follows:
[0251] The task sequences are as follows:
[0252] The optimal path and the shortest distance after failure are as follows:
[0253] σ 2 1=c 63 , c 62 , c 52 , c 42 , c 41 , c 31 , c 32 , c 22 , c 12 , c 13 , c 12 , c 11 ;
[0254] σ 2 3=c 49 , c 39 , c 29 , c 28 , c 27 , c 26 , c 25 , c 24 , c 23 , c 22 , c21;
[0255] The shortest distance is respectively: d 2 1 = 11; d 2 3 = 10;
[0256] The shortest distance of the system
[0257] Step nine: output the shortest path of each robot before and after failure, the total shortest distance of the system.
[0258] In this embodiment, three robots, initial position T s = {c 98 : r1; c 99 : r2; c 100 : r3},
[0259] The initial optimal code is: [93, 0, 86, 68, 63, 41, 0, 39, 29, 17, 13, 0], [11, 21, 1], and the specific path of the robot before failure is respectively:
[0260] σ 1 1 = c 98 , c 97 , c 96 , c 95 , c 94 , c 93 , c 83 , c 73 , c 63 ;
[0261] σ 1 2 = c 99 , c 89 , c 88 , c 87 , c 86 , c 76 , c 66 , c 67 , c 68 ;
[0262] σ 1 3 = c 100 , c 90 , c 80 , c 79 , c 78 , c 68 , c 58 , c 59 , c 49 ;
[0263] At t = 8, r2 fails, the shortest distance of the system The new position of the remaining robot after failure T s2 = {c 63 : r1; c 49 : r3}, the specific paths after failure are respectively:
[0264] σ 2 1 = c 63 , c 62 , c 52 , c 42 , c 41 , c 31 , c 32 , c 22 , c 12 , c 13 , c 12 , c 11 ;
[0265] σ 2 3 = c 49 , c 39 , c 29 , c 28 , c 27 , c 17 , c 16 , c 26 , c 25 , c 24 , c 23 , c 22 , c 21 ;
[0266] The shortest distance of the system
[0267] Therefore, during the operation of the system, the optimal path of the robot r1 is:
[0268] σ1(σ 1 1, σ 2 1) = c 98 , c 97 , c 96 , c 95 , c 94 , c 93 , c 83 , c 73 , c 63 , c 62 , c 52 , c 42 , c 41 ,
[0269] c 31 , c 32 , C 22 , c 12 , c 13 ,c 12 , c 11;
[0270] The optimal path of the robot r2 is: σ2(σ 1 2) = c 99 , c 89 , c 88 , c 87 , c 86 , c 76 , c 66 , c 67 , c 68 ;
[0271] The optimal path of the robot r3 is:
[0272] σ3(σ 1 3, σ 2 3) = c 100 , c 90 , c 80 , c 79 , c 78 , c 68 , c 58 , c 59 , c 49 , c 39 , c 29 , c 28 , c 27 , c 17 , c 16 , c 26 , c 25 , c 24 , c 23 , c 22 , c 21 ;
[0273] The shortest distance of the system
[0274] The shortest distance of the system includes two parts before and after the robot fails. During the operation, one robot r2 fails, but the remaining robots still complete the task requirements of the Boolean constraint, and the total distance of the system is as short as possible. The optimal path after the failure is shown in FIG. 8. Figure 8
[0275] The embodiment firstly uses the grid method to model the environment, gives a task area set, associates the tasks and the optimal path through the pretreatment method according to the adjacency matrix, and stores the optimal path and the shortest distance information, and then gives the Boolean requirement considering the complex task in the method; secondly, a group of codes meeting the task requirements is randomly generated, the Northern Goshawk algorithm combined with Cauchy mutation is used for optimization, and an initial good solution is obtained; further considering the failure of any robot, the robot set and the task set are updated after the failure, and the auction method is used to reassign the unfinished tasks to the robots without failure; considering the situation before and after the failure, the optimal path and the shortest moving distance of each robot are given; finally, experiments are carried out on the Gazebo simulation software, and the effectiveness of the method is proved. The robot system in the application considers the situation that the task requirements are met and the failure occurs, so that the total moving distance is the shortest, the moving cost of the robot is greatly reduced, the work efficiency is improved, the consideration of the failure situation greatly improves the robustness of the robot system, guarantees the stability and reliability in the rescue process, and has good application prospect and practical significance.
[0276] Those skilled in the art will appreciate that embodiments of the application can be provided as methods, systems, or computer program products. Accordingly, the application can be embodied in the form of complete hardware embodiments, complete software embodiments, or embodiments combining software and hardware aspects. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage media, etc.) having computer-usable program code embodied thereon.
[0277] The application is described with reference to flowcharts and / or block diagrams that illustrate the method, apparatus (system), and computer program product according to embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows or blocks Figure 1 The device that implements the function specified in one or more flows or blocks.
Claims
1. A method of task allocation in fire rescue considering robot failure, characterized by, The method comprises the following steps: The global environment of fire rescue is divided to obtain a divided fire rescue environment, and after initialization of the robots existing in the divided fire rescue environment, a task description of the robots with Boolean constraints is obtained by using Boolean constraints to formally describe the tasks of the robots; After constructing an adjacency matrix of the task cells in the divided fire rescue environment, the shortest path and the shortest distance between the task cells are obtained by preprocessing through the Dijkstra algorithm; After initial task coding of the task description of the robots with Boolean constraints, an initial task coding mode is obtained, and all tasks are allocated to each robot according to the initial task coding mode; The initial task coding mode is iterated and updated by using the discretized Northern Hawk optimization algorithm to perform Northern Hawk optimization operation, and the optimal task coding sequence and the shortest path are obtained; The initial task coding mode is iterated and updated by using the discretized Northern Hawk optimization algorithm to perform Northern Hawk optimization operation, and the optimal task coding sequence and the shortest path are obtained, and the specific operation comprises the following steps: The generation value corresponding to each task cell in the coding is updated, and the generation value is sorted in ascending order and then uniformly allocated to each robot, and the update is composed of recognition stage update and pursuit stage update; In the identification phase, starting from the first iteration, the objective function value is i = 1,..., N, where X i is the current individual, the individual with the smallest objective function value among the N individuals in the current population is selected as the reference individual, the objective function value after the identification phase update satisfies The identification phase update is performed using the following equation: x i,j new1 = x i,j + r * (b i,j - I * x i,j ) where x i,j is the current individual X i is the fitness value of the current individual X i,j is the fitness value of the reference optimal individual at the jth position of the task cell, r is a random number between 0 and 1, and I is randomly assigned a value of 1 or 2. The updated individual in the identification stage is x i new1 If the current individual is the optimal individual, it is directly retained; In the pursuit stage, the pursuit stage update is performed by combining the Cauchy mutation method, and the pursuit stage update is performed by using the following formula: x i,j new2 = x i,j + δ i + G * (2 * r - 1) * x i,j where δ i is a random disturbance generated according to a Cauchy distribution where w is the current iteration number, W is the total number of iterations, and the updated individual in the pursuit phase is x i new2 ; After the discretized Northern Hawk optimization algorithm iterates the task coding, the following parameters are updated: Updated optimal coded individual: Code best = Code; Optimal task sequence for robot p: The path corresponding to the optimal task sequence: wherein, c p,1 and are the initial cell, the 1st path task cell and the n p th path task cell, respectively, of the robot p, is the end task cell. Shortest distance of robot p: optimal objective function value: After decoding the optimal task coding sequence, the shortest path and the shortest distance of each robot are calculated by combining the shortest path and the shortest distance between the task cells obtained by preprocessing; When the robot fails, the global environment of fire rescue is updated, the tasks left by the robot when it fails are re-allocated to the non-failed robots by using the auction algorithm, and the shortest path of each robot before and after the failure and the total distance of all robots are output. 2.The method according to claim 1, wherein, The task of the robot includes a route task and a terminal task of the robot, and the route task of the robot includes a task, or a task and a non-task; The task indicates that the robot must perform the task in the global environment of fire rescue; The task indicates that the robot selectively performs the task in the global environment of fire rescue; The non-task indicates that the robot always avoids the task in the global environment of fire rescue; The task description of the robot with Boolean constraints is as follows: wherein, is a task for the robot with Boolean constraints, is a task for the robot, y o represents the number of tasks that the robot has to perform in the fire rescue global environment; is a non-task; represents the number of tasks that the robot has to perform in the fire rescue global environment, is the a o group or task, in particular, one task is selected from the set to perform, is the a i group or task. 3.The method according to claim 1, wherein, The adjacency matrix is as follows: where M is an n x n symmetric adjacency matrix storing the distance relationship between the task cells in the divided fire rescue environment, d h,y ∈ R≥0 represents the distance between adjacent cells c h and c y (h≠y), if d h,y =-∞, then the cells c h and c y are not adjacent or cannot pass through; The adjacent cell c is calculated by Dijkstra algorithm h with c y The shortest path between h,y and the shortest distance d h,y And delete the non-task cells in the adjacency matrix. 4.The method according to claim 1, wherein, The initial task coding is as follows: Code = (C y ; C u ) Wherein, Code represents the initial task coding; C y denotes a task cell of the robot approach task in the partitioned fire rescue environment, c p,q ∈∏ q is a mapping of a certain task cell in the approach task; C u representing a task cell in the partitioned fire rescue environment that satisfies the robot end goal task; is a mapping for a task cell in the end goal task; 0 represents the end of the current robot route task, and the tasks are assigned in turn from the first robot; all robots need to complete y o +a o route tasks and k end tasks, and the end tasks are randomly assigned to the k robots, y o represents the number of tasks that the robot must perform in the global environment of fire rescue, a o represents the number of tasks that the robot selectively performs in the global environment of fire rescue, and k represents the number of robots in the divided fire rescue environment. 5.The method according to claim 1, wherein, The objective function of the discretized Northern Hawk optimization algorithm is as follows: X i For each individual in the iteration process, encode a set of tasks, and the objective function value For individual X i The sum of the shortest distances of each robot in the task process, initially set N individuals; The discretized Northern Hawk optimization algorithm uses the generation value corresponding to the task cell to perform calculation and update, the generation value is the average of the Euclidean distance of the robot from the initial cell to the task cell, and the task cell and the corresponding generation value in the coding are as follows: where g p,q is the cost value of the path task cell c p,q , f p is the cost value of the goal task cell , where p = 1,..., k, k is the number of robots. 6.The method according to claim 1, wherein, The auction algorithm comprises the following steps: The cost matrix V is constructed as follows: wherein o is the number of remaining way tasks after the failure, z is the number of remaining robots after the failure, and the matrix V stores the cost between the remaining robot p and the remaining task a and the cost between each remaining task The bidding cost table is established, and the bidding of the robot for the task is initialized as 0, as shown in the following formula: The first round has z robots bidding for o tasks, with a minimum bid of The second task T2 is assigned to the first robot r1, as follows: The position of the first robot r1 in the cost matrix is updated to the second robot's bid for the task in the next round of bidding process, and the rest of the robots' bids remain unchanged. There are o-1 tasks in the second round of bidding, and the minimum bid is set to The first task Π1 is assigned to the second robot r z As follows: The above process is repeated until all the task allocation is completed, and the end task is auctioned to obtain the corresponding completed task and sequence of each robot after failure; the end task is auctioned as shown in the following formula:
7. A task allocation system in fire rescue considering robot failure, characterized by, Comprise: The task Boolean constraint description module is used for dividing the global fire rescue environment to obtain the divided fire rescue environment, initializing the robots existing in the divided fire rescue environment, and using Boolean constraints to formally describe the tasks of the robots to obtain the task description of the robots with Boolean constraints; The shortest path and shortest distance calculation unit cell module is used for constructing an adjacency matrix of the task unit cells in the divided fire rescue environment, and obtaining the shortest path and shortest distance between the task unit cells through Dijkstra algorithm preprocessing; The initial task allocation module is used for obtaining the initial task coding mode by coding the task description of the robots with Boolean constraints and the end task, and allocating all the tasks to each robot according to the initial task coding mode; The optimal initial task coding module is used for updating the task coding by using the discrete Northern Hawk optimization algorithm to perform Northern Hawk optimization operation iteration on the initial task coding mode, to obtain the optimal task coding sequence and the shortest path; The shortest path and shortest distance calculation module of the robot is used for decoding the optimal task coding sequence, combining the shortest path and shortest distance between the task unit cells obtained through preprocessing, and calculating the shortest path and shortest distance of each robot; The robot failure task re-allocation module is used for updating the global fire rescue environment when the robot fails, re-allocating the remaining tasks of the robot to the non-failed robots using the auction algorithm, and outputting the shortest path of each robot before and after failure and the total distance of all robots. 8.An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for task allocation considering robot failure in fire rescue according to any one of claims 1-6 when executing the computer program. 9.A computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method for task allocation considering robot failure in fire rescue according to any one of claims 1-6.
Citation Information
Patent Citations
Robot optimal path planning method based on Boolean constraint
CN113819919A