Multi-robot task allocation optimization algorithm in pension service scene
Through the multi-robot task allocation algorithm combining Petri network and genetic algorithm in the elderly care service scenario, the problem of low task allocation efficiency in multi-robot collaborative work is solved, and efficient and reliable task scheduling and meeting the needs of the elderly are achieved.
Patent Information
- Application Number
- CN202411196154.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-02-18
AI Technical Summary
The existing technology is difficult to effectively solve the task allocation problem of multiple robots working together in elderly care institutions, resulting in inefficient task execution and inability to meet the diversified and personalized needs of the elderly.
A multi-robot task allocation optimization algorithm is proposed in the elderly care service scenario. The ETCTFPN model is established using Petri Net, the conflict transition set is extracted, and the chromosome selection probability and mutation strategy are optimized through genetic algorithms. It is not feasible to filter and modify the state equation of Petri Net. Solution to obtain the optimal task allocation plan.
Through the combination of genetic algorithm and Petri network, the problem of multi-robot task scheduling is effectively solved, task execution efficiency is improved, resource conflicts and task execution errors are avoided, and the diversified and personalized needs of the elderly are met.
Smart Images

Figure CN119476759A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of task allocation, and in particular to an optimization algorithm for multi-robot task allocation in an elderly care service scenario. Background Art
[0002] Nursing homes must meet the daily care needs of the elderly with declining physical functions and limited self-care ability. These care tasks are both complicated and diverse. Under the current technical level, completing a nursing task or meeting the service needs of the elderly usually requires the collaborative work of multiple service robots with different functions. In order to coordinate these heterogeneous service robots to meet the diverse needs of many elderly people and improve their satisfaction, it is particularly necessary to establish a multi-robot coordination framework to guide the robots to complete tasks collaboratively. Using the coordination framework to meet the needs of the elderly involves two main tasks: first, a corresponding task process model must be established for robots to serve the elderly to guide the mutual coordination and service process between robots; second, given the single function of the service robot, each robot can only perform one subtask in the service demand, so it is necessary to decouple the service task model and separate the subtasks so that they can be performed by different service robots. However, there is currently a lack of mature multi-robot task allocation optimization algorithms, which cannot effectively solve the task allocation problem of multi-robot collaborative work in nursing homes, which leads to low task execution efficiency and cannot meet the diverse and personalized needs of the elderly. Summary of the invention
[0003] The present invention aims to at least solve the technical problem of low task execution efficiency in the prior art, and in particular innovatively proposes an optimization algorithm for multi-robot task allocation in an elderly care service scenario.
[0004] In order to achieve the above-mentioned object of the present invention, the present invention provides an optimization algorithm for multi-robot task allocation in a pension service scenario, the algorithm comprising:
[0005] S1. Use Petri net to build the corresponding ETCTFPN model according to the real-time needs of the elderly and extract the conflict transition set;
[0006] S2. Based on a genetic algorithm, the conflict transition set and the serial numbers of the heterogeneous service robots are used to form a genome, and an initial population is randomly generated based on the genome;
[0007] S3, using the satisfaction of all elderly people as a fitness function, calculating the fitness value of each chromosome in the initial population based on the fitness function, and using the fitness value to screen the chromosomes in the initial population through linear sorting selection and elite selection to obtain a first new population;
[0008] S4, exchanging two genomes in the chromosomes of the first new population for mutation, to obtain a second new population;
[0009] S5, using the second new population to screen infeasible solutions using the state equation of the Petri net, and modifying the infeasible solutions to obtain a third population;
[0010] S6. Repeat steps S3 to S5 to obtain an optimal chromosome, where the optimal chromosome is an optimal solution for multi-robot task allocation.
[0011] The beneficial effect of the present invention is that, through the combination of genetic algorithms and Petri nets, the problem of robot task scheduling in elderly care service institutions can be effectively solved. Specifically, by optimizing the selection probability and mutation strategy of chromosomes through genetic algorithms, the diversity of the population can be improved, thereby avoiding falling into local optimal solutions. At the same time, the state equations of Petri nets are used to screen and modify infeasible solutions, thereby ensuring the feasibility of task scheduling and avoiding resource conflicts and errors in task execution. In addition, by establishing an ETCTFPN model based on the needs of the elderly, the operation process of elderly care service institutions can be simulated more accurately, providing a reliable reference framework for robot task scheduling. By extracting conflicting transition sets, potential resource conflicts can be identified and resolved in advance, thereby improving the efficiency of task execution.
[0012] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0014] Figure 1 It is a flow chart of the multi-robot task allocation optimization algorithm of the present invention.
[0015] Figure 2 It is a schematic diagram of the general framework of multi-robot multi-task allocation and coordination in the context of an elderly care service institution of the present invention.
[0016] Figure 3 It is a schematic diagram of the Petri net model of the present invention and its reachability graph.
[0017] Figure 4 It is a schematic diagram of the ETCTFPN model of the robot of the present invention transporting an elderly person i to the toilet and back.
[0018] Figure 5 It is a schematic diagram of the ETCTFPN model of the present invention in which SR helps the elderly to walk.
[0019] Figure 6 It is a schematic diagram of the interruptible transition of the present invention.
[0020] Figure 7 It is a schematic diagram of the interruptible robot function module of the present invention.
[0021] Figure 8 It is a schematic diagram of the non-interruptible service action module of the present invention.
[0022] Fig. 9 It is a schematic diagram of the refined network model of the present invention's SR helping the elderly to walk.
[0023] Fig.10 It is a schematic diagram of the refining network in which the robot of the present invention transports the elderly i to the toilet and back.
[0024] Fig.11 It is a flow chart of extracting conflict transition sets in the ETCTFPN model according to the present invention.
[0025] Fig.12 It is a schematic diagram of the steps of sequential crossover of the genome chromosomes of the present invention.
[0026] Fig.13 It is a plan view of a simulated elderly care service institution according to the present invention.
[0027] Fig.14 It is a schematic diagram of the ETCTFPN model of the ABC elderly walking at time T0 of the present invention.
[0028] Fig.15 It is a schematic diagram of the ABC elderly walking ETCTFPN model of the two SRs of the present invention.
[0029] Fig.16 It is a schematic diagram of the positions of the elderly and the robot in scenario a of the present invention.
[0030] Fig.17 It is a schematic diagram of the ETCTFPN model of scene a at time T1 of the present invention.
[0031] Fig.18 It is a schematic diagram comparing the DPC of the present invention with the task priority strategy and the distance priority strategy.
[0032] Fig.19 It is a schematic diagram comparing the DPC of the present invention with the task priority and distance priority strategies.
[0033] Fig. 20 It is a schematic diagram of the positions of the elderly and the robot in scenario b of the present invention.
[0034] Fig.21 It is a schematic diagram of the refined network of the bETCTFPN model for the T0 moment scenario of the present invention.
[0035] Fig. 22 It is a schematic diagram of the bETCTFPN model of the T1 moment scene of the present invention.
[0036] Fig.23 It is a schematic diagram of the ETCTFPN model at time T0 of the present invention.
[0037] Fig.24 It is a schematic diagram of the positions of the elderly and the robot in scenes c1c2 of the present invention.
[0038] Fig.25 It is a schematic diagram of the convergence of the genetic algorithm of the present invention.
[0039] Fig.26 It is a schematic diagram of the positions of the elderly and the robot in scene d at time T1 of the present invention.
[0040] Fig. 27 It is a schematic diagram of the ETCTFPN model of scene c at time T1 of the present invention.
[0041] Fig.28 It is a convergence diagram of the genetic algorithm of the present invention. DETAILED DESCRIPTION
[0042] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0043] like Figure 1 As shown, an optimization algorithm for multi-robot task allocation in a pension service scenario includes:
[0044] S1. Use Petri net to build the corresponding ETCTFPN model according to the real-time needs of the elderly and extract the conflict transition set;
[0045] It should be noted that the Petri net is a five-tuple, PN = (P, T, F, W, M0), where P = {P1, P2, ..., P n} is a finite set of places, n>0 represents the number of places in the system. Places are mainly used to describe various states in the system. When place P i When the token exists in the memory, the meaning represented by the library takes effect; T = {t1, t2, ..., t m} is a finite set of transitions, m>0 represents the number of transitions contained in the system, plays the role of state switching in the network, and satisfies: P∩T=Φ and P∪T≠Φ; F(P×T)∪(T×P) is a finite set of directed arcs, which connect places and transitions, showing the flow direction of tokens in the network. The directed arcs only flow from places to transitions or from transitions to places, and there is no connecting arc between any two places or any two transitions; W is the weight mapped on the directed arc, which represents the number of tokens that must be consumed each time the token flows, and represents the rule for triggering transitions; M0 is the initial identifier, which is the number of tokens contained in each place in the place set P, and is used to describe the initial state of the system. The identifier of place P can be expressed as M(p). When drawing a Petri net, a circle represents a place, a rectangle represents a transition, and a token is represented by a black dot.
[0046] Petri nets express changes in system states by transforming system identifiers. Petri nets update the state or identifier of the network according to the following rules: i The number of tokens contained is greater than or equal to the weight W(P i , t), that is, M(P i )≥W(P i ,t), transition t has the right to occur. And transition t is marked by M(P i ) can be expressed as M(P i )t>At this time, from the input library P i Remove W(P i ,t) tokens and in the output place P i +1 Added W(t,P i +1) tokens, W(t,P i +1) is the transition t connected to the output library P i +1. After the transition is triggered, the mark changes to M. The process can be expressed as: M(P i )t>M.
[0047] In addition, Petri nets include multiple properties such as reachability, boundedness, safety, and activity. Among them, reachability refers to when the Petri net starts from the initial mark M0 and triggers a series of transition sequences to reach the mark M r , then it is called M rIt is reachable from M0, and the set of all identifiers reachable from M0 is called the reachable identifier set, which represents all possible operations of the system under the current identifier. The activity of Petri net means that for a transition t, if there is a certain identifier M that makes the transition triggerable, then the transition is called active. If all transitions of a Petri net can be triggered, then the Petri net is called active. This property can be used to verify the rationality of the established Petri net model. If some transitions cannot be triggered due to improper allocation of tokens, the system falls into a deadlock state and needs to be modified. At present, common Petri net analysis methods include reachable identifier graphs, coverable trees, association matrices, state equations and other schemes.
[0048] like Figure 3 As shown, the reachable graph is obtained by running the Petri net model as Figure 3 As shown in , starting from the initial identifier M0, the graph obtained by connecting the identifiers triggered by each transition in the network through directed arcs is the reachable identifier graph. Figure 3 It is the reachable graph of the Petri net model. It can be seen that when the shared resource library PR contains only one token, transitions T1 and T3 need to be triggered first. It can be seen that the resource PR needs to select a task to complete before continuing to another task.
[0049] Through the reachable identification diagram, we can see the transition triggering sequence from the initial identification M0 to the final identification M7, as well as the operating status of the system. The association matrix of the Petri net model is shown in Table 1. Through the association matrix, this embodiment can determine the connection status of each network library and transition, and the number of tokens consumed when each transition of the model is triggered. Combined with the state equation of the Petri net, the simulation operation of the Petri net can be realized.
[0050] Table 1. Incidence matrix of Petri net model
[0051]
[0052] The Petri net is used to model the task flow of the elderly care service agency, which is convenient for this embodiment to track the progress of the robot in performing the service task and find the global optimal robot scheduling solution. Below, this embodiment will model the task service flow, robot functions, and robot resources in the elderly care service agency scenario based on ETCTFPN.
[0053] It should also be noted that since the simulation operation of the Petri net can be represented by a set of trigger sequences of transitions, this is similar to the chromosomes composed of gene sequences in the genetic algorithm. Moreover, each subtask in the ETCTFPN model corresponding to the needs of each elderly person is completed by the robot in a fixed transition sequence, so the chromosome sequence encoding method can be used to correspond the genes in the chromosome to the transitions in the task flow. The relative position of the chromosome gene is used to represent the order of transitions within the ETCTFPN model of each elderly person. Therefore, the elderly number {A, B, C...} on the ETCTFPN model will be represented by the digital number {1, 2, 3...}.
[0054] by Figure 5 Based on the ETCTFPN model corresponding to the walking demand, assuming that three elderly people A, B, and C request a walk at the same time, DPC establishes a global ETCTFPN model including the three elderly people, in which the transition related to elderly A will be represented by the number "1". The task model of elderly A's walk includes three transitions to be triggered: T A1 ,T A2 ,T A3 , which can be represented by {1,1,1}. The relative positions between the same digital numbers are used to correspond to different transitions in the task, so the global transition trigger sequence can be represented by chromosome {1,1,1,2,2,2,3,3,3}. To obtain the solution of the ETCTFPN model and the corresponding elderly satisfaction, it is also necessary to know the executing robots of each transition in the transition trigger sequence. Therefore, it is necessary to expand the corresponding robot scheduling scheme inside the chromosome. This embodiment expands the meaning of genes inside the chromosome, and uses the defined genome as the basic unit of chromosome composition. The genome is a 2-dimensional matrix, and its internal meaning is [elderly number, robot number]. Therefore, the chromosome of a solution to the above model can be represented as shown in Table 2.
[0055] Table 2 Chromosome coding scheme and its meaning
[0056]
[0057] By observing the ETCTFPN model, this embodiment found that each response module is connected to its own resource library, and the response transition and subsequent action transition trigger use the same robot. Therefore, the key transition set composed of all untriggered response modules in the model affects the robot allocation plan and system process, and the key transitions in different elderly needs constitute a resource competition relationship. The complexity of the model can be reduced and the chromosome length can be shortened by screening conflicting transitions. The extraction process can be described in the language of Petri nets, and its expression is as follows:
[0058]
[0059] Among them, ConflictSet represents the conflict transition set, σ i It represents the set of transitions that the ETCTFPN model needs to trigger from the initial mark M0 to the final mark M. This process can be expressed as M0σ i >M. It represents the front set of all resource repositories connected to SR. It represents the front set of all resource repositories connected to CR, which is the response module connected to the resource repositories in the ETCTFPN model. Taking the intersection of two sets composed of transitions, we can get the current ETCTFPN model and the conflict transition set under the mark.
[0060] It is possible to automatically extract these changes that may constitute robot usage conflicts from the established ETCTFPN model, such as Fig.11 The figure shows the extraction process designed in this embodiment.
[0061] Table 3 Chromosome coding scheme and meaning of conflict transition set
[0062]
[0063] This embodiment reduces the complexity of the analysis model and shortens the length of the chromosome corresponding to the model. Fig.11 The process shown in the figure establishes a service model for three elderly people. Since the three elderly people are in the initial state, the conflict transition set extracted is {T A2 T B2 ,T C2}. A chromosome corresponding to the conflict transition set is shown in Table 3.
[0064] S2. Based on a genetic algorithm, the conflict transition set and the serial numbers of the heterogeneous service robots are used to form a genome, and an initial population is randomly generated based on the genome;
[0065] It should be noted that the generation of the initial population is achieved by randomly combining the transitions in the conflicting transition set and the numbers of the heterogeneous service robots. Each individual represents a possible solution, where each column of the genome represents a transition and each row represents a robot. In this way, it can be ensured that each individual satisfies the correspondence between transitions and robots in the model.
[0066] S3, using the satisfaction of all elderly people as a fitness function, calculating the fitness value of each chromosome in the initial population based on the fitness function, and using the fitness value to screen the chromosomes in the initial population through linear sorting selection and elite selection to obtain a first new population;
[0067] S4, exchanging two genomes in the chromosomes of the first new population for mutation, to obtain a second new population;
[0068] S5, using the second new population to screen infeasible solutions using the state equation of the Petri net, and modifying the infeasible solutions to obtain a third population;
[0069] S6. Repeat steps S3 to S5 to obtain an optimal chromosome, where the optimal chromosome is an optimal solution for multi-robot task allocation.
[0070] It should also be noted that after the initial population is generated in the above step S2, crossover mutation and selection genetic operations are required. The purpose of the selection operation is to determine the probability of an individual being selected to participate in the next generation based on its fitness. The fitness function is related to the satisfaction of the elderly, that is, to improve the satisfaction of the elderly as much as possible under the premise of meeting all transition triggering requirements. The crossover operation is to generate new offspring by exchanging some genes of two individuals. In order to ensure that the new individual after the crossover operation is still valid, it is necessary to ensure that the selection of the crossover point does not destroy the corresponding relationship between the transition and the robot. For example, methods such as single-point crossover or uniform crossover can be used, but it must be ensured that the individuals after the crossover still meet the model constraints. The mutation operation introduces new genetic diversity by randomly changing certain genes in the individual. Mutation can be changing the value of a gene or inserting or deleting certain genes. The mutation operation helps to avoid the algorithm from falling into a local optimal solution, thereby increasing the probability of finding a global optimal solution. After multiple generations of iterations, a population with higher fitness can be obtained in the end. By selecting the individual with the highest fitness as the final solution, a service model that meets the needs of the elderly and has a high satisfaction can be obtained.
[0071] like Figure 1 and 2 As shown, in summary, in order to solve the problem of state space explosion of the ETCTFPN model when a large number of complex tasks and multiple robot resources appear in the ETCTFPN model, this embodiment uses Petri nets combined with improved genetic algorithms for rapid solution, and extracts conflict transition sets by analyzing the relationship between each resource library and the task execution status in the ETCTFPN model, shortens the length of the chromosome, and reduces the complexity of the ETCTFPN model. By designing unique chromosomes and genomes, the encoding of multi-robot multi-task scheduling schemes for elderly care service agencies is realized. At the same time, in order to keep the population size unchanged and diverse, the embodiment also uses the detection mechanism of wrong chromosomes and the chromosome modification method. In order to avoid the fitness values of each chromosome from being too large, causing the population to quickly converge to the same individual and fall into the local optimum, this embodiment adopts linear sorting selection to allocate selection probability to ensure population diversity, and combines elite selection to ensure that the best individuals in the population are retained, so that the population continues to approach the optimal solution, thereby achieving reasonable allocation and optimal use of resources, improving the satisfaction of the elderly and the work efficiency of the robot.
[0072] As an optional embodiment of the present invention, optionally, the fitness function is expressed as:
[0073]
[0074] Among them, Overall satf represents the satisfaction of all elderly people; e represents the natural base number; N represents that there are N elderly people in the service queue at this moment; X represents the needs raised by the elderly; Sdtf H,X,N represents the satisfaction of the elderly H; α0, α1 and α2 are all adjustable parameters; Prior X Indicates the priority of X; impat H Indicates the irritability of the old man H; t wait,H,X,N V represents the waiting time from when the elderly H puts forward the demand X to when he receives the robot service; H,X,N Indicates the carrying speed; represents the comfortable carrying speed of the elderly H when receiving the robot carrying service; α H,X,N represents the acceleration coefficient; α min Indicates the minimum value of the acceleration coefficient; α max represents the maximum value of the acceleration coefficient; γ0, γ1 and γ2 all represent weights, which are used to adjust the calculation results; K represents the demand put forward by the current N elderly people, and Prior represents the priority.
[0075] It should be noted that the fitness function is a formula for calculating the satisfaction of the elderly, which comprehensively considers factors that affect the change of the elderly's satisfaction, such as the priority of the task, the impatience of the elderly, the expected waiting time, and the difference between the comfort and actual receiving speed. DPC can allocate service resources according to the status and satisfaction of each elderly, avoiding the problem of emergency tasks not being responded to in a timely manner due to blindly executing tasks in the order of the elderly's needs.
[0076] As an optional embodiment of the present invention, optionally, in step S3, using the fitness value to select chromosomes in the initial population through linear sorting selection and elite selection to obtain the first new population includes:
[0077] S301, linearly sorting the chromosomes based on the fitness values of the chromosomes, and arranging the chromosomes in the initial population from low to high according to the fitness values;
[0078] S302, calculating the selection probability of each chromosome according to the linear sorting result;
[0079] S303, assigning the chromosomes in the initial population in an ascending order based on all the selected probabilities calculated;
[0080] S304: Utilize the elite selection to select at least one optimal chromosome in the initial population to obtain a first new population.
[0081] It should be noted that DPC establishes the corresponding ETCTFPN model according to the real-time needs of the elderly and extracts the conflict transition set. Based on the conflict transition set and the genome composed of the numbers of the heterogeneous service robots, DPC randomly generates the initial population. Then, the satisfaction of all the elderly is used as the fitness function, and the chromosomes are screened by linear sorting selection and elite selection. Among them, the individuals must be sorted according to the fitness value first, the best chromosome is ranked in the Bth position, and the worst chromosome is ranked in the first position. The selection probability is assigned to the chromosomes sorted from high to low in fitness value from large to small, which avoids the situation that individual chromosomes cannot be selected due to too large a difference in fitness value, and the population quickly converges to the same chromosome and falls into the local optimum. Elite selection retains the best first few individuals in the population, so that the population continues to approach the optimal solution.
[0082] After the population is screened, this embodiment uses the method of swapping two genomes in the chromosome for mutation. To ensure that the chromosome after crossover mutation is an executable solution, no deadlock occurs, and can be used to calculate the fitness value, this embodiment uses the state equation of the Petri net to screen and modify infeasible solutions, and calculates the fitness value of each chromosome in the population after completing the inspection and modification.
[0083] As an optional embodiment of the present invention, optionally, the selection probability expression of each chromosome is calculated in step S302 as follows:
[0084]
[0085] Wherein, P(i) represents the selection probability of chromosome i; B represents the arrangement position of the optimal chromosome; b - represents the selection probability for solving the optimal chromosome; b + represents the selection probability for solving the worst chromosome; i represents the i-th chromosome.
[0086] As an optional embodiment of the present invention, optionally, in step S4, the two genomes in the chromosomes of the first new population are exchanged for mutation to obtain the second new population, which includes:
[0087] S401, obtaining two parent chromosomes, and randomly selecting a genome from one of the parent chromosomes as a reserved segment, and placing the reserved segment at the same position of the daughter chromosome;
[0088] S402, randomly selecting a genome from another parent chromosome as an insertion fragment, and sequentially placing the insertion fragments at the remaining positions of the daughter chromosome to generate a daughter chromosome, wherein the number of genes in the daughter chromosome is the same as the number of genes in the parent chromosome;
[0089] S403. Repeat steps S401 to S402 to generate a second population.
[0090] like Fig.12 As shown, it should be noted that crossover usually randomly selects crossover points in two parent chromosomes, and then exchanges the selected gene fragments to produce new chromosomes, thereby passing on excellent characteristics to the next generation. Since the modeling of the service tasks of the elderly care service agency in this embodiment is based on Petri nets, in view of the characteristics and advantages of the encoding method of the above-mentioned genome chromosomes, this embodiment adopts a sequential crossover method to generate new offspring. First, a genome is randomly selected from the two parent chromosomes as the starting point of the reserved fragment, and one is selected from several genomes after the starting point as the end point of the reserved fragment (the starting and ending points of the two parent chromosomes are the same). The genome fragments of parent chromosome 1 (Parent1) in this region will be retained and copied to the same position of daughter chromosome 1 (Child1). After that, the missing genomes in offspring 1 are recorded, and the missing genomes are found in parent chromosome 2, and these genomes are filled into offspring 1 in sequence, that is, new chromosomes are generated. Offspring 2 is also obtained in the same way. Assume that there are two parent chromosomes as shown in Table 3.3.
[0091] Table 4 Solution of ETCTFPN model at time T1
[0092]
[0093] Taking Table 4 as an example, the sequential crossover of this embodiment is described. The steps of sequential crossover are as follows: Fig.12 The sequential crossover of the embodiment ensures that the change meaning represented by the genome in each chromosome appears only once, and there will be no problems such as missing changes and duplication of change meanings due to crossover.
[0094] As an optional embodiment of the present invention, optionally, in step S5, using the second new population to screen infeasible solutions using the state equation of the Petri net, and modifying the infeasible solutions to obtain the third population includes:
[0095] S501, using the state equation to screen infeasible solutions of the offspring chromosomes of the second new population;
[0096] S502, extracting the problematic gene position of the infeasible solution and inserting it into the end of the offspring chromosome;
[0097] S503, repeating steps S501 to S502 until all the offspring chromosomes become feasible solutions, thereby generating a third population.
[0098] It should be noted that as the chromosomes within the population continue to cross and mutate, the solutions represented by each chromosome are fully transformed. Since the needs of the elderly may be a complex multi-robot service task, the two heterogeneous service robots need to cooperate with each other to complete the task, and then the two heterogeneous robots can be released to return to idle. When the genomes corresponding to the response modules of the two robots are inserted between the genomes, and the elderly also use these two robots, resource snatching occurs. Since the collaborative tasks of the two robots are not completed, the robots cannot respond to the needs of the newly inserted elderly, and the system is deadlocked. Since the chromosomes are reorganized based on the given sequential crossover rules, the purpose is to find new trigger sequences and new robot allocation schemes, and it cannot be guaranteed that each change of the crossed chromosomes can be successfully triggered. It is necessary to introduce a screening mechanism for infeasible solutions and design a unified modification plan for these infeasible solutions to ensure that the population size remains unchanged and iterates smoothly.
[0099] The state equation is defined as:
[0100] Let ∑=(S,T,F,M0) be a Petri net;
[0101] Where: M0 is the initial identifier; A is the association matrix of the network. If there exists a transition sequence σ such that M0σ>M, then there exists an n-dimensional vector X of non-negative integers such that the following equation holds.
[0102] M=M0+A T X
[0103] The genome in each chromosome represents the transition to be triggered in the ETCTFPN model. When a transition is triggered, each transition has a corresponding X vector, and each successful triggering will change the system's identifier M. By sequentially triggering the sequence of transitions represented by the chromosome, the simulation of the running state of the scheme can be completed. Figure 4 Based on the ETCTFPN model of transporting the elderly to the toilet, assuming that two elderly people A and B simultaneously request to go to the toilet, the conflict transition set extracted by DPC is: {T A2 ,T A3 ,T A5 ,T A8 ,T A10 ,T B2 ,T B3 ,T B5 ,T B8 ,T B10}. Assume that the elderly care service agency contains 4 idle robots, namely {MAN, SR1, SR2, CR1, CR2}. Assume that a chromosome is generated through crossover mutation, as shown in Table 5.
[0104] Table 5 Infeasible solutions corresponding to chromosomes
[0105]
[0106] There are 10 transitions in the chromosome, so the vector X is composed of {X1,X2,X3,X4,X5,X6,X7,X8,X9,X 10} consists of ten sub-vectors. Each vector multiplied by the association matrix represents the triggering of the transition. DPC determines the problem transition by checking the status of the identifier M in the resource library, and puts the problem transition at the end of the chromosome to resolve the conflict. Repeat the detection and modification steps until the chromosome becomes a feasible solution. For example, DPC triggers the transitions in the chromosome in Table 5 in sequence and finds that the second gene position snatches SR2. The problematic gene position is extracted and connected to the end of the chromosome.
[0107] The modified chromosome is shown in Table 6. It can be found that the state in the original chromosome where each needs the other's robot to help unlock the exclusive robot resources has been resolved. After SR2 and CR1 complete the transfer task of Elder B, CR1 will help Elder A. There is no deadlock state in this chromosome.
[0108] Table 6 Modified chromosomes
[0109]
[0110] Given an initial identifier, the state equation of the Petri net is a necessary condition for reaching the final identifier from the initial identifier. Therefore, the state equation of the Petri net can be used to verify whether the new chromosome crossed out is a feasible solution.
[0111] As an optional embodiment of the present invention, optionally, the ETCTFPN model is a seven-tuple, and its expression is:
[0112] ETCTFPN=<P;T;F;τ;C;W;M0>
[0113] Among them, ETCTFPN represents the task process model, P represents place, T represents transition, F represents directed arc, τ represents time function, C represents color token, W represents weight function on directed arc set, and M0 represents the initial identification mapped on place set.
[0114] It should be noted that, based on the defined general task service process model, this embodiment defines an extended time color task process Petri net (ETCTFPN model) in combination with the advantages of Petri net. As shown in the above formula, the ETCTFPN model is a seven-tuple, P = {P1, P2, ..., P m}∪{P R} is a finite set of places, where {P1,P2,...,P m} indicates the states that the elderly person switches to in sequence with the help of the robot. When there is a token in the library, the elderly person is in this state. R} represents the shared robot resource library of the elderly care service agency. When the library contains a token, the robot is idle and can respond to new tasks; T = {T1, T2, ..., T n} is a finite set of transitions, representing the transitions between system states; is a finite set of directed arcs, connecting places and transitions; τ is a concept in the time Petri net, which is a time function defined on the transition set T. A transition can only be triggered after a time of τ, which represents the time it takes for the robot to help the elderly complete the state switch; C = {C1, C2, ..., C k} is a concept in the color Petri net, which is a finite set of color tokens and is used to distinguish the robots in the multi-robot system of the elderly care service agency; W is the weight function mapped on the directed arc set, which controls the occurrence rules of transitions and the movement of color tokens in the library; M0 is the initial identifier mapped on the library place set, which represents the initial state of the system.
[0115] Now, we take a service task of an elderly care service institution as an example to establish the ETCTFPN model corresponding to the task. This model will be used as a task template in the task flow model library and will be called when the DPC coordinates the robot to serve the elderly. Assume that there is a task in which multiple heterogeneous service robots transport the elderly to the toilet and return to their beds to rest. There are two types of robots in the elderly care service institution: walking support robots (SR) and intelligent wheelchair robots (CR). These two robots can be used to help teachers with leisure activities such as eating, going to the toilet, and taking a walk. The established ETCTFPN model is as follows: Figure 4 As shown, this model will be used as an example to illustrate the following.
[0116] The internal library of the Petri net service model represents i n represents the current state of the elderly, where the number i is used to distinguish different elderly people, indicating which elderly person the task serves; n is a natural number used to record the switching of the elderly status during the task. In this model, there are 24 places n = 24. Shared resource places SR and CR represent the two types of robot resources required by the elderly care service agency task. Transition Ti m represents the actions taken by the multi-robot system to help the elderly, realizing the switching of the elderly’s state. This task model contains a total of 22 transitions m=22.
[0117] Where P i 1 represents the initial state of the elderly when they make a request. Since this service task requires the collaboration of two types of robots, i 2 to place P i 5. The two types of robots responded to the elderly's requests in parallel and i 8. The two robots completed the collaborative work before, realizing the subtask of moving the elderly from the bed to the wheelchair. After that, CR carried the elderly to the destination bathroom and took the wheelchair from the library P. i 9 to place P i 13 mainly completes the task of transferring the elderly from the wheelchair to the toilet. After the elderly have finished using the toilet, the other half of the network completes the task of returning the elderly to their room.
[0118] Table 7 Meaning of the ETCTFPN model library for transporting the elderly to the toilet and back
[0119]
[0120] The ETCTFPN model library for transporting the elderly to the bathroom and returning to the elderly’s bed is defined in detail in Table 7.
[0121] Table 8 Meaning of the transition of the ETCTFPN model for transporting the elderly to the toilet and back
[0122]
[0123]
[0124] The detailed definition of the transitions in the ETCTFPN model is shown in Table 8. Each transition in the model is completed by the system and the robot, and each transition is attached with its own time function so that DPC can predict the time and state of the robot's task execution.
[0125] Figure 5 Another service task of elderly care service institutions is shown, where an intelligent walking robot (SR) helps the elderly to walk. This task is a simple task that can be completed by only one type of robot. i 1 represents the initial state of the elderly's demands. i 1 When triggered, DPC completes the work of building a network according to the needs of the elderly, and then changes to T i 2 When triggered, SR responds to the elderly person's request and goes to the elderly person's location. Elderly person i is in the library P i3 and then received the SR assisted walking service. The time that the elderly person continued to occupy the robot will be added as a time function to the transition T i 3. As a public resource of elderly care service institutions, SR provides services to the elderly and needs to be able to respond to various types of tasks, such as the two types of service tasks listed above. DPC can predict the time for SR to complete some subtasks of transporting the elderly to the toilet based on the time function attached to each transition, and help other elderly people take a walk during the SR's free time. After completing the walking task, the robot will join the elderly in returning to the room after using the toilet. This improves the efficiency of robot use and reduces the waiting time for the elderly.
[0126] As an optional embodiment of the present invention, optionally, establishing the ETCTFPN model in step S1 includes:
[0127] S101. Build a task process model library based on the daily activity needs of all elderly people in the elderly care service institution;
[0128] S102, constructing a robot function module library according to robot tasks of the elderly care service agency;
[0129] S103, constructing a robot resource library based on the resources of the elderly care service agency;
[0130] S104. Based on the needs of the elderly, DPC uses the task process model library, robot function module library and robot resource library to build the ETCTFPN model.
[0131] It should be noted that the construction of the task process model library involves formulating corresponding task process models according to the daily activity needs of the elderly in the elderly care service institutions, and storing these models in the task process model library. As the basic framework for robots to serve the elderly, this model library not only includes all the services that the robot team can currently provide, but also its internal task process model also reflects the workflow of the robot team to serve the elderly, and guides how different types of robots can collaborate to complete complex tasks. In addition, the model library has good scalability. Once a new type of elderly demand appears, it only needs to build a task process model for the corresponding type of task.
[0132] To build a robot function module library, the robot needs to provide its functions to establish a function module library according to the task requirements of the elderly care service agency. These functions should meet the daily use needs of the elderly in the elderly care service agency and serve the elderly as the primary goal. Therefore, the module library should contain two major types of modules: one is the response module in which the robot responds to the needs of the elderly and goes to their location, and the reply module in which the robot returns to a fixed location and waits for orders after completing the task. These modules are common modules shared by all robots. The other type is the various action modules that different types of robots can perform according to their own capabilities and the needs of the elderly. These two types of modules will serve as the underlying logic for robots to serve the elderly and support robots to complete service tasks.
[0133] Building a robot resource library includes integrating all available robot resources in the elderly care service agency environment and reflecting the current usage and idle status of each robot.
[0134] At time T0, several elderly people put forward their needs. The needs are received by DPC, and the corresponding task process model is extracted from the task process model library. Subsequently, DPC selects the required modules from the robot function module library and embeds them into the task process service model to determine the specific location where the robot provides services. In this way, all task process networks are endowed with robot functions, and the network can be delivered to the robot for execution, thus completing the construction of the global service model (ETCTFPN). DPC continuously exchanges information with various heterogeneous robots. From a global perspective, it comprehensively considers various factors such as the personal status of the elderly, the location information of the robot, and the task execution status, and uses genetic algorithms to calculate the best task allocation plan. According to the calculated allocation plan, DPC integrates different heterogeneous service robots into the global service model. As the network runs, the robot begins to perform the established service tasks.
[0135] It should also be noted that in order to complete the coordination of multiple robots serving the elderly in the scenario of elderly care service institutions, it is necessary to first establish a task flow model for robots serving the elderly. Although the tasks of elderly care service institutions are complex and diverse, each complex task can be composed of simple actions, and most of the service types every day are relatively fixed, so a limited task flow model can be established for the limited service task types of elderly care service institutions.
[0136] The expression of the task process model is:
[0137] TFM=<TaskName;ShareRobotSet;SubTaskSet;ElderrlyStatus>
[0138] Among them: TFM is the task flow model; TaskName is the name of the service task of the elderly care service agency, which is used to distinguish the service tasks of each elderly care service agency; ShareRobotSet is the set of shared robots required by the task flow model, which is used to determine the type and quantity of shared robot resources consumed by the service task of the elderly care service agency, so that DPC can extract the required resources from the shared resource library; SubTaskSet is the set of subtasks required to complete the service task of the elderly care service agency, which is used to determine the functions that each robot should provide when meeting the service needs of the elderly, so that DPC can guide the robot how to complete its work; ElderlyStatus is the state set that the elderly switch with the help of the robot in the service task of the elderly care service agency, so that DPC can record the changes in the elderly status and adjust the robot service plan according to the real-time elderly care service agency environment at any time to improve the satisfaction of the service recipients. Since elderly care service agencies have various types of service robots to provide various services for the elderly, in order to fully utilize the capabilities of various heterogeneous service robots and improve the details of each task in the ETCTFPN model of the multi-robot ETCTFPN model of the elderly care service agency, the robot needs to establish the robot function module in advance according to its own functions and integrate it into the robot function module library, and when in use, it will be handed over to DPC for refinement using genetic algorithms.
[0139] The expression of the robot function module library is:
[0140] RFM=<ModuleName;ModuleFiunction;RobotStatus>
[0141] Among them, RFM represents the robot function module library; ModuleName is the name of the module, which is used to distinguish different module categories; ModuleFiunction is the function that the robot function module can achieve; RobotStatus is a collection of robot status, which is used to record the changes in the robot's status when completing the function of the module, so as to facilitate tracking and predicting the time required for the robot to complete the task. Robot resource libraries all share resource libraries, and the Petri net models of service tasks of various elderly care service agencies use the same resource library. Service robots of the same type are included in the same resource library, but due to the different locations of each robot, the response time to the same task is also different, so this situation needs to be differentiated and modeled. The following is a general definition of each shared robot resource in the elderly care service agency environment.
[0142] The expression of the robot resource library is:
[0143] SRR=<RobotType;RobotNumber;BotUsageStatus>
[0144] Among them, SRR represents the robot resource library; RobotType is the type of the robot, which is used to distinguish heterogeneous service robots with different functions; RobotNumber is the number of the robot in the same type, which is used to distinguish robots of the same type; BotUsageStatus represents the use and idle status of the robot. The Petri net color set is used to represent each robot, and when each color token is in the library, it can represent the status of the robot.
[0145] Based on the ETCTFPN model of heterogeneous service robots serving the elderly, DPC can first determine which type of heterogeneous service robots should be used for this type of service task. Secondly, it can distinguish all robots in the elderly care service agency environment through colored tokens, and combine the time function defined on each transition to predict the time for the robot to complete the current subtask and the time required for each robot to reach the elderly's location, so that DPC can assign tasks to robots. The heterogeneous service robots are "liberated" from the traditional robot service team, and the robots that have completed the task are sent to another location where the robot needs to provide services, which improves the efficiency of robot use. If the triggering of the transition in the Petri net is non-instantaneous, the transition in the Petri net can be replaced by another network. The service models defined above are all "rough task processes" for robots to serve the elderly, which need to be supplemented by robot function modules to improve the details of the robot's service tasks for the elderly. The robot function modules will be modeled below to facilitate Petri net refinement.
[0146] The Petri net modeling of the task flow library and the internal model of the robot function module library in the preparation stage of the multi-robot collaborative system in the context of the elderly care service agency of this embodiment has been completed above. The task flow models and robot function modules established in advance will be saved as formed modules in each model library, and these modules will be called by the DPC according to the real-time needs of the elderly. The following will explain the refined network after the delay changes in the ETCTFPN model of the service tasks of each elderly care service agency are replaced by the corresponding robot function modules. Fig. 9 As shown, Fig. 9 for Figure 5 SR helps the elderly take a walk. The refined network model of ETCTFPN replaces the delay transition - robot response transition in ETCTFPN with the robot response module, enriching the service details of SR, making it easier for SR to complete service tasks according to strict work processes, and ensuring that robots in elderly care institutions can serve the elderly in their own way without interfering with each other.
[0147] Fig.10 for Figure 4The refined network of the ETCTFPN model in which the robot transports the elderly i to the bathroom and back. Similarly, all robot responses and service actions in this model are replaced by modules in the functional module library. The two parallel response modules ensure that SR and CR can smoothly reach the elderly and collaborate to complete the service task. In order to clearly display the interruptible transitions in the refined network model, double rectangles are used instead of display. After DPC extracts the required ETCTFPN model and robot functional modules according to the real-time needs of the elderly, DPC refines the model to obtain the refined network corresponding to each demand. At this moment, all refined networks are connected through the shared robot resource library, forming a global refined network.
[0148] After that, DPC will allocate robot resources according to certain rules and assign corresponding robot tokens to the global refining network. The weights of each directed arc on the network can be determined based on the robot allocation plan.
[0149] As an optional embodiment of the present invention, optionally, extracting the conflicting transition set in step S1 includes:
[0150] S105, based on the needs of the elderly, using the ETCTFPN model to determine the resource repository to be used and the flow relationship between the resource repository and each of the transitions, obtaining a transition component set connected to the resource repository, and determining all the transition component sets that will be triggered according to the initial identifier and the final identifier;
[0151] S106: Obtain the intersection of the transition component set connected to the resource library and all possible triggered transition component sets determined according to the identifier to obtain a conflicting transition set.
[0152] As an optional embodiment of the present invention, optionally, the algorithm further includes:
[0153] The robot obtains a new task and determines whether the priority of the new task is lower than the priority of the current task;
[0154] If yes, the robot completes the new task with a higher priority and records the current task completion status;
[0155] If not, the robot continues to complete the current task until the current task is completed, and then the robot re-plans the task sequence according to the priority of the new task;
[0156] When the robot is executing a high priority task, if the priority of the original task rises and is higher than the priority of the current task, the robot interrupts the current task and returns to execute the original task.
[0157] It should be noted that this embodiment defines the robot's functional modules in a universal manner, and combines the advantages of time-color Petri nets to modularly model the robot's functions. As a complex and dynamic environment, the timing of the needs raised by each elderly person in the elderly care service agency is highly random. After the traditional PN establishes a service model in the DPC, the robot must perform tasks according to the pre-assigned plan. It cannot enter the resource library to participate in the allocation of new tasks until the robot completes the currently assigned task. Traditional Petri nets lack the ability to respond to emergencies. In order to enhance the simulation capabilities of Petri nets for the dynamically changing environment of elderly care service agencies, a new type of Petri net transition, namely interrupt transition, will be defined below.
[0158] The expression for defining a Petri net with interruptible transitions (IPN) is:
[0159] IPN=<P;T;O;τ;C;f;M0>
[0160] Where: P = {P i 1,P i 2,...,P i n} is a finite set of places; T = {T i 1,T i 2,...,T i m} is a finite set of transitions; I:P×T→N is an input function that inputs the directed arc weights of transitions T into place P. i n,t i m)=0, then there is no slave location p i n points to transition t i m is a directed arc; if I(p i n,t i m)>0, the directed arc exists and the transition trigger needs to consume I(p i n,t i m) tokens; similarly, O:T×P→N is an output function that defines the weights of directed arcs output from transitions. i m,p i n)=0, there is no transition from t i m points to place p i n+1 directed arc; if O(t i m,p i n)>0, then there exists a weight equal to O(t i m,p in+1) is a directed arc from transition to place; τ is a time function defined on the transition set T, and a transition can be triggered only after the time τ has elapsed; C = {C1, C2, ..., C q} is a color token set used to distinguish the various service resources in the elderly care service institution; f is an additional i Function on m; the function expression of f is:
[0161]
[0162] like Figure 6 As shown, when M(p i When n)=1, the transition t i n has the right to occur, that is, the library p i n contains tokens and the number of tokens is greater than or equal to the weight I(p i n,t i m). The transition input value k defined in this embodiment is a signal sent by the DPC to interrupt the triggering of the transition. When k=1, there is a directed arc O(t i m,P i n+1) breaks, the robot returns to the resource place PR, if there is no interruption requirement, k remains at 0 and no value is required; M0 is the initial identifier mapped on the place set, indicating the initial state of the system.
[0163] like Figure 6 and 7 As shown in the figure, the k value received by the interruption transition is the command issued by the DPC to the robot to decide whether to interrupt the task according to the current situation of the elderly care service agency. When the DPC establishes a global model according to the needs of the elderly, its initial value is k = 0, and the robot performs the task normally. When the task needs to be interrupted, the DPC issues a k = 1 command to release the robot token, so that the robot returns to idle to respond to new tasks.
[0164] Based on the interruptible transitions defined above, this embodiment establishes a Petri net module library for the functions of the robot. The module library is divided into interruptible and non-interruptible service action classes according to the degree of interaction between the robot and the elderly. The interruptible module means that when the robot is in the response stage of responding to the elderly's request to go to the elderly's location or in the return stage of returning to the specified area after completing the task, the robot has no contact with the elderly. If an emergency occurs, the robot can directly interrupt the current task and respond to the sudden high-priority task. The robot response module is as follows: Figure 7 a. The meaning of the library and transitions within the robot response module are shown in Table 8.
[0165] Table 8 Response module library and transition definitions
[0166]
[0167]
[0168] Robot regression module such as Figure 7 b. The library locations and transition meanings of the regression module are shown in Table 9.
[0169] Table 9 Regression module library and transition definitions
[0170]
[0171] When the robot reaches the elderly's location, it starts to perform service actions and interacts with the elderly's body. To ensure the safety of the elderly, the robot can only perform other service tasks after completing the current service task. This type of task that cannot be stopped midway and must be completed is defined as a service action module in this embodiment. This embodiment will take the intelligent walking robot (SR) and the intelligent wheelchair robot (CR) as examples to define the robot function modules according to their functions. Among them, SR has the functions of assisting the elderly to walk, help the elderly to stand up and sit down (stand-sit interaction). According to these functions, Petri net modules such as walking, pulling up, and putting down are established, as shown respectively. Figure 8 a, 8b, and 8c. CR is mainly used to transport the elderly to their destination, so the transport Petri net module is established according to this function, as shown in Figure 8 As shown in d.
[0172] Perform simulation analysis on this embodiment;
[0173] This embodiment will Fig.13 The virtual floor plan of the elderly care service agency is used as an example for subsequent simulation analysis. The elderly care service agency includes a bathroom, a restaurant, and rooms for four elderly people, A, B, C, and D. For the convenience of calculation, it is assumed that the distance between the doors of each adjacent room is 3m, and the distance from the corridor to the elderly bed is also 3m. Now assume that the elderly care service agency contains a walking robot SR (triangle in the figure) and an intelligent wheelchair robot CR (rectangle in the figure). These two types of robots can respectively realize the functions of pulling up, putting down, and carrying the elderly to their destination, and the maximum travel speed of the robots is set to 1.2m / s.
[0174] Assume that there are four types of tasks in the current elderly care service agency: going to the toilet, eating in the restaurant, taking a walk, and sitting down. List the detailed task information in Table 10.
[0175] Table 10 Mission information of elderly care service institutions
[0176]
[0177] Assume that there are two robots in the elderly care service institution at this time, one SR and one CR. The initial positions of the robots are as follows: Fig.13 At time T0, three tasks of the same type appeared in the elderly care service agency scene at the same time. The three elderly people ABC needed to take a walk. The ETCTFPN model established by DPC based on the needs of the elderly was as follows: Fig.14 As shown in the figure, P A 1. P B 1. P C 1 The place and token represent the initial state of the three elderly people. Since the needs of the three elderly people are the same, they all use the same ETCTFPN model. The following will describe the association matrix of the network based on the connection between a single elderly model and the shared resource place SR. The association matrix of the three elderly people only needs to be expanded into three parts.
[0178] Table 11 Personal information of elderly people in elderly care service institutions
[0179]
[0180] The personal information of the elderly in the elderly care service institution, such as the degree of impatience, the time to stand up and sit down comfortably with the help of SR, is shown in Table 11. In order to facilitate the analysis of the different waiting times of each elderly person caused by the robot task allocation plan, the anxiety level and comfortable pull-up and put-down time of each elderly person are temporarily set to be the same. At this time, there is only one robot SR1 with a pull-up function and one robot CR1 with a carrying function in the scene, so the internal token of the color set is {MAN, SR1, CR1}. At present, robot SR1 is in front of the door of elderly A, so the allocation plan found according to the elderly satisfaction formula only needs to confirm the order in which the robot serves the elderly. Obviously, the result is that SR1 serves elderly A, B, and C in order, and the overall waiting time of the elderly is the shortest. According to the ETCTFPN model, DPC can predict the waiting time and satisfaction of each elderly person:
[0181] A wait 2.5s, B wait 15.2s, C wait is 27.9s; SatfA is 0.31, SatfB is 3.93, and SatfC is 16.81. At this time, the correlation matrix T A As shown in Table 12:
[0182] Table 12A Correlation matrix of the ETCTFPN model for the elderly
[0183]
[0184] It can be seen that since Mr. C is at the end of the queue of elderly people served by robots, he can only receive services after SR1 meets the needs of other elderly people. This causes Mr. C's waiting time to be too long and his satisfaction to be too low. Obviously, the current number of robots cannot meet the needs of four elderly people. The number of SRs needs to be increased to improve the crowding of the elderly using robots, thereby reducing the time the elderly wait for robots and increasing their satisfaction. Thanks to the modular modeling of the coordination framework of this embodiment and the phased processing of elderly care service agency tasks, DPC can arbitrarily increase or decrease the number of robots that have completed the modeling of robot functional modules in the modeling stage. The functional module of SR has been placed in the module library, and SR1 has also been placed in the robot resource library. DPC only needs to add a new color token of SR to the robot resource library to complete the robot resource expansion, that is, the color set contains 4 tokens, namely {MAN, SR1, SR2, CR1}. At this time, the corresponding ETCTFPN model is as follows: Fig.15 As shown, at this time, the resource library SR contains two color tokens, SR1 and SR2 are distinguished by the red and yellow tokens in the figure.
[0185] Obviously, when SR2 is located near elderly C, the DPC task allocation plan is: SR1 serves elderly A and B, and the newly added SR2 serves elderly C, thereby greatly reducing the waiting time of elderly C. At this time, the association matrix AT of elderly C is as shown in Table 13. It can be found that the tokens in the resource library SR change with the transition trigger. When the transition T C 2 triggers, SR2's corresponding token is consumed, and C 3 When completed, SR2 returns to the idle state. It can be seen from this that the coordination framework of this embodiment has scalability, and the ETCTFPN model of the three elderly people ABC walking can be easily derived. The robot resources consumed by each elderly person's respective association matrix are determined by the scheduling scheme calculated by DPC.
[0186] Table 13C Correlation matrix of the ETCTFPN model for the elderly
[0187]
[0188] Based on the model, DPC predicts the waiting time for each elderly person to be: A wait =2.5s, B wait =15.2s, C wait =2.5s. The satisfaction of the elderly is: SatfA=-0.31, SatfB=-3.93, SatfC=-0.31.
[0189] The above has verified the scalability of DPC. The following will analyze the rationality of the robot allocation plan given by DPC. When the elderly care service agency has sufficient robot resources, the needs of the elderly can be met by robots in a timely manner. Now assume scenario a: The elderly care service agency includes two SRs and two CRs, and the positions of the robots are as follows: Fig.16 shown.
[0190] At T0, Elder C asked for a meal. SR2 and CR2 responded to the elderly's needs and completed the task of transporting the elderly to the restaurant. At T1, SR2 was assisting the elderly to move to the restaurant seat. At the same time, three elderly people's needs appeared. Elders A and B needed to stand up and move around, and Elder D needed to go to the bathroom. DPC expanded the ETCTFPN model of Elder C built at T0 based on the needs of the three elderly people at the same time. The model at T1 is as follows: Fig.17 As shown. It can be seen that the tokens represented by SR2 and CR2 are located in the library PC 10 , some tasks still need to be completed before returning to the idle state. Based on the time function defined on the transition, DPC can estimate that it will take 8.7s for SR2 to return to the idle state, and 4.3s for CR2 to return to the idle state. SR1 is waiting at the door of Elder A, and CR1 is waiting at the door of Elder B. At this time, multiple tasks appear, resulting in conflicts in the use of robot resources. DPC needs to find a robot allocation solution that can resolve the conflicts based on the satisfaction of the elderly.
[0191] like Fig.17 As shown in the figure, according to the ETCTFPN model of scenario a and the initial identification of the system at time T1, DPC can simulate the Petri net running the model to obtain the reachable identification graph of the network. By traversing the reachable identification graph, DPC can search for the transition trigger sequence that maximizes the satisfaction of all the elderly in the graph. By observing the ETCTFPN model, it can be found that the response modules of each elderly person in the network are connected to the robot resource library required by each, that is, there is a resource competition relationship between the triggering of the response modules of each elderly person. Each response module corresponds to an execution robot, which is the robot allocation plan. The order in which these response modules obtain resources determines the order in which each elderly person receives robot service, which is the transition trigger sequence. Therefore, it can be determined that each response module is a key transition that affects the robot allocation plan and system process. The ETCTFPN model at time T1 can extract {T A 2,T B 2,T D 2,T D 3,T D 5,T D 8,T D10} Seven key transitions are the seven response modules to be triggered. Determining the robots and transition triggering sequences required for these key transitions can yield the optimal solution for this scenario. The optimal solution found by DPC is shown in Table 14:
[0192] Table 14 Solution of ETCTFPN model at time T1
[0193]
[0194] According to the above calculation formula for overall elderly satisfaction The overall satisfaction of the elderly in this solution is 0.4433, and the satisfaction and waiting time of each elderly are shown in Table 15. It can be seen that the coordination solution provided by DPC is to let CR1, which is idle at this time, go to the room of elderly D and wait for SR2 to complete the seating requirement of elderly C. Then SR2 helps elderly D to transfer to CR1, and then CR1 is responsible for transporting the elderly to the bathroom.
[0195] Table 15 Elderly satisfaction and waiting time of the solution
[0196]
[0197] Since SR1 is located in front of the door of Elder A's room and is closer to Elder A, SR1 completes A's needs first and then helps Elder B with his standing up activities. After completing the needs of the two elderly people, SR1 is located in Elder B's room. Since it is closer to the bathroom, SR1 will go to the bathroom to help Elder D, who has arrived at the bathroom at this time, complete the transfer from the smart wheelchair robot to the toilet. Although Elder D's task priority for going to the bathroom is 4, if the existing idle robots are required to give priority to meeting Elder D's needs, Elders A and B will have to wait for Elder D's needs to be met before they can receive SR's services. The waiting time for the two elderly people is too long, and the coordination plan of DPC balances the time that each elderly person waits for the robot. When SR2 completes Elder C's task and waits for a new task request in front of the restaurant door, SR1 and SR2 are both idle at this time. Since SR2 is far from the bathroom, DPC selects SR1 to perform Elder D's task.
[0198] The allocation and coordination of multi-robot systems in elderly care service agencies can be simply viewed as assigning multiple task points to multiple robots to visit, which is similar to the traveling salesman problem. Common solutions to the traveling salesman problem include the nearest neighbor strategy, the shortest link strategy, etc. In combination with the task requirements of elderly care service agencies, the following will compare the DPC robot allocation strategy based on the satisfaction of the elderly with the task priority strategy (Taskpriorty) and the distance priority strategy (Distancepriorty) solutions. Among them, the task priority strategy means that high-priority tasks are assigned to robots first, and the distance priority strategy means that robots that are close to the task point are given priority to take charge of the task. Comparison of the satisfaction of the elderly under each strategy Fig.18 As shown in a, the waiting time of the elderly is Fig.18 As shown in b.
[0199] It can be found that in this scenario, the DPC allocation scheme has the same effect as the distance priority strategy, which is better than the task priority allocation strategy. The task priority strategy selects idle robots SR1 and CR1 to carry elderly D to the bathroom first, and then the needs of elderly A and B are handed over to SR2 to complete the task of elderly C. Although the waiting time of elderly D is shortened compared with the other two strategies, the satisfaction of elderly A and B is greatly reduced, and the satisfaction and waiting time of all elderly people do not meet the requirements. The DPC solution greatly reduces the waiting time of elderly A and B while ensuring that the waiting time of elderly D's high-priority task increases slightly. At this time, the satisfaction of all elderly people reaches the maximum.
[0200] Now keep the robot position in scene a unchanged. At time r0, elderly B asks for a meal, and SR2 and CR2 transport the elderly to the restaurant for a meal. At time r1, elderly A asks for a toilet, and elderly C and D ask for a stand-up activity. DPC will establish the ETCTFPN service model based on the existing elderly needs, and find the best transition trigger sequence according to the elderly satisfaction, as shown in Table 16.
[0201] Table 16T1 Solutions to change the needs of the elderly at any time
[0202]
[0203] The overall satisfaction of the elderly corresponding to this plan is 0.0502, and the satisfaction and waiting time of each elderly are shown in Table 17.
[0204] Table 17 Elderly satisfaction and waiting time of the solution
[0205]
[0206] Compared with the other two allocation strategies, the scheduling scheme given by DPC has the following results on the satisfaction of all the elderly: Fig.19 shown.
[0207] It can be seen that the solution provided by DPC in this situation is to let Elderly D wait for SR2 to complete the task, and let the idle robot SR1 in front of Elderly A go to Elderly B's room first to meet Elderly B's needs, and then SR1 and CR1 will help Elderly A go to the bathroom. Elderly C received the service first, so his waiting time was shorter and his satisfaction was higher. Elderly A and D were ranked behind other elderly people in the task, so their waiting time was longer, so their satisfaction was lower.
[0208] DPC is looking for an allocation plan that can maximize the satisfaction of all the elderly, while the plans given by the other two strategies are obviously too low in overall satisfaction, and the waiting time for a single elderly is too long. The task priority strategy chooses to execute the current highest priority task first, sending SR1 and CR1 to Elder A's room. Elder A's need to go to the toilet is a complex task that takes up a lot of robot time, and other elderly people wait too long for Elder A's service to be completed. Elders C and D are served by SR2, and Elder C has the longest waiting time. The distance priority strategy is obviously in the same dilemma. Robots such as SR1 are closest to Elder A, but far away from Elder C, which causes Elder C to wait too long. According to the above comparison, DPC's allocation plan meets the service needs of the elderly in the scenario of elderly care service institutions. The waiting time of each elderly is relatively balanced, and the overall elderly satisfaction is the greatest, which is the optimal solution in the current scenario.
[0209] Elderly care service institutions are a dynamic environment where the elderly may request services at any time. The elderly who request services first will be served by the robot first. If a new urgent need arises while the robot is on its way to the target location, the DPC will decide whether to interrupt the existing allocation plan and redistribute the task based on the current robot's location, task execution status, and the urgency of the new task, ultimately improving the overall satisfaction of the elderly. Fig. 20 As shown in the figure. At time T0, two tasks appeared at the same time, namely, elderly C and elderly D stood up. One second later, at time T1, a new task appeared, namely, elderly A went to the toilet. At this time, SR2 was in front of elderly B's door, and SR1 was in front of elderly A's door.
[0210] At time T0, the two elderly people C and D put forward their needs. The solution allocated by DPC is that SR1 serves elderly C and SR2 serves elderly D. At this time, the refined network of the ETCTFPN model is as follows: Fig.21 Currently, the old man and the robot tokens are in the library P C 2-1, P D 2-1, two service robots are heading to the target location according to the arrangement, and the response module of the robot is in the triggering stage.
[0211] At T1, 1 second later, due to the emergence of new needs of the elderly, DPC needs to expand the current ETCTFPN model. DPC will predict the time for each elderly to receive services based on the model at T1, and calculate the satisfaction of the elderly who continue to perform the existing tasks and complete the new tasks. The solution is: SR1 and SR2 continue to perform the existing tasks, and then SR 1、 CR1 helps old man A go to the bathroom. At the same time, DPC should assume that the robot currently in the response phase is in an idle state, and let the idle robot re-participate in the allocation of subtasks that have not been triggered globally. The ETCTFPN model at time T1 is as follows: Fig. 22 DPC calculates the satisfaction of the elderly with the allocation plan and compares it with the previous plan. If the satisfaction of all elderly people increases, it means that it is necessary to adjust the previous robot allocation plan and interrupt some robot tasks in the response stage.
[0212] DPC according to Fig. 22 The calculated transition trigger sequence is shown in Table 18: The service robots of the two elderly people C and D were interrupted from continuing to perform the task, and the released SR1 was sent to help the elderly A go to the bathroom. SR2, which was originally planned to go to the room of elderly D, was sent to the room of elderly C to help complete the pulling task, and then went to the room of elderly D.
[0213] Table 18 Solution of ETCTFPN at time T1
[0214]
[0215] The overall satisfaction of the elderly corresponding to this solution is 0.6896. The satisfaction and waiting time of each elderly are shown in Table 19. From left to right, this is the order in which the robot serves the elderly:
[0216] Table 19 Elderly satisfaction and waiting time of the solution
[0217]
[0218] Compared with the satisfaction of all the elderly who did not interrupt the task execution, which is 0.1552, the scheduling plan and the waiting time and satisfaction of each elderly are shown in Table 20. From left to right, the order in which the robot serves the elderly is:
[0219] Table 20 Elderly satisfaction and waiting time without interruption
[0220]
[0221] By comparing the two solutions, it can be found that continuing to execute the pull-up task will result in the high-priority elderly A not being served in a timely manner, and the elderly's satisfaction will drop a lot. However, the relatively low-priority elderly C and D have a longer waiting time because they are far away from the robot. The interruption plan allows SR2, which is on the route to the elderly D's room, to go to the elderly C's room nearby, reducing the waiting time of elderly C, and the waiting time of elderly A is also greatly reduced. The above simulation results show that DPC can generate the optimal multi-robot allocation plan based on the current environmental situation, and can respond to emergencies, modify the generated multi-robot allocation plan to improve the satisfaction of all elderly people.
[0222] Assume that three tasks occur at the same time at time T0, including two complex tasks: Elderly A and Elderly B go to the toilet, and Elderly C stands up. The ETCTFPN model established by DPC is as follows: Fig.23 As shown. The conflict transition set extracted by DPC is: {T A 2,T A 3,T A 5,T A 8,T A 10,T B 2,T B 3,T B 5,T B 8,T B 10,T C 2} There are 11 response transitions to be triggered.
[0223] In order to determine whether the scheduling scheme searched by the improved genetic algorithm in this embodiment is the global optimal solution, the following will change the position of the robot to compare the rationality of the scheduling scheme corresponding to the change in the satisfaction of the elderly. Assume that the positions of the robots in scene c1 are as follows: Fig.24 As shown in a, the robot position in scene c2 is Fig.24 As shown in b.
[0224] The improved genetic algorithm is used below to optimize and solve the task execution plan for the elderly in this scenario. The transitions in the conflict transition set are combined with the existing robot resources to form the genome defined in this embodiment. Chromosomes are generated based on the genome and the initial population is randomly generated. The satisfaction of all elderly people is used as the chromosome fitness value, and then the linear sorting selection is used to assign the selection probability from large to small to the chromosomes whose fitness values are sorted from high to low. This avoids the situation where the probability of the selection of the better chromosomes is close to 1 due to the large difference in fitness values of each chromosome, which makes the population quickly converge to the same chromosome, the chromosome structure lacks diversity, and quickly falls into the local optimum.
[0225] In order to avoid linear sorting selection when the population size is large, the selection probability assigned to each chromosome is too small, resulting in the optimal chromosome in the population being missed. This embodiment combines linear sorting selection with elite selection, retains the top 10 individuals in the population, and allows the population to continue to approach the optimal solution. To control the length of the calculation time, the population size is temporarily set to 200, the number of iterations is set to 100 generations, the crossover probability is 0.9, and the mutation probability is 0.06.
[0226] The convergence process of genetic algorithms in different scenarios is as follows Fig.25 As shown, Fig.25 a shows that when the robot is at position c1 in the scene, it takes 28 iterations to complete convergence, and the iteration time is 12.05s. Fig.25 b shows the convergence process of the genetic algorithm in scenario c2. The convergence is completed after 84 iterations, and the iteration time is 39.03s.
[0227] Table 21 Genetic algorithm convergence chromosomes and their meanings
[0228]
[0229] By observing Table 21 and Table 22, it can be found that the two genetic algorithms converge to the same solution. Since the needs of elderly A and B are complex tasks, the needs of elderly C are simple tasks. In scenario c1, since SR1 and CR1 are close to elderly A, they choose to execute the task of elderly A first, and the waiting time of elderly A is shorter. Although SR2 is closer to elderly B, if elderly B is helped first, elderly C will wait too long. If SR2 executes the task of elderly C first, the waiting time of elderly B will be moderately increased, the satisfaction of elderly B will not change much, and the satisfaction of elderly C will increase significantly. At this time, the satisfaction of all elderly people is 0.525.
[0230] When the robot is in the position as shown in scenario c2, DPC gives the same solution as scenario c1 in the face of a similar situation. Since the robot is closer to the target position, the satisfaction of all the elderly increases to 0.845, and the waiting time of elderly people B and C is reduced. The genetic algorithm converges to the global optimal solution.
[0231] Table 22 Comparison of waiting time for the elderly in different scenario scheduling schemes
[0232]
[0233] Assume scenario d is Fig.26As shown in the figure, at time T0, Elder D asked to go to the toilet, and DPC assigned SR1 and CR1 to go to Elder D's room to provide services. Then SR2, located in front of Elder A's room, went to the toilet to help Elder D transfer. At time T1, three demands appeared at the same time, namely, Elder A and Elder C needed to stand up and move around, and Elder B went to the toilet. At this time, SR1 had completed the work of helping Elder D sit down CR1 and was heading to the toilet.
[0234] The ETCTFPN model at time T1 is as follows Fig. 27 As shown, A , B , The tokens of the three old men C are in the initial place, and the tokens of old men D and CR1 are in place P D 8. Elder D is going to the bathroom. DPC extraction Fig. 27 The conflict transition set is: {T A 2,T B 2,T B 3,T B 5,T B 8,T B 10,T C 2,T D 8,T D 10} There are 9 response transitions to be triggered. According to the allocation plan at time T0, SR2 completes the subsequent transition of the needs of elderly D {T D 8,T D 10} is triggered.
[0235] When a new task appears, DPC reallocates robot resources and re-determines the solution based on the genetic algorithm solution. Fig.25 The weights of each directed arc in the model, the transition trigger sequence X and the association matrix A T . Fig.25 The convergence process of the model's overall elderly satisfaction and iteration times is as follows: Fig.28 shown.
[0236] The final chromosomes and their meanings calculated by the improved genetic algorithm are shown in Table 23:
[0237] Table 23 Genetic algorithm convergence chromosomes and their meanings
[0238]
[0239]
[0240] The overall satisfaction of the elderly who implemented the plan was 0.3418, and the satisfaction and waiting time of each elderly are shown in Table 24:
[0241] Table 24 Elderly satisfaction and waiting time of the solution
[0242]
[0243] It can be found that the improved algorithm found the solution with the highest satisfaction in the current scenario after 48 iterations, and then the population gradually converged. DPC modified the original solution and sent SR2 to the nearest location of Elder A to perform the pull-up task. After completing the task, SR2 and CR2 helped Elder B go to the bathroom, and SR1 went directly to Elder C's room to perform the pull-up task. Based on the model, DPC predicted that Elder D would arrive at the bathroom 10.2s after time r1. After completing the task, SR1 went to the bathroom to help Elder D transfer from CR1 to the toilet. Elder D needed to wait in the bathroom for 12.5s. This solution chooses to complete the simple tasks close to the robot's location first, and then perform the complex tasks. This can avoid the elderly who have simple needs waiting too long and reduce the repeated sections of the robot's travel path.
[0244] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. An optimization algorithm for multi-robot task allocation in elderly care service scenarios, characterized in that: The algorithm includes: S1. Use Petri net to build the corresponding ETCTFPN model according to the real-time needs of the elderly and extract the conflict transition set; S2. Based on a genetic algorithm, the conflict transition set and the serial numbers of the heterogeneous service robots are used to form a genome, and an initial population is randomly generated based on the genome; S3, using the satisfaction of all elderly people as a fitness function, calculating the fitness value of each chromosome in the initial population based on the fitness function, and using the fitness value to screen the chromosomes in the initial population through linear sorting selection and elite selection to obtain a first new population; S4, exchanging two genomes in the chromosomes of the first new population for mutation, to obtain a second new population; S5. Using the second new population and the state equation of the Petri net to screen infeasible solutions, and modifying the infeasible solutions to obtain a third population; S6. Repeat steps S3 to S5 to obtain an optimal chromosome, where the optimal chromosome is an optimal solution for multi-robot task allocation.
2. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 1 is characterized in that: The expression of the fitness function is: Among them, Overall satf represents the satisfaction of all elderly people, e represents the natural base number, N represents that there are N elderly people in the service queue at this moment, X represents the needs raised by the elderly, Sdtf H,X,N represents the satisfaction of the elderly H, α0, α1 and α2 are all adjustable parameters, Prior X Indicates the priority of X, impat H Indicates the irritability of the old man H, t wait,H,X,N V represents the waiting time from when the elderly H puts forward the demand X to when he receives the robot service. H,X,N Indicates the transport speed, represents the comfortable carrying speed of the elderly H when receiving the robot carrying service, α H,X, N represents the acceleration coefficient, α min Indicates the minimum value of the acceleration coefficient, α max represents the maximum value of the acceleration coefficient, γ0, γ1 and γ2 represent weights, K represents the demand put forward by the current N elderly people, and Prior represents the priority.
3. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 1 is characterized in that: In step S3, the chromosomes in the initial population are screened by linear sorting selection and elite selection using the fitness value to obtain a first new population, which includes: S301, linearly sorting the chromosomes based on the fitness values of the chromosomes, and arranging the chromosomes in the initial population from low to high according to the fitness values; S302, calculating the selection probability of each chromosome according to the linear sorting result; S303, assigning the chromosomes in the initial population in an ascending order based on all the selected probabilities calculated; S304: Utilize the elite selection to select at least one optimal chromosome in the initial population to obtain a first new population.
4. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 3 is characterized in that: The selection probability expression of each chromosome is calculated in step S302 as: Wherein, P(i) represents the selection probability of chromosome i, B represents the arrangement position of the optimal chromosome, and b - represents the selection probability for solving the optimal chromosome, b + represents the selection probability for solving the worst chromosome, and i represents the i-th chromosome.
5. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 1 is characterized in that: In step S4, the two genomes in the chromosomes of the first new population are exchanged for mutation to obtain a second new population, which includes: S401, obtaining two parent chromosomes, and randomly selecting a genome from one of the parent chromosomes as a reserved segment, and placing the reserved segment in the same position of the daughter chromosome; S402, randomly selecting a genome from another parent chromosome as an insertion fragment, and sequentially placing the insertion fragments at the remaining positions of the daughter chromosome to generate a daughter chromosome, wherein the number of genes in the daughter chromosome is the same as the number of genes in the parent chromosome; S403. Repeat steps S401 to S402 to generate a second population.
6. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 5, characterized in that: In step S5, the second new population is used to screen infeasible solutions using the state equation of the Petri net, and the infeasible solutions are modified to obtain a third population including: S501, using the state equation to screen infeasible solutions of the offspring chromosomes of the second new population; S502, extracting the problematic gene position of the infeasible solution and inserting it into the end of the offspring chromosome; S503, repeating steps S501 to S502 until all the offspring chromosomes become feasible solutions, thereby generating a third population.
7. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 1 is characterized in that: The ETCTFPN model is a seven-tuple, and its expression is: ETCTFPN=<P;T;F;τ;C;W;M0> Among them, ETCTFPN represents the task process model, P represents place, T represents transition, F represents directed arc, τ represents time function, C represents color token, W represents weight function on directed arc set, and M0 represents the initial identification mapped on place set.
8. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 7 is characterized in that: Establishing the ETCTFPN model in step S1 includes: S101. Build a task process model library based on the daily activity needs of all elderly people in the elderly care service institution; S102, constructing a robot function module library according to robot tasks of the elderly care service agency; S103, constructing a robot resource library based on the resources of the elderly care service agency; S104. Based on the needs of the elderly, DPC uses the task process model library, robot function module library and robot resource library to build the ETCTFPN model.
9. The multi-robot task allocation optimization algorithm in the elderly care service scenario as claimed in claim 8, characterized in that: Extracting the conflicting transition set in step S1 includes: S105, based on the needs of the elderly, using the ETCTFPN model to determine the resource repository to be used and the flow relationship between the resource repository and each of the transitions, obtaining a transition component set connected to the resource repository, and determining all the transition component sets that will be triggered according to the initial identifier and the final identifier; S106: Obtain the intersection of the transition component set connected to the resource library and all possible triggered transition component sets determined according to the identifier to obtain a conflicting transition set.
10. The multi-robot task allocation optimization algorithm in the elderly care service scenario according to claim 1, characterized in that: The algorithm also includes: The robot obtains a new task and determines whether the priority of the new task is lower than the priority of the current task; If yes, the robot completes the new task with a higher priority and records the current task completion status; If not, the robot continues to complete the current task until the current task is completed, and then the robot re-plans the task sequence according to the priority of the new task; When the robot is executing a high priority task, if the priority of the original task rises and is higher than the priority of the current task, the robot interrupts the current task and returns to execute the original task.
Citation Information
Cited By
Smart home bed service scheduling method, server, medium and product
CN120494440A