A collaborative scheduling method for a multi-agent system
The collaborative scheduling method in multi-agent systems addresses the issue of agent waiting by using a decision model with distance, availability, urgency, and throughput indicators, enhancing scheduling efficiency.
Patent Information
- Application Number
- CN202210720607.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-06-23
AI Technical Summary
In the multi-agent collaborative control scenario, multiple agents wait for each other on different sites, resulting in the problem of inability to coordinate.
Graphical modeling is used to construct a decision model including distance, idleness, urgency and throughput decision indicators. Weigh values are optimized through differential evolution algorithm, and differential variation and cross-variance optimization decision indicators are combined to generate a scheduling Gantt chart.
It realizes more feasible and efficient scheduling decisions in a multi-agent system that combines multiple factors, avoids the problem of agents waiting for each other on the site, and improves the feasibility and efficiency of the scheduling plan.
Smart Images

Figure CN115099615B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent scheduling, and more specifically, to a collaborative scheduling method for a multi-agent system. Background Art
[0002] The multi-agent system (MAS) is a brand-new distributed computing technology. Since its emergence in the 1970s, it has developed rapidly and has become a way of thinking and a tool for analyzing and simulating complex systems. Multi-agents can be modeled and simulated by various methods. Some systems are dedicated to specific problem domains and provide configurations adapted to specific problems. Other systems perform text-based or graphical programming on the environment and agent behavior through frameworks. These systems offer high flexibility, but the implementation of a multi-agent system must be achieved by defining the problem domain and agent behavior. Therefore, the Department of Medical Informatics at the Institute of Medical Biostatistics, Epidemiology and Informatics (IMBEI) at the University Medical Center Mainz, Germany, developed the Abstract Swarm multi-agent simulation system, and also defined the modeling rules for the multi-agent system and agent behavior. In the Abstract Swarm simulation system, the access behavior of agents is defined. Before each agent starts to access a site, it evaluates and accesses each target site. After the access ends, if there are still target sites to be accessed, it continues to evaluate and access the remaining target sites until all target sites have been accessed. When all agents in the multi-agent system have completed all access tasks, the multi-agent system completes the simulation.
[0003] There are three evaluation strategies in the Abstract Swarm multi-agent simulation system: random, minDistance, and maxFreeSpace. When an agent evaluates a target site, if the random strategy is used, a random value is generated as the evaluation value of the target site; if the minDistance strategy is used, the distance between the current site where the agent is located and the target site is used as the evaluation value of the target site; if the maxFreeSpace strategy is used, the remaining free space of the target site is used as the evaluation value of the target site.
[0004] Therefore, in some multi-agent collaborative control scenarios, the above three strategies may result in a situation where multiple agents wait for each other at different sites, leading to the inability to cooperate, and thus a feasible scheduling diagram cannot be generated. Summary of the Invention
[0005] The present invention aims to overcome the drawback that in some multi-agent collaborative control scenarios, multiple agents may wait for each other at different stations, resulting in the inability to collaborate, and provides a collaborative scheduling method for a multi-agent system.
[0006] To solve the above technical problems, the technical solution of the present invention is as follows:
[0007] A collaborative scheduling method for a multi-agent system includes the following steps:
[0008] S1: Model the real problem into a problem scenario of a multi-agent system using graphical modeling and construct a decision model;
[0009] The decision model includes several decision groups, each decision group includes four decision metrics and the corresponding weight values for each decision metric. The decision metrics include the distance between stations, idle degree, urgency, and throughput;
[0010] S2: Optimize the weight values of each decision metric in the decision model to obtain an optimized decision model;
[0011] S3: Apply the optimized decision model to the problem scenario for collaborative scheduling simulation and record the intermediate process of the collaborative scheduling simulation;
[0012] S4: Generate a scheduling Gantt chart from the recorded intermediate process of the simulation scheduling as the scheduling chart of the multi-agent system.
[0013] In the above solution, through a decision model including decision metrics such as distance, idle degree, urgency, and throughput, more feasible and efficient decisions can be made by comprehensively considering various factors during the collaborative scheduling simulation, so that feasible and relatively efficient scheduling solutions can be found in various problem scenarios of multi-agent systems.
[0014] Preferably, each decision group is responsible for the decision-making of a class of agents, and the number of decision groups depends on the number of agent classes.
[0015] Preferably, the evaluation formula for each decision group in the decision model is as follows:
[0016] M(o) = p1D(c, o) + p2V(o) + p3C(o) + p4T(o)
[0017] Among them, M(o) represents the evaluation value of the agent for the target site o, p1, p2, p3, and p4 respectively represent the weight values of the four decision-making indicators of distance, idle degree, urgency, and throughput, and the value range is [-1, 1]; D(c, o) represents the shortest distance from the departure site c to the target site o for the agent, V(o) represents the idle degree of the target site o, C(o) represents the urgency of the target site o, and T(o) represents the throughput of the target site o.
[0018] In the above solution, before each agent visits a site, it evaluates each site through the decision-making model and selects the site with the highest evaluation value for access; after the visit, if there are still sites to be visited, it continues to evaluate and visit the remaining sites through the decision-making model. By comprehensively considering multiple factors in the decision-making process of this decision-making model, rather than relying solely on random, shortest distance, or maximum free space for decision-making, and also considering the weights of various factors in the decision-making process, the decision-making model can make a more feasible and efficient decision by comprehensively considering multiple factors during the collaborative scheduling simulation decision-making.
[0019] Preferably, if the idle degree V(o) is greater than 0, it means that there is still free space at the target site o, and the larger the value of V(o), the higher the idle degree of the target site o; if the idle degree V(o) is equal to 0, it means that there is just no free space at the target site o; if the idle degree V(o) is less than 0, it means that the target site o has started to be crowded, and the smaller the value of V(o), the higher the degree of crowding of the site; the idle degree of the target site o is calculated by the following formula:
[0020] V(o) = s o -g
[0021] Among them, s o represents the given space size of the target site o, and g represents the number of agents that are on the way to and have arrived at the target site o.
[0022] Preferably, if the target site o has a dependent site, that is, the agents on the dependent site must visit the target site o simultaneously, and the dependent site of the target site o is in an operating state, then the urgency of the target site o is 0; otherwise, the urgency of the target site o is calculated by the following formula:
[0023]
[0024] Among them, A represents the set of agents on the current dependent site of the target site o, represents the waiting time of the agent a j .
[0025] Preferably, the throughput of the target site o is calculated by the following formula:
[0026]
[0027] Among them, o represents the target site, t represents the time required for the agent to perform an access task at the target site o, and s represents the number of agents allowed to perform access tasks at the target site o per unit time.
[0028] Preferably, in the problem scenario, the agent includes the following states: the first agent state, the second agent state, the third agent state, the fourth agent state, and the fifth agent state;
[0029] When the agent is in the first agent state, it means that the agent has just been created; when the agent is in the second agent state, it means that the agent has arrived at the waiting queue of the site; when the agent is in the third agent state, it means that the agent has started running in the working space of the site; when the agent is in the fourth agent state, it means that the agent is not in the waiting queue of any site; when the agent is in the fifth agent state, it means that the agent has no site to visit.
[0030] Preferably, in the problem scenario, the site includes the following states: the first site state, the second site state, the third site state, the fourth site state, and the fifth site state;
[0031] When the site is in the first site state, it means that the site has just been created; when the site is in the second site state, it means that there are agents waiting in the waiting queue of the site; when the site is in the third site state, it means that the site is running. If the site has a dependency relationship with other sites, the dependent sites must also be in the second site state or the third site state at this time; when the site is in the fourth site state, it means that both the working space and the waiting queue are empty; when the site is in the fifth site state, it means that the site has completed the work it needs to complete and no agent is allowed to access the site anymore.
[0032] Preferably, the differential evolution algorithm is used to optimize the weight values of each decision index, which specifically includes the following steps:
[0033] S2.1: Randomly initialize the population: Randomly generate NP individuals with a value range of [lb, ub] in the L-dimensional space as the 0th generation population; each individual vector in the population is composed of the weight values of all decision indexes in the decision model, and the value range of the weight values is [0, 1]; lb represents the lower bound of the value of the decision index weight value, and ub represents the upper bound of the value of the decision index weight value;
[0034] S2.2: Evaluation operation: Substitute each individual vector into the multi-agent system for collaborative scheduling simulation, and use the time required for all agents to complete the collaborative task as the fitness value of each individual;
[0035] S2.3: Determine whether the cumulative evaluation times of individuals in the population reach the preset maximum number of times;
[0036] If so, use the optimal individual in the population as the final weight value of all decision indicators in the decision model, and execute step S2.5;
[0037] If not, execute step S2.4;
[0038] S2.4: Generate a mutant vector through differential mutation, perform binomial crossover on the generated mutant vector and the target vector to become a trial vector, and finally select the optimal vector from the target vector and the trial vector as the target vector for the next generation of evolution, and return to step S2.2;
[0039] The generation of the mutant vector v and the trial vector u is as follows:
[0040]
[0041]
[0042] Among them, the randomly selected serial numbers r1, r 2 , r3 and the serial number i of the target vector are all different, rand() represents a random number between [0, 1], F represents the floating factor, CR represents the crossover probability, j represents the j-th dimension component in the trial vector, v i,t+1 represents the i-th mutant vector in the (t + 1)-th generation population, u ji,t+1 represents the j-th dimension component in the i-th trial vector in the (t + 1)-th generation population, x ji,t+1 represents the j-th dimension component in the i-th target vector in the (t + 1)-th generation population, and D represents the dimension of individuals in the population;
[0043] S2.5: Execution ends.
[0044] Preferably, the specific process of the collaborative scheduling simulation is as follows:
[0045] S3.1: Initialize the agents and stations in the multi-agent system. Initially, all agents are in the first agent state;
[0046] S3.2: Select and assign a task to all agents without access tasks from the corresponding task queue through the decision model;
[0047] S3.3: Determine whether all given access tasks have been completed;
[0048] If so, execute step S3.7;
[0049] If not, execute step S3.4;
[0050] S3.4: All agents access the corresponding sites according to the task requirements;
[0051] S3.5: Update the site status, including the following two cases:
[0052] a) Update the status of all sites. When the current site is in the first site status or the fourth site status, determine whether the waiting queue of the site is empty. If not, the site enters the second site status;
[0053] b) When the site is in the second site status and there are no dependent sites, the site directly enters the third site status. Otherwise, determine whether its dependent sites are in the second site status or the third site status. If so, the site enters the third site status;
[0054] S3.6: All sites in the running state run for one unit time respectively, and return to step S3.2;
[0055] S3.7: Execution ends.
[0056] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0057] The present invention provides a collaborative scheduling method for a multi-agent system. Through a decision-making model including decision-making indicators such as distance, idle degree, urgency, and throughput, more feasible and efficient decisions can be made by comprehensively considering various factors during the process of collaborative scheduling simulation, so as to find a feasible and relatively efficient scheduling scheme in various problem scenarios of multi-agent systems. Brief Description of the Drawings
[0058] Figure 1 It is a flowchart of the implementation steps of the technical solution of the present invention;
[0059] Figure 2 It is a flowchart of the state transition of agents in the present invention;
[0060] Figure 3 It is a flowchart of the state transition of sites in the present invention;
[0061] Figure 4 It is a flowchart of the collaborative scheduling simulation in the present invention. Detailed Embodiments
[0062] The drawings are only for illustrative purposes and cannot be construed as a limitation of this patent;
[0063] To better illustrate this embodiment, some components in the accompanying drawings are omitted, enlarged or reduced, which do not represent the dimensions of the actual product;
[0064] For those skilled in the art, it is understandable that some well-known structures and their descriptions in the accompanying drawings may be omitted.
[0065] The technical solution of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0066] Embodiment 1
[0067] As Figure 1 shown, a collaborative scheduling method for a multi-agent system includes the following steps:
[0068] S1: Use graphical modeling to model the real problem into a problem scenario of the multi-agent system and construct a decision model;
[0069] The decision model includes several decision groups, each decision group includes four decision indicators and the corresponding weight values for each decision indicator. The decision indicators include the distance between stations, the idle degree, the urgency degree, and the throughput;
[0070] S2: Optimize the weight values of each decision indicator in the decision model to obtain an optimized decision model;
[0071] S3: Apply the optimized decision model to the problem scenario for collaborative scheduling simulation and record the intermediate process of the collaborative scheduling simulation;
[0072] S4: Generate a scheduling Gantt chart from the recorded intermediate process of the simulation scheduling as the scheduling chart of the multi-agent system.
[0073] In the specific implementation process, through a decision model including decision indicators such as distance, idle degree, urgency degree, and throughput, more feasible and efficient decisions can be made by integrating various factors during the collaborative scheduling simulation, so as to find feasible and relatively efficient scheduling schemes in various problem scenarios of the multi-agent system.
[0074] Embodiment 2
[0075] A collaborative scheduling method for a multi-agent system includes the following steps:
[0076] S1: Use graphical modeling to model the real problem into a problem scenario of the multi-agent system and construct a decision model;
[0077] The decision model includes several decision groups, each decision group includes four decision indicators and the corresponding weight values for each decision indicator. The decision indicators include the distance between stations, the idle degree, the urgency degree, and the throughput;
[0078] More specifically, each decision-making group is responsible for the decision-making of a certain type of agent, and the number of decision-making groups depends on the number of agent types.
[0079] More specifically, the evaluation formula for each decision-making group in the decision-making model is as follows:
[0080] M(o) = p1D(c, o) + p2V(o) + p3C(o) + p4T(o)
[0081] Among them, M(o) represents the evaluation value of the agent for the target site o, p1, p2, p3, and p4 respectively represent the weight values of the four decision-making indicators of distance, idle degree, urgency, and throughput, and the value range is [-1, 1]; D(c, o) represents the shortest distance from the departure site c to the target site o for the agent, V(o) represents the idle degree of the target site o, C(o) represents the urgency of the target site o, and T(o) represents the throughput of the target site o.
[0082] In the specific implementation process, before each agent visits a site, it evaluates each site through the decision-making model respectively and selects the site with the highest evaluation value for visit; after the visit ends, if there are still sites to be visited, it continues to evaluate and visit the remaining sites through the decision-making model. By comprehensively considering multiple factors in the decision-making process of this decision-making model, rather than relying solely on random, shortest distance, or maximum idle space for decision-making, and also considering the weights of various factors in the decision-making process, the decision-making model can make a more feasible and efficient decision by comprehensively considering multiple factors during the decision-making of collaborative scheduling simulation.
[0083] More specifically, if the idle degree V(o) is greater than 0, it means that there is still idle space at the target site o, and the larger the value of V(o), the higher the idle degree of the target site o; if the idle degree V(o) is equal to 0, it means that there is just no idle space at the target site o; if the idle degree V(o) is less than 0, it means that the target site o has started to be crowded, and the smaller the value of V(o), the higher the degree of crowding of the site; the idle degree of the target site o is calculated by the following formula:
[0084] V(o) = s o -g
[0085] Among them, s o represents the space size of the given target site o, and g represents the number of agents that are on the way to and have arrived at the target site o.
[0086] More specifically, if the target site o has dependent sites, that is, the agents on the dependent sites must access the target site o simultaneously, and the dependent sites of the target site o are in the running state, then the urgency of the target site o is 0; otherwise, the urgency of the target site o is calculated by the following formula:
[0087]
[0088] where A represents the set of agents on the current dependent sites of the target site o, denotes the waiting time of agent a j .
[0089] More specifically, the throughput of the target site o is calculated by the following formula:
[0090]
[0091] where o represents the target site, t represents the time required for an agent to perform an access task at the target site o, and s represents the number of agents allowed to perform access tasks at the target site o per unit time.
[0092] S2: Optimize the weight values of each decision index in the decision model to obtain an optimized decision model;
[0093] More specifically, the differential evolution algorithm is used to optimize the weight values of each decision index, which specifically includes the following steps:
[0094] S2.1: Randomly initialize the population: Randomly generate NP individuals with values in the range [lb, ub] in the L-dimensional space as the 0th generation population; each individual vector in the population is composed of the weight values of all decision indexes in the decision model, and the value range of the weight values is [0, 1]; lb represents the lower bound of the decision index weight value, and ub represents the upper bound of the decision index weight value;
[0095] S2.2: Evaluation operation: Substitute each individual vector into the multi-agent system for collaborative scheduling simulation, and use the time required for all agents to complete the cooperation task as the fitness value of each individual;
[0096] S2.3: Determine whether the cumulative evaluation times of the individuals in the population reach the preset maximum times;
[0097] If so, use the optimal individual in the population as the final weight values of all decision indexes in the decision model, and execute step S2.5;
[0098] If not, execute step S2.4;
[0099] S2.4: Generate a mutant vector through differential mutation, perform binomial crossover on the generated mutant vector and the target vector to obtain a trial vector, and finally select the optimal vector from the target vector and the trial vector as the target vector for the next generation of evolution, then return to step S2.2;
[0100] The generation of the mutant vector v and the trial vector u is as follows:
[0101]
[0102]
[0103] (i = 1, 2,..., NP; j = 1, 2,..., D)
[0104] wherein, the randomly selected serial numbers r1, r2, r3 and the serial number i of the target vector are all different, rand() represents a random number generated between [0, 1], F represents a floating factor, CR represents a crossover probability, j represents the j-th dimension component in the trial vector, v i,t+1 represents the i-th mutant vector in the (t + 1)-th generation population, u ji,t+1 represents the j-th dimension component in the i-th trial vector in the (t + 1)-th generation population, x ji,t+1 represents the j-th dimension component in the i-th target vector in the (t + 1)-th generation population, and D represents the dimension of the individuals in the population;
[0105] S2.5: End the execution.
[0106] In the specific implementation process, intelligent optimization algorithms such as differential evolution algorithm, particle swarm algorithm, genetic algorithm, etc. are used to optimize the weight values of the decision model. The differential evolution algorithm performs relatively stably in this embodiment, so the differential evolution algorithm is selected as the optimization algorithm for the decision model in this embodiment.
[0107] S3: Apply the optimized decision model to the problem scenario for collaborative scheduling simulation, and record the intermediate process of the collaborative scheduling simulation;
[0108] S4: Generate a scheduling Gantt chart from the recorded intermediate process of the simulation scheduling as the scheduling chart of the multi-agent system.
[0109] Embodiment 3
[0110] A collaborative scheduling method for a multi-agent system, comprising the following steps:
[0111] S1: Use graphical modeling to model the real problem into the problem scenario of the multi-agent system, and construct a decision model;
[0112] More specifically, in the problem scenario, the agent includes the following states: the first agent state, the second agent state, the third agent state, the fourth agent state, and the fifth agent state;
[0113] When the agent is in the first agent state, it means that the agent has just been created; when the agent is in the second agent state, it means that the agent has arrived at the waiting queue of the site; when the agent is in the third agent state, it means that the agent has started running in the working space of the site; when the agent is in the fourth agent state, it means that the agent is not in the waiting queue of any site; when the agent is in the fifth agent state, it means that the agent has no site to visit.
[0114] In the specific implementation process, as Figure 2 shown, the state of the agent migrates in the following way:
[0115] The newly created agent is in the first agent state;
[0116] When the agent in the first agent state enters the waiting queue, its state changes to the second agent state;
[0117] When the agent in the first agent state does not enter the waiting queue, its state changes to the fourth agent state;
[0118] When the agent in the second agent state enters the working space, its state changes to the third agent state;
[0119] When the agent in the third agent state completes a single task but not all tasks, its state changes to the fourth agent state;
[0120] When the agent in the third agent state completes all tasks, its state changes to the fifth agent state;
[0121] When the agent in the fourth agent state enters the waiting queue, its state changes to the second agent state.
[0122] More specifically, in the problem scenario, the site includes the following states: the first site state, the second site state, the third site state, the fourth site state, and the fifth site state;
[0123] When the site is in the first site state, it means the site has just been created; when the site is in the second site state, it means there are agents waiting in the waiting queue of the site; when the site is in the third site state, it means the site is running. If the site has a dependency relationship with other sites, the dependent sites must also be in the second site state or the third site state at this time; when the site is in the fourth site state, it means both the workspace and the waiting queue are empty; when the site is in the fifth site state, it means the site has completed the work it needs to do and no agent is allowed to access the site anymore.
[0124] In the specific implementation process, as Figure 3 shown, the state of the site migrates in the following way:
[0125] The newly created site is in the first site state;
[0126] When the waiting queue of the site in the first site state is not empty, its state changes to the second site state;
[0127] When the waiting queue of the site in the first site state is empty, its state changes to the fourth site state;
[0128] When the site in the second site state has no dependent sites or its dependent sites are in the second site state / third site state, its state changes to the third site state;
[0129] When the workspace of the site in the third site state is empty but the waiting queue is not empty, its state changes to the second site state;
[0130] When both the workspace and the waiting queue of the site in the third site state are empty, its state changes to the fourth site state;
[0131] When the site in the third site state completes all its tasks, its state changes to the fifth site state;
[0132] When the waiting queue of the site in the fourth site state is not empty, its state changes to the second site state.
[0133] The decision-making model includes several decision-making groups. Each decision-making group includes four decision-making indicators and the corresponding weight values for each decision-making indicator. The decision-making indicators include the distance between sites, the degree of idleness, the degree of urgency, and the throughput;
[0134] More specifically, each decision-making group is responsible for the decision-making of a certain type of agent, and the number of decision-making groups depends on the number of agent types.
[0135] More specifically, the evaluation formula for each decision-making group in the decision-making model is as follows:
[0136] M(o) = p1D(c, o) + p2V(o) + p3C(o) + p4T(o)
[0137] Among them, M(o) represents the evaluation value of the agent for the target site o, p1, p2, p3, and p4 respectively represent the weight values of the four decision-making indicators of distance, idle degree, urgency degree, and throughput, and the value range is [-1, 1]; D(c, o) represents the shortest distance from the departure site c to the target site o for the agent, V(o) represents the idle degree of the target site o, C(o) represents the urgency degree of the target site o, and T(o) represents the throughput of the target site o.
[0138] In the specific implementation process, before each agent visits a site, it evaluates each site through the decision-making model respectively and selects the site with the highest evaluation value for access; after the access ends, if there are still sites to be visited, it continues to evaluate and access the remaining sites through the decision-making model. By considering multiple factors comprehensively during the decision-making process of this decision-making model, rather than relying solely on random, shortest distance, or maximum idle space for decision-making, and also considering the weights of various factors in the decision-making process, the decision-making model can make a more feasible and efficient decision by comprehensively considering multiple factors when making decisions in collaborative scheduling simulation.
[0139] More specifically, if the idle degree V(o) is greater than 0, it means that there is still idle space at the target site o, and the larger the value of V(o), the higher the idle degree of the target site o; if the idle degree V(o) is equal to 0, it means that there is just no idle space at the target site o; if the idle degree V(o) is less than 0, it means that the target site o has started to be crowded, and the smaller the value of V(o), the higher the degree of crowding of the site; the idle degree of the target site o is calculated by the following formula:
[0140] V(o) = s o -g
[0141] Among them, s o represents the given space size of the target site o, and g represents the number of agents that are on the way to and have arrived at the target site o.
[0142] More specifically, if there is a dependent site for the target site o, that is, the agents on the dependent site must visit the target site o simultaneously, and the dependent site of the target site o is in an operating state, then the urgency degree of the target site o is 0; otherwise, the urgency degree of the target site o is calculated by the following formula:
[0143]
[0144] Among them, A represents the set of agents on the current dependent site of the target site o, represents the agent aj Waiting time
[0145] More specifically, the throughput of the target site o is calculated by the following formula:
[0146]
[0147] where o represents the target site, t represents the time required for the agent to perform an access task at the target site o, and s represents the number of agents allowed to perform access tasks at the target site o per unit time.
[0148] S2: Optimize the weight values of each decision metric in the decision model to obtain an optimized decision model;
[0149] S3: Apply the optimized decision model to the problem scenario for collaborative scheduling simulation, and record the intermediate process of the collaborative scheduling simulation;
[0150] More specifically, as Figure 4 shown, the specific process of the collaborative scheduling simulation is as follows:
[0151] S3.1: Initialize the agents and sites in the multi-agent system. Initially, all agents are in the first agent state;
[0152] S3.2: Select and assign a task to all agents that currently have no access tasks from the corresponding task queue through the decision model;
[0153] S3.3: Determine whether all given access tasks have been completed;
[0154] If so, execute step S3.7;
[0155] If not, execute step S3.4;
[0156] S3.4: All agents access the corresponding sites according to the task requirements;
[0157] S3.5: Update the site status, including the following two cases:
[0158] a) Update the status of all sites. If the current site is in the first site state or the fourth site state, determine whether the waiting queue of the site is empty. If not, the site enters the second site state;
[0159] b) If the site is in the second site state and there are no dependent sites for the site, the site directly enters the third site state. Otherwise, determine whether its dependent sites are in the second site state or the third site state. If so, the site enters the third site state;
[0160] S3.6: Each site in the running state runs for one unit time respectively, and return to step S3.2;
[0161] S3.7: The execution ends.
[0162] S4: Generate a scheduling Gantt chart of the recorded intermediate process of the simulated scheduling as the scheduling chart of the multi-agent system.
[0163] Embodiment 4
[0164] In this embodiment, taking the scenario of collaborative patient treatment as an example, the decision-making model is used for coordinated scheduling simulation.
[0165] The problem scenario is set as follows: There are 5 patients, 1 nurse and 3 sites in the problem scenario. The 3 sites are respectively denoted as S1, S2 and S3. Initially, all patients are at S2 and all nurses are at S1. Each of the 5 patients needs to receive 1 medical service at S2 and S3. 1 nurse needs to provide medical services for all patients arriving at S2 at S1. Initially, all patients are at S2 and all nurses are at S1. S2 can only accommodate 1 patient at a time and each patient needs to be served for 12 unit times. S3 can only accommodate 1 patient at a time and each patient needs to be served for 10 unit times. There is a distance of 20 unit times between S2 and S3.
[0166] The process of coordinated scheduling simulation is as follows:
[0167] At time slice 0, all 5 patients are in S2, 1 nurse is in S1, and all are in the first agent state. All 5 patients have access tasks to visit both S2 and S3, and the nurse has 5 access tasks to visit S1. S1, S2, and S3 are all in the first site state. If calculated according to the decision model, patient No. 1, No. 2, and No. 3 choose to visit S2, patient No. 4 and No. 5 choose to visit S3, and nurse No. 1 chooses to visit S1. The process by which all currently task-free roles select the next site to visit through the decision model is the process by which all currently task-free roles receive a task from their corresponding task queues respectively. All roles that have received access tasks remain in the second agent state, while roles for which the task queue has no tasks to receive are in the fifth agent state. At this time, there are still patients not in the fifth agent state, and the simulation continues. All roles that have received tasks move to their respective target sites according to their access tasks. At this time, patient No. 1, patient No. 2, patient No. 3, and nurse No. 1 are all in the waiting queue of the target site. Patient No. 4 and patient No. 5 have not reached the target site after moving for one unit of time and are both set to the fourth agent state. The waiting queues of S1 and S2 are not empty, and both are set from the first site state to the second site state. The waiting queue of S3 is empty and is set from the first site state to the fourth site state. S1 is currently in the second site state and its dependent site S2 is in the second site state, so S1 is updated from the second site state to the third site state. S2 is currently in the second site state and its dependent site S1 is in the third site state, so S2 is updated from the second site state to the third site state. The workspace size of S2 is 1. According to the first-come principle, patient No. 1 enters the workspace to work for one unit of time, and patient No. 2 and patient No. 3 continue to wait in the waiting queue. The workspace size of S1 is 1, and nurse No. 1 enters the workspace to work for one unit of time. When all sites in the third site state have worked for one unit of time, at this time the time slice is 1, and all tasks received by the current roles are completed and no new tasks can be received, and they continue to complete their respective access tasks.
[0168] Until time slice 12, patient No. 1 and nurse No. 1 complete their access tasks and continue to receive the next task. At this time, patient No. 1 only has the task of visiting S3, so it receives the task of visiting S3, and nurse No. 1 continues to receive the access task of S1. Patient No. 2 enters the workspace of S2 to start working, and nurse No. 1 enters the workspace of S1 to start working.
[0169] At time slice 20, patient No. 4 and patient No. 5 arrive at the waiting queue of S3. The state of S3 is set from the first site state to the second site state, and since S3 has no dependent sites, it is directly set to the third site state, and patient No. 4 enters the workspace of S3 to start working.
[0170] At time slice 24, Patient 2 completes the access task of S2, receives its last access task of S3 and starts moving towards S3. Nurse 1 completes the access task of S1, continues to receive the access task of S1 and starts working. Patient 3 enters the working space of S2 and starts working.
[0171] At time slice 30, Patient 4 completes the access task, receives its last access task of S2 and starts moving towards S2. Patient 5 enters the working space of S3 and starts working.
[0172] At time slice 32, Patient 1 arrives at the waiting queue of S3.
[0173] At time slice 36, Patient 3 completes the access task of S2, receives its last access task of S3 and starts moving towards S3. Nurse 1 completes the access task of S1 and continues to receive the access task of S1.
[0174] At time slice 37, the waiting queue of S2 is empty, and S2 is set to the fourth site status.
[0175] At time slice 40, Patient 5 completes the access task of S3, receives its last access task of S2 and starts moving towards S2.
[0176] At time slice 44, Patient 2 arrives at the waiting queue of S3.
[0177] At time slice 50, Patient 4 arrives at the waiting queue of S2. S2 changes from the fourth site status to the second site status. At this time, S1 is in the second site status, so S2 is set from the second site status to the third site status. At the same time, S1 also changes from the second site status to the third site status. Patient 4 enters the working space of S3 and starts working. Patient 1 completes the access task of S3, and Patient 1 has completed all the access tasks it needs. The status of Patient 1 is set to the fifth agent status.
[0178] At time slice 56, Patient 3 arrives at the waiting queue of S3.
[0179] At time slice 60, Patient 2 completes the access task of S3, and Patient 2 has completed all the access tasks it needs. The status of Patient 2 is set to the fifth agent status.
[0180] At time slice 62, Patient 4 completes the access task of S3, and Patient 4 has completed all the access tasks it needs. The status of Patient 4 is set to the fifth agent status.
[0181] At time slice 70, Patient 3 completes the access task of S3, and Patient 3 has completed all the access tasks it needs. The status of Patient 3 is set to the fifth agent status.
[0182] At time slice 74, Patient 5 completes the task of accessing S3, and Patient 5 has completed all the tasks it needs to access. Set the status of Patient 5 to the fifth agent status. At this time, the status of all patients is the fifth agent status, and the scenario simulation ends.
[0183] Obviously, the above embodiments of the present invention are merely examples for clearly explaining the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A collaborative scheduling method for a multi-agent system, characterized in that, It includes the following steps: S1: Use graphical modeling to model real-world problems into problem scenarios of a multi-agent system and construct a decision model; The decision model includes several decision groups, each decision group includes four decision metrics and the corresponding weight values for each decision metric. The decision metrics include the distance between stations, the degree of idleness, the degree of urgency, and the throughput; If the degree of idleness V(o) is greater than 0, it means that there is still idle space at the target station o, and the larger the value of V(o), the higher the degree of idleness of the target station o; if the degree of idleness V(o) is equal to 0, it means that the target station o just has no idle space; if the degree of idleness V(o) is less than 0, it means that the target station o has started to be crowded, and the smaller the value of V(o), the higher the degree of crowding of the station; Calculate the degree of idleness of the target station o through the following formula: V(o) = s o –g Among them, s o represents the spatial size of the given target site o, and g represents the number of agents that are on the way to and have reached the target site o; If the target station o has a dependent station, that is, the agent on the dependent station must visit the target station o at the same time, and the dependent station of the target station o is in the running state, then the degree of urgency of the target station o is 0; otherwise, calculate the degree of urgency of the target station o through the following formula: Among them, A represents the set of agents on the current dependent site of the target site o, represents the agent a j 's waiting time; Calculate the throughput of the target station o through the following formula: Where, o represents the target station, t represents the time required for the agent to perform an access task at the target station o, and s represents the number of agents allowed to perform access tasks at the target station o per unit time; S2: Optimize the weight values of each decision metric in the decision model to obtain an optimized decision model; S3: Apply the optimized decision model to the problem scenario for collaborative scheduling simulation and record the intermediate process of the collaborative scheduling simulation; S4: Generate a scheduling Gantt chart from the recorded intermediate process of the simulated scheduling as the scheduling chart of the multi-agent system.
2. The collaborative scheduling method of a multi-agent system according to claim 1, characterized in that Each decision group is responsible for the decision-making of a class of agents, and the number of decision groups depends on the number of agent classes.
3. The collaborative scheduling method of a multi-agent system according to claim 1, wherein The evaluation formula for each decision group in the decision model is as follows: M(o) = p1D(c,o) + p2V(o) + p3C(o) + p4T(o) Where, M(o) represents the evaluation value of the agent for the target station o, p1, p2, p3, and p4 respectively represent the weight values of the four decision metrics of distance, degree of idleness, degree of urgency, and throughput, and the value range is [-1, 1]; D(c,o) represents the shortest distance from the departure station c to the target station o, V(o) represents the degree of idleness of the target station o, C(o) represents the degree of urgency of the target station o, and T(o) represents the throughput of the target station o.
4. The collaborative scheduling method of a multi-agent system according to claim 1, characterized in that, In the problem scenario, the agents include the following states: the first agent state, the second agent state, the third agent state, the fourth agent state, and the fifth agent state; When the agent is in the first agent state, it means that the agent has just been created; when the agent is in the second agent state, it means that the agent has arrived at the waiting queue of the station; When the agent is in the third agent state, it means that the agent has started running in the workspace of the site; when the agent is in the fourth agent state, it means that the agent is not in the waiting queue of any site; when the agent is in the fifth agent state, it means that the agent has no site to visit.
5. The collaborative scheduling method of a multi-agent system according to claim 4, wherein In the problem scenario, the site includes the following states: the first site state, the second site state, the third site state, the fourth site state, and the fifth site state; When the site is in the first site state, it means that the site has just been created; When the site is in the second site state, it means that there is already an agent waiting in the waiting queue of the site; When the site is in the third site state, it means that the site is running. If the site has a dependency relationship with other sites, the dependent sites must also be in the second site state or the third site state at this time; when the site is in the fourth site state, it means that both the workspace and the waiting queue are empty; When the site is in the fifth site state, it means that the site has completed the work it needs to complete and no agent is allowed to access the site anymore.
6. A collaborative scheduling method for a multi-agent system according to claim 1, characterized in that The differential evolution algorithm is used to optimize the weight values of each decision index, which specifically includes the following steps: S2.1: Randomly initialize the population: Randomly generate NP individuals with a value range of [lb, ub] in the L-dimensional space as the 0th generation population; each individual vector in the population is composed of the weight values of all decision indexes in the decision model, and the value range of the weight values is [0, 1]; lb represents the lower bound of the decision index weight value, and ub represents the upper bound of the decision index weight value; S2.2: Evaluation operation: Substitute each individual vector into the multi-agent system for collaborative scheduling simulation, and use the time required for all agents to complete the collaborative task as the fitness value of each individual; S2.3: Judge whether the cumulative evaluation times of the individuals in the population reach the preset maximum times; If so, use the optimal individual in the population as the final weight values of all decision indexes in the decision model, and execute step S2.5; If not, execute step S2.4; S2.4: Generate a mutant vector through differential mutation, perform binomial crossover on the generated mutant vector and the target vector to become a trial vector, and finally select the optimal vector from the target vector and the trial vector as the target vector for the next generation of evolution, and return to step S2.2; The generation of the mutant vector v and the trial vector u is as follows: (i = 1, 2,..., NP; j = 1, 2,..., D) Among them, the randomly selected serial numbers r1, r2, r3 and the serial number i of the target vector are all different. rand() represents a random number generated between [0, 1], F represents the floating factor, CR represents the crossover probability, j represents the j-th dimensional component in the trial vector, and v i,+1 represents the i-th mutant vector in the (t + 1)-th generation population, and u ji,t+1 represents the j-th dimensional component in the i-th trial vector in the (t + 1)-th generation population, and x ji,t+1 represents the j-th dimensional component in the i-th target vector in the (t + 1)-th generation population, and D represents the dimension of the individuals in the population; S2.5: Execution ends.
7. The collaborative scheduling method of a multi-agent system according to claim 5, characterized in that The specific process of collaborative scheduling simulation is as follows: S3.1: Initialize the agents and sites in the multi-agent system. Initially, all agents are in the first agent state; S3.2: Select and assign a task to all agents without access tasks from the corresponding task queue through the decision model; S3.3: Judge whether all given access tasks have been completed; If so, execute step S3.7; If not, execute step S3.4; S3.4: All agents access the corresponding sites according to the task requirements; S3.5: Update the site state, including the following two cases: a) Update the status of all sites. When the current site is in the first site status or the fourth site status, check whether the waiting queue of the site is empty. If it is not empty, the site enters the second site status; b) When the site is in the second site status and there are no dependent sites, the site directly enters the third site status. Otherwise, check whether its dependent sites are in the second site status or the third site status. If so, the site enters the third site status; S3.6: All sites in the running state run for one unit of time respectively, and return to step S3.2; S3.7: Execution ends.
Citation Information
Patent Citations
Multi-agent multi-objective optimization method capable of applying rescheduling method based on plasticity mechanism
CN108334986A
Multi-agent co-evolution method based on strategy migration
CN113869511A
Cited By
Interactive collaborative decision-making and autonomous scheduling method for airport ground support vehicles
CN121581591A
An interactive collaborative decision-making and autonomous scheduling method for airport ground support vehicles
CN121581591B