AGV cross-workshop distribution task scheduling method and device based on particle swarm algorithm
Through the AGV cross-workshop distribution task scheduling method based on particle swarm algorithm, the problem that multi-AGV multi-task scheduling in the prior art is difficult to optimize in complex scenarios, and more efficient AGV task scheduling and lower computing complexity are achieved.
Patent Information
- Application Number
- CN202411923161.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing multi-AGV multi-task scheduling methods are difficult to cope with the multi-objective optimization requirements in complex task scenarios, the computing complexity is high and it is difficult to meet the real-time requirements, especially in the complex task scheduling of multi-workshops, which is difficult to fully utilize the hierarchical characteristics and synergistic relationships of tasks.
The AGV cross-workshop distribution task scheduling method based on particle swarm algorithm is adopted. By obtaining cross-workshop tasks and decomposing them into tasks in different workshops, the particle swarm is initialized and the task allocation sequence is updated, the speed update formula and position update formula are used for optimization, and variable neighborhood search is performed to improve scheduling efficiency.
The calculation complexity of multi-workshop scheduling problems is reduced, the time to obtain the AGV scheduling roadmap is shortened, the task scheduling efficiency of AGV is improved, and the hierarchical characteristics and synergistic relationships of multi-workshop tasks can be more effectively utilized.
Smart Images

Figure CN119849830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of logistics task allocation, and in particular to a method, device, electronic equipment and storage medium for scheduling AGV inter-workshop distribution tasks based on a particle swarm algorithm. Background Art
[0002] With the rapid development of the intelligent manufacturing industry, the production logistics operations of intelligent factories have shown characteristics such as long transportation distance, flexible tasks, and high operation frequency. In this environment, the scheduling of material distribution tasks across workshops has become an indispensable part of the intelligent logistics system. Existing logistics scheduling tasks often involve the collaboration of multiple workshops, and usually require multiple automatic guided vehicles (AGVs) to operate efficiently between different workshops or within workshops at the same time.
[0003] The current multi-AGV multi-task scheduling methods mainly include rule-based scheduling methods, mathematical programming-based optimization methods, and meta-heuristic algorithm-based optimization methods. The rule-based scheduling method uses fixed logic (such as shortest path priority, first-come-first-served, etc.) to allocate tasks. Although the calculation speed is fast, it lacks flexibility in complex task scenarios and is difficult to meet multi-objective optimization requirements. The optimization method based on mathematical programming converts the scheduling problem into an integer programming model and solves it with the help of linear programming or dynamic programming. However, when the task scale is large or the target is complex, the computational complexity increases sharply and cannot meet the real-time requirements. Although the optimization method based on meta-heuristic algorithms (such as genetic algorithms, ant colony algorithms, etc.) has certain global search capabilities, traditional algorithms often have the defects of slow convergence and easy to fall into local optimality. Especially in the scheduling of complex tasks in multiple workshops, it is difficult to fully utilize the hierarchical characteristics and collaborative relationships of multi-workshop tasks. Summary of the invention
[0004] To solve the problems existing in the prior art, one or more embodiments of this specification describe a method, device, electronic device and storage medium for scheduling AGV cross-workshop delivery tasks based on a particle swarm algorithm.
[0005] According to a first aspect, a method for scheduling AGV inter-workshop delivery tasks based on a particle swarm algorithm is provided, the method comprising:
[0006] S101, obtaining cross-workshop tasks, decomposing the cross-workshop tasks into tasks of different workshops and merging them with tasks within each workshop to obtain tasks to be executed in each workshop;
[0007] S102, initializing a particle swarm, and updating an initial optimal task allocation sequence of the particle swarm according to a fitness function, wherein particles in the particle swarm represent a task allocation sequence in a single workshop;
[0008] S103, updating each task allocation sequence according to the speed update formula and the position update formula, and then performing a variable neighborhood search, and updating the optimal task allocation sequence according to the fitness function after each operation;
[0009] S104: If the number of iterations is not met, execute S103; if the number of iterations is met, output the optimal task allocation sequence of the current particle swarm, obtain the AGV scheduling route map for a single workshop, and control the AGVs in the workshop to perform the delivery tasks according to the scheduling route map.
[0010] Preferably, decomposing the cross-workshop task into tasks of different workshops includes decomposing the cross-workshop task according to the workshop number where the cross-workshop task is executed.
[0011] Preferably, the task parameters include the pickup point, the delivery point, the workshop serial number, the docking point working hours, the upper limit of the time window and the lower limit of the time window.
[0012] Preferably, a time constraint and a task constraint are set, and the time constraint is set according to the time window upper limit and the time window lower limit. If the fitness of a single particle does not meet the time constraint or the task constraint, an invalid value is returned.
[0013] Preferably, updating each task allocation sequence according to the speed update formula and the position update formula comprises:
[0014] Update the task assignment sequence according to the individual learning factor to obtain a first updated task assignment sequence, wherein the individual learning factor is the degree to which the task assignment sequence is affected by the individual optimal solution;
[0015] updating the first update task allocation sequence according to the social learning factor to obtain a second update task allocation sequence, wherein the social learning factor is the degree to which the first update task allocation sequence is affected by the global optimal solution;
[0016] updating the second updated task allocation sequence according to the inertia weight to obtain a third updated task allocation sequence, wherein the inertia weight is the degree to which the second updated task allocation sequence is affected by the task allocation sequence;
[0017] The third updated task allocation sequence is updated according to the flight probability to obtain a fourth updated task allocation sequence, wherein the flight probability is the probability of the third updated task allocation sequence performing a flight operation.
[0018] Preferably, the number of stagnation iterations is obtained, where the number of stagnation iterations is the number of iterations of the optimal task allocation sequence of the particle swarm since the last update, and a stagnation threshold is set. If the number of stagnation iterations is greater than the stagnation threshold, the flight probability is increased.
[0019] Preferably, the performing variable neighborhood search includes selecting two different task allocation sequences and performing any one of the operations of exchange, reversal and insertion.
[0020] According to a second aspect, a task scheduling device is provided, the device comprising:
[0021] The task division module is used to obtain cross-workshop tasks, decompose the cross-workshop tasks into tasks of different workshops and merge them with the tasks within each workshop to obtain the tasks to be executed in each workshop;
[0022] An initialization particle module is used to initialize a particle swarm and update an initial optimal task allocation sequence of the particle swarm according to a fitness function, wherein the particles in the particle swarm represent a task allocation sequence in a single workshop;
[0023] The particle iteration module is used to update each task allocation sequence according to the speed update formula and the position update formula, and then perform variable neighborhood search, and update the optimal task allocation sequence according to the fitness function after each operation;
[0024] The output module is used to execute S103 if the number of iterations is not met, and output the optimal task allocation sequence of the current particle swarm if the number of iterations is met, obtain the AGV scheduling route map of a single workshop, and control the AGV in the workshop to perform the distribution task according to the scheduling route map.
[0025] According to a third aspect, there is provided an electronic device, comprising a processor and a memory;
[0026] The processor is connected to the memory;
[0027] The memory is used to store executable program code;
[0028] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method provided in the first aspect or any possible implementation manner of the first aspect.
[0029] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and the computer-readable storage medium stores instructions, which, when the instructions are executed on a computer or a processor, cause the computer or the processor to execute the method provided in the first aspect or any possible implementation of the first aspect.
[0030] The beneficial effects of the present invention are:
[0031] 1. The method and device provided in the embodiments of this specification reduce the complexity of calculating the multi-workshop scheduling problem, shorten the time required to obtain the AGV scheduling route map, and improve the task scheduling efficiency of the AGV by splitting the cross-workshop tasks into sub-tasks within independent workshops and solving them for a single workshop. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 It is a flowchart of a method for scheduling AGV inter-workshop delivery tasks based on a particle swarm algorithm in the specific implementation of this specification;
[0034] Figure 2 It is a structural diagram of a task scheduling device in the specific implementation of this specification;
[0035] Figure 3 It is a structural schematic diagram of an electronic device in the specific implementation of this specification;
[0036] Figure 4 It is a specific flow chart of a method for scheduling AGV inter-workshop delivery tasks based on a particle swarm algorithm in the specific implementation of this specification. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0038] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.
[0039] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.
[0040] See also Figure 1 , Figure 1 : is a flow chart of a method for scheduling AGV inter-workshop delivery tasks based on a particle swarm algorithm provided in an embodiment of the present application. In an embodiment of the present application, the method includes:
[0041] S101, obtaining cross-workshop tasks, decomposing the cross-workshop tasks into tasks of different workshops and merging them with tasks within each workshop to obtain tasks to be executed in each workshop;
[0042] S102, initializing a particle swarm, and updating an initial optimal task allocation sequence of the particle swarm according to a fitness function, wherein particles in the particle swarm represent a task allocation sequence in a single workshop;
[0043] S103, updating each task allocation sequence according to the speed update formula and the position update formula, and then performing a variable neighborhood search, and updating the optimal task allocation sequence according to the fitness function after each operation;
[0044] S104: If the number of iterations is not met, execute S103; if the number of iterations is met, output the optimal task allocation sequence of the current particle swarm, obtain the AGV scheduling route map for a single workshop, and control the AGVs in the workshop to perform the delivery tasks according to the scheduling route map.
[0045] The execution entity of this application can be a cloud server.
[0046] In the embodiment of this specification, the cloud server first obtains the cross-workshop task. The cross-workshop task is separated by the AGV connection points between workshops or the elevator connection points between floors. in, represents the AGV cross-workshop material distribution task, b∈{1,2,3,…,m} represents the task number of the cross-workshop task, x∈{1,2,3,…,o} represents the single workshop number to which the cross-workshop task is assigned, and each Represents the distribution tasks in different workshops, each They are connected by connection points and executed in sequence arrive These x tasks complete the entire cross-workshop CT1 task. Then obtain the material distribution task T executed in a single workshop a , T a represents the AGV material distribution task in the workshop, and a∈{1,2,3,…,n} represents the task number that is executed only in a single workshop. With T a All of them contain parameters such as the pickup point, delivery point, workshop number, docking point working hours, time window upper limit, and time window lower limit. According to the workshop number s, s represents the workshop number, s∈{1,2,3,…,p}, all With T a All are classified into the corresponding T s,i Among them, T s,i represents the set of tasks to be performed in each workshop, T s,i The s in the figure represents the delivery task in workshop s, i∈{1,2,3,…,q} represents the task number of the delivery task in workshop s, and then each T s,i AGV set A assigned to the same workshop number s,j , A s,j The s in the s represents the AGV in the s workshop, and j∈{1,2,3,…,r} represents the serial number of the AGV in the workshop. At this time, we only need to obtain the optimal scheduling result in each workshop to know the optimal scheduling results of multiple workshops. Initialize the particle swarm. The following is an example of a single workshop. Assume that there are q tasks and r AGVs in the workshop. For each particle, randomly generate a task assignment sequence and add a task separator 0 at a random position. Assume that there are N particles in the particle swarm, each particle represents a task assignment sequence in the workshop, and the particle can be represented by an M-dimensional vector, x i =(x i1 ,x i2 ,x i3 ,…,x iM), i = 1, 2…, N, where M = q + r-1. For example, [0, 4, 7, 0, 1, 3, 8, 0, 2, 6, 5] means that there are 4 AGVs assigned to three task groups with task numbers 4→7, 1→3→8, and 2→6→5, and one AGV is not assigned to a task. Set the fitness function and calculate the fitness of a single particle according to the fitness function. Set the number of iterations, update the speed and position of each particle according to the speed update formula and the position update formula, re-update the individual optimal solution of the particle and the global optimal solution of the particle swarm according to the fitness function, and then perform a variable neighborhood search, re-update the individual optimal solution of the particle and the global optimal solution of the particle swarm according to the fitness function, increase the number of iterations, if the number of iterations is not met, re-update the speed and position of the particle and perform a variable neighborhood search, update the optimal solution of the single particle and the global optimal solution of the particle swarm, if the number of iterations is met, output the optimal solution of the current particle swarm, that is, the optimal task allocation plan, and then form an AGV scheduling route map for a single workshop. Similarly, the optimal scheduling results of other workshops can be obtained. The cloud server can control the AGV in the workshop to perform scheduling tasks according to the scheduling route map.
[0047] It should be noted that the particle corresponding to the maximum historical fitness of each particle is the individual optimal solution of each particle, denoted as pbest. In each iteration, the particle corresponding to the maximum fitness between the fitness of the particle in the particle swarm and the fitness of the global optimal solution of the current particle swarm is the global optimal solution of the particle swarm in the current iteration, denoted as gbest, which is the optimal task allocation sequence.
[0048] In one feasible implementation, in order to ensure that each task is executed within the specified time and each task is executed once by an AGV, time constraints and task constraints are set. The time constraint is that each AGV will only execute one task at a specified time, and the task constraint is that the task number in each particle is not repeated. If the fitness of a single particle does not meet one of the time constraints or the task constraints, an invalid fitness value is fed back.
[0049] Specifically, the transportation cost per unit path is set to c1, and the minimum total path cost is:
[0050]
[0051] After completing all tasks, each workshop has A s,j Total Path and Formula D s,j for:
[0052]
[0053] Among them, the formula L(A,B) represents the Manhattan distance between point A and point B;
[0054] Assuming the unit time cost is c2, the minimum maximum completion time cost is:
[0055]
[0056] Set the speed of AGV to A speed , and all tasks start from 0 seconds, tasks Start time Depending on the end time of the previous task and the time required for the AGV to move to the pickup point, for the first task (i.e. k = 1), from the starting position P s Set off,
[0057]
[0058] For subsequent tasks (i.e. k>1),
[0059]
[0060] Task End time Depends on start time and transportation time from the pickup point to the delivery point and unloading time,
[0061]
[0062] Define the completion time F s,j For AGV A in the workshop s,j The final end time after completing all its tasks is the ET of the last task plus the time to return to the initial position:
[0063]
[0064] Set the number of AGVs used in each workshop to U s , the cost of using a unit AGV is c3, and the formula for minimizing the cost of using the number of AGVs is:
[0065]
[0066] For the scheduling task set above, it is necessary to set the constraint formula:
[0067] Time constraints: in, Indicates the task Time window lower limit; Indicates the task The upper limit of the time window.
[0068] Task constraints:
[0069] In one possible implementation, the fitness calculation formula is as follows: fitness = distance_weight·c1·D s,j +makespan_weight·max(c2·F s,j )+agv_usage_weight·c3·U s , where distance_weight, makespan_weight, and agv_usage_weight represent the weights of the three target fitness values, which can be adjusted according to the actual problem. The particle corresponding to the maximum historical fitness of each particle is the individual optimal solution of each particle, denoted as pbest. In each iteration, the particle corresponding to the maximum fitness between the fitness of the particle in the particle swarm and the fitness of the global optimal solution of the current particle swarm is the global optimal solution of the particle swarm in the current iteration, denoted as gbest.
[0070] In one possible implementation, updating the speed and position of each particle according to the speed update formula and the position update formula specifically includes the following steps: taking the individual learning factor c1 in the asymmetric learning factor as the probability, the individual learning factor c1 is calculated by the following calculation formula, performing individual learning operation, performing improved PMX crossover operation on the individual optimal solution pbest and the particle, and obtaining the first updated speed and the first updated position of the particle, which is the first updated task allocation sequence. The individual learning factor c1 indicates the degree to which the current task allocation sequence is affected by the individual optimal solution, and is used to guide the AGV to adjust the task sequence in combination with the individual best historical task allocation plan to improve the task allocation efficiency of a single AGV. The formula is:
[0071]
[0072] represents the initial value of the individual learning factor, represents the final value of the individual learning factor, k represents the current number of iterations, T max represents the maximum number of iterations, c1(k) is the actual value of the individual learning factor at the current number of iterations, where the initial value of the individual learning factor, the final value of the individual learning factor and the maximum number of iterations are all preset values.
[0073] Taking the social learning factor c2 in the asymmetric learning factor as the probability, the social learning factor c2 is calculated by the following formula, and the social learning operation is performed. The global optimal solution gbest and the particle are subjected to the improved PMX crossover operation to obtain the second update speed and the second update position of the particle, which is the second update task allocation sequence. The social learning factor c2 indicates the degree to which the current task allocation sequence is affected by the global optimal solution. By referring to the global optimal task allocation sequence, the task coordination between AGVs is promoted. The formula is:
[0074]
[0075] represents the initial value of the social learning factor, represents the final value of the social learning factor, k represents the current iteration number, T max represents the maximum number of iterations, c2(k) is the actual value of the social learning factor at the current number of iterations, where the initial value of the social learning factor, the final value of the social learning factor and the maximum number of iterations are all preset values.
[0076] From the calculation formula of individual learning factor and social learning factor, it can be seen that with the increase of iteration number, the individual learning factor c1 decreases linearly and the social learning factor c2 increases linearly, thereby enhancing the ability of particles to converge to the global optimal point.
[0077] The inertia weight w of nonlinear dynamic update is used as the probability. The inertia weight w is calculated by the following formula. The inertia position update operation is performed. The previous generation of particles and the current particles are subjected to improved PMX crossover operation to obtain the third update speed and the third update position of the particles, which is the third update task allocation sequence. The inertia weight w indicates the degree of influence of the previous generation of particles on the current particle, which is used to control the task adjustment range. The formula is:
[0078]
[0079] Among them, w start represents the initial value of the inertia weight, w end represents the final value of the inertia weight, k represents the current number of iterations, T max represents the maximum number of iterations, w(k) is the actual value of the inertia weight at the current number of iterations, where the initial value of the inertia weight, the final value of the inertia weight and the maximum number of iterations are all preset values.
[0080] With adaptive Lévy flight probability P levy , flight probability P levy The calculation formula is as follows: the current particle randomly jumps to obtain the fourth updated speed and fourth updated position of the particle, which is the fourth updated task allocation sequence, and the flight probability P levyIt is used to break the local optimum of task allocation and further optimize the task sequence selection in cross-shop task scheduling. The formula is:
[0081]
[0082] From the above, it can be seen that after obtaining the fourth update speed and the fourth update position of the particle, the individual optimal solution of the particle and the global optimal solution of the particle swarm are updated according to the fitness function. At this time, in order to avoid falling into the local optimum, the number of stagnation iterations and the stagnation threshold are set. The number of stagnation iterations is the number of iterations from the last update of the global optimal solution of the particle swarm. If the global optimal solution of the particle swarm is not updated, the number of stagnation iterations is increased by 1, and the Lévy flight probability P is increased when the number of stagnation iterations exceeds the stagnation threshold. levy , if the global optimal solution of the particle swarm is updated, then restore P levy is the initial value and the number of stagnant iterations is reset to zero.
[0083] Specifically, the adjustment formula for flight probability is:
[0084]
[0085] Among them, n stagnation represents the number of stagnation iterations, T stagnation Indicates the stagnation threshold.
[0086] Specifically, according to the adaptive Lévy flight probability P levy The random position jump of the current particle to obtain the fourth updated speed and fourth updated position of the particle can be implemented by the following steps: generate a random step length according to the Lévy distribution, round the step length and add one to obtain the number of exchanges, randomly select two initial indexes for the particle that needs to perform Lévy flight, then perform a cyclic exchange operation, and finally generate the fourth position of the particle. The formula for generating the random step length is as follows:
[0087]
[0088] Among them, β is the stability parameter, u and v are two independent normally distributed random variables, Γ represents the gamma function, π is pi, and step is the step size.
[0089] In one possible implementation, the improved PMX crossover operation specifically includes: selecting two particles to be exchanged, removing the separator 0 in the two particles to be exchanged, and retaining its position in the sequence, randomly generating the starting position and the ending position of the crossover segment, copying the content of the particles to be exchanged and exchanging the crossover segment to form an initial crossover sequence, and establishing a mapping relationship between the elements of the two crossover segments. If duplicate items appear outside the crossover segment, they are replaced through the mapping relationship until all elements in the initial crossover sequence are unique, and the separator is reinserted into the sequence, and the position of the separator remains unchanged, thereby forming a new particle.
[0090] In one possible implementation, the variable neighborhood search includes the following steps: saving the global optimal solution of the current particle swarm so that it can be restored when the optimal solution is not found, randomly selecting two positions of two particles (two numbers of the task sequence), and the sum of the two numbers cannot be 0, randomly applying one of the exchange, reversal, and insertion operations to generate multiple new particles, calculating the fitness value for each newly generated particle, checking whether the constraints are met, and updating the individual optimal solution of the particle and the global optimal solution of the particle swarm.
[0091] Specifically, the exchange operation is: randomly select two different positions and exchange the order of the two tasks. For x = [x1, x2, ..., x i ,…,x j ,x n ], if positions i and j are selected for exchange, the new neighborhood solution is: x′=[x1,x2,…,x j ,…,x i ,x n ]; the reversal operation is: randomly select a subsequence between two different positions and reverse the order of tasks in the subsequence. For x = [x1, x2, …, x i ,…,x j ,x n ], if you choose a subsequence to reverse [x i ,x i+1 ,…x j ], then the new neighborhood solution is: x′=[x1,x2,…,x j ,…,x i+1 ,x i ,x n ]The insertion operation is: randomly select a task position and move the task from the current position to another random position. For x = [x1, x2, ..., x i ,…,x j ,x n ], if task x i is moved to position j, then the new neighborhood solution is: ′ =[x1,x2,…,x i-1 ,xi+1 ,,…,x j-1 ,x i ,x j+1 ,x n ].
[0092] The following will be combined with the attached Figure 2 , the task scheduling device provided in the embodiment of the present application is introduced in detail. It should be noted that the attached Figure 2 The task scheduling device shown is used to execute the present application Figure 1 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 The embodiment shown.
[0093] See also Figure 2 , Figure 2 Schematic diagram of the structure of the task scheduling device provided in the embodiment of the present application. Figure 2 As shown, the device comprises:
[0094] The task division module 201 is used to obtain cross-workshop tasks, decompose the cross-workshop tasks into tasks of different workshops and merge them with the tasks in each workshop to obtain tasks to be executed in each workshop;
[0095] Initializing particle module 202, used to initialize particle swarm and update the initial optimal task allocation sequence of the particle swarm according to the fitness function, wherein the particles in the particle swarm represent the task allocation sequence in a single workshop;
[0096] The particle iteration module 203 is used to update each task allocation sequence according to the speed update formula and the position update formula, and then perform variable neighborhood search, and update the optimal task allocation sequence according to the fitness function after each operation;
[0097] The output module 204 is used to execute the particle iteration module if the iteration number is not met, and output the optimal task allocation sequence of the current particle swarm if the iteration number is met, obtain the AGV scheduling route map of a single workshop, and control the AGV in the workshop to perform the distribution task according to the scheduling route map.
[0098] In one possible implementation, the task division module 201 is specifically used for:
[0099] The cross-workshop tasks are decomposed according to the workshop number where they are executed.
[0100] In one possible implementation, the task division module 201 includes the following structure: the task parameters include the pickup point, the delivery point, the workshop serial number, the docking point working hours, the time window upper limit and the time window lower limit.
[0101] In one possible implementation, the initialization particle module 202 is specifically used for:
[0102] Set time constraints and task constraints, the time constraints are set according to the time window upper limit and the time window lower limit, if the fitness of a single particle does not meet the time constraints or task constraints, an invalid value is returned.
[0103] In one possible implementation, the particle iteration module 203 is specifically used for:
[0104] Update the task assignment sequence according to the individual learning factor to obtain a first updated task assignment sequence, wherein the individual learning factor is the degree to which the task assignment sequence is affected by the individual optimal solution;
[0105] updating the first update task allocation sequence according to the social learning factor to obtain a second update task allocation sequence, wherein the social learning factor is the degree to which the first update task allocation sequence is affected by the global optimal solution;
[0106] updating the second updated task allocation sequence according to the inertia weight to obtain a third updated task allocation sequence, wherein the inertia weight is the degree to which the second updated task allocation sequence is affected by the task allocation sequence;
[0107] The third updated task allocation sequence is updated according to the flight probability to obtain a fourth updated task allocation sequence, wherein the flight probability is the probability of the third updated task allocation sequence performing a flight operation.
[0108] In one possible implementation, the particle iteration module 203 is specifically used for:
[0109] The number of stagnation iterations is obtained, where the number of stagnation iterations is the number of iterations of the optimal task allocation sequence of the particle swarm since the last update, and a stagnation threshold is set. If the number of stagnation iterations is greater than the stagnation threshold, the flight probability is increased.
[0110] In one possible implementation, the particle iteration module 203 is specifically used for:
[0111] The variable neighborhood search includes selecting two different task allocation sequences and performing any one of the operations of exchange, reversal and insertion.
[0112] Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present application can be implemented with the help of software and / or hardware. The "unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array (Field-Programmable Gate Array, FPGA), an integrated circuit (Integrated Circuit, IC), etc.
[0113] Each processing unit and / or module of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
[0114] See also Figure 3 , which shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, the electronic device can be used to implement Figure 1 The method in the embodiment shown. Figure 3 As shown, the electronic device 300 may include: at least one central processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0115] The communication bus 302 is used to realize the connection and communication between these components.
[0116] The user interface 303 may include a display screen (Display) and a camera (Camera). The optional user interface 303 may also include a standard wired interface and a wireless interface.
[0117] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0118] Among them, the central processing unit 301 may include one or more processing cores. The central processing unit 301 uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions and processes data of the terminal 300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the central processing unit 301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The central processing unit 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics central processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the central processing unit 301, and it can be implemented separately through a chip.
[0119] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 305 may optionally be at least one storage device located away from the aforementioned central processor 301. As Figure 3 As shown, the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.
[0120] exist Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain data input by the user; and the central processor 301 can be used to call the application stored in the memory 305 and specifically perform the following operations:
[0121] S101, obtaining cross-workshop tasks, decomposing the cross-workshop tasks into tasks of different workshops and merging them with tasks within each workshop to obtain tasks to be executed in each workshop;
[0122] S102, initializing a particle swarm, and updating an initial optimal task allocation sequence of the particle swarm according to a fitness function, wherein particles in the particle swarm represent a task allocation sequence in a single workshop;
[0123] S103, updating each task allocation sequence according to the speed update formula and the position update formula, and then performing a variable neighborhood search, and updating the optimal task allocation sequence according to the fitness function after each operation;
[0124] S104: If the number of iterations is not met, execute S103; if the number of iterations is met, output the optimal task allocation sequence of the current particle swarm, obtain the AGV scheduling route map for a single workshop, and control the AGVs in the workshop to perform the delivery tasks according to the scheduling route map.
[0125] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0126] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0127] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0128] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.
[0132] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct the relevant hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0133] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A particle swarm algorithm-based AGV inter-workshop distribution task scheduling method, characterized in that: The method comprises: S101, obtaining cross-workshop tasks, decomposing the cross-workshop tasks into tasks of different workshops and merging them with tasks within each workshop to obtain tasks to be executed in each workshop; S102, initializing a particle swarm, and updating an initial optimal task allocation sequence of the particle swarm according to a fitness function, wherein particles in the particle swarm represent a task allocation sequence in a single workshop; S103, updating each task allocation sequence according to the speed update formula and the position update formula, and then performing a variable neighborhood search, and updating the optimal task allocation sequence according to the fitness function after each operation; S104: If the number of iterations is not met, execute S103; if the number of iterations is met, output the optimal task allocation sequence of the current particle swarm, obtain the AGV scheduling route map for a single workshop, and control the AGVs in the workshop to perform the delivery tasks according to the scheduling route map.
2. According to the particle swarm algorithm-based AGV inter-workshop distribution task scheduling method of claim 1, it is characterized in that: Decomposing the cross-workshop task into tasks of different workshops includes decomposing the cross-workshop task according to the workshop number where the cross-workshop task is executed.
3. The AGV inter-workshop distribution task scheduling method based on particle swarm algorithm according to claim 2 is characterized in that: The task parameters include the pickup point, delivery point, workshop serial number, docking point working hours, time window upper limit and time window lower limit.
4. The AGV inter-workshop distribution task scheduling method based on particle swarm algorithm according to claim 3 is characterized in that: Set time constraints and task constraints, the time constraints are set according to the time window upper limit and the time window lower limit, if the fitness of a single particle does not meet the time constraints or task constraints, an invalid value is returned.
5. The AGV inter-workshop distribution task scheduling method based on particle swarm algorithm according to claim 1 is characterized in that: The updating of each task allocation sequence according to the speed update formula and the position update formula comprises: Update the task assignment sequence according to the individual learning factor to obtain a first updated task assignment sequence, wherein the individual learning factor is the degree to which the task assignment sequence is affected by the individual optimal solution; updating the first update task allocation sequence according to the social learning factor to obtain a second update task allocation sequence, wherein the social learning factor is the degree to which the first update task allocation sequence is affected by the global optimal solution; updating the second updated task allocation sequence according to the inertia weight to obtain a third updated task allocation sequence, wherein the inertia weight is the degree to which the second updated task allocation sequence is affected by the task allocation sequence; The third updated task allocation sequence is updated according to the flight probability to obtain a fourth updated task allocation sequence, wherein the flight probability is the probability of the third updated task allocation sequence performing a flight operation.
6. The AGV inter-workshop distribution task scheduling method based on particle swarm algorithm according to claim 5 is characterized in that: The number of stagnation iterations is obtained, where the number of stagnation iterations is the number of iterations of the optimal task allocation sequence of the particle swarm since the last update, and a stagnation threshold is set. If the number of stagnation iterations is greater than the stagnation threshold, the flight probability is increased.
7. The AGV inter-workshop distribution task scheduling method based on particle swarm algorithm according to claim 1 is characterized in that: The variable neighborhood search includes selecting two different task allocation sequences and performing any one of the operations of exchange, reversal and insertion.
8. A task scheduling device, characterized in that: The device comprises: The task division module is used to obtain cross-workshop tasks, decompose the cross-workshop tasks into tasks of different workshops and merge them with the tasks within each workshop to obtain the tasks to be executed in each workshop; An initialization particle module is used to initialize a particle swarm and update an initial optimal task allocation sequence of the particle swarm according to a fitness function, wherein the particles in the particle swarm represent a task allocation sequence in a single workshop; The particle iteration module is used to update each task allocation sequence according to the speed update formula and the position update formula, and then perform variable neighborhood search, and update the optimal task allocation sequence according to the fitness function after each operation; The output module is used to execute S103 if the number of iterations is not met, and output the optimal task allocation sequence of the current particle swarm if the number of iterations is met, obtain the AGV scheduling route map of a single workshop, and control the AGV in the workshop to perform the distribution task according to the scheduling route map.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer-readable storage medium has instructions stored therein, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Multi-population particle swarm optimization algorithm based on periodic interaction mechanism and knowledge plate collaborative mechanism
CN108256623A
Multi-AGV task allocation method based on improved particle swarm optimization
CN114240076A
Method for realizing AGV multi-target scheduling based on ant colony algorithm
CN117519209A
Unmanned aerial vehicle path planning method and system based on improved particle swarm optimization
CN117519294A
Improved star-sparrow optimization method for flexible job shop scheduling problem
CN118192472A
Cited By
Distributed self-organizing body-building intelligent system and method
CN120103804A
Power system business processing method, device and equipment and storage medium
CN120525323A