Multi-robot dynamic rescheduling method for task time uncertainty of nursing home
By building a task planning center in the nursing home, using the time-colored Petri net and ARIMA prediction model, combined with the ant colony algorithm, and dynamically adjusting the task allocation plan, the problems of resource waste and inefficiency caused by task time uncertainty are solved, and more efficient resource utilization and service quality are achieved.
Patent Information
- Application Number
- CN202510768680.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-12
AI Technical Summary
The uncertainty of task execution time in nursing homes leads to waste of resources and inefficient services, and the traditional fixed task duration mechanism is difficult to adapt to changes in the physical condition of the elderly.
By building a task planning center, using time-color Petri nets for modular modeling, combining ARIMA forecasting model and ant colony algorithm, task progress is monitored in real time, task allocation plans are adjusted dynamically, and a fast compensation mechanism is used to correct the predicted values, thus optimizing task allocation to maximize satisfaction.
It improves the resource utilization and service quality of the multi-robot system, reduces the number of invalid rescheduling, and improves the adaptability to task time uncertainty and scheduling efficiency.
Smart Images

Figure CN120634153A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent elderly care services, and in particular to a multi-robot dynamic rescheduling method for addressing the time uncertainty of nursing home tasks. By building a task planning center, predicting task execution times in real time, and dynamically adjusting task allocation schemes, this method aims to improve robot resource utilization and service quality, thereby enhancing elderly satisfaction. The method also provides technical support for intelligent nursing home services, promotes the application of multi-robot systems in elderly care institutions, and helps address the challenges of an aging population. Background Art
[0002] my country's aging population is accelerating, leading to a surge in demand for elderly care services. Furthermore, in some regions, the declining birthrate is leading to a loss of nursing staff, and traditional elderly care models are facing challenges such as labor shortages and low service efficiency. Multi-robot systems, due to their collaborative advantages, are becoming an important solution for nursing home services. However, task execution times in nursing homes are significantly affected by the physical condition of the residents, resulting in time deviations. Traditional fixed task duration mechanisms struggle to adapt, leading to wasted resources and inefficient services. Therefore, effectively addressing task time uncertainty and enabling dynamic rescheduling of multi-robot systems is a pressing issue. Summary of the Invention
[0003] This paper addresses the multi-robot multi-task allocation problem in nursing home settings. Due to the uncertainty of task times, actual execution may deviate from the initial allocation plan. This paper proposes a prediction model based on rapid compensation. By modeling and predicting the historical subtask times of elderly residents, a rapid compensation mechanism is used to compensate for subsequent subtask time predictions when time deviations occur, thereby reducing the number of ineffective rescheduling. First, the paper analyzes the task requirements of elderly residents in nursing homes and, using a time-color Petri net, establishes a task step module library, a subtask module library, and a robot resource library to achieve modular modeling. This makes the system scalable as new service tasks and robots are added. Second, to address the uncertain task times in nursing home settings, a rescheduling mechanism for multi-robot multi-task allocation is proposed. This mechanism proposes a rescheduling trigger mechanism based on time deviation tolerance. The Task Planning Center (TPC) monitors subtask progress in real time and dynamically determines whether to trigger a rescheduling. Finally, the satisfaction function is defined using the expectation inconsistency theory, and the task allocation scheme is optimized with the goal of maximizing overall satisfaction. The elite strategy and dynamic pheromone update rule are introduced into the ant colony algorithm, combined with the maximum-minimum ant system to balance the global search and convergence speed, effectively avoiding local optimality.
[0004] To achieve the above purpose, the present invention adopts the following technical solutions. The coordination framework of the present invention is as follows: Figure 1, the present invention comprises the following steps:
[0005] Step 1: Based on the task requirements proposed by the elderly, the corresponding model is called from the model library to build a Petri net model at the current moment. Then, the elderly’s historical subtask working time is analyzed. The ARIMA forecasting model with a rolling window is used to model and analyze the historical time within the window to predict the required subtask working time.
[0006] Step 2: Use the predicted subtask working time as the initial time information for task allocation, use the improved ant colony algorithm to generate an initial allocation plan, and start executing subtasks according to this plan.
[0007] Step 3: During subtask execution, TPC monitors the status of each subtask in real time. Using the subtask end time estimation formula (Formula 9 below), it estimates the task end time and applies a time deviation tolerance to the estimated time to determine whether to trigger rescheduling. If the estimated actual execution time exceeds the maximum allowed deviation threshold, rescheduling is triggered.
[0008] Step 4: When rescheduling is triggered, the estimated actual execution time is input into the real-time prediction model based on fast compensation. The compensation mechanism is used to quickly predict the next subtask working time and the working time of other subtasks for the same elderly person.
[0009] Step 5: Re-enter the updated subtask working time and the status information of the current subtask and robot into Step 2, calculate the new allocation plan, and start execution.
[0010] Step 6: Determine whether all subtasks are completed (if the robot has no subtasks to execute, it is considered that all subtasks have been completed); if yes, it means that all tasks have been completed; if not, go to Step 3 and continue to execute subtasks according to the task assignment list.
[0011] As a preferred solution, the model library in Step 1 of the present invention includes three libraries, namely, a task step model library, a subtask module library, and a robot resource library. When the elderly person makes a request, the modules in the three libraries are called to form the Petri net at the current moment.
[0012] As another preferred solution, the task step model library described in the present invention models the daily activity needs of the elderly in the nursing home, establishing a corresponding task step model for each task. Different tasks have different service steps, and the steps of all tasks are fixed. The task step models are centralized to form a task step module library. Service robots coordinate with each other according to the work steps defined by the model to complete the service tasks for the elderly.
[0013] The task step model is represented by a 4-tuple, see formula (1).
[0014] T SM = <TN,T SS , T SRS , T ES > (1)
[0015] Where: T N Represents the name of the task in the task step model, which is used to distinguish different service tasks in the nursing home; T SS It is the subtask set required in the current task step model to represent the subtask type that needs to be completed in the task step; T SRS It is the set of robot resources to be used in the current task step model, which represents the type and quantity of robots needed in the current task; T ES It is the set of state switches of the elderly with the assistance of the robot in the current task step model.
[0016] The defined TSM is modeled based on the time-color Petri net to form a 7-tuple
[0017] ∑=<P;T;F;τ;C;W;M0> (2)
[0018] Where: P = {p1, p2, ..., p m}∪{P R} represents a finite set of places, {p1, p2, ..., p m} represents each state of the old man in the Petri net. When P n When there is a token in the , it means the old man’s current state is P n The state in. R} represents the robot's library, when {P R When there is a token in}, it means that the robot is in an idle state and can perform new tasks; T represents a finite set of transitions, which represents the state switching of the elderly in the network; Represents a finite set of directed arcs, which represents the connection between places and transitions, and transitions and places in the network; τ is the expression of the time function attached to the transition T, which is a concept in the time Petri net. It means that the current transition T can be triggered after the time function τ has passed, which means the time it takes for the elderly to switch from the current state to the next state after the assistance of the robot. The time function τ is divided into two categories. The first type of time τ is an expression of the robot's response time, which represents the time from the robot proposing a task to arriving at the service location. The second type of time τ represents the time consumed to complete each subtask, which is a time function related to the elderly's physical state. C = {c1, c2, ...c k} represents a finite set of color tokens. Color tokens use the concept in color Petri nets to distinguish the robots in the current nursing home with different colors; W represents the weight function mapped on the directed arc set, which is used to control the occurrence rules of changes and the movement of color tokens in the library; M0 is the initial identifier on the library place set P, which represents the initial state in the network system.
[0019] As another preferred embodiment, the subtask module library of the present invention comprises subtask function models based on the functions of various heterogeneous robots. The library is divided into two categories: one is general modules, and the other is subtask function modules; these two categories of modules together constitute the subtask module library.
[0020] Subtask Function Model SFM, which is a 6-tuple, as shown in formula (3).
[0021] SFM= T ;ST L ;ST wt ;ST ewt ;ST eet ;ST rrs > (3)
[0022] Among them: ST t Represents the category of the subtask functional module, used to distinguish modules with different functions; ST l Represents the location information of the subtask function module; ST ewt Represents the elderly's expected waiting time for each subtask. When the elderly issue a request at a certain moment, based on the historical waiting time for the robot, an expected waiting time is formed. The expected waiting time is used as one of the criteria for judging the solution (see formula 12 for specific criteria); ST eet represents the expected execution time of the subtask by the elderly; ST wt is the time required to complete the current subtask function module; ST rrs This collection is a collection of robot resources required in the subtask function module.
[0023] As another preferred solution, the robot resource library modeling described in the present invention includes the types and quantities of all robots currently in the nursing home, records the current usage and idle status of each robot, and the robot resource library is jointly constructed by these shared robot resources.
[0024] The defined robot resource library is a 4-tuple, which is specifically defined as in formula (4).
[0025] SRR= <R T ; R N ; R L ; R S > (4)
[0026] Where: R T It is used to indicate the type of robot, and to distinguish service robots with different functions through different colors in the color Petri net; R N Represents the number of robots of the same type, used to distinguish different robots with the same function; R L is the position information of the robot in the current state; R S Represents the robot's usage status and idle status.
[0027] As another preferred solution, the real-time prediction model based on fast compensation in Step 4 of the present invention includes two parts: one is self-compensation, which is used to correct the prediction time of subtasks of the same type; the other is correlation compensation, which is used to adjust the time of subsequent subtasks affected by the current task.
[0028] As another preferred solution, the process of the real-time prediction model based on rapid compensation in Step 4 of the present invention is as follows:
[0029] Error calculation: Get the actual execution time of subtask j of elderly i from time t And compare it with the execution time of subtask j predicted at time t-1 Perform error calculation
[0030] Update compensation: by the absolute value of the error |e t | is compared with the threshold θ to update the compensation. The compensation is calculated as shown in formula (5).
[0031]
[0032] Where, δ t-1 Represents the compensation coefficient of the previous moment. The calculation of the compensation coefficient is based on the compensation of the previous moment; sign(e t ) represents the direction of the error, which is represented by the symbol function. t The positive and negative judgment determines whether the compensation changes in the positive or negative direction; λ1min(λ2g|e t |,2) is used to adjust the size of the error amplitude, where λ1-λ2 represent adjustable parameters; clip(,δ min ,δ max ) is the boundary constraint of the compensation.
[0033] Compensate STPM (STPM is the subtask working time prediction matrix, STPM): the compensation is sent to the STPM from t-1 to t+n, and the STPM calculation formula at time t+n is shown in formula (7).
[0034]
[0035] By compensating the STPM from time t-1 to time t+n, compensation can be achieved for its own subsequent subtasks and subsequent related subtasks.
[0036] Output: Output the updated subtask working time forecast value to the corresponding subtask.
[0037] As another preferred solution, the compensation calculation method of the present invention is divided into two types:
[0038] (1) When the absolute value of the error |e t |<θ, indicating that the deviation between the actual execution time and the predicted time is small, proving that the current predicted value is accurate, that is, δ at time t-1 t-1 The compensation is valid, so the compensation value at time t continues to use the compensation δ of the previous moment t =δ t-1 .
[0039] (2) When the absolute value of the error |e t |≥θ indicates that the deviation between the actual execution time and the predicted time is large, indicating that the state of elderly person i at time t has changed, and it is necessary to compensate for the predicted time of subtask j's own subsequent subtasks and the predicted time of subsequent other types of subtasks.
[0040] clip(δ t-1 +sign(e t )·λ1min(λ2·|e t |,2),δ min , δ max ) (6)
[0041] The compensation calculation at time t is the compensation δ at time t-1 t-1 The calculation is performed based on the error, and the compensation is updated according to the size of the error.
[0042] As another preferred solution, the time deviation tolerance in Step 3 of the present invention sets a threshold for the difference between the predicted value and the actual execution time (see Formula 9). Rescheduling is triggered only when the error exceeds the set value. TPC monitors the robot's status in real time during task execution and uses a subtask end time estimation model to dynamically predict the execution time and determine whether the deviation exceeds the threshold.
[0043]
[0044] T P To predict the execution time, T A is the actual execution time, TT is the time deviation tolerance, and a maximum allowed time deviation threshold β is set a (0<β a <1).
[0045]
[0046] When the time deviation tolerance TT exceeds the maximum allowed time, the deviation threshold β a It will trigger rescheduling, which will serve as the rescheduling trigger criterion.
[0047] During the robot's task execution, TPC will monitor the robot's operating status and task execution time in real time. When the task starts to execute, it is estimated based on the robot's current execution status, and it is predicted whether the deviation between the predicted execution time and the actual execution time will exceed the set maximum threshold. The system can dynamically evaluate whether it is necessary to trigger rescheduling during the task execution process, without having to wait for the subtask to end before making adjustments, thereby improving the response speed and execution efficiency of task scheduling. Therefore, the present invention assumes that the execution time of the subtask changes linearly, and uses the subtask end time estimation model to predict its completion time. Based on the estimation result, the time deviation tolerance can be evaluated in real time to ensure that while meeting the global scheduling stability, the system's adaptability to dynamic changes in tasks is improved, see formula (10).
[0048]
[0049] T end is the predicted subtask end time, T elapsed is the execution time of the current subtask, T current The current progress of the subtask.
[0050] In the nursing home setting, the TPC needs to maintain continuous information exchange with each service robot to obtain its operating status in real time. After receiving the elderly's service request, the TPC relies on the constructed Petri net model and comprehensively considers global information such as the elderly's location, task priority, task execution progress, and the current status of the robot to dynamically optimize the task allocation plan to ensure the efficiency and rationality of the service. This invention uses the overall satisfaction of all elderly people as the optimization goal of the ant colony algorithm to ensure that the task scheduling plan can maximize the needs of the elderly and improve the overall efficiency and service quality of the collaboration between multiple robots. The calculation formula (11) for the overall satisfaction of the elderly is as follows.
[0051]
[0052] In the above formula, the satisfaction of all elderly people is equal to the sum of the satisfaction of each elderly person, and the calculation formula for the satisfaction of each elderly person is formula (12).
[0053]
[0054] In formula (12), (1) H represents the elderly, N represents the number of elderly people who have made demands at the current moment, and t k represents the task currently proposed by the elderly, and m represents the current task t k There are m subtasks. (2) where α0-α1 represents the weight of each part. (3) Prior represents task t k The priority of the task is divided into five levels {1, 2, 3, 4, 5} in the present invention, where 5 is the highest priority. (4) Impat represents the impatience of the elderly H. Similarly, the present invention divides the impatience of the elderly into five levels {1, 2, 3, 4, 5}, setting the impatience coefficient to 1 as the lowest and gradually increasing with the impatience of the elderly. (5) Health represents the health index of the elderly H. The health index is a comprehensive evaluation index of the health status of the elderly, including age, physical condition, etc. The smaller the value, the healthier the elderly. The present invention divides the health index into five levels {1, 2, 3, 4, 5}. (6) Representative task t k The actual completion time of the jth subtask is, which includes the two parts in formula 13, respectively. represents the actual waiting time of subtask j, represents the actual execution time of subtask j. (7) Representative task t k The expected time of the jth subtask is calculated by formula 14, where represents the expected waiting time of subtask j, represents the expected execution time of subtask j.
[0055] As another preferred solution, the improved ant colony algorithm process in Step 2 of the present invention is as follows:
[0056] (1) Initialize each parameter: initialize and assign values to each parameter used.
[0057] (2) State transition rules: Ants select an enabled transition and move to the next marker according to the state transition equation (i.e., Formula (15) below). 70% of the ants choose high-probability transitions in a roulette-wheel manner, while 30% choose randomly to improve search diversity and global optimization capabilities and reduce the risk of premature convergence.
[0058]
[0059] Where, τ ij (t) represents the pheromone concentration on the path (i, j) at time t; η ij (t) is the heuristic function; α is the information heuristic factor; β is the expected heuristic factor; T ij Indicates the execution time of the selected pending transition; allowed k Represents the set of transitions that can be reached in the next step.
[0060] (3) Pheromone update rules: After each round of iteration, the ant with the best performance is retained, and the pheromone concentration on its path is further enhanced to strengthen the guiding role of the historical optimal solution in subsequent path selection.
[0061] Secondly, the pheromone update rule of the present invention adopts the pheromone update method of the ant colony algorithm with the elite strategy, as shown in Formula 17.
[0062] τ ij (t+1)=(1-ρ)τ ij (t)+△τ ij (t)+Δr * (t) (17)
[0063]
[0064] Where Δτ ij (t) represents the sum of pheromone increments on the path (i, j) caused by the ant traversal process; represents the additional pheromone increment released by the elite ant on path (i, j); ρ is the pheromone volatility coefficient; δ * is the number of elite ants; Q is the pheromone intensity.
[0065] The maximum and minimum ant system is used to set upper and lower limits [τ min ,τ max ], limiting its fluctuation within a reasonable range (the reasonable range is determined by the sum of pheromones on the path, the upper limit is 80% of the highest pheromone concentration in all paths, and the lower limit is 20% of the highest pheromone concentration in all paths). When τ ij (t)<τ min (t), let τ ij (t) = τ min (t); when τ ij (t)>τ max (t), let τ ij (t)<τ max (t).
[0066] In addition, the value range of the pheromone volatility coefficient ρ of the present invention is (0,1].
[0067] Beneficial effects of the present invention:
[0068] 1. Targeting the characteristics of tasks in nursing homes, we modeled these tasks using time-colored Petri nets. This modular modeling approach allows for scalability as new service tasks and robots are added. 2. Addressing the uncertain nature of task times in nursing homes, we designed a prediction model based on rapid compensation. By modeling and predicting the historical subtask times of residents, we use a rapid compensation mechanism to compensate for any deviations in the predicted times of subsequent subtasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The scope of protection of the present invention is not limited to the following description.
[0070] Figure 1 This is a flow chart of the rescheduling mechanism based on task time uncertainty of the present invention.
[0071] Figure 2 A Petri net modeling process is used for the present invention.
[0072] Figure 3 This is a real-time prediction model based on rapid compensation of the present invention.
[0073] Figure 4 This is the flow chart of the improved ant colony algorithm of the present invention.
[0074] Figure 5 The floor plan of a nursing home is simulated for the present invention.
[0075] Figure 6 The Petri net is constructed at time T0 in the example of the present invention.
[0076] Figure 7 This is the initial allocation scheme in the example of the present invention. Figure 7 Table 1 shows the initial key transition information in the example of the present invention.
[0077] Figure 8 This is the rapid compensation prediction diagram for Elder A in the example of the present invention. Figure 8 Table 2 shows the satisfaction of the initial allocation scheme in the example of the present invention.
[0078] Figure 9 The figure shows a comparison of three implementation schemes in an example of the present invention. Figure 9 Table 3 shows the satisfaction of three implementation schemes in the examples of the present invention. DETAILED DESCRIPTION
[0079] In the modeling phase, the task model library consists of three libraries: the task step model library, the subtask module library, and the robot resource library. For nursing homes, the modeling of relatively fixed task steps and subtask modules, as well as the recording of various robot resources, is performed. When the elderly make a request, the modules in the three libraries are called to form the Petri net at the current moment, such as Figure 2 shown.
[0080] (1) Task step modeling: This layer models the daily activity needs of the elderly in the nursing home, and establishes a corresponding task step model (TSM) for each task. Different tasks have different service steps, and the steps of all tasks are fixed. These various TSMs are brought together to build a task step module library. Service robots will coordinate with each other according to the work steps defined by the model to complete the service tasks for the elderly.
[0081] The task step model defined in the present invention is represented by a 4-tuple as shown in Formula 1.
[0082] TSM= <T N ,T SS ,T SRS , T ES 〉 (1)
[0083] Where: (1) T N (TaskName) represents the name of the task in the task step model, which is used to distinguish different service tasks in the nursing home; (2)T SS (SubtaskSet) is the subtask set required in the current task step model, which represents the subtask type that needs to be completed in the task step, so that TPC can provide corresponding operation guidance to the robot; (3) T SRS (ShareRobotSet) is the set of robot resources to be used in the current task step model, which is used to represent the type and quantity of robots needed in the current task, making it easier for TPC to call the corresponding robot resources; (4) T ES ElderlyStatus is a collection of elderly status transitions in the current task step model with the assistance of the robot. This facilitates the TPC to understand information and adjust service plans in real time based on the dynamic environment of the nursing home to improve elderly satisfaction.
[0084] The present invention models the TSM defined in this paper based on the time-color Petri net to form a 7-tuple
[0085] ∑= <P;T;F;τ;C;W;M0〉 (2)
[0086] Where: (1) P = {p1, p2, ... p m}∪{P R} represents a finite set of places, {p1, p2, ... p m} represents each state of the old man in the Petri net. When P n When there is a token in the , it means the old man’s current state is P n The state in. R} represents the robot's library, when {P R When there is a token in}, it means that the robot is in an idle state and can perform new tasks; (2) T represents a finite set of transitions, which represents the state switching of the elderly in the network; (3) Represents a finite set of directed arcs, which represents the connection between places and transitions and between transitions and places in the network; (4) τ is the expression of the time function attached to the transition T, which is a concept in the time Petri net, representing that the current transition T can be triggered after experiencing the time function τ, and usually represents the time it takes for the elderly to switch from the current state to the next state after the assistance of the robot. In the present invention, the time function τ is divided into two categories. The first type of time τ mainly expresses the response time of the robot, representing the time from the robot proposing the task to arriving at the service location. The second type of time τ represents the time consumed to complete each subtask, which is a time function related to the physical state of the elderly. (5) C={c1,c2,…c k} represents a finite set of color tokens. Color tokens are concepts in color Petri nets that use different colors to distinguish the robots in the current nursing home; (6) W represents the weight function mapped on the directed arc set, which is used to control the occurrence rules of transitions and the movement of color tokens in the library; (7) M0 is the initial identifier on the library set P, which represents the initial state in the network system.
[0087] (2) Subtask modeling: It contains subtask function models (SFM) based on the functions of various heterogeneous robots. This library is mainly divided into two categories: one is general modules and the other is subtask function modules; these two types of modules together constitute the subtask module library.
[0088] The subtask function module modeling in the subtask module library is introduced, and the subtask function model SFM is defined, which is a 6-tuple, as shown in Formula 3.
[0089] SFM= <ST T ;ST L ;ST wt ;ST ewt ;ST eet ;ST rrs > (3)
[0090] Among them: (1) ST t (Subtask Type) represents the category of the subtask function module, which is used to distinguish modules with different functions; (2) ST l (Subtask Location) represents the location information of the subtask functional module, which facilitates the required robot to find the specific location where the task is required, and also facilitates TPC to calculate the time required for the robot to reach the subtask location; (3) ST ewt (Subtask Expected Waiting Time) represents the elderly's expected waiting response time for each subtask, that is, the time the robot waits at the service location after the elderly person makes a task request. When the elderly person makes a request at a certain moment, an expected value of the waiting time will be formed based on the historical waiting time for the robot. In addition, the same elderly person will have different expected waiting time values for different subtasks, and different elderly people will also have different expected waiting time values for the same subtask. Therefore, the expected waiting time is used as one of the criteria for judging the solution to help TPC guide the robot to complete the work better; (4) ST eet (Subtask Expected Execution Time) represents the expected execution time of the subtask by the elderly. In the study of this invention, since the execution time of each subtask is not fixed, the elderly will have an expectation of the execution time of each subtask; (5) ST wt (Subtask Working time) is the time required to complete the current subtask function module. Since the subtask working time of the present invention is uncertain, after forming the task requirement network, an initial completion time will be assigned to each subtask function module through prediction. (6) ST rrs (SubtaskRequired Robot Set) This set is the set of robot resources required in the subtask function module.
[0091] (4) Robot resource layer modeling: It includes the types and quantities of all robots in the current nursing home, records the current usage and idle status of each robot, and these shared robot resources (SRR) jointly construct the robot resource library.
[0092] The defined robot resource library is a 4-tuple, which is specifically defined as Equation 4.
[0093] SRR=〈R T ; R N ; R L ; R S 〉 (4)
[0094] Where: (1) R T (Robot Type) is used to indicate the type of robot, and different colors in the color Petri net are used to distinguish service robots with different functions; (2) R N (Robot Number) represents the number of robots of the same type, used to distinguish different robots with the same function; (3) R L (Robot Location) is the location information of the robot in its current state, which makes it easy for TPC to know the location information of the robot at any time and to call it conveniently; (4) R S (Robot State) represents the robot's usage state and idle state.
[0095] After modeling the elderly's task requirements, actual execution may deviate from the initial allocation plan due to the uncertainty of task times. To address this issue, this paper proposes a rescheduling mechanism based on uncertain task times. First, based on the uncertain nature of task times in nursing homes, a real-time prediction model based on rapid compensation is designed to achieve preliminary predictions of uncertain task times and quickly compensate for the predicted values of subsequent subtasks when rescheduling is triggered. Then, during task execution, the TPC monitors task progress in real time, calculates the time deviation tolerance of subtasks, and determines whether to trigger rescheduling. If rescheduling is necessary, the predicted subtask time is updated and the current subtask and robot status are recorded. Finally, this information is re-input into the improved ant colony algorithm to obtain the task allocation plan with the highest overall satisfaction, and execution continues according to the task list.
[0096] The fast compensation mechanism proposed in this invention is based on real-time error calculation to achieve adaptive correction of the predicted value. This mechanism consists of two parts: one is self-compensation, which is used to correct the predicted time of subtasks of the same type; the other is correlation compensation, which is used to adjust the time of subsequent subtasks affected by the current task. Combined with the ARIMA model with a rolling window, this method can improve the accuracy of task time prediction and enhance the robustness of the scheduling plan to changes in the elderly's status. The process of this model is as follows Figure 3 shown.
[0097] Step 1 (error calculation): Get the actual execution time of subtask j of elderly person i from time t And compare it with the execution time of subtask j predicted at time t-1 Perform error calculation
[0098] Step 2 (Update compensation): By the absolute value of the error |e t | is compared with the threshold θ to update the compensation. The compensation is calculated as shown in Equation 5.
[0099]
[0100] Where, δ t-1 Represents the compensation coefficient of the previous moment. The calculation of the compensation coefficient is based on the compensation of the previous moment; sign(e t ) represents the direction of the error, which is represented by the symbol function. t The positive and negative judgment determines whether the compensation changes in the positive or negative direction; λ1min(λ2g|e t |,2) is used to adjust the size of the error amplitude, where λ1-λ2 represent adjustable parameters; clip(,δ min ,δ max ) is the boundary constraint of the compensation.
[0101] Adjustable parameters λ1-λ2 are determined based on the volatility of the elderly person's status. The selection of adjustable parameters λ1-λ2 is determined by the fluctuations in the elderly person's task time. Each elderly person's task time fluctuates differently, and each elderly person has their own fluctuations and changes in time. Different attempts are made for different elderly people. Overall, through multiple parameter adjustments, the time deviation tolerance between the compensation prediction and the elderly person's actual execution time is less than or equal to the deviation threshold.
[0102] clip(,δ min ,δ max ) is the boundary constraint of compensation, which limits the scope of compensation. The scope of compensation is related to the historical status of the elderly and needs to be selected according to the maximum and minimum values of the historical time. The selection of boundary constraints is because the task time range of each elderly person is different. When the maximum value of the boundary constraint TP-TA is greater than zero, the compensation value is the size when the time deviation tolerance calculated between the compensation prediction time and the elderly person's actual execution time is equal to the deviation threshold. The calculation of the minimum value is the size of the compensation value when TP-TA is less than zero and the time deviation tolerance calculated between the compensation prediction time and the elderly person's actual execution time is equal to the deviation threshold.
[0103] There are two ways to calculate compensation:
[0104] (1) When the absolute value of the error |e t |<θ, indicating that the deviation between the actual execution time and the predicted time is small, proving that the current predicted value is accurate, that is, δ at time t-1 t-1 The compensation is valid, so the compensation value at time t continues to use the compensation δ of the previous moment t =δ t-1 .
[0105] (2) When the absolute value of the error |e t|≥θ indicates that the deviation between the actual execution time and the predicted time is large, indicating that the state of elderly person i at time t has changed, and it is necessary to compensate for the predicted time of subtask j's own subsequent subtasks and the predicted time of subsequent other types of subtasks.
[0106] clip(δ t-1 +sign(e t )·λ1min(λ2·|e t |,2),δ min , δ max ) (6)
[0107] It can be seen from the formula that the compensation calculation at time t is the compensation δ at time t-1 t-1 The calculation is performed based on the error, and the compensation is updated according to the size of the error.
[0108] Step 3 (compensation STPM): send the compensation to the STPM at time t-1 to t+n, and use the STPM calculation formula at time t+n to see
[0109] Formula 7.
[0110]
[0111] By compensating the STPM from time t-1 to time t+n, compensation can be achieved for its own subsequent subtasks and subsequent related subtasks.
[0112] Step 4 (output): Output the updated subtask working time prediction value to the corresponding subtask.
[0113] In a nursing home setting, task execution time fluctuates due to changes in the elderly's status. Directly triggering rescheduling with prediction errors will lead to frequent and inefficient scheduling behavior. To this end, the present invention introduces a time deviation tolerance mechanism, sets a reasonable threshold for the difference between the predicted value and the actual execution time, and triggers rescheduling only when the error exceeds the set value, thereby improving system stability and scheduling efficiency. TPC monitors the robot status in real time during task execution, and uses the subtask end time estimation model to dynamically predict the execution time and predict whether the deviation exceeds the threshold. This method supports rapid response during the task process, without waiting for the task to end before determining whether to reschedule, and enhances the system's adaptability to dynamic changes in tasks.
[0114]
[0115] T P To predict the execution time, T A is the actual execution time, TT is the time deviation tolerance, and a maximum allowed time deviation threshold β is set a (0<β a<1).
[0116]
[0117] T end is the predicted subtask end time, T elapsed is the execution time of the current subtask, T current The current progress of the subtask.
[0118] After obtaining the Petri net model, the present invention uses the ant colony algorithm to solve the model. The ant colony algorithm simulates the foraging behavior of ants to search for a path to the target identifier in the reachable graph of the Petri model as the scheduling result. The improved ant colony algorithm process used in the present invention is as follows: Figure 4 shown.
[0119] (1) Initialize each parameter: initialize and assign values to each parameter used.
[0120] (2) State transition rules: Ants select enabled transitions and move to the next marker according to the state transition equation (Equation 10). To avoid falling into local optima, the present invention adopts a hybrid strategy: 70% of the ants use a roulette wheel to select high-probability transitions, while 30% select randomly. This improves search diversity and global optimization capabilities, and reduces the risk of premature convergence.
[0121]
[0122] Where, τ ij (t) represents the pheromone concentration on the path (i, j) at time t; η ij (t) is the heuristic function; α is the information heuristic factor; β is the expected heuristic factor; T ij Indicates the execution time of the selected pending transition; allowed k Represents the set of transitions that can be reached in the next step.
[0123] (3) Pheromone update rules: This paper draws on the elite retention strategy in genetic algorithms to optimize the pheromone update mechanism. After each iteration, the best-performing ant is retained, and the pheromone concentration on its path is further enhanced to strengthen the guiding role of the historical optimal solution in subsequent path selection. This method helps to accelerate the accumulation of pheromones on high-quality paths and increase the tendency of subsequent ants to choose the global optimal path, thereby accelerating convergence and improving the quality of search.
[0124] The pheromone update method of the ant colony algorithm with elite strategy is as shown in formula 12.
[0125] τ ij (t+1)=(1-ρ)τ ij (t)+△τ ij(t)+Δτ * (t) (12)
[0126]
[0127] Where Δτ ij (t) represents the sum of pheromone increments on the path (i, j) caused by the ant traversal process; represents the additional pheromone increment released by the elite ant on the path (i, j); ρ is the pheromone volatility coefficient, which ranges from (0,1]; δ * is the number of elite ants; Q is the pheromone intensity.
[0128] However, applying additional pheromone increments to elite ant paths may lead to excessive accumulation of pheromones, causing the algorithm to converge to a local optimum prematurely. To avoid search stagnation, the present invention introduces a maximum-minimum ant system to set upper and lower limits [τ min ,τ max ], limiting its fluctuation within a reasonable range to ensure the continuity and diversity of the search. ij (t)<τ min (t), let τ ij (t) = τ min (t); when τ ij (t)>τ max (t), let τ ij (t)<τ max (t).
[0129] Assume that the subtask execution time of Elder A fluctuates greatly, while the execution time of Elders B and C is stable. At a certain moment, A asks to go to the toilet, B asks to eat, and C asks to take a walk. The floor plan of the nursing home and the positions of the robots are as follows: Figure 5 As shown in the figure, for ease of calculation, it is assumed that the room and the robot are both point mass models, the distance between adjacent room doors is 3m, the distance from the corridor to the door is 2m, and the robot's service position is 1m from the door. The robot moves at a speed of 1m / s, the path is a point-to-point straight line, and there is no collision during the movement. Based on the needs of the three elderly people, TPC retrieves the corresponding modules from the task model library and constructs the current Petri net (such as Figure 6 ), and use the ARIMA model with a rolling window to predict the initial subtask time, and store the predicted value in the corresponding transition, see Table 1.
[0130] Put the initial information of the robot and subtask into the improved ant colony algorithm and calculate the initial execution plan with the highest overall satisfaction, such as Figure 7The satisfaction is shown in Table 2. Under the initial allocation scheme generated by TPC, the robot starts to execute the task. When the transition TA2 is completed, its actual completion time is 7.66 seconds, which exceeds the set maximum time deviation threshold and triggers rescheduling. At this time, the actual execution time of TA2 is input into the fast compensation prediction model, and the subtask times of TA3, TA8, and TA10 are re-predicted to be 6.73 seconds, 8.00 seconds, and 6.73 seconds, respectively. Figure 8 As shown, the expected time of Elder A's task is updated. The time deviation of subsequent subtasks does not exceed the threshold, and no rescheduling is required. The comparison of the initial plan, the rescheduling plan and the non-rescheduling plan is as follows: Figure 9 The satisfaction and waiting time are shown in Table 3.
[0131] It can be understood that the above specific description of the present invention is only used to illustrate the present invention and is not limited to the technical solutions described in the embodiments of the present invention. Those skilled in the art should understand that the present invention can still be modified or replaced by equivalents to achieve the same technical effects; as long as the use requirements are met, they are within the scope of protection of the present invention.
Claims
1. A multi-robot dynamic rescheduling method for nursing home tasks with time uncertainty, characterized by The following steps are involved: Step 1: Based on the task requirements proposed by the elderly, the corresponding model is called from the model library to build a Petri net model for the current moment. Then, the elderly's historical subtask working time is analyzed. The ARIMA forecasting model with a rolling window is used to model and analyze the historical time within the window to predict the required subtask working time. Step 2: Use the predicted subtask working time as the initial time information for task allocation, use the improved ant colony algorithm to generate an initial allocation plan, and start executing subtasks according to this plan; Step 3: During subtask execution, TPC monitors the status of each subtask in real time. It estimates the task end time using the subtask end time estimation formula and applies a time deviation tolerance to the estimated time to determine whether to trigger rescheduling. If the estimated actual execution time exceeds the maximum allowable deviation threshold, rescheduling is triggered. Step 4: When rescheduling is triggered, the estimated actual execution time is input into the real-time prediction model based on fast compensation. The compensation mechanism quickly predicts the next subtask working time and the working time of other subtasks for the same elderly person. Step 5: Re-enter the updated subtask working time and the current subtask and robot status information into Step 2, calculate the new allocation plan, and start execution; Step 6: Determine whether all subtasks are completed; If yes, it means all tasks have been completed; if not, go to Step 3 and continue to execute subtasks according to the task allocation list.
2. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 1 is characterized in that There are three libraries in the model library in Step 1, namely the task step model library, the subtask module library and the robot resource library; when the elderly person makes a request, the modules in the three libraries are called to form the Petri net at the current moment.
3. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 2 is characterized in that The task step model library is modeled to model the daily activity needs of the elderly in the nursing home. A corresponding task step model is established for each task. Different tasks have different service steps, and the steps of all tasks are fixed. The task step models are centralized to jointly build a task step module library. The service robots coordinate with each other according to the work steps defined by the model to complete the service tasks for the elderly. The task step model is represented by a 4-tuple, see formula (1); TSM=<T N ,T SS ,T SRS ,T ES > (1) Where: T N Represents the name of the task in the task step model, which is used to distinguish different service tasks in the nursing home; T SS It is the subtask set required in the current task step model to represent the subtask type that needs to be completed in the task step; T SRS It is the set of robot resources to be used in the current task step model, which represents the type and quantity of robots needed in the current task; T ES It is the set of state transitions of the elderly person with the assistance of the robot in the current task step model; The defined TSM is modeled based on the time-color Petri net to form a 7-tuple ∑=<P;T;F;τ;C;W;M0> (2) Where: P = {p1, p2, ... p m }∪{P R } represents a finite set of places, {p1, p2, ..., p m } represents each state of the old man in the Petri net. When P n When there is a token in the , it means the old man’s current state is P n The state in {P R } represents the robot's library, when {P R When there is a token in}, it means that the robot is in an idle state and can perform new tasks; T represents a finite set of transitions, which represents the state switching of the elderly in the network; represents a finite set of directed arcs, which represents the connection between places and transitions and between transitions and places in the network; τ is the time function expression attached to transition T, which is a concept in time Petri net, indicating that the current transition T can be triggered after the time function τ, indicating the time required for the elderly to switch from the current state to the next state after the assistance of the robot; the time function τ is divided into two categories. The first type of time τ expresses the robot's response time, representing the time from the robot proposing a task to arriving at the service location. The second type of time τ represents the time consumed to complete each subtask, which is a time function related to the elderly's physical state; C = {c1, c2, ...c k } represents a finite set of color tokens. Color tokens use the concept in color Petri nets to distinguish the robots in the current nursing home with different colors; W represents the weight function mapped on the directed arc set, which is used to control the occurrence rules of changes and the movement of color tokens in the library; M0 is the initial identifier on the library place set P, which represents the initial state in the network system.
4. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 2 is characterized in that The subtask module library includes subtask function models based on the functions of various heterogeneous robots. The library is divided into two categories: one is a general module and the other is a subtask function module. These two categories of modules together constitute the subtask module library. Subtask Function Model SFM, which is a 6-tuple, as shown in formula (3); SFM=<ST T ;ST L ;ST wt ;ST ewt ;ST eet ;ST rrs > (3) Among them: ST t Represents the category of the subtask functional module, used to distinguish modules with different functions; ST l Represents the location information of the subtask function module; ST ewt Represents the elderly's expected waiting time for each subtask; when the elderly issue a request at a certain moment, an expected waiting time is formed based on the historical waiting time for the robot; the expected waiting time is used as one of the criteria for judging the solution; ST eet represents the expected execution time of the subtask by the elderly; ST wt is the time required to complete the current subtask function module; ST rrs This collection is a collection of robot resources required in the subtask function module.
5. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 2 is characterized in that The robot resource library modeling includes the types and quantities of all robots currently in the nursing home, records the current usage and idle status of each robot, and constructs the robot resource library by sharing these robot resources; The defined robot resource library is a 4-tuple, specifically defined as formula (4); SRR=<R T ;R N ;R L ;R S > (4) Where: R T It is used to indicate the type of robot, and to distinguish service robots with different functions through different colors in the color Petri net; R N Represents the number of robots of the same type, used to distinguish different robots with the same function; R L is the position information of the robot in the current state; R S Represents the robot's usage status and idle status.
6. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 1 is characterized in that The process of the real-time prediction model based on fast compensation in Step 4 is as follows: Error calculation: Get the actual execution time of subtask j of elderly i from time t And compare it with the execution time of subtask j predicted at time t-1 Perform error calculation Update compensation: by the absolute value of the error |e t | is compared with the threshold θ to update the compensation. The compensation is calculated as shown in formula (5); Where, δ t-1 Represents the compensation coefficient of the previous moment. The calculation of the compensation coefficient is based on the compensation of the previous moment; sign(e t ) represents the direction of the error, which is represented by the symbol function. t The positive and negative judgment determines whether the compensation changes in the positive or negative direction; λ1min(λ2g|e t |,2) is used to adjust the size of the error amplitude, where λ1-λ2 represent adjustable parameters; clip(,δ min ,δ max ) is the boundary constraint of compensation; Compensate STPM (STPM is the subtask working time prediction matrix, STPM): the compensation is sent to the time from t-1 to t+n, and the STPM calculation formula at time t+n is shown in formula (7); By compensating the STPM from time t-1 to time t+n, it can compensate for its own subsequent subtasks and subsequent related subtasks; Output: Output the updated subtask working time forecast value to the corresponding subtask.
7. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 1 is characterized in that There are two ways to calculate the compensation: (1) When the absolute value of the error |e t |<θ, indicating that the deviation between the actual execution time and the predicted time is small, proving that the current predicted value is accurate, that is, δ at time t-1 t-1 The compensation is valid, so the compensation value at time t continues to use the compensation δ of the previous moment t =δ t-1 ; (2) When the absolute value of the error |e t |≥θ, indicating that the deviation between the actual execution time and the predicted time is large, indicating that the state of elderly i at time t has changed, and it is necessary to compensate for the predicted time of subtask j's subsequent subtasks and the predicted time of subsequent subtasks of other types; clip(d t-1 +sign(e t )·λ1min(λ2·|e t |,2),d min ,d max ) (6) The compensation calculation at time t is the compensation δ at time t-1 t-1 The calculation is performed based on the error, and the compensation is updated according to the size of the error.
8. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 1 is characterized in that The time deviation tolerance in Step 3: sets a threshold for the difference between the predicted value and the actual execution time, triggering rescheduling only when the error exceeds the set value; TPC monitors the robot status in real time during task execution and uses the subtask end time estimation model to dynamically predict the execution time and predict whether the deviation exceeds the threshold; T P To predict the execution time, T A is the actual execution time, TT is the time deviation tolerance, and a maximum allowed time deviation threshold β is set α ; When the time deviation tolerance TT exceeds the maximum allowed time, the deviation threshold β a It will trigger rescheduling, which will serve as the rescheduling trigger criterion; As the robot performs a task, TPC monitors the robot's operating status and task execution time in real time. At the start of a task, it estimates the robot's current execution status and predicts whether the deviation between the predicted and actual execution times will exceed a set maximum threshold. It dynamically assesses whether rescheduling is necessary during task execution, eliminating the need to wait for subtasks to complete before making adjustments. Subtask execution times are assumed to vary linearly, and a subtask end time estimation model is used to predict their completion times. Based on the estimation result, the time deviation tolerance is evaluated in real time to ensure that the system's adaptability to dynamic changes in tasks is improved while meeting the global scheduling stability, see formula (10); T end is the predicted subtask end time, T elapsed is the execution time of the current subtask, T current The current progress of the subtask; In the nursing home setting, TPC maintains continuous information exchange with each service robot and obtains its operating status in real time. After receiving the elderly’s service request, TPC dynamically optimizes the task allocation plan based on the constructed Petri net model, taking into account the elderly’s location, task priority, task execution progress, and the global information of the robot’s current status. The overall satisfaction of all elderly people is taken as the optimization goal of the ant colony algorithm. The calculation formula (11) for the satisfaction of all elderly people is as follows: In the above formula, the satisfaction of all elderly people is equal to the sum of the satisfaction of each elderly person, and the calculation formula for the satisfaction of each elderly person is formula (12); In formula (12), H represents the elderly, N represents the number of elderly people who have made demands at the current moment, and t k represents the task currently proposed by the elderly, and m represents the current task t k There are m subtasks; where α0-α1 represents the weight of each part; Prior represents the task t k The priority of Impat represents the impatience of the old man H. Health represents the health index of the elderly H and the health status of the elderly; Representative task t k The actual completion time of the jth subtask of is, which includes the two parts in formula (13), namely represents the actual waiting time of subtask j, represents the actual execution time of subtask j; Representative task t k The expected time of the jth subtask is calculated by formula (14), where represents the expected waiting time of subtask j, represents the expected execution time of subtask j.
9. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 1 is characterized in that The improved ant colony algorithm process in Step 2 is as follows: (1) Initialize each parameter: initialize and assign values to each parameter used; (2) State transition rules: Ants select an enabled transition and move to the next marker based on the state transition equation; 70% of the ants choose high-probability transitions in a roulette-wheel manner, and 30% choose randomly to improve search diversity and global optimization capabilities and reduce the risk of premature convergence; Where, τ ij (t) represents the pheromone concentration on the path (i, j) at time t; η ij (t) is the heuristic function; α is the information heuristic factor; β is the expected heuristic factor; T ij Indicates the execution time of the selected pending transition; allowed k Represents the set of transitions that can be reached in the next step; (3) Pheromone update rules: After each round of iteration, the ant with the best performance is retained, and the pheromone concentration on its path is further enhanced to strengthen the guiding role of the historical optimal solution in subsequent path selection.
10. The multi-robot dynamic rescheduling method for nursing home task time uncertainty according to claim 9 is characterized in that The pheromone update rule adopts the pheromone update method of the ant colony algorithm with elite strategy, as shown in formula (17); Where Δτ ij (t) represents the sum of pheromone increments on the path (i, j) caused by the ant traversal process; represents the additional pheromone increment released by the elite ant on path (i, j); ρ is the pheromone volatility coefficient; δ * is the number of elite ants; Q is the pheromone intensity; The maximum and minimum ant system is used to set upper and lower limits [τ min ,τ max ], limiting its fluctuation within a reasonable range, when τ ij (t)<τ min (t), let τ ij (t) = τ min (t); when τ ij (t)>τ max (t), let τ ij (t)<τ max (t).