Workshop scheduling method and device based on adaptive genetic algorithm, storage medium and equipment

Through the adaptive genetic algorithm and OSMSMC coding technology, the initial chromosome population is generated and cross-mutation is performed, which solves the problems of local optimality and high computational cost in flexible job shop scheduling, and achieves more efficient scheduling plan generation.

CN118863501APending Publication Date: 2024-10-29HOHAI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410936140.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing multi-level space competitive distributed genetic algorithms are prone to fall into local optima, converge too quickly and have high computational costs in flexible job shop scheduling.

Method used

An adaptive genetic algorithm is used to generate the initial chromosome population through OSMSMC coding, and a combination of heuristic rules is used to generate chromosomes with optimal fitness values, and crossover and mutation iterations are performed to improve search capabilities and convergence speed.

Benefits of technology

The search capability and convergence speed of the flexible job shop scheduling algorithm are improved, the calculation cost is reduced, the optimal scheduling plan is generated, and the problems of local optimality and excessive convergence are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863501A_ABST
    Figure CN118863501A_ABST
Patent Text Reader

Abstract

The invention discloses a workshop scheduling method and device based on a self-adaptive genetic algorithm, a storage medium and equipment, and belongs to the technical field, and the workshop scheduling method based on the self-adaptive genetic algorithm comprises the steps: carrying out the coding of the workpiece process sorting, machine selection and machine preset capability of a target workshop, and carrying out the processing of the target workshop; generating chromosomes and generating an initial chromosome population according to the chromosomes and the heuristic rule combination; and screening the chromosome with the optimal fitness value in the chromosome population based on a fitness function and a genetic algorithm which are determined by taking the shortest processing completion time as an optimization target in advance. According to the method, the workpiece process sorting, the machine selection and the machine preset capability of the target workshop are coded, the initial chromosome population is generated by using the heuristic rule combination, and the chromosome with the optimal fitness value in the chromosome population is screened by using the genetic algorithm, so that the earlier-stage search capability is improved, and the later-stage convergence speed is accelerated; and decoding the chromosome with the optimal fitness value to obtain an optimal scheduling scheme of the target workshop.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method, a device, a storage medium and equipment for workshop scheduling based on an adaptive genetic algorithm, and belongs to the technical field. Background Art

[0002] In order to meet the challenges of diversification, customization and on-time delivery, traditional flexible manufacturing systems and assembly lines seek a balance between high productivity and flexibility. Difficulties in scheduling caused by order diversification, demand fluctuations, reduced equipment utilization and inefficient human resource allocation are all major challenges. To this end, a new manufacturing system, the reconfigurable manufacturing system (RMS), has emerged, demonstrating a new way to improve productivity and flexibility.

[0003] Existing multi-level spatial competitive distributed genetic algorithm algorithms for solving flexible job shop scheduling problems are mostly based on competitive distributed genetic algorithms and simulated annealing algorithms. Although these algorithms have competitive advantages and cooling mechanisms, they are prone to fall into local optimality and converge too quickly. In addition, competitive distributed genetic algorithms also have the problem of high computational cost. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a workshop scheduling method, device, storage medium and equipment based on an adaptive genetic algorithm, generate an excellent initial population through a combination of heuristic rules, and use a genetic algorithm to screen chromosomes with the best fitness value in the chromosome population, thereby improving the early search capability and accelerating the convergence speed in the later stage, solving the problems of the current flexible job shop scheduling algorithm having too high computational cost, being easy to fall into local optimality and converging too quickly.

[0005] In order to achieve the above purpose / solve the above technical problems, the present invention is implemented by adopting the following technical solutions: A first aspect of the present invention provides a workshop scheduling method based on an adaptive genetic algorithm, comprising: Encode the workpiece process sequencing, machine selection and machine pre-setting capabilities of the target workshop to generate chromosomes; Generate an initial chromosome population based on the generated chromosomes and heuristic rule combinations; Based on the fitness function and genetic algorithm determined in advance with the shortest processing time as the optimization goal, the chromosome with the best fitness value in the chromosome population is selected; The chromosome with the best fitness value is decoded to obtain the optimal scheduling plan for the target workshop.

[0006] Furthermore, encoding the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop to generate a chromosome population includes: The OSMSMC coding method is used to encode the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop, where: Each gene in the OS segment is directly encoded with the workpiece number. For the i-th occurrence of workpiece number j, it represents the i-th process of workpiece j, and the total number of occurrences of workpiece number j is equal to the total number of processes of workpiece j; The MS segments are arranged in sequence according to the workpiece process, and each process corresponds to a machine; Each gene in the MC segment is matched with the preset capabilities provided by the machines in the MS segment and the capabilities required by the process in the OS segment.

[0007] Furthermore, the generating an initial chromosome population according to the generated chromosomes and the heuristic rule combination includes: Based on the scheduling steps of the target workshop, the workpieces and machines corresponding to the scheduling steps are selected through heuristic rules until all processes are selected to generate a complete chromosome; Chromosomes are generated by combining heuristic rules until the number of chromosomes meets the initial population size.

[0008] Furthermore, the method of selecting a chromosome with the best fitness value in the chromosome population based on a fitness function determined in advance with the shortest processing time as the optimization goal and a genetic algorithm includes: Calculate the fitness of chromosomes; According to the obtained fitness, the probability of chromosome adaptive crossover and mutation in the population is calculated; According to the adaptive crossover and mutation probability, a preset number of chromosomes are selected to perform machine crossover and mutation iteration, process crossover and mutation iteration, and generate offspring chromosomes; Select the offspring chromosomes as the new generation population until the number of chromosomes in the new generation population is the same as the initial population; Select the chromosome with the best fitness value in the new generation population.

[0009] Furthermore, the adaptive crossover and mutation probability of chromosomes in the population is calculated according to the obtained fitness, including:

[0010] in: P c represents the adaptive crossover probability of chromosomes in the population, P m represents the probability of chromosome mutation in the population, f min represents the minimum fitness value of the population, f ave represents the average fitness value of the contemporary population, f crepresents the fitness value of the crossover chromosome, f m represents the fitness value of the mutated chromosome, k 1 represents a constant, k 1≤1, k 1=0.8, k 2 represents a constant, k 2≤1, k 2=0.3.

[0011] Furthermore, the screening of progeny chromosomes as a new generation population, until the number of chromosomes in the new generation population is the same as that in the initial population, comprises: Arrange the offspring chromosomes according to their fitness values, and retain M offspring chromosomes from small to large; The remaining offspring chromosomes are selected by roulette wheel according to their fitness values, and the population size is kept unchanged.

[0012] Furthermore, the step of arranging the offspring chromosomes according to the fitness values ​​and retaining M chromosomes from small to large includes: in: M Indicates the number of offspring chromosomes retained in ascending order of fitness value, N represents the population size, T represents the number of population iterations, e Represents a natural constant.

[0013] A second aspect of the present invention provides a workshop scheduling device based on an adaptive genetic algorithm, comprising: The first generation module is used to encode the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop to generate chromosomes; The second generation module is used to generate an initial chromosome population according to the generated chromosomes and the heuristic rule combination; A processing module, used for selecting a chromosome with the best fitness value in the chromosome population based on a fitness function determined in advance with the shortest processing time as the optimization goal and a genetic algorithm; The decoding module is used to decode the chromosome with the best fitness value to obtain the optimal scheduling plan for the target workshop.

[0014] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned workshop scheduling method based on the adaptive genetic algorithm is implemented.

[0015] A fourth aspect of the present invention provides a computer device, comprising: A memory for storing instructions; The processor is used to execute the instructions so that the device implements the above-mentioned workshop scheduling method based on adaptive genetic algorithm.

[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention encodes the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop, and uses a heuristic rule combination to generate an initial chromosome population, thereby improving the diversity of the initial chromosome population and generating an excellent initial population; a genetic algorithm is used to screen the chromosome with the best fitness value in the chromosome population, thereby improving the early search capability and accelerating the convergence speed in the later stage, and finally the optimal scheduling plan of the target workshop is obtained by decoding the chromosome with the best fitness value, thereby solving the problems of the current flexible job shop scheduling algorithm being too high in computational cost, easy to fall into local optimality and too fast convergence.

[0017] 2. The present invention encodes the workpiece process sorting, machine selection and machine preset capacity of the target workshop through the OSMSMC coding method, takes into account multiple machines in the scheduling and the corresponding machine capabilities, and includes multiple scheduling situations in the process of population iteration, thereby improving the flexibility of scheduling and expanding the search scope of the algorithm.

[0018] 3. The present invention calculates the fitness of chromosomes, and performs machine crossover and mutation iteration, process crossover and mutation iteration on a preset number of chromosomes according to the fitness, generates offspring chromosomes, and screens and retains the offspring chromosomes through fitness sorting and roulette wheel selection, thereby improving the accuracy of determining the optimal scheduling plan. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flow chart of a method for scheduling a workshop based on an adaptive genetic algorithm, an embodiment of a method, device, storage medium and equipment for scheduling a workshop based on an adaptive genetic algorithm of the present invention; Figure 2 The embodiment of the method, device, storage medium and equipment for workshop scheduling based on adaptive genetic algorithm of the present invention is a Gantt chart of the method for workshop scheduling based on adaptive genetic algorithm; Figure 3 It is a schematic diagram comparing the convergence of the workshop scheduling method based on an adaptive genetic algorithm and the convergence of the traditional genetic algorithm in an embodiment of the workshop scheduling method, device, storage medium and equipment based on an adaptive genetic algorithm of the present invention. DETAILED DESCRIPTION

[0020] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0021] Embodiment 1 like Figure 1 As shown, the workshop scheduling method based on the adaptive genetic algorithm includes: The workpiece process sorting, machine selection and machine pre-setting capacity of the target workshop are encoded to generate chromosomes. In this embodiment, the workpiece process sorting, machine selection and machine pre-setting capacity of the target workshop are encoded in the OSMSMC encoding method, wherein: Each gene in the OS segment is directly encoded with the workpiece number. For the i-th occurrence of workpiece number j, it represents the i-th process of workpiece j, and the total number of occurrences of workpiece number j is equal to the total number of processes of workpiece j; The MS segments are arranged in sequence according to the workpiece process. Each process corresponds to a machine, and each integer represents the number of optional machines for the current process. Each gene in the MC segment is matched with the preset capabilities provided by the machines in the MS segment and the capabilities required by the process in the OS segment.

[0022] Generate the initial chromosome population based on the generated chromosomes and heuristic rule combination, specifically: Based on the scheduling steps of the target workshop, the workpieces and machines corresponding to the scheduling steps are selected through heuristic rules until all processes are selected to generate a complete chromosome; Chromosomes are generated by combining heuristic rules until the number of chromosomes meets the initial population size.

[0023] Based on the fitness function and genetic algorithm determined in advance with the shortest processing time as the optimization goal, the chromosome with the best fitness value in the chromosome population is selected. Specifically: Calculate the fitness of chromosomes; According to the obtained fitness, the probability of chromosome adaptive crossover and mutation in the population is calculated, including:

[0024] in: P c represents the adaptive crossover probability of chromosomes in the population, P m represents the probability of chromosome mutation in the population, f min represents the minimum fitness value of the population, f ave represents the average fitness value of the contemporary population, f c represents the fitness value of the crossover chromosome, f m represents the fitness value of the mutated chromosome, k 1 represents a constant, k 1≤1, k 1=0.8, k2 represents a constant, k 2≤1, k 2=0.3; According to the adaptive crossover and mutation probability, a preset number of chromosomes are selected to perform machine crossover and mutation iteration, process crossover and mutation iteration, and generate offspring chromosomes; Screen the offspring chromosomes as the new generation population until the number of chromosomes in the new generation population is the same as the initial population, including: Arrange the offspring chromosomes according to their fitness values, and retain M offspring chromosomes from small to large, where: M Indicates the number of offspring chromosomes retained in ascending order of fitness value, N represents the population size, T represents the number of population iterations, e represents a natural constant; The remaining offspring chromosomes are selected by roulette wheel according to their fitness values, and the population size is kept constant; like Figure 3 As shown, this example uses 10 average values ​​to measure the convergence performance of the algorithm. The genetic algorithm (RAGA) of this embodiment converges to 53 after 170 iterations, and the optimal value is better than 54 of the traditional genetic algorithm (GA), demonstrating the superior convergence performance of the genetic algorithm (RAGA) of this embodiment.

[0025] Select the chromosome with the best fitness value in the new generation population; Decode the chromosome with the best fitness value to get the optimal scheduling plan for the target workshop. Specifically, read the end time of the previous process T_lastO_end, the end time T_M_end, the processing time PT, and the reconfiguration time AST of the current machine from the chromosome code with the best fitness value. If the current machine needs to be reconfigured, the processing time of the current process is corrected to PT = PT + AST; If the current machine has an idle time window and the idle time window is not less than the processing time PT of the current process, then determine whether the start time of the time slot is greater than the end time T_lastO_end+AST of the previous process of the given job in the target workshop. If so, the start time T_start of the current process is T_lastO_end, otherwise T_start = Max (T_lastO_end –AST, T_M_end); If the current machine has an idle time window and the idle time window is less than the processing time PT of the current process, then T_start = Max (T_lastO_end – AST, T_M_end); Determine whether the end time of the time slot minus the end time of the previous process of the given job in the target workshop T_lastO_end is not less than PT-AST. If so, the start time of the current process T_start = Max (time slot start time, T_lastO_end - AST), otherwise T_start = Max (T_lastO_end - AST, T_M_end); If the current machine does not need to reconfigure its capabilities, there is a time window and it is greater than the processing time PT of the current process, then determine whether the start time of the time slot is greater than T_lastO_end. If so, the start time of the current process T_start is T_lastO_end, otherwise the start time of the current process T_start = Max (T_lastO_end, T_M_end); Determine whether the end time of the time slot minus T_lastO_end is not less than PT. If so, the start time of the current process T_start = Max (time slot start time, T_lastO_end); otherwise, the start time of the current process T_start = Max (T_lastO_end, T_M_end); Calculate the end time of the current process T_end = T_start+PT and update the machine status; Go to the next process until all processes are decoded; Calculate the maximum completion time; like Figure 2 As shown, a Gantt chart is drawn based on the maximum completion time.

[0026] Embodiment 2 The workshop scheduling device based on adaptive genetic algorithm includes: The first generation module is used to encode the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop to generate chromosomes; The second generation module is used to generate an initial chromosome population according to the generated chromosomes and the heuristic rule combination; A processing module, used for selecting a chromosome with the best fitness value in the chromosome population based on a fitness function determined in advance with the shortest processing time as the optimization goal and a genetic algorithm; The decoding module is used to decode the chromosome with the best fitness value to obtain the optimal scheduling plan for the target workshop.

[0027] Embodiment 3 A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the following method: Encode the workpiece process sequencing, machine selection and machine pre-setting capabilities of the target workshop to generate chromosomes; Generate an initial chromosome population based on the generated chromosomes and heuristic rule combinations; Based on the fitness function and genetic algorithm determined in advance with the shortest processing time as the optimization goal, the chromosome with the best fitness value in the chromosome population is selected; The chromosome with the best fitness value is decoded to obtain the optimal scheduling plan for the target workshop.

[0028] Embodiment 4 A computer device comprising: A memory for storing instructions; The processor is configured to execute the instructions so that the device performs the steps of implementing the following method: Encode the workpiece process sequencing, machine selection and machine pre-setting capabilities of the target workshop to generate chromosomes; Generate an initial chromosome population based on the generated chromosomes and heuristic rule combinations; Based on the fitness function and genetic algorithm determined in advance with the shortest processing time as the optimization goal, the chromosome with the best fitness value in the chromosome population is selected; The chromosome with the best fitness value is decoded to obtain the optimal scheduling plan for the target workshop.

[0029] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0030] The present application is described with reference to the flowcharts of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0031] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A function specified in a process or multiple processes.

[0032] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.

[0033] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A workshop scheduling method based on adaptive genetic algorithm, characterized in that: include: Encode the workpiece process sequencing, machine selection and machine pre-setting capabilities of the target workshop to generate chromosomes; Generate an initial chromosome population based on the generated chromosomes and heuristic rule combinations; Based on the fitness function and genetic algorithm determined in advance with the shortest processing time as the optimization goal, the chromosome with the best fitness value in the chromosome population is selected; The chromosome with the best fitness value is decoded to obtain the optimal scheduling plan for the target workshop.

2. The method for shop scheduling based on adaptive genetic algorithm according to claim 1, characterized in that: The encoding of the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop to generate a chromosome population includes: The OSMSMC coding method is used to encode the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop, where: Each gene in the OS segment is directly encoded with the workpiece number. For the i-th occurrence of workpiece number j, it represents the i-th process of workpiece j, and the total number of occurrences of workpiece number j is equal to the total number of processes of workpiece j; The MS segments are arranged in sequence according to the workpiece process, and each process corresponds to a machine; Each gene in the MC segment is matched with the preset capabilities provided by the machines in the MS segment and the capabilities required by the process in the OS segment.

3. The method for shop scheduling based on adaptive genetic algorithm according to claim 1, characterized in that: The generating an initial chromosome population according to the generated chromosomes and the heuristic rule combination includes: Based on the scheduling steps of the target workshop, the workpieces and machines corresponding to the scheduling steps are selected through heuristic rules until all processes are selected to generate a complete chromosome; Chromosomes are generated by combining heuristic rules until the number of chromosomes meets the initial chromosome population number.

4. The method for shop scheduling based on adaptive genetic algorithm according to claim 1, characterized in that: The method of selecting a chromosome with the best fitness value in the chromosome population based on a fitness function determined in advance with the shortest processing time as the optimization goal and a genetic algorithm comprises: Calculate the fitness of chromosomes; According to the obtained fitness, the probability of chromosome adaptive crossover and mutation in the population is calculated; According to the adaptive crossover and mutation probability, a preset number of chromosomes are selected to perform machine crossover and mutation iteration, process crossover and mutation iteration, and generate offspring chromosomes; Select the offspring chromosomes as the new generation population until the number of chromosomes in the new generation population is the same as the initial population; Select the chromosome with the best fitness value in the new generation population.

5. The method for shop scheduling based on adaptive genetic algorithm according to claim 4 is characterized in that: The step of calculating the adaptive crossover and mutation probability of chromosomes in the population according to the obtained fitness includes: in: P c represents the adaptive crossover probability of chromosomes in the population, P m represents the probability of chromosome mutation in the population, f min represents the minimum fitness value of the population, f ave represents the average fitness value of the contemporary population, f c represents the fitness value of the crossover chromosome, f m represents the fitness value of the mutated chromosome, k 1 represents a constant, k 1≤1, k 1=0.8, k 2 represents a constant, k 2≤1, k 2=0.

3.

6. The method for shop scheduling based on adaptive genetic algorithm according to claim 4 is characterized in that: The step of screening offspring chromosomes as a new generation population until the number of chromosomes in the new generation population is the same as that in the initial population comprises: Arrange the offspring chromosomes according to their fitness values, and retain M offspring chromosomes from small to large; the remaining offspring chromosomes are selected by roulette wheel according to their fitness values, and the population size is kept unchanged.

7. The method for shop scheduling based on adaptive genetic algorithm according to claim 6 is characterized in that: The offspring chromosomes are arranged according to the fitness values, and M chromosomes are retained from small to large, including: in: M Indicates the number of offspring chromosomes retained in ascending order of fitness value, N represents the population size, T represents the number of population iterations, e Represents a natural constant.

8. A workshop scheduling device based on adaptive genetic algorithm, characterized in that: include: The first generation module is used to encode the workpiece process sorting, machine selection and machine pre-setting capabilities of the target workshop to generate chromosomes; The second generation module is used to generate an initial chromosome population according to the generated chromosomes and the heuristic rule combination; A processing module, used for selecting a chromosome with the best fitness value in the chromosome population based on a fitness function determined in advance with the shortest processing time as the optimization goal and a genetic algorithm; The decoding module is used to decode the chromosome with the best fitness value to obtain the optimal scheduling plan for the target workshop.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for shop scheduling based on an adaptive genetic algorithm as described in any one of claims 1 to 7 is implemented.

10. A computer device, characterized in that: include: A memory for storing instructions; The processor is used to execute the instruction so that the device implements the workshop scheduling method based on the adaptive genetic algorithm as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Matrix type workshop scheduling method based on genetic algorithm

    CN119247908A

  • Automatic guided vehicle scheduling method and device, computer equipment and storage medium

    CN119599388A