CN115758761A - Quality inspection task scheduling method, equipment and medium based on genetic algorithm - Google Patents
Quality inspection task scheduling method, equipment and medium based on genetic algorithm Download PDFInfo
- Publication number
- CN115758761A CN115758761A CN202211480861.5A CN202211480861A CN115758761A CN 115758761 A CN115758761 A CN 115758761A CN 202211480861 A CN202211480861 A CN 202211480861A CN 115758761 A CN115758761 A CN 115758761A
- Authority
- CN
- China
- Prior art keywords
- individual
- task scheduling
- quality inspection
- equal
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- General Factory Administration (AREA)
Abstract
The invention discloses a quality inspection task scheduling method based on a genetic algorithm, which relates to the technical field of genetic algorithms and is used for solving the problem of finishing the scheduling strategy formulation of a quality inspection task, and the method comprises the following steps: constructing a quality inspection task scheduling model according to the situations of serial, parallel and mutual exclusion relations of detection tests and mutual exclusion relations of equipment in quality inspection task scheduling; decoding the task scheduling model through a domain search rule and a heuristic rule, and solving the task scheduling model by combining a simulated annealing algorithm; and obtaining an optimal quality inspection task scheduling scheme. The invention also discloses electronic equipment and a computer storage medium for quality inspection task scheduling based on the genetic algorithm. The method constructs a quality inspection task scheduling model through the situations of serial, parallel and mutual exclusion relations of detection tests and mutual exclusion relations of equipment in quality inspection task scheduling, and solves the model to obtain the optimal solution of a scheduling scheme.
Description
Technical Field
The invention relates to the technical field of genetic algorithms, in particular to a quality inspection task scheduling method, equipment and medium based on a genetic algorithm.
Background
The mass transmission quality inspection plays an important role in the measurement work, and is an important link for unifying the quantity value and ensuring the accuracy and consistency of the measuring instruments. At present, in order to improve the detection efficiency and reduce the manual error, more and more quality testing laboratories begin to adopt an automatic and intelligent task scheduling algorithm to replace the traditional and repeated manual scheduling.
Compared with the scheduling problem of the traditional flexible job shop, the quality inspection task scheduling problem has similar task targets, namely, a proper detection task (process) and equipment are selected for a batch of samples (workpieces), but the quality inspection task scheduling problem has obvious difference. In the flexible job shop scheduling, each workpiece has a fixed process, the processes are sequentially completed according to a fixed processing sequence, and the process and equipment scheduling are only limited by the processing quantity and the processing time under the condition of not considering faults. The quality inspection task scheduling does not have the fixed detection task requirement of a single sample, a plurality of detection tasks are completed on a batch of samples together, complex nonlinear constraint relations exist among the detection tasks, such as serial relations (for example, certain climate influence experiments need the same sample to complete different experiments on a plurality of devices successively), parallel relations (for example, accuracy experiments need to be performed on a plurality of samples simultaneously), mutual exclusion relations (for example, functional experiments and environment influence experiments cannot be completed on the same sample), and the like. By combining the above conditions, the quality inspection task scheduling has higher scheduling freedom and more various constraint limits compared with flexible job shop scheduling, and provides higher requirements for the design and decoding of the scheduling algorithm.
At present, in the prior art, a general model for flexible scheduling is used to complete the formulation of a quality inspection task scheduling strategy, and a special model for a quality inspection task is lacked, so that the scheduling strategy is difficult to meet the test scheduling scene of multiple batches, multiple samples and multiple tasks, and the sample detection efficiency is low.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide a quality inspection task scheduling method based on a genetic algorithm, which completes the construction of an optimal quality inspection task scheduling scheme by constructing a multi-batch multi-machine multi-task quality inspection task scheduling model.
One of the purposes of the invention is realized by adopting the following technical scheme:
a quality inspection task scheduling method based on a genetic algorithm comprises the following steps:
constructing a quality inspection task scheduling model according to the situations of serial, parallel and mutual exclusion relations of detection tests and mutual exclusion relations of equipment in quality inspection task scheduling;
decoding the task scheduling model through a domain search rule and a heuristic rule, and solving the task scheduling model by combining a simulated annealing algorithm;
and obtaining an optimal quality inspection task scheduling scheme.
Further, a quality inspection task scheduling model is constructed according to the situations of serial, parallel and mutual exclusion relations of the detection tests and mutual exclusion relations of the equipment in the quality inspection task scheduling, and the method comprises the following steps:
establishing a model optimal solution function, and satisfying the following conditions: c max =min(max(C i ) I is more than or equal to 1 and less than or equal to n, wherein n is the total number of samples; min (, is to find the minimum value; max (x) is the maximum value; c i Time to completion of the test for sample i; c max Is the optimal solution of the model;
establishing a model constraint condition, and meeting the following requirements:
restraining one: ET ij ≥ST ij +T j ×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, wherein l represents the total number of the test items; s. the ij = 1,0, 1 represents sample i for test j, otherwise 0; ET ij Is Si j End time of, ET ij ≥0;ST ij Is Si j Start Time of (ST) ij ≥0;T j Representing the time it takes to complete test j;
and (2) constraining: ST (ST) ij ≤M×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, wherein M is a maximum constant;
and (3) constraining: ET ih ×S ih +M×(1-y ijh )≥ET ij ×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and h is less than or equal to l, wherein y ijh = {1,0},1 represents that trial j of sample i precedes trial h, otherwise 0;
and (5) constraining:wherein m represents the total number of test devices, X ijk = {0,1},1 represents S ij Selecting test equipment k, otherwise, setting the test equipment k as 0; p is a radical of j Is the sum of times;
and (6) constraining: y is ijh =0,j,h∈J 3 I is more than or equal to 1 and less than or equal to n, J is more than or equal to 1 and h is less than or equal to l, wherein J 3 Representing a mutually exclusive trial set;
constraint seven: y is ijh ×2≤S ij +S ih ,M×y ijh ≥S ij +S ih -1,1≤i≤n,1≤j≤l;
further, decoding the task scheduling model through a domain search rule and a heuristic rule, and solving the task scheduling model by combining a simulated annealing algorithm, wherein the method comprises the following steps of:
s21, initializing model parameters, wherein the model parameters comprise population size Pop, maximum iteration Gen, initial cross probability CR, initial variation probability MU and simulated annealing coefficient alpha;
s22, generating a model initial population Chromosomees in a random mode, wherein each individual in the population is randomly coded into a chromosome with the length of l according to the number sequence of 1-l;
s23, decoding the individuals through the domain search rule and the heuristic rule, and calculating the optimal model solution C of the quality inspection task scheduling model M according to the experiment sequence represented by the individual A max And further calculating the fitness value f of the individual;
s24, performing elite reservation selection, adaptive crossing and adaptive variation on the population, and performing simulated annealing mechanism judgment on the obtained individuals to determine whether the new individuals replace the original individuals;
and S25, outputting the optimal quality inspection task scheduling scheme when the calculation result meets the termination condition, and otherwise, executing the step S24.
Further, decoding the individuals through a domain search rule and a heuristic rule, and calculating the optimal model solution C of the quality inspection task scheduling model M according to the experiment sequence represented by the individual A max And further calculating the fitness value f of the individual, comprising the following steps:
performing serial neighborhood search on chromosomes of each individual, searching serial test numbers in the chromosomes, and adding subsequent tests to the previous sequence;
carrying out mutual exclusion neighborhood search on chromosomes of each individual, searching mutual exclusion test numbers in the chromosomes, and adding subsequent tests to the preorders;
carrying out heuristic sample selection on the chromosome of each individual, selecting the sample with the shortest test completion time according to the test sequence from front to back, and selecting the sample with the shortest test completion time when a plurality of samples meet the selection condition;
carrying out heuristic equipment selection on the chromosomes of each individual, selecting corresponding equipment according to the selected sample with the shortest completion time, and selecting the equipment with the smallest load if a plurality of equipment meet the selection condition;
updating the states of the test, the sample and the equipment until all tests are traversed;
obtaining the optimal solution C of the model according to the maximum value of the completion time of each sample max ;
Calculating a fitness value according to the optimal solution, and satisfying the following conditions:
further, performing elite reservation selection on the population, comprising the following steps:
calculating the probability p of the ith individual being selected i Obtaining a probability set p = { p = } 1 ,p 2 ,...,p Pop H probability p i The calculation of (a) satisfies:wherein f is i The fitness value of the ith individual is shown, and Pop is the total number of population individuals;
selecting an individual corresponding to the maximum value as an elite individual e according to the probability set;
adding directly to the next population according to the selected elite individual.
Further, adaptively interleaving the population includes:
with probability CR i Performing crossover operations on individuals with probability CR i The calculation of (a) satisfies:
where i represents the ith individual, CR represents the initial crossover probability, f i Representing the fitness value of the current individual, f best Represents the optimal fitness value of the individual in the current population, f worst Represents the worst fitness value, beta, of the individuals of the current population c Representing the cross adaptation adjustment parameters.
Further, adaptively mutating the population, comprising:
by probability MU i Mutation operation is performed on individuals with probability MU i The calculation of (a) satisfies:
wherein i represents the ith individual, MU represents the initial variation probability, f i Representing the fitness value of the current individual, f best Represents the optimal fitness value of the individual in the current population, f worst Represents the worst fitness value, beta, of the individuals of the current population m Representing the variant adaptation parameters.
Further, the judgment of the annealing mechanism meets the following requirements:
wherein X represents a parent individual, X' represents a child individual generated after cross mutation operation, C X′ 、C X Represents the model optimal solution of the individuals X and X ', P (X, X') represents the probability of the child replacing the parent, C best And alpha is a simulated annealing coefficient.
Another object of the present invention is to provide an electronic device for performing one of the above objects, which includes a processor, a storage medium, and a computer program stored in the storage medium, wherein the computer program, when executed by the processor, implements the above quality inspection task scheduling method based on a genetic algorithm.
It is a further object of the present invention to provide a computer-readable storage medium storing one of the objects of the present invention, having a computer program stored thereon, which, when being executed by a processor, implements the above-mentioned genetic algorithm-based quality inspection task scheduling method.
Compared with the prior art, the invention has the beneficial effects that:
the invention establishes a mathematical model of the quality inspection task scheduling problem, and can adapt to the test scheduling scene of multiple batches, multiple samples and multiple tasks; a simulated annealing mechanism is added to accept new chromosomes, so that the convergence speed of the algorithm is accelerated and the diversity of the population is kept; compared with the traditional algorithm for the flexible workshop scheduling problem, the method has great advantages in solving quality and solving time, and the effect achieved by the model is better as the number of test batches scheduled by quality inspection is increased.
Drawings
FIG. 1 is a flowchart of a quality inspection task scheduling method based on a genetic algorithm according to an embodiment I;
FIG. 2 is a flow chart of a model solving process according to the first embodiment;
FIG. 3 is a diagram of convergence of the algorithm of the second embodiment;
FIG. 4 is a graph of the marginal benefit of a batch according to example two;
fig. 5 is a block diagram of the electronic apparatus of the third embodiment.
Detailed Description
The present invention will now be described in more detail with reference to the accompanying drawings, in which the description of the invention is given by way of illustration and not of limitation. Various embodiments may be combined with each other to form other embodiments not shown in the following description.
Example one
The embodiment I provides a quality inspection task scheduling method based on a genetic algorithm, and aims to provide a multi-batch multi-machine multi-task quality inspection task scheduling model for serial, parallel and mutual exclusion characteristics among quality inspection scheduling task tests and mutual exclusion characteristics among devices based on the genetic algorithm.
Referring to fig. 1, a quality inspection task scheduling method based on a genetic algorithm includes the following steps:
s1, constructing a quality inspection task scheduling model according to the situations of serial, parallel and mutual exclusion relations of detection tests and mutual exclusion relations of equipment in quality inspection task scheduling;
s1 specifically comprises the following steps:
establishing a model optimal solution function, and satisfying the following conditions: c max =min(max(C i ) I is more than or equal to 1 and less than or equal to n, wherein n is the total number of samples; min (#) is used for solving a minimum value; max (x) is the maximum value; c i Time to completion of the test for sample i; c max The optimal solution of the model is obtained; the optimization goal of the quality inspection task scheduling model is to minimize the maximum completion time of the sample completion test.
In this embodiment, the constraint conditions of the model are set to 8, specifically, the constraint conditions of the model are established to satisfy:
(1)ET ij ≥ST ij +T j ×S ij i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, wherein l represents the total number of the test items; s ij = {1,0},1 stands for sampleCarrying out a test j on the product i, otherwise, the product i is 0; ET ij Is S ij End Time of (ET) ij ≥0;ST ij Is S ij Start Time of (ST) ij ≥0;T j Representing the time taken to complete trial j; the constraints are set to ensure that a test is in ST ij At the beginning, a test time T has elapsed j To ET ij And (6) ending.
(2)ST ij ≤M×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, wherein M is a maximum constant; this constraint ensures that test j has normal ST when tested on sample i ij Otherwise ST ij =0。
(3)ET ih ×S ih +M×(1-y ijh )≥ET ij ×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and h is less than or equal to l, wherein y ijh = {1,0},1 represents that trial j of sample i precedes trial h, otherwise 0; the constraint conditions ensure that test j and test h on the same sample i can be tested only if the previous test j is completed.
(4)Wherein, J 1 Represents a serial test set; the constraint condition ensures that serial tests are continuously performed on the same sample, and a subsequent serial test must be performed after a previous serial test is completed.
(5)Wherein m represents the total number of test devices. X ijk = {0,1},1 represents S ij Selecting test equipment k, otherwise, 0; p is a radical of j Is the sum of times; this constraint ensures that parallel tests are performed on different samples.
(6)y ijh =0,j,h∈J 3 I is more than or equal to 1 and less than or equal to n, J is more than or equal to 1 and h is less than or equal to l, wherein J 3 Representing a mutually exclusive test set; the constraint condition ensures that the experiment of the postitem can not be carried out after the completion of the prepositive item of the mutual exclusion experiment.
(7)y ijh ×2≤S ij +S ih ,M×y ijh ≥S ij +S ih 1,1 ≦ i ≦ n,1 ≦ j ≦ l, the constraint ensuring that the variable y is only when both trial j and trial h are placed on sample i and j precedes h ijh =1。
(8)The constraint guarantees S ij At most, tests can be carried out simultaneously on only one test apparatus.
By means of the constructed model, the number decision of test samples, the number and sequence decision of test items and the decision of equipment test sequence can be optimized
S2, decoding the task scheduling model through a field search rule and a heuristic rule, and solving the task scheduling model by combining a simulated annealing algorithm;
in this embodiment, when solving the model of S1, a self-adaptive hybrid genetic algorithm is provided to solve the multi-batch multi-machine laboratory quality inspection task scheduling model, as shown in fig. 2, which specifically includes the following steps:
s21, initializing model parameters, wherein the model parameters comprise population size Pop, maximum iteration Gen, initial cross probability CR, initial variation probability MU and simulated annealing coefficient alpha;
s22, generating a model initial population Chromosomees in a random mode, wherein each individual in the population is randomly coded into a chromosome with the length of l according to the number sequence of 1-l;
s23, decoding the individuals through the domain search rule and the heuristic rule, and calculating the optimal model solution C of the quality inspection task scheduling model M according to the experiment sequence represented by the individual A max And further calculating the fitness value f of the individual;
s23 specifically comprises the following steps:
performing serial neighborhood search on chromosomes of each individual, searching serial test numbers in the chromosomes, and adding subsequent tests to the previous sequence;
carrying out mutual exclusion neighborhood search on chromosomes of each individual, searching mutual exclusion test numbers in the chromosomes, and adding subsequent tests to the preorders;
carrying out heuristic sample selection on the chromosome of each individual, selecting the sample with the shortest test completion time according to the test sequence from front to back, and selecting the sample with the shortest test completion time when a plurality of samples meet the selection condition;
performing heuristic equipment selection on the chromosome of each individual, selecting corresponding equipment according to the selected sample with the shortest completion time, and selecting the equipment with the minimum load if a plurality of equipment meet the selection condition;
updating the states of the test, the sample and the equipment until all tests are traversed;
obtaining the optimal solution C of the model according to the maximum value of the completion time of each sample max ;
Calculating a fitness value according to the optimal solution, and satisfying the following conditions:
of course, when performing individual decoding in step S23, each constraint condition of the model in S1 needs to be satisfied.
S24, performing elite reservation selection, adaptive crossing and adaptive variation on the population, and performing simulated annealing mechanism judgment on the obtained individuals to determine whether the new individuals replace the original individuals;
the elite reservation selection specifically comprises:
calculating the probability p of the ith individual being selected i To get a set of probabilities p = { p = 1 ,p 2 ,...,p Pop H probability p i The calculation of (a) satisfies:wherein f is i The fitness value of the ith individual is shown, and Pop is the total number of population individuals;
selecting an individual corresponding to the maximum value as an elite individual e according to the probability set;
adding directly to the next population according to the selected elite individual. The elite individual does not carry out crossing and mutation operations in the iteration until a better individual is obtained in the subsequent iteration process.
In S24, adaptively crossing the population includes:
with probability CR i Performing crossover operations on individuals with probability CR i The calculation of (a) satisfies:
where i represents the ith individual, CR represents the initial crossover probability, f i Representing the fitness value of the current individual, f best Represents the optimal fitness value of the individual in the current population, f worst Represents the worst fitness value, beta, of the individuals of the current population c Representing the cross adaptation adjustment parameters.
Performing adaptive variation on the population, including:
by probability MU i Mutation operation on individuals, probability MU i The calculation of (a) satisfies:
wherein i represents the ith individual, MU represents the initial variation probability, f i Representing the fitness value of the current individual, f best Represents the optimal fitness value of the individual in the current population, f worst Represents the worst fitness value, beta, of the individuals of the current population m Representing the variant adaptation parameters.
The annealing mechanism in S24 satisfies:
wherein X represents a parent individual, X' represents a child individual generated after cross mutation operation, C X ,、C X Represents the model optimal solution of the individuals X and X ', respectively, P (X, X') represents the probability of child replacing parent, C best And alpha is a simulated annealing coefficient.
And S25, outputting an optimal quality inspection task scheduling scheme when the calculation result meets the termination condition, and otherwise, executing the step S24.
And S3, obtaining an optimal quality inspection task scheduling scheme.
In summary, compared with the conventional algorithm, the method provided by the embodiment has great advantages in terms of solving quality and solving time, can be matched with quality inspection task scheduling, and outputs an optimal scheduling task strategy, and the quality inspection task scheduling method based on the adaptive hybrid genetic algorithm has better effect when the number of test batches of the quality inspection problem is larger.
Example two
The second embodiment is to illustrate the specific test results of the model proposed in the first embodiment.
The test results in this example are from the real data of the mass transfer testing laboratory from a group of grid companies.
Please refer to the time information table and the device information table shown in tables 1-1 and 1-2.
TABLE 1-1 test-time information Table
TABLE 1-2 test equipment information sheet
Device numbering | Number of devices | Device numbering | Number of |
0 | 1 | 11 | 1 |
1 | 2 | 12 | 2 |
2 | 1 | 13 | 1 |
3 | 1 | 14 | 1 |
4 | 1 | 15 | 1 |
5 | 3 | 16 | 1 |
6 | 1 | 17 | 1 |
7 | 1 | 18 | 1 |
8 | 1 | 19 | 1 |
9 | 1 | 20 | 1 |
10 | 1 | 21 | 1 |
The model algorithm parameters are shown in tables 1-3, the population scale is 100, the maximum iteration number is 200, the cross initial probability is set to 0.9 (the adaptive upper and lower bounds are [0.4-0.9 ]), the variation initial probability is set to 0.2 (the adaptive upper and lower bounds are [0.02,0.2 ]), and the simulated annealing mechanism coefficient is set to 0.9. Referring to the convergence diagram shown in fig. 3, it is found that the result converges to the minimum value within 200 generations.
TABLE 1-3 Algorithm parameter Table
The embodiment sets up data sets of different scales for testing according to the existing data. According to the number of tests, 10, 20, 30, 40 and 50 categories of test items are set, the number of samples is kept to be 5, and the equipment data are determined according to the used test numbers. In order to verify the effectiveness of the adaptive hybrid genetic algorithm, the test is also performed by combining a classical Genetic Algorithm (GA) and a particle swarm algorithm (PSO), and the results are shown in tables 1-4.
Tables 1-4 Single batch Algorithm validation tables
The table above shows the results of quality testing performed on a single batch of samples, which respectively completed the calculation of experimental items of 10, 20, 30, 40 and 50 orders of magnitude. Each example was run for 10 times and the overall completion time was recorded as the objective function and the average of the algorithm times measured the algorithm performance. Compared with the PSO algorithm as a reference, the GA algorithm has the average quality higher than that of the target function value by 1.36 percent, and the algorithm time is saved by 11.61 percent; the quality of the AHGA algorithm is averagely improved by 3.78 percent on the objective function value, and the algorithm time is saved by 9.72 percent. It can be seen that the GA and AHGA algorithms involved in the genetic algorithm in the first embodiment are superior to the particle swarm algorithm used in the conventional calculation in terms of both quality and solution time.
Further, the single-batch quality test is expanded to multiple batches, and 3 batches of samples are continuously used for completing calculation examples of test items of 10, 20, 30, 40 and 50 orders of magnitude. Each example repeats 10 times of experiments, and the overall completion time is recorded as the average value of the objective function value and the algorithm time to measure the algorithm performance. The results are shown in tables 1 to 5. Similarly, the PSO algorithm is used as a reference for comparison, the average mass of the GA algorithm on the objective function value is 4.98%, and the algorithm time is saved by 32.32%; the quality of the AHGA algorithm is averagely improved by 6.83 percent on the basis of the objective function value, and the algorithm time is saved by 31.59 percent. When the sample batch is increased, the solving quality and the solving time of the three algorithms are different, the quality of the AHGA algorithm is further improved, and the time saved by the GA algorithm and the AHGA algorithm is approximately three times of that of a single batch experiment.
TABLE 1-5 Multi-batch quality control test Table
This example assumes that a batch of samples was tested using 2 samples for quality testing, as shown in tables 1-6, the longer the total time required for quality testing, the longer the algorithm solution time, as the batch size increases. This indicates that the size of the test batch is positively correlated with the time to final completion and the time to solve for the algorithm. FIG. 4 further shows the average quality inspection time of a single lot, and as the number of lots increases, the average completion time of each lot test decreases, indicating that the model can perform better scheduling to optimize the task sequence in the face of large-scale lots, saving overall completion time. In particular, as the number of batches increases, the rate at which the average completion time decreases becomes progressively smaller, indicating that the marginal benefit of increasing batches in saving overall completion time becomes smaller.
Tables 1-6 test batch effects
Number of batches | Value of objective function | Time to solution | Average completion time |
1 | 599 | 53.57 | 599 |
2 | 992 | 109.96 | 496 |
3 | 1417 | 159.84 | 472.33 |
4 | 1800 | 221.13 | 450 |
5 | 2247 | 280.55 | 449.4 |
6 | 2597 | 344.2 | 432.83 |
7 | 3000 | 389.93 | 428.57 |
8 | 3383 | 450.82 | 422.88 |
9 | 3778 | 524.47 | 419.78 |
10 | 4174 | 574.02 | 417.4 |
11 | 4582 | 653.39 | 416.55 |
12 | 4975 | 704.09 | 414.58 |
EXAMPLE III
Fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention, as shown in fig. 5, the electronic device includes a processor 210, a memory 220, an input device 230, and an output device 240; the number of the processors 210 in the computer device may be one or more, and one processor 210 is taken as an example in fig. 5; the processor 210, the memory 220, the input device 230, and the output device 240 in the electronic apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
The memory 220, which is a computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules. The processor 210 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 220, that is, implements the quality inspection task scheduling method based on the genetic algorithm according to the first to second embodiments.
The memory 220 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 220 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 220 can further include memory located remotely from the processor 210, which can be connected to the electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 230 may be used to receive input user identity information, sample data, and the like. The output device 240 may include a display device such as a display screen.
Example four
The fourth embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the storage medium is used for a computer to execute a quality inspection task scheduling method based on a genetic algorithm, and the method includes:
constructing a quality inspection task scheduling model according to the situations of serial, parallel and exclusive relations of the detection tests and the exclusive relations of the equipment in the quality inspection task scheduling;
decoding the task scheduling model through a domain search rule and a heuristic rule, and solving the task scheduling model by combining a simulated annealing algorithm;
and obtaining an optimal quality inspection task scheduling scheme.
Of course, the storage medium provided by the embodiments of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform the operations related to the genetic algorithm-based quality inspection task scheduling method provided by any embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling an electronic device (which may be a mobile phone, a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
Various other modifications and changes may be made by those skilled in the art based on the above-described technical solutions and concepts, and all such modifications and changes should fall within the scope of the claims of the present invention.
Claims (10)
1. A quality inspection task scheduling method based on a genetic algorithm is characterized by comprising the following steps:
constructing a quality inspection task scheduling model according to the situations of serial, parallel and exclusive relations of the detection tests and the exclusive relations of the equipment in the quality inspection task scheduling;
decoding the task scheduling model through a domain search rule and a heuristic rule, and solving the task scheduling model by combining a simulated annealing algorithm;
and obtaining an optimal quality inspection task scheduling scheme.
2. The method for scheduling quality control tasks based on genetic algorithms according to claim 1, wherein constructing a quality control task scheduling model according to the context of serial, parallel, and mutual exclusion relationships of tests and mutual exclusion relationships of devices in quality control task scheduling comprises:
establishing an optimal solution function of the model, and satisfying the following conditions: c max =min(max(C i ) I is more than or equal to 1 and less than or equal to n, wherein n is the total number of samples; min (#) is used for solving a minimum value; max (x) is the maximum value; c i Time to completion of the test for sample i; c max The optimal solution of the model is obtained;
establishing a model constraint condition, and meeting the following requirements:
restraining one: ET ij ≥ST ij +T j ×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, wherein l represents the total number of the test items; s ij = 1,0, 1 represents sample i for test j, otherwise 0; ET ij Is S ij End time of, ET ij ≥0;ST ij Is S ij Start Time of (ST) ij ≥0;T j Representing the time taken to complete trial j;
and (2) constraining: ST (ST) ij ≤M×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to l, wherein M is a maximum constant;
and (3) constraining: ET ih ×S ih +M×(1-y ijh )≥ET ij ×S ij I is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and h is less than or equal to l, wherein y ijh = {1,0},1 represents that trial j of sample i precedes trial h, otherwise 0;
and (5) constraining:wherein m represents the total number of test devices, X ijk = {0,1},1 represents S ij Selecting test equipment k, otherwise, setting the test equipment k as 0; p is a radical of j Is the sum of times;
and (6) constraining: y is ijh H is belonged to J3, i is more than or equal to 1 and less than or equal to n, J is more than or equal to 1 and h is less than or equal to l, wherein J is more than or equal to 3 Representing a mutually exclusive trial set;
constraint seven: y is ijh ×2≤S ij +S ih ,M×y ijh ≥S ij +S ih -1,1≤i≤n,1≤j≤l;
3. the quality inspection task scheduling method based on genetic algorithm as claimed in claim 1 or 2, wherein the task scheduling model is decoded by domain search rule and heuristic rule, and solved by combining simulated annealing algorithm, comprising the following steps:
s21, initializing model parameters, wherein the model parameters comprise population size Pop, maximum iteration Gen, initial cross probability CR, initial variation probability MU and simulated annealing coefficient alpha;
s22, generating a model initial population Chromosomees in a random mode, wherein each individual in the population is randomly coded into a chromosome with the length of l according to the number sequence of 1-l;
s23, decoding the individuals through the domain search rule and the heuristic rule, and calculating the optimal model solution C of the quality inspection task scheduling model M according to the experiment sequence represented by the individual A max And further calculating the fitness value f of the individual;
s24, performing elite reservation selection, adaptive crossing and adaptive variation on the population, and performing simulated annealing mechanism judgment on the obtained individuals to determine whether the new individuals replace the original individuals;
and S25, outputting the optimal quality inspection task scheduling scheme when the calculation result meets the termination condition, and otherwise, executing the step S24.
4. The quality inspection task scheduling method based on genetic algorithm as claimed in claim 3, wherein the individual is decoded by domain search rule and heuristic rule, and model optimal solution C of quality inspection task scheduling model M is calculated according to experimental sequence represented by individual A max And further calculating the fitness value f of the individual, comprising the following steps:
performing serial neighborhood search on chromosomes of each individual, searching serial test numbers in the chromosomes, and adding subsequent tests to the previous sequence;
carrying out mutual exclusion neighborhood search on chromosomes of each individual, searching mutual exclusion test numbers in the chromosomes, and adding subsequent tests to the preorders;
carrying out heuristic sample selection on the chromosome of each individual, selecting the sample with the shortest test completion time according to the test sequence from front to back, and selecting the sample with the shortest test completion time when a plurality of samples meet the selection condition;
carrying out heuristic equipment selection on the chromosomes of each individual, selecting corresponding equipment according to the selected sample with the shortest completion time, and selecting the equipment with the smallest load if a plurality of equipment meet the selection condition;
updating the states of the test, the sample and the equipment until all tests are traversed;
obtaining the optimal solution C of the model according to the maximum value of the completion time of each sample max ;
5. the method of claim 3, wherein the elite reservation selection is performed on the population, and the method comprises the following steps:
calculating the probability p of the ith individual being selected i Obtaining a probability set p = { p = } 1 ,p 2 ,...,p Pop H probability p i The calculation of (c) satisfies:wherein f is i The fitness value of the ith individual is shown, and Pop is the total number of population individuals;
selecting an individual corresponding to the maximum value as an elite individual e according to the probability set;
adding directly to the next population according to the selected elite individual.
6. The method for scheduling quality inspection tasks based on genetic algorithms according to claim 3, wherein the adaptively interleaving the population comprises:
with probability CR i Performing crossover operations on individuals with probability CR i The calculation of (c) satisfies:
where i represents the ith individual, CR represents the initial crossover probability, f i Representing the fitness value of the current individual, f best Represents the optimal fitness value of the individual in the current population, f worst Represents the worst fitness value, beta, of the individuals of the current population c Representing the cross adaptation adjustment parameters.
7. The method for scheduling quality inspection tasks based on genetic algorithms according to claim 3, wherein the adaptive mutation of the population comprises:
by probability MU i Mutation operation is performed on individuals with probability MU i The calculation of (a) satisfies:
wherein i represents the ith individual, MU represents the initial variation probability, f i Fitness value, f, representing the current individual best Represents the optimal fitness value of the individual in the current population, f worst Represents the worst fitness value, beta, of the individuals of the current population m Representing the variant adaptation parameter.
8. The quality inspection task scheduling method based on genetic algorithm as claimed in claim 3, wherein the judgment of the annealing mechanism satisfies the following conditions:
wherein X represents a parent individual, X' represents a child individual generated after cross mutation operation, C X′ 、C X Represents the model optimal solution of the individuals X and X ', P (X, X') represents the probability of the child replacing the parent, C best And alpha is a simulated annealing coefficient.
9. An electronic device comprising a processor, a storage medium, and a computer program, the computer program being stored in the storage medium, wherein the computer program, when executed by the processor, implements the method for scheduling a genetic algorithm-based quality inspection task according to any one of claims 1 to 8.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for quality inspection task scheduling based on genetic algorithm according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211480861.5A CN115758761A (en) | 2022-11-24 | 2022-11-24 | Quality inspection task scheduling method, equipment and medium based on genetic algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211480861.5A CN115758761A (en) | 2022-11-24 | 2022-11-24 | Quality inspection task scheduling method, equipment and medium based on genetic algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115758761A true CN115758761A (en) | 2023-03-07 |
Family
ID=85336913
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211480861.5A Pending CN115758761A (en) | 2022-11-24 | 2022-11-24 | Quality inspection task scheduling method, equipment and medium based on genetic algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115758761A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116307214A (en) * | 2023-03-23 | 2023-06-23 | 无锡物联网创新中心有限公司 | Automatic cotton distribution method based on NSGA-II algorithm and related device |
CN116502870A (en) * | 2023-06-25 | 2023-07-28 | 北京电科智芯科技有限公司 | Scheduling policy determination method, device, management terminal and storage medium |
-
2022
- 2022-11-24 CN CN202211480861.5A patent/CN115758761A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116307214A (en) * | 2023-03-23 | 2023-06-23 | 无锡物联网创新中心有限公司 | Automatic cotton distribution method based on NSGA-II algorithm and related device |
CN116502870A (en) * | 2023-06-25 | 2023-07-28 | 北京电科智芯科技有限公司 | Scheduling policy determination method, device, management terminal and storage medium |
CN116502870B (en) * | 2023-06-25 | 2023-09-22 | 北京电科智芯科技有限公司 | Scheduling policy determination method, device, management terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115758761A (en) | Quality inspection task scheduling method, equipment and medium based on genetic algorithm | |
Li et al. | An effective PSO-based hybrid algorithm for multiobjective permutation flow shop scheduling | |
CN109840154B (en) | Task dependency-based computing migration method in mobile cloud environment | |
Lei | Simplified multi-objective genetic algorithms for stochastic job shop scheduling | |
CN111832101B (en) | Construction method of cement strength prediction model and cement strength prediction method | |
CN112987664B (en) | Flow shop scheduling method based on deep reinforcement learning | |
Wang et al. | Modified backtracking search optimization algorithm inspired by simulated annealing for constrained engineering optimization problems | |
CN105929690A (en) | Flexible workshop robustness scheduling method based on decomposition multi-target evolution algorithm | |
CN104636871A (en) | Data-based single-stage multi-product scheduling control method | |
Webster et al. | A genetic algorithm for scheduling job families on a single machine with arbitrary earliness/tardiness penalties and an unrestricted common due date | |
CN114283320B (en) | Branch-free structure target detection method based on full convolution | |
CN111709535A (en) | Federal learning method, device, central server and medium based on evolution calculation | |
CN111461445A (en) | Short-term wind speed prediction method and device, computer equipment and storage medium | |
CN109298930A (en) | A kind of cloud workflow schedule method and device based on multiple-objection optimization | |
Kumar et al. | A genetic algorithm for a flow shop scheduling problem with breakdown interval, transportation time and weights of jobs | |
CN114881504A (en) | Electronic precision part full-automatic flexible production line scheduling method based on order selection | |
Zhao et al. | The application of heterogeneous graph neural network and deep reinforcement learning in hybrid flow shop scheduling problem | |
CN106952077A (en) | The generation method and device of a kind of worksheet strategy | |
CN114186479A (en) | Stamping process parameter processing method and device, electronic equipment and storage medium | |
Guo et al. | Integrated scheduling for remanufacturing system considering component commonality using improved multi-objective genetic algorithm | |
Rajkumar et al. | A hybrid algorithm for multi-objective optimization of minimizing makespan and total flow time in permutation flow shop scheduling problems | |
WO2024066143A1 (en) | Molecular collision cross section prediction method and apparatus, device, and storage medium | |
CN116128334A (en) | Quality inspection task scheduling method, equipment and medium | |
CN110162704B (en) | Multi-scale key user extraction method based on multi-factor genetic algorithm | |
CN115454585A (en) | Adaptive batch processing and parallel scheduling system for deep learning model inference of edge equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |