An optimization method for equipment production scheduling and in-field logistics scheduling based on improved genetic algorithm
By inserting time slices to reserve transportation time during the equipment scheduling optimization process, and using improved genetic algorithms to optimize equipment scheduling and AGV scheduling solutions, the problems of equipment scheduling and logistics scheduling optimization in the existing technology are solved, and efficient coordinated optimization of the manufacturing process is achieved.
Patent Information
- Application Number
- CN202210611119.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-05-31
AI Technical Summary
The prior art is difficult to simultaneously optimize equipment scheduling and on-site logistics scheduling in discrete manufacturing processes, resulting in the combination of scheduling schemes and logistics scheduling that is not necessarily optimal and has low computing efficiency.
Using an improved genetic algorithm, by inserting time slices to reserve transportation time during the equipment scheduling optimization process, we ensure that the combination of equipment scheduling and AGV scheduling scheme can obtain an approximately overall optimal scheduling scheme.
The coordinated optimization of equipment scheduling and transportation scheduling of discrete manufacturing systems has been achieved, the order production cycle has been shortened, the operation efficiency of manufacturing enterprises has been improved, and the calculation speed has been accelerated.
Smart Images

Figure CN114971317B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of manufacturing process production scheduling and optimization, and particularly relates to an equipment production scheduling and on-site logistics scheduling optimization method based on an improved genetic algorithm. Background Art
[0002] By adjusting the processing sequence and process parameters, the discrete manufacturing process can adapt to mixed processing tasks of multiple varieties and variable batches, and has a high degree of flexibility. The discrete manufacturing process needs to coordinate the operation status of the workshop, comprehensively consider factors such as material scheduling, equipment capacity and delivery period constraints, and formulate corresponding production scheduling plans for different production goals. In order to quickly respond to complex and changing market demands and enhance the competitiveness of enterprises, it is necessary to optimize the manufacturing process from multiple aspects such as efficiency, energy consumption, and stability, and provide the best execution plan before starting the production task.
[0003] For discrete manufacturing processes, the most important thing is to design a suitable production scheduling plan. Production scheduling refers to specifying execution equipment for each process according to the process route of the order product, and arranging the execution order of the process under the constraints of the process. Correspondingly, production scheduling optimization optimizes the evaluation indicators by adjusting the execution equipment and order of the process. Scheduling refers to logistics scheduling, that is, transporting various raw materials, semi-finished products and finished products to the designated location in a timely manner, which is an important link to ensure that the production schedule can be executed on time. In the discrete manufacturing process, the production order of products on each device is flexible and changeable, so it is not suitable to transport semi-finished products with conveyor belts. With the research and promotion of smart workshops, unmanned intelligent vehicles (Automated Guided Vehicle, AGV) have been widely used in the industrial field. AGV can efficiently and accurately complete the material handling task under the guidance of the program, and improve the execution efficiency of the production scheduling plan. Therefore, the scheduling system is modeled and optimized with AGV as the object.
[0004] At present, the results of studying production scheduling optimization or logistics scheduling separately are relatively mature. Both problems are NP-hard problems. Integer programming or branch-and-bound methods are traditionally used to find the optimal solution, but these methods have low optimization efficiency and are not suitable for large-scale problems. Therefore, scholars at home and abroad have successively proposed intelligent search algorithms such as artificial bee colony algorithm, particle swarm algorithm, simulated annealing algorithm and ant colony algorithm. However, most of the current algorithm results often focus on only one of the two problems, or only emphasize solving the optimal production scheduling plan and hide the arrangement of subsequent logistics scheduling, or only set the optimal logistics scheduling plan based on known production needs, which is a one-sided consideration; on the other hand, the combination of the solutions obtained by optimizing the two problems separately is not necessarily the best, so the solutions obtained by these algorithms often cannot be directly put into use. A few methods that combine the two problems for simultaneous optimization ignore the intrinsic connection between the two problems. They only express the mutual influence of the two problems through time constraints during modeling, and apply optimization algorithms to the overall solution. The feasible domain of the problem is more complex and the solution time is longer. In summary, in the field of simultaneous optimization of production scheduling and logistics scheduling, there is still a blank in the research results of using the intrinsic connection between the two to accelerate the optimization speed and improve the optimization quality. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an equipment production scheduling and on-site logistics scheduling optimization method based on an improved genetic algorithm. The method considers the impact of equipment processing and AGV transportation on the production process in the model, solves the optimal equipment production scheduling plan and the optimal AGV scheduling plan in steps, and inserts time slices to reserve transportation time in the equipment production scheduling optimization process to ensure that the combination of the two parts of the plan can obtain a scheduling plan that is close to the overall optimal.
[0006] The object of the present invention is achieved through the following technical solution: a method for optimizing equipment production scheduling and on-site logistics scheduling based on an improved genetic algorithm, characterized in that it comprises the following steps:
[0007] Step (1): Obtain order information, equipment information and AGV status; order information includes order number, type and quantity of products in the order, type and total number of processes of order products, equipment that can be used for each process and processing time on different equipment, and loading and unloading time required for materials in different states; divide product batches according to orders, and the types of products in the same batch are the same, and batches are used as the basic unit of production scheduling; after obtaining the process routes of all batches of products, determine the processes and corresponding transportation tasks and number them; equipment information includes equipment type, quantity and location coordinates, and each device is uniquely numbered; AGV status includes the number of the normally working AGV, and the travel time between different devices calculated based on the current performance of the AGV;
[0008] Step (2): Set the optimization goal according to the requirements and select the corresponding genetic algorithm population fitness function;
[0009] Step (3): Set the population size, maximum number of iterations and convergence threshold, initialize a population for solving the optimal equipment production schedule; use the MSOS encoding method, each individual consists of an equipment selection string and a process sequence string; use a genetic algorithm to iteratively optimize the population, and the specific operations include decoding and calculating fitness, selection operation, crossover operation and mutation operation; in particular, when decoding the chromosome set into a production schedule and recursively deriving the start and end time of each process, time slices need to be inserted between adjacent processes of the same product, and the length is the estimated transportation time; when the condition for stopping iteration is met, output the chromosome set corresponding to the individual with the highest fitness;
[0010] Step (4): Set the population size, maximum number of iterations and convergence threshold, and reinitialize a population to solve the optimal AGV scheduling solution under the current optimal production scheduling solution; each individual consists of four chromosome substrings, including equipment selection string, process sequence string, AGV selection string and transportation sequence string, where the equipment selection string and process sequence string are the optimal individual chromosome groups output by step (3), and the AGV selection string and transportation sequence string are randomly generated according to the MSOS coding rules; use a genetic algorithm to iteratively optimize the population, but only perform crossover and mutation operations on the AGV selection string and transportation sequence string during the iteration process; repeat the iteration until the stopping condition is met, and output the production scheduling solution corresponding to the individual with the highest fitness.
[0011] Furthermore, the optimization goal of step (2) is to minimize the execution time of the entire production scheduling plan, that is, the time it takes for all products to be processed and transported to the warehouse. Item 1 Complete the final processing step for product n The moment; np is the process number, representing the pth process of product n. The total number of processes of product n is P n ; Item 2 The time it takes to load product n onto the AGV; is a 0-1 variable. If the processing is done on the equipment numbered j, it is 1, otherwise it is 0. j0 is the time taken by the AGV to travel from equipment j to the warehouse, so the third term of the formula represents the time taken by the AGV to travel from the processing step to the warehouse. The time it takes to drive from the equipment to the warehouse; the fourth item is the unloading time; the optimization goal is to make T max minimum, take As the fitness function, C>0 is a constant, and the optimization objective is converted to maximizing f.
[0012] Furthermore, the process of step (3) can be specifically expressed as follows:
[0013] Step (3.1) sets the population size, maximum number of iterations and convergence threshold, initializes a population for solving the optimal equipment scheduling plan, uses the MSOS encoding method, and each individual consists of an equipment selection string and a process sequence string;
[0014] Step (3.2) decodes the chromosomes in the population into a specific production schedule and calculates the fitness of each individual. When decoding the chromosome group into a production schedule and recursively calculating the start and end time of each process, a time slice needs to be inserted between adjacent processes of the same product, and the length is the estimated time required for transportation between the two process execution equipment.
[0015] Step (3.3) According to the elite retention strategy, retain the individuals with the highest fitness in the population; then apply the binary tournament selection operator to the current population to select individuals with higher fitness to join the new generation population;
[0016] Step (3.4) randomly performs crossover and mutation operations on the chromosomes in the population according to the set probability to obtain a new population;
[0017] Step (3.5) When the total number of iterative evolution of the population reaches the maximum number of iterations, or the convergence parameter reaches the convergence threshold, the iteration ends and the individual with the highest fitness is output; otherwise, the convergence parameter is updated and the process returns to step (3.2).
[0018] Furthermore, the process of step (4) can be specifically expressed as follows:
[0019] Step (4.1) sets the population size, maximum number of iterations and convergence threshold, and initializes a new population based on the known optimal equipment scheduling plan to obtain the optimal AGV scheduling plan under the current scheduling plan; each individual generated consists of four chromosome substrings, among which the equipment selection string and process sequence string are the chromosome groups corresponding to the optimal equipment scheduling plan, and the AGV selection string and transportation sequence string are randomly generated according to the MSOS coding rules;
[0020] Step (4.2) decodes the chromosomes in the population into a specific scheduling scheme and calculates the fitness of each individual;
[0021] Step (4.3) According to the elite retention strategy, retain the individuals with the highest fitness in the population; then apply the binary tournament selection operator to the current population to select individuals with higher fitness to join the new generation population;
[0022] Step (4.4) randomly performs crossover and mutation operations on the AGV selection string and the transportation sequence string according to the set probability to obtain a new population;
[0023] Step (4.5) When the total number of iterative evolutions of the population reaches the maximum number of iterations, or the convergence parameter reaches the convergence threshold, the iteration ends and the scheduling plan obtained by decoding the individual with the highest fitness is output; otherwise, the convergence parameter is updated and the process returns to step (4.2).
[0024] Furthermore, in the decoding process of step (3.2), time slices representing the transportation process are inserted between each process. The specific process is as follows:
[0025] According to the MSOS coding rules, the chromosome is reversely decoded into a specific production scheduling plan, the execution equipment and priority of each process, as well as the processing task table of each device, are determined, and the time points for starting and completing processing of each process are deduced in sequence; np First, find the execution equipment number j and execution order of the process, and determine the equipment j that is ranked first in O np The previous task O processed by the previous person n′p′ and its completion time tc n′p′ , then find process O n(p-1) The completion time tc n(p-1) and execution equipment number j′; process O np Need to be idle when device j is free and O n(p-1) The processing can only start after the processing is completed; the time slice representing the transportation process needs to be inserted between the adjacent processes of the same product. np The time to start processing is ts np =max{tc n′p′ ,tc n(p-1) +TD j′j}, where TD j′j is the time required for the AGV to travel from device j′ to device j; process O np The processing completion time is in Is equipment j for a product n processing step O np Time used, num n is the number of products n in the batch; after completing the recursion, the execution time of the plan can be obtained and the fitness can be calculated.
[0026] Furthermore, the convergence parameter of step (3.5) is set as follows: due to the influence of the elite retention strategy, the optimal fitness change curve of each generation of the population is a monotonically increasing piecewise constant function image, so the number of iterations from the most recent jump point in the past to the current population is taken as the convergence parameter, that is, the number of iterations at which the current optimal fitness has remained unchanged; when the population convergence parameter reaches the convergence threshold, the algorithm is considered to have converged; when updating the convergence parameter, check whether the current population optimal fitness is the same as the optimal fitness of the previous round of iterations. If different, set the convergence parameter to zero; if the same, add one to the convergence parameter of the previous round.
[0027] Furthermore, in step (4.1), after obtaining the optimal equipment production scheduling plan, the equipment selection string and process sequence string corresponding to the optimal plan are retained; using the MSOS encoding rule, a pair of AGV selection strings and transportation sequence strings are randomly generated each time, and it is checked whether these individuals can form an executable production scheduling plan with the equipment selection string and process sequence string corresponding to the known optimal plan, and the feasible individuals are placed in the initial population for global optimization; because the processing sequence and transportation sequence are specified separately, but there are sequence constraints between the process and transportation tasks and within the two, the randomly generated individuals may fall into infinite recursion when recursing the time node, so additional availability checks are required.
[0028] Furthermore, step (4.2) considers the impact of equipment processing and AGV transportation on the solution time nodes during the decoding process, and completes the time node recursion by checking the preconditions of each process and transportation task:
[0029] According to the MSOS coding rules, reverse decoding is performed to determine the execution equipment and priority of each process, the processing task list of each equipment, the execution AGV and priority of each transportation task, and the transportation task list of each AGV; np First, find the execution equipment number j and execution order of the process, and determine the equipment j that is ranked first in O np The previous task O n′p′ and its completion time tc n′p′ ; Then find the transportation task task np Completion time np ; Process O np Need to be idle when device j is free and O np The processing can only start after the material to be processed arrives at equipment j, that is, process O np The time to start processing is ts np =max{ta np +TU np ,tc n′p′}, where TU np Yes np Unloading time of processed materials; Operation Onp The processing completion time is For transportation tasks np First, find the execution AGV number v and execution order of the task, and determine the immediate predecessor task on the same AGV. n′p′ , and then search for process O in sequence np , O n′p′ and O n(p-1) The execution device numbers j, j′ and j″ determine the working route of the AGV: After completing the task n′p′ After unloading the material, it departs from equipment j′ and drives to equipment j″ to receive and complete process O. n(p-1) The material is transported to equipment j to prepare for execution O np processing; when the AGV has arrived at equipment j″ and process O n(p-1) The loading of materials can only start after the task has been completed. np Time to start transportation td np =max{tc n(p-1) ,ta n′p′ +TU n′p′ +TD j′j″}+TL np , where n′p′ It is a task n′p′ Execution completion time, TU n′p′ Yes n′p′ Unloading time of the processed material, TD j′j″ is the time required for the AGV to travel from device j′ to device j″, TL np Yes np Loading time of the processed material; task np The time it takes to complete the transport np =td np +TD j″j , where TD j″j It is the time required for the AGV to travel from device j″ to device j. After completing the specific production scheduling time node recursion, the fitness is calculated according to the plan execution time.
[0030] Furthermore, step (4.4) only performs crossover and mutation operations on the AGV selection string and the transport sequence string; the chromosome randomly decides whether to perform crossover or mutation operations according to the set probability; after the operation is completed, an inspection is performed, and new individuals that can be decoded as available solutions are directly placed in the next generation population. If they are unavailable individuals, they are discarded and individuals with higher fitness in the parent generation are placed in the next generation population instead.
[0031] The beneficial effects of the present invention include:
[0032] (1) The coordinated optimization of equipment production scheduling and transportation scheduling in discrete manufacturing systems has been achieved. This has shortened the production cycle of orders, fully utilized the capacity of the manufacturing system, and greatly improved the operating efficiency of manufacturing enterprises.
[0033] (2) For complex production systems with multiple equipment and AGVs, a step-by-step optimization method is proposed to ensure stable optimization results and faster calculation speed. This method first optimizes the equipment scheduling problem separately, and ensures the global optimization effect by inserting transportation time slices. Then, the optimal AGV scheduling solution is solved based on the optimal equipment scheduling solution. Since the problem is decomposed into two parts, the optimization space is narrowed and the amount of calculation is reduced. It has higher optimization efficiency than traditional genetic algorithms, so it can quickly provide a scheduling solution, which is suitable for complex discrete system scheduling problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of the method of the present invention.
[0035] Figure 2 This is the Gantt chart of the optimal solution obtained by this method. DETAILED DESCRIPTION
[0036] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0037] like Figure 1 As shown in the figure, a method for optimizing equipment production scheduling and on-site logistics scheduling based on an improved genetic algorithm is shown in the figure. Figure 1 shown.
[0038] Step (1) first reads the order information, including the order number, the type and quantity of the products in the order, the type and total number of processes for the order products, the equipment that can be used for each process and the processing time on different equipment, and the loading and unloading time required for materials in different states. The order products are divided into batches. The products of the same batch have the same type and process route, and are continuously processed on the equipment as a whole. The batch is used as the basic unit of production scheduling. After obtaining the process routes of all batches of products, the processes and transportation tasks are determined, and the pth process of the nth batch of products is recorded as O np , O np The material to be processed is transported from the previous location to the processing location O np The equipment transportation task is recorded as task np Since the finished products need to be transported to the warehouse in the end, for each batch of products, the total number of transportation tasks is one more than the number of processes. Equipment information includes equipment type, quantity and location coordinates, and each equipment is uniquely numbered M. 1 ,M 2 ,…,M J, J is the total number of devices. The AGV status includes the number of AGVs that are working normally, and the travel time between different devices calculated based on the current performance of the AGV.
[0039] The optimization goal of step (2) is to minimize the execution time of the entire production scheduling plan, that is, the time it takes for all products to be processed and transported to the warehouse. The meanings of the symbols in the formula are as follows: The first term Complete the final processing step for product n The moment; the second The time it takes to load product n onto the AGV; is a 0-1 variable. If the processing is done on the equipment numbered j, it is 1, otherwise it is 0. j0 is the time taken by the AGV to travel from equipment j to the warehouse, so the third term of the formula represents the time taken by the AGV to travel from the processing plant to the warehouse. The time it takes to drive from the equipment to the warehouse; the fourth item is the unloading time. Assume that under the current production schedule, the product number of the last product transported to the warehouse is n 0 , the last process is in equipment j 0 If the processing is done on the The optimization goal is to make T max minimum, take As the fitness function, C>0 is a constant, and the optimization objective is converted to maximizing f.
[0040] Step (3) Set the population size, maximum number of iterations and convergence threshold based on experience. Initialize a population to solve the optimal equipment scheduling plan; use the MSOS method to encode chromosomes, each individual consists of an equipment selection string and a process sequence string; use a genetic algorithm to iteratively optimize the population, and the specific operations include decoding and calculating fitness, selection operations, crossover operations and mutation operations; the two chromosome substrings guide the equipment selection and process processing sequence of the process respectively, and the specific encoding rules are as follows:
[0041] The length of the equipment selection string and the process sequence string are That is, the total number of all product processes. The sum of the number of product processes in the first k batches of the product set is recorded as And stipulate that 0 = 0, the device selects the xth gene storage processing step O on the string np The conversion relationship of the device number is:
[0042] n=k,p=xl k-1 ,if l k-1 <x≤l k
[0043] The gene storage product batch number of the process sequence string, the number of occurrences of each product number is equal to the total number of its processes P n , and the product number n that appears from left to right in the process sequence string for the pth time represents the current gene recording process O np The operations on the left in the operation sequence have priority over the operations on the right when they are scheduled on the equipment.
[0044] According to the above rules, some individuals are randomly generated as the initial population.
[0045] Step (4) reversely decodes according to the coding rules to determine the execution equipment and priority of each process, as well as the processing task table of each device, and recursively deduce the time points for starting and completing processing of each process. np First, find the execution equipment number j and execution order of the process, and determine the immediate predecessor task O on the same equipment. n′p′ The completion time tc n′p′ Then search for process O n(p-1) The completion time tc n(p-1) and execution equipment number j′. Process O np Need to be idle when device j is free and O n(p-1) The processing can only start after the processing is completed. A time slice representing the transportation process needs to be inserted between adjacent processes of the same product. The length is the estimated time used for transportation between the two process execution equipment. The final process O np The time to start processing is ts np =max{tc n′p′ ,tc n(p-1) +TD j′j}, where TD j′j is the time required for the AGV to travel from device j' to device j. np The processing completion time is in Is equipment j for a product n processing step O np Time used, num n is the number of products n in the batch. After completing the recursion, the execution time of the solution can be obtained and the fitness can be calculated.
[0046] Step (5) first retains the individual with the highest fitness in the population according to the elite retention strategy. Then, the binary tournament selection operator is used to randomly select two individuals from the population with replacement each time, and the individual with higher fitness is copied to the next generation population until the population size reaches the set value.
[0047] Step (6) The two chromosome substrings use different crossover and mutation operators. The equipment selection string uses uniform crossover and single-point mutation, and the process sequence string uses POX crossover and reverse mutation. 1 and P 2 When performing uniform crossover, the corresponding genes on each locus decide whether to exchange with the same probability. When the parent equipment selection string P performs single-point mutation, a locus on P is randomly selected. If there are multiple available devices for the process corresponding to the locus, the gene value is modified to an available device number different from the current value. 1 and P 2 When performing POX crossover, the product set is randomly divided into two non-empty and non-intersecting subsets S 1 and S 2 , P 1 S 1 The gene corresponding to the product is copied to O 1 At the same position, P 2 S 2 The genes corresponding to the products are filled in O 1 Similarly, swap P 1 and P 2 The position of O 2 When the parent process sequence string P performs reverse mutation, two loci on P are randomly selected, and the order of all genes between the two loci is reversed to obtain a daughter chromosome. The chromosome randomly decides whether to perform a crossover or mutation operation according to the set probability.
[0048] Step (7) When the optimal fitness of the population remains unchanged for a certain number of iterations, the algorithm is considered to have converged. The number of iterations for which the optimal fitness remains unchanged is set as the convergence parameter, and the convergence threshold set in step (3) is used as a sign to determine whether it has converged. When the total number of population iterations reaches the maximum value, or the convergence parameter reaches the convergence threshold, the iteration is stopped and the optimal individual is output. Otherwise, the convergence parameter is updated and the step (4) is returned. When updating the convergence parameter, check whether the optimal fitness of the current population is the same as the optimal fitness of the previous round of iteration. If different, the convergence parameter is set to zero. If the same, add one to the convergence parameter of the previous round.
[0049] Step (8) sets the population size, maximum number of iterations, and convergence threshold based on experience. After obtaining the optimal equipment scheduling plan, retain the equipment selection string and process sequence string corresponding to the optimal plan. Also use the MSOS encoding rule to randomly generate a pair of AGV selection strings and transportation sequence strings each time. The generation rules are as follows:
[0050] The lengths of the AGV selection string and the transport sequence string are Similar to the rules of equipment selection string and process sequence string, the sum of the number of transportation tasks of the first k product batches of the product set is recorded as And stipulate m 0 = 0, the device selects the xth gene storage and transportation task on the string np The conversion relationship of AGV number is:
[0051] n=k,p=xm k-1 ,if m k-1 <x≤m k
[0052] The gene of the transport sequence string also stores the product batch number, and the number of occurrences of each product number is equal to the total number of its transport tasks (P n +1), and the product number n that appears from left to right in the transport sequence string for the pth time represents the current gene recording task task np Priority. The transport tasks on the left side of the transport sequence have priority over the transport tasks on the right side when they are scheduled on the AGV.
[0053] According to the above rules, some individuals are randomly generated, and it is checked whether these individuals can form an executable production scheduling plan with the equipment selection string and process sequence string corresponding to the known optimal production scheduling plan, and the feasible individuals are placed in the initial population for global optimization. Because the processing sequence and transportation sequence are specified separately, but there are sequence constraints between the process and transportation tasks and within the two, the randomly generated individuals may fall into infinite recursion when recursing the time node, so additional availability checks are required.
[0054] Step (9) reversely decodes according to the MSOS coding rules to determine the execution equipment and priority of each process, the processing task table of each equipment, the execution AGV and priority of each transportation task, and the transportation task table of each AGV.
[0055] For process O np First, find the execution equipment number j and execution order of the process, and determine the immediate predecessor task O on the same equipment. n′p′ The completion time tc n′p′ , then find the transport task np Completion time np . Process O np Need to be idle when device j is free and O np The processing can only start after the material to be processed arrives at equipment j, that is, process O np The time to start processing is ts np =max{ta np +TU np ,tc n′p′}, where TUnp Yes np The unloading time of the processed material. np The processing completion time is For transportation tasks np First, find the execution AGV number v and execution order of the task, and determine the immediate predecessor task on the same AGV. n′p′ , and then search for process O in sequence np , O n′p′ and O n(p-1) The execution device numbers j, j′ and j″ determine the working route of the AGV: After completing the task n′p′ After unloading the material, it departs from equipment j′ and drives to equipment j″ to receive the completed process O n(p-1) The material is transported to equipment j to prepare for execution O np After the AGV has arrived at equipment j″ and process O n(p-1) The loading of materials can only start after the task has been completed. np Time to start transportation td np =max{tc n(p-1) ,ta n′p′ +TU n′p′ +TD j′j″}+TL np , where n′p′ It is a task n′p′ Execution completion time, TU n′p′ Yes n′p′ Unloading time of the processed material, TD j′j″ is the time required for the AGV to travel from device j′ to device j″, TL np Yes np The loading time of the processed material. np The time it takes to complete the transport np =td np +TD j″j , where TD j″j It is the time required for the AGV to travel from device j″ to device j. After completing the specific production scheduling time node recursion, the fitness is calculated according to the plan execution time.
[0056] Step (10) is the same as step (5), using the elite retention strategy and binary tournament selection operator to obtain the next generation population.
[0057] Step (11) only operates on the AGV selection string and the transport sequence string. The AGV selection string uses uniform crossover and single-point mutation, and the transport sequence string uses POX crossover and reverse mutation. The chromosome randomly decides whether to perform the crossover or mutation operation according to the set probability. After the operation is completed, it is checked and the new individuals that can be decoded as available solutions are directly placed in the next generation population. If they are unavailable individuals, they are discarded and the individuals with higher fitness in the parent generation are placed in the next generation population instead.
[0058] Step (12) is the same as step (7). When the algorithm converges or the total number of population iterations reaches the maximum value, the result is directly output; otherwise, the convergence parameter is updated and the process returns to step (9).
[0059] Example
[0060] In order to make full use of the production capacity of the intelligent discrete manufacturing system, adjust the process parameters in real time according to the order requirements, and achieve efficient production, it is necessary to formulate a suitable production scheduling optimization plan for the manufacturing enterprise. Complex equipment procedures and flexible process routes can meet different production needs, but they also increase the difficulty of production scheduling optimization. Taking into account the impact of material transportation within the factory on the efficiency of production plan execution, existing optimization schemes often combine production scheduling and scheduling problems to model at the same time, which results in large-scale problems and complex solutions. In response to this problem, the present invention designs a step-by-step optimization algorithm, which can quickly achieve global optimization of equipment scheduling and AGV scheduling, which is better than existing methods. The effectiveness of this method is illustrated below in combination with the production data of a certain intelligent manufacturing workshop.
[0061] Next, the implementation steps of the present invention are described in detail in conjunction with the specific process:
[0062] Step (1) first reads the device information, including the number and location coordinates of each device, where the device types and quantities are shown in Table 1.
[0063] Table 1 Equipment quantity table
[0064] Equipment code category Quantity / unit serial number M1 Milling Machine 2 1,2 M2 Machining Center 1 3 M3 lathe 2 4,5 M4 Drill Press 2 6,7 M5 grinder 2 8,9 M6 Wire cutting machine 1 10
[0065] The order information includes order number, product type and quantity, process route, available equipment for each process and corresponding processing time, as shown in Table 2 and Table 3. Directly divide one part into one batch as the basic unit of production scheduling.
[0066] Table 2 Order information table
[0067] Part Number Product Name Quantity / piece Process route J1 Screw sleeve 10 Turning - Drilling - Milling - Grinding J2 Grid 8 Turning-Grinding-Drilling J3 Toothed gasket 15 Milling - Turning - Machining Center - Drilling - Wire Cutting - Grinding J4 Ball 6 Turning-Wire Cutting-Grinding-Milling J5 Nozzle body 4 Turning-Grinding-Milling J6 Back cover 16 Wire cutting - machining center - drilling - grinding - milling J7 Sealing cap 12 Turning - Wire Cutting - Grinding - Milling - Machining Center - Drilling J8 cover 5 Turning - machining center - drilling - milling J9 case 9 Wire cutting - turning - grinding - milling - machining center processing J10 End face 17 Milling - Grinding - Machining Center - Drilling - Wire Cutting - Turning J11 Contact circle 11 Milling - Wire Cutting Machining Center - Grinding - Drilling
[0068] Table 3 Processing time of each process on each equipment
[0069]
[0070] There are 15 identical AGVs, numbered 1 to 15. For each order, the loading and unloading time of semi-finished products in all states is 15 minutes. The time taken for the AGV to travel between various locations is calculated, as shown in Table 4:
[0071] Table 4 Driving time of each AGV (unit: minutes)
[0072]
[0073] The processes and transportation tasks are divided, and the pth process of the nth batch of products is recorded as O np For example, the turning process of the product with code J1 is recorded as O 11 ; O np The required material is transported from the previous location to be processed O np The transportation task at the equipment is recorded as task np For example, for product code J1, the task of transporting raw materials from the warehouse to the lathe is recorded as task 11 After the lathe is turned, the task of transporting the semi-finished product from the lathe to the drilling machine is recorded as task 12 , after completing the four processes, the task of transporting the finished product from the grinder to the warehouse is recorded as task 15 .
[0074] The optimization goal of step (2) is to minimize the execution time of the entire production scheduling plan, that is, the time T for all products to be transported to the warehouse after processing. max According to the order information, the estimated execution time is several hundred hours. as a fitness function.
[0075] Step (3) sets the population size to 50, the maximum number of iterations to 1000, and the convergence threshold to 150 based on experience. The MSOS method is used to encode chromosomes, and two chromosome substrings are used to guide the equipment selection and process order of the process respectively. The length of the equipment selection string is the same as the total number of processes, and the execution equipment number selected for each process is recorded in turn. For example, the second gene value is 7, which represents process O. 12 The process is performed by the device with serial number 7, which is a drilling machine. The gene storage product batch number of the process sequence string, the product number n that appears from left to right in the process sequence string for the pth time, represents the current gene recording process O np The process on the left in the process sequence has a higher priority. For example, the process sequence [3,1,3,2,2,1,…] represents a priority of O. 31 >O 11 >O 32 >O 21 >O 22 >O 12 >…, so in O 11, O 21 and O 32 When using the same lathe, the lathe first processes O 11 , reprocessing O 32 , finally processed O 21 According to this rule, some individuals are randomly generated as the initial population.
[0076] Step (4) First, the chromosome set is translated into a specific equipment processing task table. The processing task of each equipment can be queried according to the number on the equipment selection string, and the processing order of each equipment is determined according to the priority specified by the process sequence string, and the time points for starting and completing processing of each process are successively deduced. np First, find the execution equipment number j and execution order of the process, and determine the immediate predecessor task O on the same equipment. n′p′ The completion time tc n′p′ Then search for process O n(p-1) The completion time tc n(p-1) and execution equipment number j′. Process O np Need to be idle when device j is free and O n(p-1) The processing can only start after the processing is completed. The time slice representing the transportation process needs to be inserted between the adjacent processes of the same product. np The time to start processing is ts np =max{tc n′p′ ,tc n(p-1) +TD j′j}, where TD j′j is the time required for the AGV to travel from device j' to device j. np The processing completion time is in Is equipment j for a product n processing step O np Time used, num n is the number of products n in the batch. After completing the recursion, the execution time of the solution is obtained and the fitness is calculated.
[0077] Step (5) first retains the individual with the highest fitness in the population according to the elite retention strategy. Then, the binary tournament selection operator is used to randomly select two individuals from the population with replacement each time, and the individual with higher fitness is copied to the next generation population until the population size reaches the set value.
[0078] In step (6), different chromosome substrings use different crossover and mutation operators. The equipment selection string uses uniform crossover and single-point mutation, and the process sequence string uses POX crossover and reverse mutation. 1 and P 2When performing uniform crossover, the corresponding genes on each locus decide whether to exchange with the same probability. When the parent equipment selection string P performs single-point mutation, a locus on P is randomly selected. If there are multiple available devices for the process corresponding to the locus, the gene value is modified to an available device number different from the current value. 1 and P 2 When performing POX crossover, the product set is randomly divided into two non-empty and non-intersecting subsets S 1 and S 2 , P 1 S 1 The gene corresponding to the product is copied to O 1 At the same position, P 2 S 2 The genes corresponding to the products are filled in O 1 Similarly, swap P 1 and P 2 The position of O 2 When the parent process sequence string P performs reverse mutation, two loci on P are randomly selected, and the order of all genes between the two loci is reversed to obtain a daughter chromosome. The chromosome randomly decides whether to perform a crossover or mutation operation according to the set probability.
[0079] Step (7) When the optimal fitness of the population remains unchanged for a certain number of iterations, the algorithm is considered to have converged. The number of iterations for which the optimal fitness remains unchanged is set as the convergence parameter, and the convergence threshold set in step (3) is used as a sign to determine whether it has converged. When the total number of population iterations reaches the maximum value, or the convergence parameter reaches the convergence threshold, the iteration is stopped and the optimal individual is output. Otherwise, the convergence parameter is updated and the step (4) is returned. When updating the convergence parameter, check whether the optimal fitness of the current population is the same as the optimal fitness of the previous round of iteration. If different, the convergence parameter is set to zero. If the same, add one to the convergence parameter of the previous round.
[0080] Step (8) sets the population size to 50, the maximum number of iterations to 1000, and the convergence threshold to 150 based on experience. After obtaining the optimal equipment scheduling plan, retain the equipment selection string and process sequence string corresponding to the optimal plan. The MSOS encoding rule is also used to randomly generate a pair of AGV selection strings and transportation sequence strings each time. The difference is that since the transportation task includes transporting raw materials out of the warehouse and transporting finished products back to the warehouse, each product has one more transportation task than the total number of its processes. Accordingly, the lengths of the AGV selection string and the transportation sequence string are both The number of times each product number appears in the shipping sequence is P. n+1. Each time a pair of AGV selection strings and transport sequence strings is generated, check whether they can form an executable production scheduling plan with the equipment selection string and process sequence string corresponding to the known optimal production scheduling plan, and put the feasible individuals into the initial population for global optimization. Because the processing sequence and transportation sequence are specified separately, but there are sequence constraints between the process and transportation tasks and within the two, the randomly generated individuals may fall into infinite recursion when recursing the time node. For example, in a certain plan, on the same lathe O 11 Before O 21 Processing, but on the same AGV task 11 Arrange in task 22 After that, at this time O 11 Need to wait for task 11 After the raw materials are completed, they will be transported to the designated lathe to start processing, and task 11 Need to wait for task 22 After completion, the task can be executed. 22 Transport 22 The processed material is just completed. 21 Processed materials, while O 21 The processing needs to wait for O 11 , falls into infinite recursion, so an additional check for availability is required.
[0081] Step (9) is similar to step (4). Reverse decoding is performed according to the MSOS coding rules to determine the execution equipment and priority of each process, the processing task list of each equipment, the execution AGV and priority of each transportation task, and the transportation task list of each AGV. np First, find the execution equipment number j and execution order of the process, and determine the immediate predecessor task O on the same equipment. n′p′ The completion time tc n′p′ , then find the transport task np Completion time np . Process O np Need to be idle when device j is free and O np The processing can only start after the material to be processed arrives at equipment j, that is, process O np The time to start processing is ts np =max{ta np +TU np ,tc n′p′}, where TU np Yes np The unloading time of the processed material. np The processing completion time is For transportation tasks npFirst, find the execution AGV number v and execution order of the task, and determine the immediate predecessor task on the same AGV. n′p′ , and then search for process O in sequence np , O n′p′ and O n(p-1) The execution device numbers j, j′ and j″ determine the working route of the AGV: After completing the task n′p′ After unloading the material, it departs from equipment j′ and drives to equipment j″ to receive and complete process O. n(p-1) The material is transported to equipment j to prepare for execution O np After the AGV has arrived at equipment j″ and process O n(p-1) The loading of materials can only start after the task has been completed. np Time to start transportation td np =max{tc n(p-1) ,ta n′p′ +TU n′p′ +TD j′j″}+TL np , where n′p′ It is a task n′p′ Execution completion time, TU n′p′ Yes n′p′ Unloading time of processed material, TD j′j″ is the time required for the AGV to travel from device j′ to device j″, TL np Yes np The loading time of the processed material. np The time it takes to complete the transport np =td np +TD j″j , where TD j″j It is the time required for the AGV to travel from device j″ to device j. After completing the specific production scheduling time node recursion, the fitness is calculated according to the plan execution time.
[0082] Step (10) is the same as step (5), using the elite retention strategy and binary tournament selection operator to obtain the next generation population.
[0083] Step (11) only operates on the AGV selection string and the transport sequence string. The AGV selection string uses uniform crossover and single-point mutation, and the transport sequence string uses POX crossover and reverse mutation. The chromosome randomly decides whether to perform the crossover or mutation operation according to the set probability. After the operation is completed, the scheme is checked. New individuals that can be decoded as available schemes are directly placed in the next generation population. If they are unavailable individuals, they are discarded and individuals with higher fitness in the parent generation are placed in the next generation population instead.
[0084] Step (12) is the same as step (7). When the algorithm converges or the total number of population iterations reaches the maximum value, the iteration is stopped and the optimal solution is output in the form of a Gantt chart, such as Figure 2 As shown, otherwise update the convergence parameters and return to step (9).
[0085] The optimization goal is to minimize the execution time of the solution, that is, the time from the first batch of raw materials being shipped out of the warehouse to the last finished product being put into the warehouse. After repeated experiments, it was found that when the population size is set to 50, the device iteration convergence threshold and the overall iteration convergence threshold are set to 150 and 100 respectively, high-quality optimization results can be obtained in the shortest possible time.
[0086] The effect comparison between the method of the present invention and the common genetic algorithm is shown in Table 5. To control the variables, all iterative convergence thresholds are uniformly set to 150, and the experiment is repeated 30 times to eliminate the accidental influence.
[0087] Table 5 Algorithm effect comparison
[0088]
[0089] Compared with ordinary genetic algorithms:
[0090] (1) The method of the present invention optimizes the two problems of equipment scheduling and transportation scheduling respectively, and reserves time for transportation scheduling in advance during the equipment scheduling stage, so that the step-by-step local optimization achieves the same effect as the global optimization.
[0091] (2) The method of the present invention can achieve convergence within a smaller number of iterations, greatly speeding up the calculation speed, enabling faster response to orders and improving the operating efficiency of manufacturing enterprises.
[0092] The above embodiments are used to illustrate the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.
Claims
1. A method for optimizing equipment production scheduling and on-site logistics scheduling based on an improved genetic algorithm, characterized in that: The following steps are involved: Step (1): Obtain order information, equipment information and AGV status; order information includes order number, type and quantity of products in the order, type and total number of processes for order products, equipment that can be used for each process and processing time on different equipment, and loading and unloading time required for materials in different states; divide product batches according to orders, and the types of products in the same batch are the same, and batches are used as the basic unit of production scheduling; After obtaining the process routes of all batches of products, determine the processes and corresponding transportation tasks and number them; equipment information includes equipment type, quantity and location coordinates, and each device is uniquely numbered; AGV status includes the number of the normally working AGV and the travel time between different devices calculated based on the current performance of the AGV; Step (2): Set the optimization goal according to the demand and select the corresponding genetic algorithm population fitness function; the optimization goal is to minimize the execution time of the entire production scheduling plan, that is, to minimize the time for all products to be processed and transported to the warehouse. Item 1 Complete the final processing step for product n The moment; np is the process number, representing the pth process of product n. The total number of processes of product n is P n ; Item 2 The time it takes to load product n onto the AGV; is a 0-1 variable. If the processing is done on the equipment numbered j, it is 1, otherwise it is 0. j0 is the time taken by the AGV to travel from equipment j to the warehouse, so the third term of the formula represents the time taken by the AGV to travel from the processing step to the warehouse. The time it takes to drive from the equipment to the warehouse; the fourth item It is unloading time; The optimization goal is to make T max minimum, take As the fitness function, C>0 is a constant, and the optimization objective is converted to maximizing f; Step (3): Set the population size, maximum number of iterations and convergence threshold, initialize a population for solving the optimal equipment production schedule; use the MSOS encoding method, each individual consists of an equipment selection string and a process sequence string; use a genetic algorithm to iteratively optimize the population, and the specific operations include decoding and calculating fitness, selection operation, crossover operation and mutation operation; when decoding the chromosome set into a production schedule and recursively calculating the start and end time of each process, time slices need to be inserted between adjacent processes of the same product, and the length is the estimated transportation time; when the condition for stopping iteration is met, output the chromosome set corresponding to the individual with the highest fitness; Step (4): Set the population size, maximum number of iterations and convergence threshold, and reinitialize a population to solve the optimal AGV scheduling solution under the current optimal production scheduling solution; each individual consists of four chromosome substrings, including equipment selection string, process sequence string, AGV selection string and transportation sequence string, where the equipment selection string and process sequence string are the optimal individual chromosome groups output by step (3), and the AGV selection string and transportation sequence string are randomly generated according to the MSOS coding rules; use a genetic algorithm to iteratively optimize the population, but only perform crossover and mutation operations on the AGV selection string and transportation sequence string during the iteration process; repeat the iteration until the stopping condition is met, and output the production scheduling solution corresponding to the individual with the highest fitness.
2. The method according to claim 1, characterized in that The process of step (3) can be specifically expressed as follows: Step (3.1) sets the population size, maximum number of iterations and convergence threshold, initializes a population for solving the optimal equipment scheduling plan, uses the MSOS encoding method, and each individual consists of an equipment selection string and a process sequence string; Step (3.2) decodes the chromosomes in the population into a specific production schedule and calculates the fitness of each individual. When decoding the chromosome group into a production schedule and recursively calculating the start and end time of each process, a time slice needs to be inserted between adjacent processes of the same product, and the length is the estimated time required for transportation between the two process execution equipment. Step (3.3) retains the individuals with the highest fitness in the population according to the elite retention strategy; Then apply the binary tournament selection operator to the current population to select individuals with higher fitness to join the new generation population; Step (3.4) randomly performs crossover and mutation operations on the chromosomes in the population according to the set probability to obtain a new population; Step (3.5) When the total number of iterative evolution of the population reaches the maximum number of iterations, or the convergence parameter reaches the convergence threshold, the iteration ends and the individual with the highest fitness is output; otherwise, the convergence parameter is updated and the process returns to step (3.2).
3. The method according to claim 1, characterized in that The process of step (4) can be specifically expressed as follows: Step (4.1) sets the population size, maximum number of iterations and convergence threshold, and initializes a new population based on the known optimal equipment scheduling plan to obtain the optimal AGV scheduling plan under the current scheduling plan; each individual generated consists of four chromosome substrings, among which the equipment selection string and process sequence string are the chromosome groups corresponding to the optimal equipment scheduling plan, and the AGV selection string and transportation sequence string are randomly generated according to the MSOS coding rules; Step (4.2) decodes the chromosomes in the population into a specific scheduling scheme and calculates the fitness of each individual; Step (4.3) retains the individuals with the highest fitness in the population according to the elite retention strategy; Then apply the binary tournament selection operator to the current population to select individuals with higher fitness to join the new generation population; Step (4.4) randomly performs crossover and mutation operations on the AGV selection string and the transportation sequence string according to the set probability to obtain a new population; Step (4.5) When the total number of iterative evolutions of the population reaches the maximum number of iterations, or the convergence parameter reaches the convergence threshold, the iteration ends and the scheduling plan obtained by decoding the individual with the highest fitness is output; otherwise, the convergence parameter is updated and the process returns to step (4.2).
4. The method according to claim 2, characterized in that: During the decoding process of step (3.2), time slices representing the transportation process are inserted between each process. The specific process is as follows: According to the MSOS coding rules, the chromosome is reversely decoded into a specific production scheduling plan, the execution equipment and priority of each process, as well as the processing task table of each device, are determined, and the time points for starting and completing processing of each process are deduced in sequence; np First, find the execution equipment number j and execution order of the process, and determine the equipment j that is ranked first in O np The previous task O processed by the previous person n′p′ and its completion time tc n′p′ , then find process O n(p-1) The completion time tc n(p-1) and execution equipment number j′; process O np Need to be idle when device j is free and O n(p-1) The processing can only start after the processing is completed; the time slice representing the transportation process needs to be inserted between the adjacent processes of the same product. np The time to start processing is ts np =max{tc n′p′ , tc n(p-1) +TD j′j }, where TD j′j is the time required for the AGV to travel from device j′ to device j; process O np The processing completion time is in Is equipment j for a product n processing step O np Time used, num n is the number of products n in the batch; after completing the recursion, the execution time of the plan can be obtained and the fitness can be calculated.
5. The method according to claim 2, characterized in that: The convergence parameters described in step (3.5) are set as follows: Due to the influence of the elite retention strategy, the optimal fitness change curve of each generation of the population is a monotonically increasing piecewise constant function image. Therefore, the number of iterations from the most recent jump point in the past to the current population is taken as the convergence parameter, that is, the number of iterations at which the current optimal fitness has remained unchanged; when the population convergence parameter reaches the convergence threshold, the algorithm is considered to have converged; when updating the convergence parameter, check whether the current population optimal fitness is the same as the optimal fitness of the previous round of iterations. If different, set the convergence parameter to zero; if the same, add one to the convergence parameter of the previous round.
6. The method according to claim 3, characterized in that Step (4.1) After obtaining the optimal equipment production scheduling plan, retain the equipment selection string and process sequence string corresponding to the optimal plan; use the MSOS encoding rule to randomly generate a pair of AGV selection strings and transportation sequence strings each time, check whether these individuals can form an executable production scheduling plan with the equipment selection string and process sequence string corresponding to the known optimal plan, and put the feasible individuals into the initial population for global optimization; because the processing sequence and transportation sequence are specified separately, but there are sequence constraints between the process and transportation tasks and within the two, the randomly generated individuals may fall into infinite recursion when recursing the time node, so additional availability checks are required.
7. The method according to claim 4, characterized in that Step (4.2) considers the impact of equipment processing and AGV transportation on the solution time nodes during the decoding process, and completes the time node recursion by checking the preconditions of each process and transportation task: According to the MSOS coding rules, reverse decoding is performed to determine the execution equipment and priority of each process, the processing task list of each equipment, the execution AGV and priority of each transportation task, and the transportation task list of each AGV; np First, find the execution equipment number j and execution order of the process, and determine the equipment j that is ranked first in O np The previous task O n′p′ and its completion time tc n′p′ ; Then find the transportation task task np Completion time np ; Process O np Need to be idle when device j is free and O np The processing can only start after the material to be processed arrives at equipment j, that is, process O np The time to start processing is ts np =max{ta np +TU np , tc n′p′ }, where TU np Yes np Unloading time of processed materials; Operation O np The processing completion time is For transportation tasks np First, find the execution AGV number v and execution order of the task, and determine the immediate predecessor task on the same AGV. n′p′ , and then search for process O in sequence np , O n′p′ and O n(p-1) The execution device numbers j, j′ and j″ determine the working route of the AGV: After completing the task n′p′ After unloading the material, it departs from equipment j′ and drives to equipment j″ to receive and complete process O. n(p-1) The material is transported to equipment j to prepare for execution O np processing; when the AGV has arrived at equipment j″ and process O n(p-1) The loading of materials can only start after the task has been completed. np Time to start transportation td np =max{tc n(p-1) , n′p′ +TU n′p′ +TD j′j″ }+TL np , where n′p′ It is a task n′p′ Execution completion time, TU n′p′ Yes n′p′ Unloading time of processed material, TD j′j" is the time required for the AGV to travel from device j′ to device j″, TL np Yes np Loading time of the processed material; task np The time it takes to complete the transport np =td np +TD j"j , where TD j"j It is the time required for the AGV to travel from device j″ to device j. After completing the specific production scheduling time node recursion, the fitness is calculated according to the plan execution time.
8. The method according to claim 3, characterized in that Step (4.4) only performs crossover and mutation operations on the AGV selection string and the transport sequence string; the chromosome randomly decides whether to perform crossover or mutation operations according to the set probability; after the operation is completed, an inspection is performed, and new individuals that can be decoded as available solutions are directly placed in the next generation population. If they are unavailable individuals, they are discarded and individuals with higher fitness in the parent generation are placed in the next generation population instead.
Citation Information
Patent Citations
Multi-target flexible job shop scheduling method based on improved ecological niche genetic algorithm
CN111222642A
Workshop dual-resource integrated scheduling method and system in intelligent manufacturing environment
CN111598332A
Cited By
Road train intelligent scheduling method based on improved ant colony algorithm
CN121860175A