CN111667071B - Traditional job shop scheduling method based on improved genetic algorithm - Google Patents

Traditional job shop scheduling method based on improved genetic algorithm Download PDF

Info

Publication number
CN111667071B
CN111667071B CN202010513661.XA CN202010513661A CN111667071B CN 111667071 B CN111667071 B CN 111667071B CN 202010513661 A CN202010513661 A CN 202010513661A CN 111667071 B CN111667071 B CN 111667071B
Authority
CN
China
Prior art keywords
population
chromosomes
value
child
chromosome
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.)
Active
Application number
CN202010513661.XA
Other languages
Chinese (zh)
Other versions
CN111667071A (en
Inventor
陈金广
马玲叶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaoxing Keqiao District West Textile Industry Innovation Research Institute
Xian Polytechnic University
Original Assignee
Shaoxing Keqiao District West Textile Industry Innovation Research Institute
Xian Polytechnic University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shaoxing Keqiao District West Textile Industry Innovation Research Institute, Xian Polytechnic University filed Critical Shaoxing Keqiao District West Textile Industry Innovation Research Institute
Priority to CN202010513661.XA priority Critical patent/CN111667071B/en
Publication of CN111667071A publication Critical patent/CN111667071A/en
Application granted granted Critical
Publication of CN111667071B publication Critical patent/CN111667071B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Economics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Tourism & Hospitality (AREA)
  • General Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Development Economics (AREA)
  • Evolutionary Computation (AREA)
  • Educational Administration (AREA)
  • Data Mining & Analysis (AREA)
  • Game Theory and Decision Science (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Genetics & Genomics (AREA)
  • Physiology (AREA)
  • Manufacturing & Machinery (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • General Factory Administration (AREA)

Abstract

The invention discloses a traditional job shop scheduling method based on an improved genetic algorithm, which comprises the following steps: step 1, setting basic parameters of a genetic algorithm; step 2, initializing a population; step 3, calculating fitness values of all chromosomes in the initial population; step 4, selecting the initial population with the calculated fitness value in the step 3 by adopting a roulette method; step 5, performing cross operation on chromosomes in the Parent population selected in the step 4 to increase population diversity, and generating a child population 1, namely child_1; step 6, finishing mutation operation on the chromosome in the Children_1 population generated in the step 5 by adopting an interchange method; step 7, recording the optimal chromosome and the fitness value thereof in the population Children_2; and 8, judging whether j is larger than the projects. The method solves the problem that the solution stability is poor due to premature convergence when the traditional genetic algorithm is used for solving.

Description

Traditional job shop scheduling method based on improved genetic algorithm
Technical Field
The invention relates to the technical field of job shop scheduling, in particular to a traditional job shop scheduling method based on an improved genetic algorithm.
Background
With the development of market economy, competition among enterprises is more and more intense, and how to reasonably arrange job shop scheduling is of great importance. With the vigorous development of science and technology, the workshop production scale in industrial engineering is gradually enlarged, job shop scheduling is more and more complex, and the problem of combination optimization of job shop scheduling has become one of the hot problems of development and research in the field of industrial engineering nowadays. The aim of solving the scheduling problem of the traditional job shop is to obtain a scientific and reasonable scheduling scheme. A scientific and reasonable scheduling scheme can effectively improve production efficiency and reduce processing cost. The scheduling scheme is primarily to determine the processing order of all the processes for all the workpieces, which is a typical NP-hard problem.
Currently, the common mainstream solving methods include particle swarm optimization algorithm, genetic algorithm, neural network algorithm, tabu search algorithm and the like. The genetic algorithm is used as a population intelligent algorithm, and has the characteristics of implicit parallelism and global search, so that the genetic algorithm is widely applied to the aspects of optimizing scheduling problems, optimizing combination problems and the like. In solving the actual industrial engineering production scheduling problem, genetic algorithms are generally focused and used, and the operation of the genetic algorithms reflects the basic principle of the superior and inferior elimination operation, but the traditional genetic algorithms have the defects of premature convergence, poor solution stability, difficult determination of genetic parameters and the like. The invention improves the defects of premature convergence, poor solution stability and difficult determination of genetic parameters of the traditional genetic algorithm, so that the scheduling problem of the traditional job shop can be better solved.
Disclosure of Invention
The invention aims to optimize a traditional genetic algorithm, provides a traditional job shop scheduling method based on an improved genetic algorithm, and solves the problems of premature convergence, poor stability of solution and difficult determination of genetic parameters when the traditional genetic algorithm is used for solving.
The technical scheme adopted by the invention is that the traditional job shop scheduling method based on the improved genetic algorithm is implemented according to the following steps:
step 1, setting basic parameters of a genetic algorithm: total iteration number of Iterations, j, is initialized to 1, population total size popSize, and influence factor k of adaptive crossover and mutation probability 1 ,k 2 ,k 3 ,k 4
Step 2, initializing a population according to the popSize given in the step 1, and obtaining an initial population with popSize chromosomes after the population is initialized;
step 3, calculating fitness values of all chromosomes in the initial population generated in the step 2;
step 4, selecting the initial population with the fitness value calculated in the step 3 by adopting a roulette method, selecting (popSize-1)/2 chromosomes as Parent population, namely Parent population, and performing subsequent steps;
step 5, performing cross operation on chromosomes in the Parent population selected in the step 4 to increase population diversity, and generating a child population 1, namely child_1;
step 6, finishing mutation operation on the chromosome in the child_1 population generated in the step 5 by adopting an interchange method to generate a child population 2, namely child_2;
step 7, recording the optimal chromosome and the fitness value thereof in the population Children_2;
step 8, judging whether j is larger than the projects, if j is larger than the projects, drawing an iteration process diagram and a workpiece process Gantt chart according to the data recorded in the step 7, and ending the algorithm; if j is less than or equal to the tasks, j+1 goes to step 3.
The present invention is also characterized in that,
the step 2 is specifically implemented according to the following steps:
step 2.1, enlarging parameter popSize: expanding the total population size in the step 1 to twice as large as the original population size plus one, namely popsize=popsize+2+1;
step 2.2, generating an initial population:
step 2.2.1, defining a chromosome containing n multiplied by m genes, wherein the coding mode of the chromosome adopts real number coding based on procedures, and traversing from the first gene position to the last gene position of the chromosome in sequence;
step 2.2.2 the chromosomes generated in step 2.2.1 are treated with random function random in MATLAB and popSize is cycled through to generate an initial population of popSize chromosomes.
The step 3 is specifically implemented according to the following steps:
step 3.1, calculating objective function values h (i) of all chromosomes in the initial population: i is any chromosome in the initial population, and the value range is [1, popsize ]; h (i) represents an objective function of chromosome i, and is specifically shown in formula (1):
Figure BDA0002529343080000031
in the formula (1), ms (i) is the time taken for processing all the workpieces according to the gene sequence in i, which is also called the maximum finishing time, h (i) is an objective function, and is the reciprocal of the maximum finishing time, and the larger the value of h (i) is, the better the scheduling scheme is, and the chromosome should be inherited;
step 3.2, calculating the fitness function f (i) of i according to h (i) calculated in step 3.1, specifically as shown in formula (2):
Figure BDA0002529343080000032
in the formula (2), max represents the maximum value of h (i), min represents the minimum value of h (i), and the larger f (i), the larger i is selected.
Step 5 is specifically implemented according to the following steps:
step 5.1, selecting a chromosome in sequence in the population Parent as a Parent1, namely Parent1, and selecting a chromosome with a corresponding serial number in the Parent population as a Parent2, namely Parent2 according to random integers generated between [1, (popSize-1)/2 ] by a randi function;
step 5.2, by adaptive cross probability function P c The cross probability value is obtained as shown in a formula (3):
Figure BDA0002529343080000041
in the formula (3), g max Represents the maximum fitness value, g, of all chromosomes in a population Parent avg Represents the average fitness value of all chromosomes in the population Parent, g' is the larger fitness value of Parent1 and Parent2, k 1 ,k 2 The value of (2) is selected from the range of (0, 1);
step 5.3, if the cross probability value obtained in step 5.2 is greater than the value randomly generated between (0, 1) by the rand function, performing the cross operation by using the priority process cross method:
step 5.3.1, randomly dividing the workpiece set {1,2,3,., n } into two non-nullsSet j 1 ,j 2
Step 5.3.2 including j in Parent1 and Parent2 1 The workpiece numbers are copied into child 1, namely child 1, and child 2, namely child 2 according to the positions of the workpiece numbers in chromosomes, and j is contained in the part 1 and the part 2 2 The workpiece numbers are respectively copied into the Children2 and the Children1 according to the sequence of the workpiece numbers in the chromosome;
step 5.3.3, the two obtained chromosomes of Children1 and Children2 are crossed chromosomes;
step 5.4, if the cross probability value obtained in step 5.2 is smaller than or equal to the value randomly generated between (0, 1) by the rand function, performing no cross operation, and taking the Parent1 and Parent2 obtained in step 5.1 as the Children1 and Children2 directly;
step 5.5, adding Children1 and Children2 into the population Children_1.
Step 6 is specifically implemented according to the following steps:
step 6.1, selecting a chromosome child 1 in the population child_1 according to the sequence of the chromosomes;
step 6.2, firstly, passing through an adaptive variation probability function P m The variation probability value is obtained as shown in the formula (4):
Figure BDA0002529343080000051
in the formula (4), g max Represents the maximum fitness value, g, of all chromosomes in the population child_1 avg Represents the average fitness value of all chromosomes in the population child_1, g represents the fitness value of child_1, k 3 ,k 4 The value of (2) is selected from the range of (0, 1);
step 6.3, if the variation probability value obtained in step 6.2 is greater than the value randomly generated between (0, 1) by the rand function, performing the variation operation by using a gene exchange method:
step 6.3.1, randomly generating two integers by a randi function to serve as two gene numbers of the Children1;
step 6.3.2, exchanging the corresponding workpiece numbers on the two gene numbers on the Children1, and circulating the step 6.3.1 and the step 6.3.2 for 4 times;
step 6.3.3, adding the Children1 into the population Children_2;
and step 6.4, if the variation probability value obtained in the step 6.2 is smaller than or equal to the value randomly generated between (0 and 1) by the rand function, not performing variation operation, and directly adding the Children1 obtained in the step 6.1 into the population Children_2.
The beneficial effects of the invention are as follows:
the invention solves the problems of premature convergence, poor solution stability and difficult determination of genetic parameters when the traditional genetic algorithm is used for solving the scheduling problem of the traditional job shop. The invention uses the minimum maximum completion time as an optimization target, enlarges the population quantity to increase population diversity during initialization, adopts a new fitness function to increase the degree of distinction among chromosomes, uses a priority process crossing method (POX) to complete crossing operation, and generates offspring by the priority process crossing method which can inherit excellent characteristics of the parent well and the offspring is always feasible, uses an exchange method (REM) to complete mutation operation, wherein the crossing and mutation probability in the crossing and mutation operation is determined by adopting a self-adaption method, and the probability value can be automatically adjusted according to the chromosome fitness value. The performance of the present invention was demonstrated by reference case verification.
Drawings
FIG. 1 is a flow chart of a conventional job shop scheduling method based on an improved genetic algorithm according to the present invention;
fig. 2 is a comparison chart of the results obtained by performing experimental verification on the FT06 reference case for 20 times by using a traditional genetic algorithm and an optimized genetic algorithm respectively;
fig. 3 is a comparison chart of results obtained by performing experimental verification on the LA01 reference case for 20 times by using a conventional genetic algorithm and an optimized genetic algorithm respectively;
FIG. 4 is a graph of an iterative process for solving FT06 reference cases using an improved genetic algorithm, with the abscissa representing algebra and the ordinate representing the time required to finish all workpieces;
fig. 5 is an optimized ranking sweet-ter diagram obtained by solving the FT06 reference case by the improved genetic algorithm;
FIG. 6 is a graph of an iterative process for solving the LA01 reference case by the improved genetic algorithm, with the abscissa representing algebra and the ordinate representing the time required to finish machining all workpieces;
fig. 7 is a graph of the optimal ranking sweet obtained by solving the LA01 reference case with the improved genetic algorithm.
Detailed Description
The invention will be described in detail below with reference to the drawings and the detailed description.
The invention discloses a traditional job shop scheduling method based on an improved genetic algorithm, which is implemented as shown in fig. 1, and specifically comprises the following steps:
step 1, setting basic parameters of a genetic algorithm: total iteration number of Iterations, j is initialized to 1, the total population size popSize, and the influence factor k of adaptive crossover and mutation probability 1 ,k 2 ,k 3 ,k 4
The set problems parameter is the ending condition of the algorithm, when j is larger than the value set by the problems, the algorithm ends and gives a feasible workshop scheduling scheme and the time spent by processing all workpieces according to the scheduling scheme, and one scheduling scheme corresponds to one chromosome in the genetic algorithm; the popSize parameter is the total number of chromosomes to be produced, the popSize chromosomes comprising a population, k 1 ,k 2 ,k 3 ,k 4 The parameters are influence factors of the self-adaptive crossover and variation probability functions, and have a vital effect on the determination of crossover probability values and variation probability values;
step 2, initializing a population according to the popSize given in the step 1, and obtaining an initial population with popSize chromosomes after the population is initialized, wherein each chromosome in the initial population corresponds to a feasible scheduling scheme of workshop scheduling problems;
conventional job shop scheduling problems can be described as: a reasonable machining sequence is arranged for n different workpieces with m working procedures, the aim is to minimize the total finishing time for finishing the n workpieces, and two steps are included in initializing the population: expanding parameters and generating an initial population;
the step 2 is specifically implemented according to the following steps:
step 2.1, enlarging parameter popSize: the total size of the population in the step 1 is enlarged to twice as much as the original size, namely popsize=popsize+2+1, so that the population diversity is increased, the competition among the populations is also increased, and the optimal chromosome can be saved;
step 2.2, generating an initial population:
step 2.2.1, defining a chromosome containing n multiplied by m genes, wherein the chromosome coding mode adopts real number coding based on procedures, the chromosome coding mode traverses from the first gene position to the last gene position of the chromosome, if the same workpiece number appears for the kth time, the kth procedure of the workpiece is represented, such as a chromosome [3 3 2 12 1], wherein the first 3 represents the first procedure of the workpiece number 3, the second 3 represents the second procedure of the workpiece number 3, and so on;
step 2.2.2, treating the chromosomes generated in step 2.2.1 with a random function random in MATLAB, and cycling the popSize to generate an initial population of popSize chromosomes, each chromosome in the initial population being capable of representing a scheduling scheme for a plant scheduling problem, the initial population representing a set of scheduling schemes for the plant scheduling problem.
Step 3, calculating fitness values of all chromosomes in the initial population generated in the step 2: the goal of the workshop scheduling problem is to be able to generate a scheduling scheme that takes the shortest time to finish machining all the workpieces, the scheduling scheme that takes the shortest time corresponding to the optimal chromosome in the population; the fitness value of the chromosomes is used for distinguishing the quality degree among the chromosomes, the better fitness value of the chromosomes is larger, the selected probability is larger, the worse fitness value of the chromosomes is lower, the selected probability is lower, and the fitness value of each chromosome must be calculated in the evolution process of the population so as to ensure that the probability that the good chromosomes are selected is large during the selection operation;
the step 3 is specifically implemented according to the following steps:
step 3.1, calculating objective function values h (i) of all chromosomes in the initial population: i is any chromosome in the initial population, and the value range is [1, popsize ]. h (i) represents an objective function of chromosome i, and is specifically shown in formula (1):
Figure BDA0002529343080000081
in the formula (1), ms (i) is the time taken for processing all the workpieces according to the gene sequence in i, which is also called the maximum finishing time, h (i) is an objective function, and is the reciprocal of the maximum finishing time, and the larger the value of h (i) is, the better the scheduling scheme is, and the chromosome should be inherited;
step 3.2, calculating the fitness function f (i) of i according to h (i) calculated in step 3.1, specifically as shown in formula (2):
Figure BDA0002529343080000091
in the formula (2), max represents the maximum value of h (i), min represents the minimum value of h (i), and the larger f (i), the larger i is selected.
Step 4, selecting the initial population with the fitness value calculated in the step 3 by adopting a roulette method, selecting (popSize-1)/2 chromosomes as Parent population, namely Parent population, and performing subsequent steps;
step 5, performing cross operation on chromosomes in the Parent population selected in the step 4 to increase population diversity, and generating a child population 1, namely child_1;
step 5 is specifically implemented according to the following steps:
step 5.1, selecting a chromosome in sequence in the population Parent as a Parent1, namely Parent1, and selecting a chromosome with a corresponding serial number in the Parent population as a Parent2, namely Parent2 according to random integers generated between (1, (popSize-1)/2) of a randi function;
step 5.2, by adaptive cross probability function P c The cross probability value is obtained as shown in a formula (3):
Figure BDA0002529343080000092
in the formula (3), g max Represents the maximum fitness value, g, of all chromosomes in a population Parent avg Represents the average fitness value of all chromosomes in the population Parent, g' is the larger fitness value of Parent1 and Parent2, k 1 ,k 2 The value of (2) is selected from the range of (0, 1);
step 5.3, if the cross probability value obtained in step 5.2 is greater than the value randomly generated between (0, 1) by the rand function, performing the cross operation by using the priority process cross method:
step 5.3.1, randomly dividing the workpiece set {1,2,3,. }, n } into two non-empty subsets j 1 ,j 2
Step 5.3.2 including j in Parent1 and Parent2 1 The workpiece numbers are copied into child 1, namely child 1, and child 2, namely child 2 according to the positions of the workpiece numbers in chromosomes, and j is contained in the part 1 and the part 2 2 The workpiece numbers are respectively copied into the Children2 and the Children1 according to the sequence of the workpiece numbers in the chromosome;
step 5.3.3, the two obtained chromosomes of Children1 and Children2 are crossed chromosomes;
for example, parent 1= {3,2,2,3,1,1}, parent 2= {1,1,3,2,2,3}, randomly partitioning the workpiece set {1,2,3} generates j 1 ={2},j 2 After POX crossing, obtaining Children 1= {1,2,2,1,3,3}, children 2= {3,3,1,2,2,1}, wherein two chromosomes, namely Children1 and Children2, are new individuals generated after the crossing operation is completed by the parent, and correspond to two feasible workshop scheduling schemes newly obtained in the workshop scheduling problem;
step 5.4, if the cross probability value obtained in step 5.2 is smaller than or equal to the value randomly generated between (0, 1) by the rand function, performing no cross operation, and taking the Parent1 and Parent2 obtained in step 5.1 as the Children1 and Children2 directly;
step 5.5, adding Children1 and Children2 into the population Children_1.
Step 6, finishing mutation operation on the chromosome in the child_1 population generated in the step 5 by adopting an interchange method to generate a child population 2, namely child_2;
step 6 is specifically implemented according to the following steps:
step 6.1, selecting a chromosome child 1 in the population child_1 according to the sequence of the chromosomes;
step 6.2, firstly, passing through an adaptive variation probability function P m The variation probability value is obtained as shown in the formula (4):
Figure BDA0002529343080000111
in the formula (4), g max Represents the maximum fitness value, g, of all chromosomes in the population child_1 avg Represents the average fitness value of all chromosomes in the population child_1, g represents the fitness value of child_1, k 3 ,k 4 The value of (2) is selected from the range of (0, 1);
step 6.3, if the variation probability value obtained in step 6.2 is greater than the value randomly generated between (0, 1) by the rand function, performing the variation operation by using a gene exchange method:
step 6.3.1, randomly generating two integers by a randi function to serve as two gene numbers of the Children1;
step 6.3.2, exchanging the corresponding workpiece numbers on the two gene numbers on the Children1, and circulating the step 6.3.1 and the step 6.3.2 for 4 times;
step 6.3.3, adding the Children1 into the population Children_2;
and step 6.4, if the variation probability value obtained in the step 6.2 is smaller than or equal to the value randomly generated between (0 and 1) by the rand function, not performing variation operation, and directly adding the Children1 obtained in the step 6.1 into the population Children_2.
Step 7, recording the optimal chromosome and the fitness value thereof in the population Children_2;
step 8, judging whether j is larger than the projects, if j is larger than the projects, drawing an iteration process diagram and a workpiece process Gantt chart according to the data recorded in the step 7, and ending the algorithm; if j is less than or equal to the tasks, j+1 goes to step 3.
Case analysis and method verification of the present invention
In order to verify the effectiveness of the invention, the MATLAB_R2018a software on the macOS10.13.6operating system of the invention respectively carries out 20 operations on the two reference cases FT06 and LA01, and the method is set as follows according to the empirical parameters: iteration number 200, total population size 100. When solving by using a traditional genetic algorithm, setting the crossover probability to be 0.9 according to experience, and setting the variation probability to be 0.05; when solving using the optimized genetic algorithm, k1=k2=0.9, k3=k4=0.1. After 20 times of operation, the comparison of experimental results of the optimal solutions of the two reference cases obtained by the traditional genetic algorithm and the optimized genetic algorithm are shown in fig. 2 and 3. The optimal solution obtained by the optimized genetic algorithm is better than the optimal solution obtained by the traditional genetic algorithm as shown in fig. 2 and 3, and the optimal solution currently known by the two reference cases can be obtained by the optimization algorithm, so that the optimizing capability of the optimized genetic algorithm is higher than that of the traditional genetic algorithm. Analysis summarises the data in figures 2,3, and the comparative table of the results is shown in table 1.
Table 1 results comparison table
Figure BDA0002529343080000121
As can be seen from table 1, when the FT06 reference case is used for verification, the optimal solution obtained by the conventional algorithm is 59, 59 is obtained by 2 times in 20 experiments, the average value of the obtained solution is 61.5, and when the optimal solution is obtained as 59, the optimal iteration number is 3, and the average iteration number is 11.6; the optimal solution obtained by the optimization algorithm is 55, the average value of the obtained solution is 56.2 in 12 times of 20 times of experiments, when the optimal solution is 55, the optimal iteration number is 10, and the average iteration number is 38.05; when the LA01 reference case is used for verification, the optimal solution obtained by the traditional algorithm is 740, 1 time of experiments is carried out for obtaining 740, the average value of the obtained solution is 774.35, when the optimal solution is obtained for obtaining 740, the optimal iteration number is 4, and the average iteration number is 8.4; the optimal solution obtained by the optimization algorithm is666 And 14 times of experiments are performed to obtain an optimal solution, the average value of the optimal solution is 671.3, when the optimal solution is 666, the optimal iteration number is 18, and the average iteration number is 76.6. Therefore, the optimal solution obtained by the improved genetic algorithm is superior to the traditional genetic algorithm, the improved algorithm can also obtain the currently known optimal solution of the two reference cases, the problem of precocity of the traditional algorithm is solved, and the convergence speed is high; meanwhile, after 20 experiments are carried out, the optimal solution times obtained by the optimized algorithm are respectively 12 times and 14 times which are far greater than those obtained by the traditional algorithm, so that the problem of poor stability of the solution of the traditional algorithm is solved; upon completion of the crossover and mutation operations, according to a given k 1 ,k 2 ,k 3 ,k 4 The cross and variation probability values are determined in a self-adaptive mode, and the problem that parameters are difficult to determine is solved.
Fig. 4 is an iteration process diagram of FT06, from which it is known that when the optimal solution is found to be 55, the iteration number is only 10, the iteration speed is high, fig. 5 is a ranking gante diagram of all the working procedures of the workpiece, from which the production sequence of all the working procedures of all the workpieces in the FT06 case can be found, and the production shop can process and produce according to the sequence; fig. 6 is an iteration process diagram of LA01, from which it is clear that when the optimal solution is 666, the iteration number is only 18, the iteration speed is high, fig. 7 is a ranking gante diagram of all the work pieces, from which it is clear that the production sequence of all the work pieces in LA01 case can be processed and produced in the production shop.
The invention enlarges the population size when initializing the population, increases the diversity of individuals and the competitiveness among individuals, calculates the individual fitness value by adopting a new fitness function, increases the degree of distinction among individuals, solves the problems of difficult parameter determination, premature convergence and unstable solution in the traditional genetic algorithm by adopting the self-adaptive crossover and variation probability, improves the optimizing capability and convergence speed of the algorithm, and tests the performance of the invention by using a reference case, thereby proving that the method is applicable.

Claims (1)

1. The traditional job shop scheduling method based on the improved genetic algorithm is characterized by comprising the following steps of:
step 1, setting basic parameters of a genetic algorithm: total iteration number of Iterations, j, is initialized to 1, population total size popSize, and influence factor k of adaptive crossover and mutation probability 1 ,k 2 ,k 3 ,k 4
Step 2, initializing a population according to the popSize given in the step 1, and obtaining an initial population with popSize chromosomes after the population is initialized;
step 3, calculating fitness values of all chromosomes in the initial population generated in the step 2;
step 4, selecting the initial population with the fitness value calculated in the step 3 by adopting a roulette method, selecting (popSize-1)/2 chromosomes as Parent population, namely Parent population, and performing subsequent steps;
step 5, performing cross operation on chromosomes in the Parent population selected in the step 4 to increase population diversity, and generating a child population 1, namely child_1;
step 6, finishing mutation operation on the chromosome in the child_1 population generated in the step 5 by adopting an interchange method to generate a child population 2, namely child_2;
step 7, recording the optimal chromosome and the fitness value thereof in the population Children_2;
step 8, judging whether j is larger than the projects, if j is larger than the projects, drawing an iteration process diagram and a workpiece process Gantt chart according to the data recorded in the step 7, and ending the algorithm; if j is less than or equal to the operations, j+1 is then transferred to step 3;
the step 2 is specifically implemented according to the following steps:
step 2.1, enlarging parameter popSize: expanding the total population size in the step 1 to twice as large as the original population size plus one, namely popsize=popsize+2+1;
step 2.2, generating an initial population:
step 2.2.1, defining a chromosome containing n multiplied by m genes, wherein the coding mode of the chromosome adopts real number coding based on procedures, and traversing from the first gene position to the last gene position of the chromosome in sequence;
step 2.2.2, treating the chromosomes generated in step 2.2.1 with random function random in MATLAB, and circularly treating popSize for times to generate an initial population with popSize chromosomes;
the step 3 is specifically implemented according to the following steps:
step 3.1, calculating objective function values h (i) of all chromosomes in the initial population: i is any chromosome in the initial population, and the value range is [1, popsize ]; h (i) represents an objective function of chromosome i, and is specifically shown in formula (1):
Figure FDA0004203494750000021
in the formula (1), ms (i) is the time taken for processing all the workpieces according to the gene sequence in i, which is also called the maximum finishing time, h (i) is an objective function, and is the reciprocal of the maximum finishing time, and the larger the value of h (i) is, the better the scheduling scheme is, and the chromosome should be inherited;
step 3.2, calculating the fitness function f (i) of i according to h (i) calculated in step 3.1, specifically as shown in formula (2):
Figure FDA0004203494750000022
in the formula (2), max represents the maximum value of h (i), min represents the minimum value of h (i), and the larger f (i), the larger i is selected;
step 5 is specifically implemented according to the following steps:
step 5.1, selecting a chromosome in sequence in the population Parent as a Parent1, namely Parent1, and selecting a chromosome with a corresponding serial number in the Parent population as a Parent2, namely Parent2 according to random integers generated between [1, (popSize-1)/2 ] by a randi function;
step 5.2, by adaptive cross probability function P c The cross probability value is obtained as shown in a formula (3):
Figure FDA0004203494750000031
in the formula (3), g max Represents the maximum fitness value, g, of all chromosomes in a population Parent avg Represents the average fitness value of all chromosomes in the population Parent, g' is the larger fitness value of Parent1 and Parent2, k 1 ,k 2 The value of (2) is selected from the range of (0, 1);
step 5.3, if the cross probability value obtained in step 5.2 is greater than the value randomly generated between (0, 1) by the rand function, performing the cross operation by using the priority process cross method:
step 5.3.1, randomly dividing the workpiece set {1,2,3,. }, n } into two non-empty subsets j 1 ,j 2
Step 5.3.2 including j in Parent1 and Parent2 1 The workpiece numbers are copied into child 1, namely child 1, and child 2, namely child 2 according to the positions of the workpiece numbers in chromosomes, and j is contained in the part 1 and the part 2 2 The workpiece numbers are respectively copied into the Children2 and the Children1 according to the sequence of the workpiece numbers in the chromosome;
step 5.3.3, the two obtained chromosomes of Children1 and Children2 are crossed chromosomes;
step 5.4, if the cross probability value obtained in step 5.2 is smaller than or equal to the value randomly generated between (0, 1) by the rand function, performing no cross operation, and taking the Parent1 and Parent2 obtained in step 5.1 as the Children1 and Children2 directly;
step 5.5, adding the Children1 and the Children2 into the population Children_1;
step 6 is specifically implemented according to the following steps:
step 6.1, selecting a chromosome child 1 in the population child_1 according to the sequence of the chromosomes;
step 6.2, firstly, passing through an adaptive variation probability function P m The variation probability value is obtained as shown in the formula (4):
Figure FDA0004203494750000041
in the formula (4), g max Represents the maximum fitness value, g, of all chromosomes in the population child_1 avg Represents the average fitness value of all chromosomes in the population child_1, g represents the fitness value of child_1, k 3 ,k 4 The value of (2) is selected from the range of (0, 1);
step 6.3, if the variation probability value obtained in step 6.2 is greater than the value randomly generated between (0, 1) by the rand function, performing the variation operation by using a gene exchange method:
step 6.3.1, randomly generating two integers by a randi function to serve as two gene numbers of the Children1;
step 6.3.2, exchanging the corresponding workpiece numbers on the two gene numbers on the Children1, and circulating the step 6.3.1 and the step 6.3.2 for 4 times;
step 6.3.3, adding the Children1 into the population Children_2;
and step 6.4, if the variation probability value obtained in the step 6.2 is smaller than or equal to the value randomly generated between (0 and 1) by the rand function, not performing variation operation, and directly adding the Children1 obtained in the step 6.1 into the population Children_2.
CN202010513661.XA 2020-06-08 2020-06-08 Traditional job shop scheduling method based on improved genetic algorithm Active CN111667071B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010513661.XA CN111667071B (en) 2020-06-08 2020-06-08 Traditional job shop scheduling method based on improved genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010513661.XA CN111667071B (en) 2020-06-08 2020-06-08 Traditional job shop scheduling method based on improved genetic algorithm

Publications (2)

Publication Number Publication Date
CN111667071A CN111667071A (en) 2020-09-15
CN111667071B true CN111667071B (en) 2023-06-02

Family

ID=72385790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010513661.XA Active CN111667071B (en) 2020-06-08 2020-06-08 Traditional job shop scheduling method based on improved genetic algorithm

Country Status (1)

Country Link
CN (1) CN111667071B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069081B (en) * 2020-09-24 2022-06-03 中国人民解放军国防科技大学 Genetic algorithm-based directory controller test excitation generation method
CN112488314B (en) * 2020-11-24 2021-07-09 江苏科技大学 System elasticity recovery method and system based on improved genetic algorithm
CN113095733A (en) * 2021-05-10 2021-07-09 北京化工大学 Method for solving scheduling of single mechanical arm transfer job shop based on improved genetic algorithm
CN116859725A (en) * 2023-06-25 2023-10-10 盐城工学院 Genetic algorithm-based optimization method for automobile chassis control system
CN117057485B (en) * 2023-10-11 2024-01-09 山东天鼎舟工业科技有限公司 Scheduling method and system for casting machining production

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07287760A (en) * 1994-04-18 1995-10-31 Sanyo Electric Co Ltd Method for matching template
CN104281917A (en) * 2014-09-26 2015-01-14 东华大学 Fuzzy job-shop scheduling method based on self-adaption inheritance and clonal selection algorithm

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07287760A (en) * 1994-04-18 1995-10-31 Sanyo Electric Co Ltd Method for matching template
CN104281917A (en) * 2014-09-26 2015-01-14 东华大学 Fuzzy job-shop scheduling method based on self-adaption inheritance and clonal selection algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种求解作业车间调度问题的改进遗传算法;何斌等;《制造业自动化》;20180825(第08期);正文第2-3节 *
基于自适应遗传算法的流水车间作业调度;沈斌等;《计算机工程》;20100720(第14期);全文 *
改进遗传算法求解TSP;张雁翔等;《山西电子技术》;20160215(第01期);全文 *

Also Published As

Publication number Publication date
CN111667071A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN111667071B (en) Traditional job shop scheduling method based on improved genetic algorithm
CN112257296B (en) Improved genetic algorithm-based job shop scheduling method with cache constraint
CN110796355B (en) Flexible job shop scheduling method based on dynamic decoding mechanism
CN110389819B (en) Method and system for scheduling calculation intensive batch processing tasks
CN107862411A (en) A kind of extensive flexible job shop scheduling optimization method
CN111325443B (en) Method for solving flexible job shop scheduling by improved genetic algorithm based on catastrophe mechanism
CN112749776B (en) Job shop scheduling method based on improved hybrid genetic algorithm
CN108460463B (en) High-end equipment assembly line production scheduling method based on improved genetic algorithm
CN111797469B (en) Aeroengine case technological parameter optimization method based on machining cutter relieving deformation constraint
CN111967654A (en) Method for solving flexible job shop scheduling based on hybrid genetic algorithm
CN111173573A (en) Identification method for power object model of steam turbine regulating system
CN111401693B (en) Flexible workshop scheduling optimization method and system with robot transportation
CN111781898B (en) Distribution estimation algorithm for optimizing flexible job shop scheduling of maximum deadline
CN113705812B (en) Production scheduling method and system based on hybrid parallel genetic and variable neighborhood algorithm
CN112381343A (en) Flexible job shop scheduling method based on genetic-backbone particle swarm hybrid algorithm
CN112286152B (en) Distributed flow shop scheduling method and system with batch delivery constraint
CN114021934A (en) Method for solving workshop energy-saving scheduling problem based on improved SPEA2
Braglia et al. Optimization of POLCA-controlled production systems with a simulation-driven genetic algorithm
CN117075545A (en) Multi-target flexible job shop scheduling method, electronic equipment and medium
CN111814359B (en) Discrete manufacturing-oriented integrated workshop scheduling and assembly sequence planning method
CN113689066A (en) Internet of things workshop scheduling method based on NSGA-II algorithm
Chamnanlor et al. Hybrid genetic algorithms for solving reentrant flow-shop scheduling with time windows
CN111665799B (en) Time constraint type parallel machine energy-saving scheduling method based on collaborative algorithm
CN111596622B (en) Flexible job shop scheduling method of ECM (electronic model control) rule distribution estimation algorithm
CN109255484A (en) The discrete manufacturing recourses cooperative optimization method and system of data-driven

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
GR01 Patent grant
GR01 Patent grant