AGV task allocation method, electronic equipment and storage medium
By combining event-driven, Hungarian algorithms and heuristic algorithms in the AGV scheduling system, dynamic adjustments are made according to the production beat, the problems of low AGV starting rate and production efficiency are solved, and efficient and flexible task allocation is achieved.
Patent Information
- Application Number
- CN202510208008.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-07-01
AI Technical Summary
The existing AGV scheduling systems pay less attention to the optimization of dynamic task allocation algorithms, resulting in low AGV starting rate and low production efficiency, and failure to respond to dynamic adjustments in line-edge production in a timely manner.
A coupling scheme of a variety of task allocation algorithms is adopted, including event-driven allocation strategy, Hungarian algorithm allocation strategy and heuristic algorithm allocation strategy. It is divided into different stages according to the production rhythm, and the most suitable strategy is used for task allocation.
It improves the AGV starting rate and production efficiency, can respond quickly under complex production needs and reasonably formulate task allocation plans, which are highly adaptable and avoids the inefficiency and uneven load problems of a single algorithm in complex environments.
Smart Images

Figure CN120233773A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent manufacturing technology, and particularly relates to an AGV task allocation method, an electronic device, and a storage medium. Background Art
[0002] At present, to meet the market's customized needs and improve production efficiency, some automobile manufacturing factories have built flexible production operation systems to improve the flexibility and automation level in the manufacturing process. Automated Guided Vehicle (AGV), as an important part of the flexible workshop, has gradually replaced the traditional assembly line conveyor belt and manual material transportation methods.
[0003] The existing AGV scheduling systems focus more on the control of the AGV vehicle body and the optimization of path selection, while paying less attention to the optimization of dynamic task allocation algorithms. This is mainly reflected in aspects such as a single cost evaluation index and a lack of dynamic adaptability. Among them, the existing AGV scheduling systems in manufacturing workshops adopt simple task allocation strategies, only simply considering the set task priorities and static path costs, without considering the changes in the real-time road network environment, resulting in a low AGV operation rate; moreover, the existing task allocation algorithms only consider the current task allocation plan to be optimal, ignoring the consumption of station inventories and demand changes in future time periods. When facing dynamic adjustments in in-line production, they cannot be adjusted in time, affecting the overall production efficiency.
[0004] Correspondingly, there is a need in this field for a new AGV task allocation solution to solve the above problems. Summary of the Invention
[0005] To overcome the above defects, the present application is proposed to provide an AGV task allocation method, an electronic device, and a storage medium that can solve or at least partially solve the technical problems that the existing AGV scheduling systems pay less attention to the optimization of dynamic task allocation algorithms, resulting in a low AGV operation rate and low production efficiency.
[0006] In a first aspect, an AGV task allocation method is provided, and the method includes:
[0007] Obtain the operation stage of the current AGV task allocation scenario; the operation stage includes a first stage, a second stage, and a third stage;
[0008] Determine the corresponding task allocation strategy based on the operation stage; the task allocation strategy includes an event-driven allocation strategy, a Hungarian algorithm allocation strategy, and a heuristic algorithm allocation strategy;
[0009] Perform AGV task allocation based on the determined task allocation strategy.
[0010] In one technical solution of the above AGV task allocation method, the obtaining of the operation stage of the current AGV task allocation scenario includes:
[0011] Obtain the production beat of the current AGV task allocation scenario;
[0012] Based on the production beat, determine that the operation stage is the first stage, the second stage or the third stage;
[0013] Wherein, the production beat of the first stage is less than the production beat of the second stage, and the production beat of the second stage is less than the production beat of the third stage.
[0014] In one technical solution of the above AGV task allocation method, determining the corresponding task allocation strategy based on the operation stage includes:
[0015] When the operation stage is the first stage, determine that the task allocation strategy is the event-driven allocation strategy;
[0016] When the operation stage is the second stage, determine that the task allocation strategy is the Hungarian algorithm allocation strategy;
[0017] When the operation stage is the third stage, determine that the task allocation strategy is the heuristic algorithm allocation strategy.
[0018] In one technical solution of the above AGV task allocation method, performing AGV task allocation based on the determined task allocation strategy includes:
[0019] When the task allocation strategy is the event-driven allocation strategy, determine whether there is a task to be allocated;
[0020] If so, obtain the shortest path for each idle AGV to reach the task start point;
[0021] Allocate the task to be allocated to the idle AGV with the smallest shortest path, so that the AGV receives and executes the task;
[0022] Wherein, the number of idle AGVs is greater than the number of tasks to be allocated.
[0023] In one technical solution of the above AGV task allocation method, the performing of AGV task allocation based on the determined task allocation strategy further includes:
[0024] When the task allocation strategy is the Hungarian algorithm allocation strategy, obtain all tasks to be allocated and idle AGVs;
[0025] Based on the tasks to be allocated and idle AGVs, construct a shortest path cost matrix;
[0026] Determine a task assignment plan with the lowest total cost based on the Hungarian algorithm and the shortest path cost matrix;
[0027] Send the task assignment result in the task assignment plan to the corresponding AGV so that the AGV receives and executes the task.
[0028] In a technical solution of the above AGV task assignment method, the AGV task assignment based on the determined task assignment strategy further includes:
[0029] When the task assignment strategy is the heuristic algorithm assignment strategy, obtain all tasks to be assigned and idle AGVs;
[0030] Based on the greedy strategy, initially assign the tasks to be assigned to each idle AGV to obtain an initial assignment plan;
[0031] Optimize the initial assignment plan to obtain a final task assignment plan;
[0032] Send the task assignment result in the final task assignment plan to the corresponding AGV so that the AGV receives and executes the task;
[0033] Wherein, the number of the idle AGVs is less than the number of the tasks to be assigned.
[0034] In a technical solution of the above AGV task assignment method, the determination of the task assignment plan with the lowest total cost based on the Hungarian algorithm and the shortest path cost matrix includes:
[0035] S1. Create a matching array based on the shortest path cost matrix, and set the number of vertices and edge weights;
[0036] S2. Obtain all free vertices;
[0037] S3. Search for an augmenting path based on the free vertices;
[0038] S4. If the augmenting path is found, update the matching status; otherwise, return to step S2;
[0039] S5. Determine whether the current matching covers all the free vertices; if so, obtain the matching result, otherwise return to step S2;
[0040] S6. Obtain the task assignment plan with the lowest total cost based on the matching result;
[0041] Wherein, the matching result includes matching vertex pairs, corresponding weights, and the total weight.
[0042] In one technical solution of the above AGV task allocation method, the optimization of the initial allocation scheme to obtain the final task allocation scheme includes:
[0043] Perturb the initial allocation scheme to obtain the objective function value of each scheme in the initial allocation scheme; the objective function value is obtained by weighting the difference between the task waiting time and the execution time;
[0044] Update the initial allocation scheme based on the scheme with the largest decrease in the objective function value in the initial allocation scheme;
[0045] Optimize the updated initial allocation scheme based on at least one of AGV path conflicts, AGV empty driving and / or waiting time, production plan information, and AGV charging period to obtain the final task allocation scheme.
[0046] In a second aspect, an electronic device is provided. The electronic device includes a processor and a memory. The memory is adapted to store multiple program codes, and the program codes are adapted to be loaded and run by the processor to execute the AGV task allocation method described in any one of the technical solutions of the above AGV task allocation method.
[0047] In a third aspect, a computer-readable storage medium is provided. Multiple program codes are stored in the computer-readable storage medium, and the program codes are adapted to be loaded and run by a processor to execute the AGV task allocation method described in any one of the technical solutions of the above AGV task allocation method.
[0048] One or more of the above technical solutions of the present application have at least one or more of the following beneficial effects:
[0049] In implementing the technical solution of the present application, the operation stage of the current AGV task allocation scenario can be obtained, including the first stage, the second stage, and the third stage; then, based on the operation stage, the corresponding task allocation strategy is determined. The task allocation strategy includes an event-driven allocation strategy, a Hungarian algorithm allocation strategy, and a heuristic algorithm allocation strategy; finally, the AGV task allocation is performed based on the determined task allocation strategy. Through the above implementation method, a coupling scheme of multiple task allocation algorithms is adopted, which can adopt different task allocation strategies in different operation stages, meet the needs of dynamic adjustment of production tasks, has strong adaptability, and can reasonably formulate tasks according to the production plan in the face of complex production requirements, determine a feasible and efficient allocation scheme in a short time, and improve the AGV operation rate and production efficiency. Description of the Drawings
[0050] Referring to the accompanying drawings, the disclosure of the present application will become more readily understandable. It is easily understood by those skilled in the art that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:
[0051] Figure 1 is a schematic diagram of the main steps of an AGV task allocation method according to an embodiment of the present application;
[0052] Figure 2 is a schematic diagram of an event-driven allocation strategy according to an embodiment of the present application;
[0053] Figure 3 is the intention of a Hungarian algorithm allocation strategy according to an embodiment of the present application;
[0054] Figure 4 is a schematic diagram of a heuristic algorithm allocation strategy according to an embodiment of the present application;
[0055] Figure 5 is a schematic diagram of the main structure of an electronic device according to an embodiment of the present application.
[0056] List of reference numerals:
[0057] 51: Processor; 52: Memory. Detailed implementation manners
[0058] The following describes some embodiments of the present application with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principle of the present application and are not intended to limit the scope of protection of the present application.
[0059] In the description of the present application, a "processor" may include hardware, software, or a combination of both. A processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, in hardware, or in a combination of both. A non-transitory computer-readable storage medium includes any suitable medium that can store program code, such as magnetic disks, hard disks, optical discs, flash memories, read-only memories, random access memories, and the like.
[0060] The term "A and / or B" represents all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a meaning similar to "A and / or B" and may include only A, only B, or A and B. The singular forms of the terms "a" and "this" may also include the plural forms.
[0061] Some terms related to the present application are explained here first.
[0062] AGV: Automated Guided Vehicle, that is, an automated guided vehicle, is a transportation device that can automatically travel along a preset path and is widely used in many fields such as industrial production and logistics warehousing.
[0063] As described in the background art, to meet the market's customized needs and improve production efficiency, some automotive manufacturing plants build flexible production and operation systems to enhance the flexibility and automation level in the manufacturing process. As an important part of the flexible workshop, AGVs have gradually replaced the traditional assembly line conveyor belts and manual material transportation methods. Introducing multiple types of AGVs in the factory workshop can efficiently transport components between different material sorting areas and work islands. These handling AGVs can complete the timely replenishment of components according to production requirements, significantly improving the flexibility and response speed of the production line.
[0064] The AGV task allocation algorithm is the key in the automated logistics system, aiming to optimize task allocation and resource utilization. The current AGV task allocation algorithms mainly include rule-based, centralized, distributed, based on the Hungarian algorithm, genetic algorithm, reinforcement learning, and optimization algorithms (such as particle swarm optimization and ant colony algorithm, etc.).
[0065] Among them, the rule-based algorithm usually allocates tasks according to predetermined rules, conditions, or priorities. For example, it selects a suitable AGV to execute the task based on the urgency of the task, the target location, the idle state of the AGV, etc. Its allocation is simple and intuitive, and the implementation cost is relatively low, suitable for small-scale systems, but its robustness is poor. Without an optimization strategy, it may cause some AGVs to be idle while other AGVs are overloaded, and as the system scale expands, the maintenance and adjustment of the rules become increasingly complex.
[0066] The centralized task allocation algorithm usually has a central controller or scheduler responsible for the task scheduling and allocation of the entire system. This scheduler makes a globally optimal task allocation based on information such as task requirements, the current location of AGVs, and their loads. It can comprehensively consider all tasks in the system and the status of AGVs, make globally optimal decisions, and can reasonably consider the capabilities and locations of AGVs during task allocation to reduce unnecessary path conflicts. However, it has a single-point failure risk. As the system scale increases, the computational complexity of the central controller also increases. When the scheduler is too centralized, there may be an uneven load situation, resulting in a reduction in resource utilization.
[0067] Distributed task allocation algorithms do not have a central controller. Instead, they complete task allocation through communication and coordination among AGVs. Each AGV selects and schedules tasks based on its own status and cooperation with other AGVs. It can quickly adapt in a dynamic environment, has good real-time performance and flexibility. Moreover, as the number of AGVs increases, the system can be more easily expanded. However, since each AGV only cares about its own status, it may not be able to achieve a globally optimal allocation. Frequent communication among AGVs may lead to communication burdens and delays.
[0068] The task allocation algorithm based on the Hungarian algorithm can adapt to dynamically changing tasks and environments, flexibly handle emergencies, and ensure the fairness of task allocation through the cost matrix, avoiding overloading of some AGVs while other AGVs are idle. However, a large amount of calculation and comparison are involved in the process, which may affect the real-time performance of the system.
[0069] Reinforcement learning is an algorithm that learns the optimal strategy through the interaction between an agent and the environment. In AGV task allocation, the AGV learns how to select appropriate tasks by interacting with the environment, optimizes the strategy according to the reward signal, and can self-optimize through continuous interaction with the environment to adapt to the dynamically changing environment. It can optimize long-term decisions by accumulating rewards and avoid losses caused by short-term decisions. However, a large amount of interaction and training are required to obtain an effective strategy, the convergence speed is slow, and a large amount of computing resources are needed to train the agent, especially in complex environments. Moreover, the algorithm may lead to unsatisfactory decision-making effects due to model instability.
[0070] Optimization algorithms imitate the heuristic optimization mechanism in nature and find the optimal task allocation scheme by simulating the behavior of particles or ants. Optimization algorithms can find an approximate globally optimal solution in complex task allocation problems and can make effective adjustments in a dynamically changing environment. When facing uncertain and complex environments, optimization algorithms perform relatively stably. However, these algorithms usually require multiple iterations to achieve good results, and the computing time is long. Especially when the problem space is large, it is easy to fall into a local optimal solution rather than the globally optimal solution.
[0071] Therefore, when performing task allocation, the selection of the algorithm needs to consider factors such as system scale, real-time requirements, and task complexity. However, the current AGV scheduling system focuses more on the control of the AGV body and the optimization of path selection, and less on the optimization of dynamic task allocation algorithms. This is mainly reflected in the following aspects:
[0072] 1. Single cost evaluation index: The existing AGV scheduling system in the manufacturing workshop adopts a simple task allocation strategy, only simply considering the set task priorities and static path costs, without considering the changes in the real-time road network environment, resulting in a low utilization rate of AGVs.
[0073] 2. Lack of dynamic adaptability: Existing task allocation algorithms only consider the optimality of the current task allocation scheme, ignoring the consumption of station inventory and demand changes in future time periods. When faced with dynamic adjustments in on-line production, they cannot be adjusted in a timely manner, affecting the overall production efficiency.
[0074] To solve the above problems, the present application provides an AGV task allocation method, an electronic device, and a storage medium.
[0075] Refer to the appendix Figure 1 , Figure 1 is a schematic diagram of the main steps of an AGV task allocation method according to an embodiment of the present application. As Figure 1 shown, the AGV task allocation method in the embodiment of the present application mainly includes the following steps S101 to step S103.
[0076] Step S101: Obtain the operation stage of the current AGV task allocation scenario;
[0077] Among them, the operation stage may include a first stage, a second stage, and a third stage.
[0078] Step S102: Determine the corresponding task allocation strategy based on the operation stage;
[0079] Among them, the task allocation strategy includes an event-driven allocation strategy, a Hungarian algorithm allocation strategy, and a heuristic algorithm allocation strategy.
[0080] Step S103: Perform AGV task allocation based on the determined task allocation strategy.
[0081] Based on the method described in the above steps S101 to step S103, a coupling scheme of multiple task allocation algorithms is adopted, which can adopt different task allocation strategies in different operation stages, meet the needs of dynamic adjustment of production tasks, and has strong adaptability. When facing complex production requirements, it can reasonably formulate tasks according to the production plan, determine a feasible and efficient allocation plan in a short time, and improve the AGV operation rate and production efficiency.
[0082] The following further explains the above steps S101 to S105.
[0083] In some embodiments of the above step S101, the operation stage of the current AGV task allocation scenario can be obtained.
[0084] Specifically, the operation stage of the current AGV task allocation scenario can be obtained through the following steps S1011 to step S1012.
[0085] Step S1011: Obtain the production beat of the current AGV task allocation scenario;
[0086] Among them, the production cycle time is an important indicator to measure the efficiency of the production line and is usually used to describe the production speed and rhythm of the production line. The unit of the production cycle time is usually "pieces per hour" (JPH, Jobs Per Hour), indicating the number of products that can be completed per hour.
[0087] Step S1012: Determine that the operation stage is the first stage, the second stage or the third stage based on the production cycle time.
[0088] Among them, the production cycle time of the first stage is less than that of the second stage, and the production cycle time of the second stage is less than that of the third stage.
[0089] Specifically, the operation stage can be divided into the first stage, the second stage and the third stage according to the production cycle time from slow to fast.
[0090] For example, when the production cycle time is less than 30 JPH, it means that the production cycle time is relatively slow and can be divided into the first stage; when the production cycle time is between 30 JPH and 50 JPH, it means that the production cycle time is moderate and can be divided into the second stage; when the production cycle time is greater than 50 JPH, it means that the production cycle time is relatively fast and can be divided into the third stage.
[0091] The above is a further description of step S101. Next, step S102 will be further described.
[0092] In some embodiments of the above step S102, when the operation stage is the first stage, the task allocation strategy can be determined as an event-driven allocation strategy.
[0093] Specifically, in the first stage, the number of tasks is small and the number of AGVs is sufficient. When performing task allocation, the main goal is to select the AGV that can complete the task fastest for each task. In this case, each AGV only needs to execute one task.
[0094] At this time, if algorithms such as heuristic algorithms are used for task allocation, it will lead to a long task response time and may not obtain the optimal solution in a simple environment. Therefore, an event-driven task allocation strategy can be adopted to effectively improve the real-time performance and flexibility of the algorithm.
[0095] In some embodiments of the above step S102, when the operation stage is the second stage, the task allocation strategy can be determined as a Hungarian algorithm allocation strategy.
[0096] Specifically, in the second stage, the number of tasks is moderate and the number of AGVs is sufficient. For example, the production beat is between 30 JPH and 50 JPH, the task arrival frequency is moderate, and an efficient task allocation strategy is required. Moreover, when performing task allocation, factors such as the empty running and / or waiting time of AGVs, the production plan information in the future time period, and the possible charging time periods of current AGVs need to be comprehensively considered to reasonably allocate tasks to different AGVs. In this case, each AGV only needs to execute one task.
[0097] At this time, if a simple event-driven based task allocation is used, the calculation efficiency is too low. If a heuristic algorithm is used for task allocation, it will result in a long task response time and may not obtain the optimal solution in a simple environment. Therefore, the Hungarian algorithm can be used to trigger task allocation periodically to calculate the task allocation plan with the lowest total cost. This can not only find the task allocation plan with the lowest total cost under given conditions, but also quickly calculate the task allocation results under a moderate task volume. Moreover, the Hungarian algorithm is applicable to various task allocation scenarios and is not restricted by specific task types.
[0098] In some embodiments of the above step S102, when the operation stage is the third stage, the task allocation strategy can be determined as a heuristic algorithm allocation strategy.
[0099] Specifically, in the third stage, there are many piled-up tasks and AGVs are in short supply. For example, the production beat is greater than 50 JPH. Different from the previous two stages, some AGVs need to execute multiple tasks at a time. Therefore, on the basis of the second stage, factors such as the task precedence relationship of one AGV, task priority, and load balance of AGVs need to be further considered.
[0100] At this time, if a simple event-driven based task allocation is used, the calculation efficiency is too low. Therefore, a heuristic algorithm can be used to optimize the task allocation plan on the basis of considering the task precedence relationship and AGV load balance, so as to adapt to complex task allocation scenarios and handle various constraint conditions. Moreover, the heuristic algorithm can flexibly adjust the neighborhood structure according to specific problems to improve the algorithm effect.
[0101] The above is a further description of step S102. Next, step S103 will be further described.
[0102] In some embodiments of the above step S103, in the first stage, when the task allocation strategy is an event-driven allocation strategy, the relationship between the number m of idle AGVs and the number n of tasks to be allocated is m > n. At this time, it can be determined whether there are tasks to be allocated.
[0103] Further, if there are tasks to be assigned, obtain the shortest path for each idle AGV to reach the task starting point, and assign the tasks to be assigned to the idle AGV with the minimum shortest path, so that the AGV can receive and execute the tasks.
[0104] Specifically, in the first stage, one AGV only needs to consider completing one task. Therefore, the task assignment method can be abstracted as a mathematical problem for modeling. In the first stage, an objective function with the lowest total cost can be constructed. Among them, the objective function of the optimization problem can be the following function (1):
[0105] min∑ k∈K ∑ i∈I r ki x ki (1)
[0106] Among them, k represents the k-th AGV, K represents the total number of AGVs, k ∈ K; i represents the i-th task, I represents the total number of tasks, i ∈ I; the constraint conditions of the above objective function include: 0-1 variable constraint, that is, x ki ∈ {0, 1}, indicating whether to assign the k-th AGV to complete the i-th task; r ki represents the shortest path cost from the current position to the task starting point without considering conflicts.
[0107] The task constraints include the following constraint formulas (2)-(3):
[0108]
[0109]
[0110] The above constraint formulas (2)-(3) indicate that one AGV can only perform one task at the same time, and one task can only be completed by one AGV.
[0111] Further, in the first stage, the event-driven task assignment method can specifically include the following steps 11 to step 14:
[0112] Step 11, the timer triggers to scan the task queue: Scan the task queue through the timer (such as triggering once per second) to determine whether there are tasks to be assigned arriving;
[0113] Step 12, calculate the shortest path: For each task to be assigned, the optimized Dijkstra algorithm or A* algorithm, etc. can be used to calculate the shortest path from each idle AGV to the task starting point without considering conflicts;
[0114] Among them, the optimized Dijkstra algorithm is an improved version of the classic Dijkstra algorithm. The classic Dijkstra algorithm is an algorithm for calculating the shortest path from a single source, applicable to weighted graphs (weights are non-negative numbers). Its core idea is to gradually expand the shortest path from the starting point to other nodes through a greedy strategy. The optimized Dijkstra algorithm usually accelerates the node selection process by using a priority queue (such as a binary heap or a Fibonacci heap), thereby reducing the time complexity. Specifically, the algorithm starts from the starting point, selects the unprocessed node that is currently closest to the starting point each time, and updates the shortest paths of its neighbor nodes. Through the priority queue, the algorithm can quickly find the next closest node, thus accelerating the search speed for the shortest path. In practical application scenarios, it can find the optimal path more quickly and accurately, improving the operating efficiency of the system.
[0115] The A* algorithm is a heuristic search algorithm that combines the breadth-first search of the Dijkstra algorithm and heuristic estimation to find the shortest path from the starting point to the target node in a graph. Different from the Dijkstra algorithm, the A* algorithm not only considers the actual path cost (g value) from the starting point to the current node during the search process, but also introduces a heuristic function (h value) to estimate the expected cost from the current node to the target node. By comprehensively considering the g value and the h value, the A* algorithm can preferentially search for paths that are more likely to be close to the target node, thereby reducing the search scope and improving the efficiency.
[0116] Step 13, Task allocation: In the first stage, the relationship between the number m of AGVs and the number n of tasks to be allocated is m > n. At this time, the idle AGV with the smallest shortest path can be selected, and the task to be allocated is assigned to this AGV;
[0117] Step 14, Task execution: This AGV receives the above task and starts to execute the task.
[0118] Refer to the appendix Figure 2 , Figure 2 is a schematic diagram of the event-driven allocation strategy according to an embodiment of the present application.
[0119] As Figure 2 shown, at time t0, AGV1 and AGV2 are idle and there are no tasks to be allocated; at time t1, there is a task at station 1, which is immediately sent to the nearest AGV1 so that AGV1 reaches station 1 to execute the task.
[0120] Through the above implementation method, in the first stage, an event-driven task allocation strategy is adopted, effectively improving the real-time performance and flexibility of the algorithm.
[0121] In some embodiments of the above step S103, in the second stage, when the task assignment strategy is the Hungarian algorithm assignment strategy, the relationship between the number m of idle AGVs and the number n of tasks to be assigned is m≈n, and one AGV only needs to consider completing one task.
[0122] Therefore, when abstracting the task assignment method into a mathematical problem for modeling, the objective function of the optimization problem can also be the above function (1), where k represents the k-th AGV, K represents the total number of AGVs, k∈K; i represents the i-th task, I represents the total number of tasks, i∈I; the constraint conditions of the above objective function include: 0-1 variable constraint, that is, x ki ∈{0,1}, indicating whether to assign the k-th AGV to complete the i-th task; r ki represents the path cost obtained by calculating the cost matrix and comprehensively considering the empty running and / or waiting time of the AGV, the production plan information in the future time period, and the possible charging time period of the current AGV; the task constraints include the above constraint formulas (2)-(3).
[0123] Further, in the second stage, the task assignment method based on the Hungarian algorithm may specifically include the following steps 21 to 24:
[0124] Step 21: Obtain all tasks to be assigned and idle AGVs;
[0125] That is, collect all currently unassigned tasks and idle AGVs.
[0126] Step 22: Construct a shortest path cost matrix based on the tasks to be assigned and idle AGVs;
[0127] Specifically, the shortest path cost from each idle AGV to the starting point of each task can be calculated to construct the shortest path cost matrix.
[0128] Step 23: Determine the task assignment plan with the lowest total cost based on the Hungarian algorithm and the shortest path cost matrix;
[0129] In the second stage, the relationship between the number m of AGVs and the number n of tasks to be assigned is m≈n. At this time, factors such as the empty running and / or waiting time of the AGV, the production plan information in the future time period, and the possible charging time period of the current AGV need to be comprehensively considered, and the tasks received by each AGV are reasonably assigned, and the Hungarian algorithm is used to solve the task assignment plan to ensure the lowest total cost.
[0130] Among them, the Hungarian algorithm is a combinatorial optimization algorithm for solving the maximum matching problem in a bipartite graph. A bipartite graph is a special graph whose vertex set can be divided into two non-overlapping subsets, and each edge in the graph connects vertices from two different subsets. The core idea of the Hungarian algorithm is to continuously expand the matching scale by finding augmenting paths. Starting from an initial matching (which can be empty), for unmatched vertices, try to find an augmenting path, that is, a path starting from an unmatched vertex, alternating between unmatched edges and matched edges, and finally reaching another unmatched vertex. Once an augmenting path is found, the matching status of the edges on the path can be flipped (matched edges become unmatched edges, and unmatched edges become matched edges) to increase the number of matched edges. Repeat this process until no augmenting path can be found. At this time, the obtained matching is the maximum matching of the bipartite graph. The Hungarian algorithm has wide applications in scenarios such as task allocation and scheduling. For example, when allocating multiple tasks to multiple executors, the tasks and executors can be regarded as the two vertex sets of a bipartite graph, and thus the optimal task allocation scheme can be found through the Hungarian algorithm.
[0131] Specifically, the Hungarian algorithm can include steps such as start, initialization, constructing a minimum cover, finding an augmenting path, judging the augmenting path, checking the completeness of the matching, and outputting the result.
[0132] Among them, the start is the starting point of the algorithm, ready to receive input. The input for initialization is the shortest path cost matrix, which represents the weights of each edge in the bipartite graph.
[0133] In some embodiments, step S23 can determine the task allocation scheme with the lowest total cost through the following steps 231 to 235:
[0134] Step 231: Create a matching array based on the shortest path cost matrix and set the number of vertices and edge weights;
[0135] Among them, in the initial state, all vertices are unmatched. Therefore, the number of vertices and edge weights can be set for subsequent calculations.
[0136] Step 232: Obtain all free vertices;
[0137] When constructing the minimum cover, it is necessary to find all free vertices (unmatched left vertices). Specifically, all unmatched left vertices can be traversed and marked as "free" vertices, ready for the search of augmenting paths.
[0138] Step 233: Find an augmenting path based on the free vertices;
[0139] When finding an augmenting path, starting from each unmatched left vertex, depth-first search (abbreviated as DFS) can be used.
[0140] Breadth-First Search: The English full spelling is Breadth-First Search. Use depth-first search (DFS) or breadth-first search (BFS) to find an augmenting path, and explore adjacent right vertices recursively or through a queue to find a path that can increase the matching. If a path is found, record the vertices passed through for subsequent matching updates.
[0141] Among them, DFS and BFS are common algorithms for traversing graphs and tree structures. DFS continuously explores deeply along a path until it can no longer advance or finds the target, and then backtracks to find other paths. It is often implemented recursively and is suitable for finding specific paths, such as maze pathfinding. For example, in a binary tree, starting from the root node, preferentially explore deeply into the left subtree or right subtree. BFS expands and searches layer by layer outward centered on the starting point, implemented using a queue. First, enqueue the starting node. When dequeuing, visit it and enqueue its unvisited adjacent nodes. It is often used to find the shortest path, such as finding the least number of transfer routes between two points in a city traffic map.
[0142] Step 234: If an augmenting path is found, update the matching status; otherwise, return to Step 232.
[0143] When judging the augmenting path, if an augmenting path is found, update the matching and change the matching status on the path; if no augmenting path is found: return to "Construct the minimum cover" (Step 232) to prepare to mark more free vertices or perform other operations.
[0144] Step 235: Determine whether the current matching covers all free vertices; if so, obtain the matching result, otherwise return to Step 232.
[0145] When checking the completeness of the matching, it can be determined whether the current matching has covered all left vertices. Specifically, the left vertices can be traversed to check whether each vertex has a matching. If all left vertices have a matching, the algorithm ends and outputs the result; if there are unmatched left vertices, return to "Construct the minimum cover" (Step 232) to continue searching for an augmenting path.
[0146] Step 236: Obtain the task assignment plan with the lowest total cost based on the matching result.
[0147] Specifically, after the matching is complete, the final matching result and its corresponding weight value can be output. Among them, the matching result usually includes matching vertex pairs, corresponding weights, and the total weight.
[0148] The above is a further explanation of Step 23.
[0149] Step 24: Send the task assignment result in the task assignment plan to the corresponding AGV so that the AGV can receive and execute the task.
[0150] See the appendix Figure 3 , Figure 3 is a schematic diagram of the Hungarian algorithm assignment strategy according to an embodiment of the present application.
[0151] As Figure 3 shown, at time t0, AGV1 and AGV2 are idle and there are no tasks to be assigned; at time t1, there is a task at station 1 and it is not issued temporarily; at time H, there are tasks at both station 1 and waiting-to-be-issued 1. At this time, based on the Hungarian algorithm, the idle AGV1 and AGV2 are assigned tasks, so that AGV1 reaches station 3 to execute the task and AGV2 reaches waiting-to-be-issued 1 to execute the task.
[0152] Through the above implementation manner, in the second stage, adopting the Hungarian algorithm assignment strategy can not only find the task assignment plan with the lowest total cost under given conditions, but also quickly calculate the task assignment result under a moderate task volume, and is applicable to a variety of task assignment scenarios without being restricted by specific task types.
[0153] In some implementation manners of the above step S103, when the task assignment strategy is a heuristic algorithm assignment strategy, the relationship between the number m of AGVs and the number n of tasks to be assigned is m < n. Different from the previous two stages, at this time, one AGV needs to receive and execute multiple tasks. Therefore, it is necessary to consider task assignment from two dimensions: First, different tasks need to be assigned to different AGVs. This dimension needs to comprehensively consider the empty driving and / or waiting time of AGVs, the production plan information in the future time period, and the possible charging time periods of current AGVs, etc., and reasonably assign the tasks received by each AGV; Second, it is also necessary to consider the task order when each AGV completes a series of tasks.
[0154] Therefore, in the third stage, it is necessary to consider the precedence relationship of different tasks completed by AGVs and the load balance of AGVs. When abstracting the task assignment method into a mathematical problem for modeling, the objective function of the optimization problem can be the following function (4):
[0155]
[0156] The constraint conditions of the above objective function include the following constraint formulas (5)-(8):
[0157] Task assignment constraint (each task must be executed by one AGV once):
[0158]
[0159] Flow balance constraint (constraint for each AGV to enter and exit tasks):
[0160]
[0161] Task start point constraint:
[0162]
[0163] Task end point constraint:
[0164]
[0165] Among them, the 0-1 variable constraint: Indicates that after the kth AGV completes task i, it will complete task j, characterizing the order of tasks; c ij Represents the cost when the AGV executes this task sequence, comprehensively considering the empty driving and / or waiting time of the AGV, the production plan information in the future time period, and the possible charging time period of the current AGV.
[0166] Furthermore, in the third stage, the algorithm implementation framework of the task allocation method based on the heuristic algorithm may include the generation of an initial solution and iterative optimization. Among them, the initial solution can be generated through the serial scheduling algorithm. The serial scheduling algorithm is a scheduling strategy that processes tasks one by one in a specific order. It sorts tasks according to rules such as the task submission order and priority, and then executes them in sequence. Only after the previous task is completed does the next task start. This algorithm is suitable for scenarios with high requirements for order or limited and exclusively used resources.
[0167] In some embodiments, the task allocation method based on the heuristic algorithm may include the following steps 31 to 34:
[0168] Step 31, Obtain all tasks to be allocated and idle AGVs;
[0169] Step 32, Based on the greedy strategy, initially allocate the tasks to be allocated to each idle AGV to obtain an initial allocation plan;
[0170] Among them, the greedy strategy is an algorithmic idea for solving problems. In each step of decision-making, it selects the optimal solution in the current state, hoping to achieve the global optimum through a series of such local optimal selections. This strategy focuses on the present, does not consider the long-term impact of decisions on the future, and only makes what seems to be the best choice based on the current information.
[0171] Based on the greedy strategy, the tasks to be allocated can be initially allocated to each idle AGV to obtain an initial allocation plan, that is, the initial task execution order of each AGV, to ensure load balancing.
[0172] Step 33, Optimize the initial allocation plan to obtain the final task allocation plan;
[0173] That is, the initial allocation scheme is iteratively optimized, which may specifically include the following steps 331 to 333.
[0174] Step 331, perturb the initial allocation scheme to obtain the objective function value of each scheme in the initial allocation scheme;
[0175] Specifically, a fixed number of positions can be randomly selected through a perturbation algorithm to determine whether they can be exchanged with the previous and next tasks, without perturbing the initial allocation plan, and using a variable neighborhood algorithm for local search.
[0176] Furthermore, a fixed number of tasks can be randomly exchanged through a local search algorithm, and a fixed number of exchange groups can be generated, and the exchange method that reduces the objective function the most can be selected to evaluate the objective function value of each allocation scheme. The objective function value can be obtained based on the weighted difference between the task waiting time and the execution time.
[0177] Step 332: update the initial allocation plan based on the plan with the largest decrease in the objective function value among the initial allocation plans;
[0178] Specifically, based on the local search of the modified neighborhood, all tasks or the task with the latest completion time can be started, all movable ranges (predecessor / successor tasks can be moved in conjunction) can be traversed, and the moving scheme that reduces the objective function the most can be selected.
[0179] Furthermore, based on the local search of the fixed neighborhood, starting from the task that reduces the objective function the most, all movable ranges can be traversed (only the current task moves, and the predecessor / successor tasks cannot move in conjunction), and the movement plan that reduces the objective function the most can be selected.
[0180] Then the solution can be evaluated. If the current objective function value is better than the current objective function value, the task with the latest completion time is replaced and updated. At the same time, in the above local search based on the modified neighborhood, the task with the latest completion time is selected as the starting point.
[0181] Step 333: Based on at least one of AGV path conflicts, AGV idle driving and / or waiting time, production plan information, and AGV charging period, the updated initial allocation plan is optimized to obtain a final task allocation plan.
[0182] During the optimization process, at least one of AGV path conflicts, AGV idle driving and / or waiting time, production plan information, and AGV charging period may be considered to generate a final task allocation plan.
[0183] The above is a further explanation of step 33.
[0184] Step 34: Send the task allocation result in the final task allocation plan to the corresponding AGV so that the AGV can receive and execute the task.
[0185] See the appendix Figure 4 , Figure 4 is a schematic diagram of the heuristic algorithm allocation strategy according to an embodiment of the present application.
[0186] As Figure 4 shown, at time t1, AGV1 and AGV2 are idle, and there are tasks at Station 1, Station 3, Outbound 1, and Return Position. At this time, the idle AGV1 and AGV2 can be assigned tasks based on the heuristic algorithm allocation strategy. Among them, AGV1 completes three tasks, which in sequence include the PLC return task of Station 1 (AGV1 → Station 1 → Return Position), the empty box return task (Return Position → Outbound 1), and the PLC return task of Station 3 (Outbound 1 → Station 3 → Return Position); AGV2 completes two tasks, which in sequence include the empty box return task (Return Position → Outbound 2), and the Outbound 1 delivery task (Outbound 2 → Outbound 1 → Station 1).
[0187] Among them, PLC return is a specific type of task, which usually appears in an automated production environment, especially in a system using a programmable logic controller (PLC). Briefly speaking, the PLC return task means that after a certain station (such as Station 1) completes certain operations, a task is generated to return an empty load device (such as an empty box, empty pallet, etc.) to a specified position.
[0188] Through the above implementation method, in the third stage, adopting the heuristic algorithm allocation strategy can adapt to complex task allocation scenarios, handle various constraint conditions, and through neighborhood search, can jump out of the local optimal solution, find a better global solution, and can flexibly adjust the neighborhood structure according to specific problems to improve the algorithm effect.
[0189] The above is a further description of step S103.
[0190] The AGV task allocation method provided by the present application aims to minimize the empty driving and waiting time of AGVs, considers the production plan information in the future time period and the possible charging periods of current AGVs, reasonably allocates the component supply tasks of different operation islands, and avoids traffic congestion on the lines and charging stations caused by excessive task allocation in individual areas. Through the design of the three-stage task allocation algorithm, compared with the original relatively single algorithm, when facing complex production demand situations, it can more effectively formulate the material supply task according to the production plan, determine a feasible and efficient material replenishment plan in a short time, meet the needs of dynamic adjustment of production tasks, and ensure that the component inventory of all operation islands meets the production plan and production rhythm.
[0191] Compared with other allocation algorithms, the AGV task allocation method provided in this application has been substantially improved in the following four aspects:
[0192] 1. Real-time performance: The AGV task allocation method can respond promptly to task changes, quickly allocate tasks when tasks arrive, and improve the response speed and flexibility of the system;
[0193] 2. Flexibility: Different algorithm strategies are adopted to cope with the task volume and the number of AGVs in different stages, with strong adaptability;
[0194] 3. Cost optimization: By adopting event-driven, Hungarian algorithm and heuristic algorithm, the total cost of task allocation can be optimized under different task densities;
[0195] 4. Load balancing: Considering the task load situation of AGVs, avoiding uneven task allocation, and improving the overall efficiency of the system. It solves the problem that a single algorithm is prone to slow algorithm response speed and long algorithm execution time when facing complex production requirements without personalized customization.
[0196] The above is the description of the AGV task allocation method provided in this application.
[0197] It should be noted that although the above steps are described in a specific order in the above embodiments, those skilled in the art can understand that in order to achieve the effects of this application, different steps do not necessarily have to be executed in such an order, and they can be executed simultaneously (in parallel) or in other orders, and these changes are all within the protection scope of this application.
[0198] Those skilled in the art can understand that all or part of the processes in the method of implementing the above embodiments of this application can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable storage medium can include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium that can carry the computer program code.
[0199] Furthermore, this application also provides an electronic device. Refer to the attached Figure 5 , Figure 5 is the main structural schematic diagram of an electronic device according to an embodiment of this application. AsFigure 5 As shown in the figure, the electronic device in the embodiment of the present application mainly includes a processor 51 and a memory 52. The memory 52 can be configured to store a program for executing the AGV task allocation method in the above method embodiment. The processor 51 can be configured to execute the program in the memory 52, and the program includes, but is not limited to, the program for executing the AGV task allocation method in the above method embodiment. For the sake of convenience of description, only the parts related to the embodiment of the present application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiment of the present application.
[0200] In some possible implementation manners of the present application, the electronic device may include a plurality of processors 51 and a plurality of memories 52. The program for executing the AGV task allocation method in the above method embodiment can be divided into multiple sub-programs, and each sub-program can be loaded and run by the processor 51 respectively to execute different steps of the AGV task allocation method in the above method embodiment. Specifically, each sub-program can be stored in a different memory 52 respectively, and each processor 51 can be configured to execute the program in one or more memories 52 to jointly implement the AGV task allocation method in the above method embodiment, that is, each processor 51 executes different steps of the AGV task allocation method in the above method embodiment respectively to jointly implement the AGV task allocation method in the above method embodiment.
[0201] The above-mentioned plurality of processors 51 can be processors deployed on the same device. For example, the above-mentioned electronic device can be a high-performance device composed of multiple processors, and the above-mentioned plurality of processors 51 can be the processors configured on the high-performance device. In addition, the above-mentioned plurality of processors 51 can also be processors deployed on different devices. For example, the above-mentioned electronic device can be a server cluster, and the above-mentioned plurality of processors 51 can be the processors on different servers in the server cluster.
[0202] Furthermore, the present application also provides a computer-readable storage medium. In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium can be configured to store a program for executing the AGV task allocation method in the above method embodiment, and the program can be loaded and run by a processor to implement the above AGV task allocation method. For the sake of convenience of description, only the parts related to the embodiment of the present application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a memory device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-transitory computer-readable storage medium.
[0203] It should be noted that the relevant user personal information that may be involved in the embodiments of this application is all processed in strict accordance with the requirements of laws and regulations, following the principles of legality, legitimacy, and necessity, for reasonable purposes based on business scenarios, and is the personal information actively provided by users during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with user authorization.
[0204] The user personal information processed by this application may vary depending on the specific product / service scenario. It is subject to the specific scenario of the user's use of the product / service and may involve the user's account information, device information, driving information, vehicle information, or other relevant information. This application will treat the user's personal information and its processing with a high degree of diligence.
[0205] This application attaches great importance to the security of user personal information and has taken security protection measures that meet industry standards and are reasonable and feasible to protect the user's information and prevent personal information from being accessed, publicly disclosed, used, modified, damaged, or lost without authorization.
[0206] So far, the technical solution of this application has been described in conjunction with one implementation manner shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of this application is obviously not limited to these specific implementation manners. Without departing from the principle of this application, those skilled in the art can make equivalent changes or replacements to the relevant technical features, and the technical solutions after these changes or replacements will all fall within the protection scope of this application.
Claims
1. An AGV task allocation method, characterized in that: The method comprises: Obtain the operation stage of the current AGV task allocation scenario; the operation stage includes the first stage, the second stage and the third stage; Determining a corresponding task allocation strategy based on the operation stage; the task allocation strategy includes an event-driven allocation strategy, a Hungarian algorithm allocation strategy and a heuristic algorithm allocation strategy; AGV task allocation is performed based on the determined task allocation strategy.
2. The AGV task allocation method according to claim 1, characterized in that: The operation phase of obtaining the current AGV task allocation scenario includes: Get the production rhythm of the current AGV task allocation scenario; Determining the operation phase as the first phase, the second phase or the third phase based on the production rhythm; The production tact of the first stage is smaller than that of the second stage, and the production tact of the second stage is smaller than that of the third stage.
3. The AGV task allocation method according to claim 1, characterized in that: Determining the corresponding task allocation strategy based on the running stage includes: When the operation stage is the first stage, determining that the task allocation strategy is the event-driven allocation strategy; When the operation stage is the second stage, determining that the task allocation strategy is the Hungarian algorithm allocation strategy; When the running stage is the third stage, the task allocation strategy is determined to be the heuristic algorithm allocation strategy.
4. The AGV task allocation method according to claim 3, characterized in that: The AGV task allocation based on the determined task allocation strategy includes: When the task allocation strategy is the event-driven allocation strategy, determining whether there is a task to be allocated; If yes, obtain the shortest path for each idle AGV to reach the starting point of the task; Allocate the task to be assigned to the idle AGV with the smallest shortest path, so that the AGV receives and executes the task; The number of idle AGVs is greater than the number of tasks to be assigned.
5. The AGV task allocation method according to claim 3, characterized in that: The performing AGV task allocation based on the determined task allocation strategy also includes: When the task allocation strategy is the Hungarian algorithm allocation strategy, all tasks to be allocated and idle AGVs are acquired; Constructing a shortest path cost matrix based on the tasks to be assigned and the idle AGVs; Determine the task allocation scheme with the lowest total cost based on the Hungarian algorithm and the shortest path cost matrix; The task allocation result in the task allocation scheme is sent to the corresponding AGV, so that the AGV receives and executes the task.
6. The AGV task allocation method according to claim 3, characterized in that: The performing AGV task allocation based on the determined task allocation strategy also includes: When the task allocation strategy is the heuristic algorithm allocation strategy, all tasks to be allocated and idle AGVs are acquired; Based on the greedy strategy, the tasks to be assigned are initially assigned to each idle AGV to obtain an initial assignment plan; Optimizing the initial allocation plan to obtain a final task allocation plan; Sending the task allocation result in the final task allocation plan to the corresponding AGV, so that the AGV receives and executes the task; The number of idle AGVs is less than the number of tasks to be assigned.
7. The AGV task allocation method according to claim 5, characterized in that: The task allocation scheme with the lowest total cost determined based on the Hungarian algorithm and the shortest path cost matrix includes: S1. Create a matching array based on the shortest path cost matrix, and set the number of vertices and edge weights; S2, get all free vertices; S3, searching for an augmented path based on the free vertices; S4. If the augmented path is found, update the matching status; otherwise, return to step S2; S5, determining whether the current match covers all the free vertices; if so, obtaining a matching result, otherwise returning to step S2; S6. Obtaining the task allocation solution with the lowest total cost based on the matching result; The matching results include matching vertex pairs, corresponding weights and total weights.
8. The AGV task allocation method according to claim 6, characterized in that: Optimizing the initial allocation scheme to obtain a final task allocation scheme includes: The initial allocation scheme is disturbed to obtain the objective function value of each scheme in the initial allocation scheme; the objective function value is obtained based on the weighted difference between the task waiting time and the execution time; Based on the scheme in which the objective function value decreases the most among the initial allocation schemes, updating the initial allocation scheme; Based on at least one of AGV path conflicts, AGV idle travel and / or waiting time, production plan information, and AGV charging period, the updated initial allocation plan is optimized to obtain the final task allocation plan.
9. An electronic device comprising a processor and a memory, wherein the memory is suitable for storing a plurality of program codes, wherein: The program code is suitable for being loaded and run by the processor to execute the AGV task allocation method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the AGV task allocation method according to any one of claims 1 to 8.
Citation Information
Cited By
Humanoid robot task scheduling method and related equipment
CN121132649A
Dynamic task allocation method for humanoid robot in industrial scene and related equipment
CN121340239A
Humanoid robot dynamic task allocation method and related equipment in industrial scenario
CN121340239B