CN112926819A - Scheduling method, device, equipment and storage medium based on improved genetic algorithm - Google Patents

Scheduling method, device, equipment and storage medium based on improved genetic algorithm Download PDF

Info

Publication number
CN112926819A
CN112926819A CN202011539402.0A CN202011539402A CN112926819A CN 112926819 A CN112926819 A CN 112926819A CN 202011539402 A CN202011539402 A CN 202011539402A CN 112926819 A CN112926819 A CN 112926819A
Authority
CN
China
Prior art keywords
coding sequence
machine
procedure
sequence
gene
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
Application number
CN202011539402.0A
Other languages
Chinese (zh)
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011539402.0A priority Critical patent/CN112926819A/en
Publication of CN112926819A publication Critical patent/CN112926819A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The invention relates to the technical field of flexible workshop scheduling, in particular to a scheduling method, a scheduling device, scheduling equipment and a scheduling storage medium based on an improved genetic algorithm. The method comprises the steps of constructing a process coding sequence and a corresponding machine coding sequence, and forming an individual set by taking the process coding sequence and the corresponding machine coding sequence as individuals; carrying out cross operation on process coding sequences of any two different individuals in the individual set; performing cross operation on machine coding sequences of any two different individuals in the individual set; when the cross operation of the procedure coding sequence is carried out, the genes matched with the genes in the cross segments are deleted from the procedure coding sequence, then the cross segments are spliced to the tail end of the procedure coding sequence as a whole, instead of correspondingly dispersing and filling the genes in the cross segments to the deletion position of the procedure coding sequence in sequence, the convergence rate of the algorithm is increased, the iteration times of the genetic algorithm are small, and the calculation amount and the calculation time are reduced.

Description

Scheduling method, device, equipment and storage medium based on improved genetic algorithm
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of flexible workshop scheduling, in particular to a scheduling method, a scheduling device, scheduling equipment and a scheduling storage medium based on an improved genetic algorithm.
[ background of the invention ]
Flexible manufacturing systems are a complex class of man-made systems characterized by uncertainty, complexity, multiple constraints, multiple resources coordinated with each other, and the like. One of the most important research objects in the manufacturing system is production scheduling, which is also one of the most difficult problems in theoretical research. The purpose of production scheduling is to determine specific processing paths, times, machines, operations, etc. for each processing object based on production goals and constraints. The excellent scheduling strategy has a very great effect on improving the optimality of the production system and improving the economic benefit.
The genetic algorithm in the prior art has the defects of long evolution time, large calculation amount, long calculation time and the like. The long evolution time, the large calculation amount and the long calculation time are caused by the loss of partial excellent individuals due to the fact that the excellent individuals cannot be completely reserved by the crossover operator in the genetic operation, so that the evolution efficiency is low, the evolution algebra is increased, and the calculation amount and the calculation time are increased.
[ summary of the invention ]
The invention aims to provide a scheduling method, a scheduling device, scheduling equipment and a scheduling storage medium based on an improved genetic algorithm, so as to solve the technical problems of large calculation amount and long calculation time in the prior art.
The technical scheme of the invention is as follows: the scheduling method based on the improved genetic algorithm comprises the following steps:
randomly constructing a procedure coding sequence according to procedure data of all workpieces in a flexible operation workshop, constructing a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible operation workshop, and forming an individual set by taking the procedure coding sequence and the corresponding machine coding sequence as individuals, wherein the procedure coding sequence is used for representing the arrangement sequence of processing tasks, and the processing tasks are used for representing the procedures of different workpieces; the machine coding sequence is used for representing the corresponding relation between the processing task and a machine for processing the processing task;
performing cross operation on process coding sequences of any two different individuals in the individual set, specifically comprising: acquiring a first cross segment of a first procedure coding sequence and a second cross segment of a second procedure coding sequence; matching each gene in a second cross segment in the first process coding sequence, and splicing the second cross segment to the tail end of the first process coding sequence after deleting the matched gene from the first process coding sequence; matching each gene in a first cross segment in the second process coding sequence, and splicing the first cross segment to the tail end of the second process coding sequence after deleting the matched gene from the second process coding sequence;
performing cross operation on machine coding sequences of any two different individuals in the individual set;
and repeating the process coding sequence cross operation and the machine coding sequence cross operation until reaching the preset iteration times, stopping iteration, and selecting one process coding sequence and the corresponding machine coding sequence from the obtained individual set as a task scheduling scheme.
Preferably, the constructing a machine code sequence corresponding to the process code sequence according to the machine data of the flexible job shop includes:
aiming at a first gene of the procedure coding sequence, respectively acquiring the load time of each machine for completing the processing task corresponding to the gene, initializing the total load time of each machine, selecting the machine with the smallest sum of the load time and the total load time for completing the processing task, writing the serial number of the machine into the first position of the machine coding sequence, and updating the total load time of each machine;
aiming at a second gene of the procedure coding sequence, respectively acquiring the load time of each machine for completing the processing task corresponding to the gene, selecting the machine with the minimum sum of the load time and the total load time for completing the processing task, writing the code of the machine into a second position of the machine coding sequence, and updating the total load time of each machine;
repeating the steps until each gene in the process coding sequence is subjected to machine coding, and outputting the machine coding sequence.
Preferably, the constructing a machine code sequence corresponding to the process code sequence according to the machine data of the flexible job shop includes:
and randomly determining a machine for completing the processing task corresponding to the gene aiming at each gene of the procedure coding sequence, and generating the machine coding sequence by the machine number according to the arrangement sequence of the procedure coding sequence.
Preferably, the cross-operating the machine-encoded sequences of any two different individuals in the set of individuals comprises:
setting an array with the length same as that of the machine coding sequence, wherein each digit of the array corresponds to a gene with the same median in the machine coding sequence;
randomly generating a first value or a second value starting from a first bit of the array;
when the value of the corresponding digit in the array is a first numerical value, exchanging the genes of the same digit in the two machine coding sequences; when the value of the corresponding digit in the array is a second value, the same number of genes in both machine-encoded sequences is retained.
Preferably, after the cross-operating the machine-encoded sequences of any two different individuals in the individual set, the method further comprises:
and (3) carrying out mutation operation on the process coding sequence, and carrying out mutation operation on the machine coding sequence.
Preferably, said mutating said process coding sequence and said machine coding sequence comprises:
randomly selecting two genes in the process coding sequence for position exchange;
randomly selecting one gene in the machine-encoded sequence and replacing the selected gene with the other machine number.
Preferably, the obtaining of the first cross-fragment of the first process coding sequence comprises:
randomly determining two processes of the workpiece and the selected workpiece as two cross points, and taking a segment between the two cross points in the first process coding sequence as the first cross segment.
The other technical scheme of the invention is as follows: provided is a scheduling device based on an improved genetic algorithm, comprising:
the system comprises an initial population module, a sequence module and a population module, wherein the initial population module is used for randomly constructing a procedure coding sequence according to procedure data of all workpieces in a flexible job shop, constructing a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible job shop, and forming an individual set by taking the procedure coding sequence and the corresponding machine coding sequence as individuals, wherein the procedure coding sequence is used for representing the arrangement sequence of processing tasks, and the processing tasks are used for representing each procedure of different workpieces; the machine coding sequence is used for representing the corresponding relation between the processing task and a machine for processing the processing task;
the first crossing module is used for crossing process coding sequences of any two different individuals in the individual set, and specifically comprises: acquiring a first cross segment of a first procedure coding sequence and a second cross segment of a second procedure coding sequence; matching each gene in a second cross segment in the first process coding sequence, and splicing the second cross segment to the tail end of the first process coding sequence after deleting the matched gene from the first process coding sequence; matching each gene in a first cross segment in the second process coding sequence, and splicing the first cross segment to the tail end of the second process coding sequence after deleting the matched gene from the second process coding sequence;
the second cross module is used for carrying out cross operation on machine coding sequences of any two different individuals in the individual set;
and the output module is used for repeating the process coding sequence cross operation and the machine coding sequence cross operation until reaching the preset iteration times, stopping iteration, and selecting one process coding sequence and the corresponding machine coding sequence from the obtained individual set as a task scheduling scheme.
The other technical scheme of the invention is as follows: an electronic device is provided that includes a processor, and a memory coupled to the processor, the memory storing program instructions executable by the processor; the processor, when executing the program instructions stored by the memory, implements the improved genetic algorithm based scheduling method described above.
The other technical scheme of the invention is as follows: there is provided a storage medium having stored therein program instructions which, when executed by a processor, implement the improved genetic algorithm based scheduling method described above.
The invention has the beneficial effects that: the scheduling method, the scheduling device, the scheduling equipment and the scheduling storage medium based on the improved genetic algorithm randomly construct a procedure coding sequence according to procedure data of all workpieces in a flexible job shop, construct a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible job shop, and form an individual set by taking the procedure coding sequence and the corresponding machine coding sequence as individuals; performing cross operation on the process coding sequences of any two different individuals in the individual set; performing cross operation on machine coding sequences of any two different individuals in the individual set; repeating the sequence cross operation and the machine sequence cross operation until reaching the preset iteration times; when the cross operation of the procedure coding sequence is carried out, the genes matched with the genes in the cross segments are deleted from the procedure coding sequence, then the cross segments are spliced to the tail end of the procedure coding sequence as a whole, instead of correspondingly dispersing and filling the genes in the cross segments to the deletion position of the procedure coding sequence in sequence, the convergence rate of the algorithm is increased, the iteration times of the genetic algorithm are small, and the calculation amount and the calculation time are reduced.
[ description of the drawings ]
FIG. 1 is a flow chart of a scheduling method based on an improved genetic algorithm according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a scheduling method based on an improved genetic algorithm according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a scheduling apparatus based on a modified genetic algorithm according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the invention;
fig. 5 is a schematic structural diagram of a storage medium according to a fifth embodiment of the present invention.
[ detailed description ] embodiments
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first", "second" and "third" in the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise. All directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present invention are only used to explain the relative positional relationship between the components, the movement, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In the present invention, the flexible job shop scheduling is described as follows: n machines { N1,N2,…NnFor M workpieces { M }1,M2,…MmProcessing, wherein each workpiece m has one or more working procedures; for the same workpiece, the processing sequence of the working procedures is fixed in advance and cannot be changed; each process can be processed on any optional machine, and the processing time of each process is changed along with the difference of the machine; for each process, each machine is available for selection. The scheduling aims to determine the sequence of each procedure under a certain constraint condition, so that the obtained performance index is optimal. In the present invention, the goal is to optimize the maximum flow time Cmax of the scheduling.
The constraint conditions of flexible workshop operation scheduling are as follows: firstly, any next working procedure of the workpiece can be started after the previous working procedure is finished; secondly, the same workpiece can be processed on one machine at a time and cannot be processed on a plurality of machines simultaneously; third, any one machine can only process one workpiece at a time, and the process cannot be interrupted once it is started; fourthly, sequential constraint exists among the working procedures of the same workpiece, and sequential constraint does not exist among the working procedures of different workpieces; fifth, there is no priority between different workpieces.
Fig. 1 is a flowchart illustrating a scheduling method based on an improved genetic algorithm according to a first embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 1 if the results are substantially the same. As shown in fig. 1, the scheduling method based on the improved genetic algorithm includes the steps of:
s101, randomly constructing a procedure coding sequence according to procedure data of all workpieces in the flexible operation workshop, constructing a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible operation workshop, and forming an individual set by taking the procedure coding sequence and the corresponding machine coding sequence as individuals.
The process data for each workpiece includes the number of processes and the sequence of the processes, and the machine data for each machine includes the processing time, which may also be referred to as load time, for the different processes in which the machine processes each workpiece. Wherein, the individual set is also called population in genetic algorithm, each individual includes a process coding sequence and a machine coding sequence, the process coding sequence can be called first chromosome, the machine coding sequence can be called second chromosome, each individual represents a scheduling scheme.
The process coding sequence is used for representing the arrangement sequence of processing tasks, and the processing tasks are used for representing various processes of different workpieces; the machine code sequence is used for representing the corresponding relation between the processing task and a machine for processing the processing task.
Wherein each processing task is referred to as a gene in the process coding sequence and each machine number is referred to as a gene in the machine coding sequence.
Specifically, taking 3 workpieces, each requiring 3 processes as an example, the process code sequence is (O) for example31,O32,O11,O21,O12,O22,O33,O13,O23) Wherein O is31Showing the first step of a third workpiece, O32Showing a second step of a third workpiece, O11Denotes a first process of a first workpiece, O21Denotes the first process of a second workpiece, and so on, where O31,O32,O11Genes for the process coding sequences, respectively. For convenience of description, the above procedure coding sequence (O)31,O32,O11,O21,O12,O22,O33,O13,O23) It can also be simplified as (331212312), where the numbers 1,2,3 represent workpieces, the first "3" representing the 1 st of workpiece 3 in left-to-right orderThe second "3" indicates the 2 nd process of the workpiece 3, and the third "3" indicates the 3 rd process of the workpiece 3.
The machine code sequence corresponds to the process code sequence described above, for example, four machines, the machine code sequence being, for example, (N)4,N2,N1,N1,N3,N4,N3,N2,N4) The number of the machine code sequence is the same as that of the process code sequence, and the x-th position in the machine code sequence corresponds to the x-th position in the process code sequence, for example, the 1 st N position in the machine code sequence4Corresponds to O31Is represented by O31Processing on machine number 4; n at position 22Corresponds to O32Is represented by O32Processing on machine number 2; and so on, wherein N4,N2,N1Genes for machine coding sequences, respectively. For convenience of description, the machine code sequence may be simply represented as (421134324), and the numbers 1,2,3, and 4 represent machine numbers.
And S102, performing cross operation on the process coding sequences of any two different individuals in the individual set.
In step S102, the two process code sequences to be crossed are a first process code sequence and a second process code sequence, respectively; acquiring a first cross segment of a first procedure coding sequence and a second cross segment of a second procedure coding sequence; matching each gene in a second cross segment in the first process coding sequence, and splicing the second cross segment to the tail end of the first process coding sequence after deleting the matched gene from the first process coding sequence; matching each gene in the first cross-over segment in the second process coding sequence, and splicing the first cross-over segment to the end of the second process coding sequence after deleting the matched gene from the second process coding sequence.
In step S102, the process coding sequence is crossed, and for the first process coding sequence and the second process coding sequence to be crossed, the first process coding sequence and the second process coding sequence are respectively coded from the first processRandomly acquiring a first cross segment and a second cross segment from the code sequence and the second procedure code sequence, specifically: two processes of randomly determining a workpiece and said selected workpiece as two intersections, and a segment between the two intersections as an intersection segment. Specifically, for example, the first process sequence code PA (O)21 O22O31 O23 O32 O41 O11 O33 O34 O24 O42 O12 O43 O13 O44 O14) The second process coding sequence PB (O)31 O32 O21O22 O41 O42 O33 O23 O11 O12 O24 O13 O14 O43 O34 O44) For the first process code sequence PA, the randomly determined work is 3, the processes are 1 and 3, and the crossover points PointA and NpointA are O31And O33The first crossover fragment CrossA is (O)31 O23 O32 O41 O11 O33) (ii) a For the second process sequence PB, the randomly determined work pieces are 2, the processes are 1 and 3, and the crossover points PointB and NpointB are O, respectively21And O23The second crossover segment CrossB is (O)21 O22 O41 O42O33O23)。
When crossing, each gene of the second cross segment CrossB is matched in the first process coding sequence PA, the matched gene is deleted, and the deleted gene is deleted
Figure BDA0002854459750000081
Figure BDA0002854459750000082
Then the second cross-over fragment CrossB (O)21 O22 O41 O42 O33 O23) Spliced to the end of PA to obtain a new first process code sequence CA (O)31 O32 O11 O34 O24 O12 O43 O13 O44 O14 21 22 41O O O 42 33 23O O O)(ii) a Following the above procedure, a new second sequence coding sequence CB (O) is obtained21 O22 O42 O12 O24 O13 O14 O43O34 O44 31 23 32 41 11 33O O O O O O). In the step, the cross segments are spliced to the tail end of the process coding sequence with the matched genes deleted as a whole, instead of correspondingly dispersing and filling the genes in the cross segments to the deletion position of the process coding sequence in sequence, the first cross segments are retained in the second process coding sequence as a whole, the second cross segments are retained in the first process coding sequence as a whole, the convergence rate of the algorithm is increased, and the preset iteration number in the step S104 is small.
S103, performing cross operation on machine coding sequences of any two different individuals in the individual set.
In this embodiment, the interleaving of the machine-coded sequences may be performed by using an interleaving method in the prior art, or may be performed in the following preferred manner, and step S103 further includes:
s1031, setting an array with the length same as that of the machine coding sequence, wherein each digit of the array corresponds to a gene with the same median in the machine coding sequence;
s1032, randomly generating a first numerical value or a second numerical value from the first bit of the array;
the first value may be 1, and the second value may be 0.
S1033, when the value of the corresponding digit in the array is the first numerical value, exchanging the genes of the same digit in the two machine coding sequences; when the value of the corresponding digit in the array is a second value, the same number of genes in both machine-encoded sequences is retained.
Specifically, as shown in tables 1 to 3, the 3 rd, 7 th, 10 th and 15 th bits of the array Cr are 1, and the other positions are 0, so that the 3 rd, 7 th, 10 th and 15 th bits of the first and second machine code sequences are crossed, and the rest are unchanged.
Table 1 initial array example
First machine code sequence PA (4 2 1 5 1 5 3 4 3 2 4 4 1 4 5 5)
Array Cr (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
Second machine coding sequence PB (3 2 4 5 1 3 2 3 4 1 4 1 3 4 2 2)
TABLE 2 example of machine coding before interleaving
First machine code sequence CA (4 2 1 5 1 5 3 4 3 2 4 4 1 4 5 5)
Array Cr (0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0)
Second machine-encoded sequence CB (3 2 4 5 1 3 2 3 4 1 4 1 3 4 2 2)
TABLE 3 post-interleaving machine coding example
First machine code sequence PA (4 2 4 5 1 5 2 4 3 1 4 4 1 4 2 5)
Array Cr (0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0)
Second machine coding sequence PB (3 2 1 5 1 3 3 3 4 2 4 1 3 4 5 2)
And S104, repeating the steps S102 and S103 until a preset iteration number is reached, stopping iteration, and selecting a process coding sequence and a corresponding machine coding sequence from the obtained individual set as a task scheduling scheme.
In this embodiment, the predetermined number of iterations is less than other genetic algorithms of the prior art for the same target Cmax. The preset iteration times can be adjusted according to different target Cmax, and if the target Cmax is higher in requirement, the value of the preset iteration times can be correspondingly increased; if the target Cmax requires to be decreased, the value of the preset iteration number may be decreased accordingly.
Compared with the prior art, the Cmax obtained by the method of the embodiment obtains equal or better results, and meanwhile, the convergence rate of the optimal solution is found to be high in the test process. With the method of prior art 1(Guohui Zhang, Xinyu sho, Peigen Li, Liang gao. an effective vertical double search optimization algorithm for multi-objective flexible joint-cut scheduling of project [ J ]. Computer & Industrial Engineering,2009(56):1309-1318.), the genetic operation iteration needs 50 times, and in the case of equal Cmax, the average number of iterations of the genetic operation is tested to be less than 20 times, and the convergence rate of the method of this embodiment is fast.
In this embodiment, the process coding sequence and the machine coding sequence of each individual may be respectively crossed without changing the corresponding relationship, for example, the individual a includes the process coding sequence a1 and the machine coding sequence a 1', and the process coding sequence a1 may be crossed with other process coding sequences, for example, to obtain the process coding sequence a1-T, where T is the number of crossing; the machine-encoded sequence a1 'may be crossed with other machine-encoded sequences, e.g., to give the machine-encoded sequence a 1' -L, L being the number of crossings; thus, the correspondence between the process code sequence a1-T and the machine code sequence a 1' -L is unchanged.
In an optional embodiment, in step S101, a machine coding sequence is obtained by using a global machine search, and step S101 specifically includes:
s1011, randomly constructing a procedure coding sequence according to procedure data of all workpieces in the flexible operation workshop;
s1012, aiming at the first gene of the procedure coding sequence, respectively acquiring the load time of each machine for completing the processing task corresponding to the gene, initializing the total load time of each machine, selecting the machine with the smallest sum of the load time and the total load time for completing the processing task, writing the number of the machine into the first position of the machine coding sequence, and updating the total load time of each machine;
s1013, aiming at a second gene of the procedure coding sequence, respectively acquiring the load time of each machine for completing the processing task corresponding to the gene, selecting the machine with the smallest sum of the load time and the total load time for completing the processing task, writing the code of the machine into a second position of the machine coding sequence, and updating the total load time of each machine;
and S1014, repeating the step S1013 until each gene in the process coding sequence is subjected to machine coding, and outputting the machine coding sequence.
In step S1012, the total initial load time of each machine is 0, and the load time for each machine to process different processes for different workpieces is determined based on the machine data of the flexible job shop.
TABLE 4 machine Global search example
Figure BDA0002854459750000111
In the example shown in table 4, the machine load times in the total machine load are added to the machine time in the machine time table of the current process, the machine with the shortest added time is selected as the machine of the current process, the selected machine time is accumulated in the total machine load array, and step S1013 is repeated until the selection of the machines of all processes is completed. Here, if the current process is the first pass, the total machine load is all 0, and if there are two or more minimum machine times, the first machine is selected as the processing machine. This gives the machine code sequence (234321142) corresponding to the process code sequence shown in Table 4.
Further, the machine code sequence may be randomly generated, and after step S1011, the method further includes step S1012' of randomly determining a machine that completes a processing task corresponding to each of the genes for each of the process code sequences, and generating the machine code sequence by assigning the machine numbers in the order of the process code sequences.
To increase the diversity of the initialized individual sets (populations in the genetic algorithm), in step S101, a first percentage of machine-coded sequences are generated in the global search mode of steps S1012 to S1014, and a second percentage of machine-coded sequences are generated in the random mode of step S1012'. Therefore, in the preferred embodiment, the initial population (individual set) is generated by combining the global search-based mode and the random mode, so that the diversity of the population is increased, and premature convergence is avoided to a great extent.
Fig. 2 is a flowchart illustrating a scheduling method based on an improved genetic algorithm according to a second embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 2 if the results are substantially the same. As shown in fig. 2, the scheduling method based on the improved genetic algorithm includes the steps of:
s201, randomly constructing a procedure coding sequence according to procedure data of all workpieces in the flexible operation workshop, constructing a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible operation workshop, and forming an individual set by taking the procedure coding sequence and the corresponding machine coding sequence as individuals.
S202, carrying out cross operation on the process coding sequences of any two different individuals in the individual set.
S203, performing cross operation on machine coding sequences of any two different individuals in the individual set.
Step S201 to step S203 refer to the descriptions of step S101 to step S103 of the first embodiment, which are not repeated herein.
S204, carrying out mutation operation on the process coding sequence and carrying out mutation operation on the machine coding sequence.
In step S204, two genes are randomly selected in the process coding sequence for position exchange; randomly selecting one gene in the machine-encoded sequence and replacing the selected gene with the other machine number.
And S205, repeating the steps S202, S203 and S204 until a preset iteration number is reached, stopping iteration, and selecting a process coding sequence and a corresponding machine coding sequence from the obtained individual set as a task scheduling scheme.
S206, uploading the task scheduling scheme to a block chain, so that the block chain encrypts and stores the task scheduling scheme.
Specifically, the corresponding digest information is obtained based on the task scheduling scheme, and specifically, the digest information is obtained by performing hash processing on the task scheduling scheme, for example, by using the sha256s algorithm. Uploading summary information to the blockchain can ensure the safety and the fair transparency of the user. The user equipment may download the summary information from the blockchain to verify whether the task scheduling scheme is tampered with. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Fig. 3 is a schematic structural diagram of a scheduling apparatus based on an improved genetic algorithm according to a third embodiment of the present invention. As shown in fig. 3, the apparatus 30 includes an initial population module 31, a first crossover module 32, a second crossover module 33, and an output module 34.
The initial population module 31 is configured to randomly construct a procedure coding sequence according to procedure data of all workpieces in a flexible job shop, construct a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible job shop, and form an individual set by using the procedure coding sequence and the corresponding machine coding sequence as individuals, where the procedure coding sequence is used to represent an arrangement sequence of processing tasks, and the processing tasks are used to represent each procedure of different workpieces; the machine coding sequence is used for representing the corresponding relation between the processing task and a machine for processing the processing task; the first crossover module 32 is configured to perform crossover operation on process sequence codes of any two different individuals in the individual set, and specifically includes: acquiring a first cross segment of a first procedure coding sequence and a second cross segment of a second procedure coding sequence; matching each gene in a second cross segment in the first process coding sequence, and splicing the second cross segment to the tail end of the first process coding sequence after deleting the matched gene from the first process coding sequence; matching each gene in a first cross segment in the second process coding sequence, and splicing the first cross segment to the tail end of the second process coding sequence after deleting the matched gene from the second process coding sequence; a second crossover module 33, configured to perform a crossover operation on the machine-encoded sequences of any two different individuals in the set of individuals; and the output module 34 is used for repeating the process coding sequence cross operation and the machine coding sequence cross operation until reaching the preset iteration times, stopping iteration, and selecting one process coding sequence and the corresponding machine coding sequence from the obtained individual set as a task scheduling scheme.
Further, the initial population module 31 is further configured to, for a first gene of the procedure coding sequence, respectively obtain load time for each machine to complete a processing task corresponding to the gene, initialize total load time of each machine, select a machine with the smallest sum of the load time and the total load time to complete the processing task, write a number of the machine into a first bit of the machine coding sequence, and update the total load time of each machine; aiming at a second gene of the procedure coding sequence, respectively acquiring the load time of each machine for completing the processing task corresponding to the gene, selecting the machine with the minimum sum of the load time and the total load time for completing the processing task, writing the code of the machine into a second position of the machine coding sequence, and updating the total load time of each machine; repeating the steps until each gene in the process coding sequence is subjected to machine coding, and outputting the machine coding sequence.
Further, the initial population module 31 is further configured to randomly determine, for each gene of the procedure coding sequence, a machine that completes a processing task corresponding to the gene, and generate the machine coding sequence from the machine number according to the sequence of the procedure coding sequence.
Further, the second interleaving module 33 is further configured to set an array having a length identical to that of the machine-encoded sequence, where each digit of the array corresponds to a gene having a same median in the machine-encoded sequence; randomly generating a first value or a second value starting from a first bit of the array; when the value of the corresponding digit in the array is a first numerical value, exchanging the genes of the same digit in the two machine coding sequences; when the value of the corresponding digit in the array is a second value, the same number of genes in both machine-encoded sequences is retained.
Further, the apparatus 30 further comprises a mutation operation module for performing a mutation operation on the process coding sequence and performing a mutation operation on the machine coding sequence. Specifically, the mutation operation module is used for randomly selecting two genes in the process coding sequence for position exchange; randomly selecting one gene in the machine-encoded sequence and replacing the selected gene with the other machine number.
Further, the first crossover module 32 is further configured to randomly determine two processes for the workpiece and the selected workpiece as two crossover points, and to use a segment between the two crossover points in the first process encoding sequence as the first crossover segment.
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. As shown in fig. 4, the electronic device 40 includes a processor 41 and a memory 42 coupled to the processor 41.
The memory 42 stores program instructions for implementing the improved genetic algorithm based scheduling method of any of the above embodiments.
Processor 41 is operative to execute program instructions stored in memory 42 for improved genetic algorithm based scheduling.
The processor 41 may also be referred to as a CPU (Central processing Unit). The processor 41 may be an integrated circuit chip having signal processing capabilities. The processor 41 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a storage medium according to a fifth embodiment of the invention. The storage medium of the embodiment of the present invention, which stores program instructions 51 that can implement all the methods described above, may be either non-volatile or volatile. The program instructions 51 may be stored in the storage medium in the form of a software product, and include several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or terminal devices, such as a computer, a server, a mobile phone, and a tablet.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
While the foregoing is directed to embodiments of the present invention, it will be understood by those skilled in the art that various changes may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A scheduling method based on an improved genetic algorithm is characterized by comprising the following steps:
randomly constructing a procedure coding sequence according to procedure data of all workpieces in a flexible operation workshop, constructing a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible operation workshop, and forming an individual set by taking the procedure coding sequence and the corresponding machine coding sequence as individuals, wherein the procedure coding sequence is used for representing the arrangement sequence of processing tasks, and the processing tasks are used for representing the procedures of different workpieces; the machine coding sequence is used for representing the corresponding relation between the processing task and a machine for processing the processing task;
performing cross operation on process coding sequences of any two different individuals in the individual set, specifically comprising: acquiring a first cross segment of a first procedure coding sequence and a second cross segment of a second procedure coding sequence; matching each gene in a second cross segment in the first process coding sequence, and splicing the second cross segment to the tail end of the first process coding sequence after deleting the matched gene from the first process coding sequence; matching each gene in a first cross segment in the second process coding sequence, and splicing the first cross segment to the tail end of the second process coding sequence after deleting the matched gene from the second process coding sequence;
performing cross operation on machine coding sequences of any two different individuals in the individual set;
and repeating the process coding sequence cross operation and the machine coding sequence cross operation until reaching the preset iteration times, stopping iteration, and selecting one process coding sequence and the corresponding machine coding sequence from the obtained individual set as a task scheduling scheme.
2. The improved genetic algorithm based scheduling method of claim 1, wherein the constructing of the machine code sequence corresponding to the process code sequence from the machine data of the flexible job shop comprises:
aiming at a first gene of the procedure coding sequence, respectively acquiring the load time of each machine for completing the processing task corresponding to the gene, initializing the total load time of each machine, selecting the machine with the smallest sum of the load time and the total load time for completing the processing task, writing the serial number of the machine into the first position of the machine coding sequence, and updating the total load time of each machine;
aiming at a second gene of the procedure coding sequence, respectively acquiring the load time of each machine for completing the processing task corresponding to the gene, selecting the machine with the minimum sum of the load time and the total load time for completing the processing task, writing the code of the machine into a second position of the machine coding sequence, and updating the total load time of each machine;
repeating the steps until each gene in the process coding sequence is subjected to machine coding, and outputting the machine coding sequence.
3. The improved genetic algorithm based scheduling method of claim 1, wherein the constructing of the machine code sequence corresponding to the process code sequence from the machine data of the flexible job shop comprises:
and randomly determining a machine for completing the processing task corresponding to the gene aiming at each gene of the procedure coding sequence, and generating the machine coding sequence by the machine number according to the arrangement sequence of the procedure coding sequence.
4. The improved genetic algorithm based scheduling method of claim 1, wherein said interleaving machine-encoded sequences of any two different individuals of said set of individuals comprises:
setting an array with the length same as that of the machine coding sequence, wherein each digit of the array corresponds to a gene with the same median in the machine coding sequence;
randomly generating a first value or a second value starting from a first bit of the array;
when the value of the corresponding digit in the array is a first numerical value, exchanging the genes of the same digit in the two machine coding sequences; when the value of the corresponding digit in the array is a second value, the same number of genes in both machine-encoded sequences is retained.
5. The improved genetic algorithm based scheduling method of claim 1, wherein said interleaving the machine-encoded sequences of any two different individuals of said set of individuals further comprises:
and (3) carrying out mutation operation on the process coding sequence, and carrying out mutation operation on the machine coding sequence.
6. The improved genetic algorithm based scheduling method of claim 5, wherein said mutating said process coding sequence and said machine coding sequence comprises:
randomly selecting two genes in the process coding sequence for position exchange;
randomly selecting one gene in the machine-encoded sequence and replacing the selected gene with the other machine number.
7. The improved genetic algorithm based scheduling method of claim 1, wherein said obtaining a first cross-section of a first process sequence encoding sequence comprises:
randomly determining two processes of the workpiece and the selected workpiece as two cross points, and taking a segment between the two cross points in the first process coding sequence as the first cross segment.
8. A scheduling apparatus based on an improved genetic algorithm, comprising:
the system comprises an initial population module, a sequence module and a population module, wherein the initial population module is used for randomly constructing a procedure coding sequence according to procedure data of all workpieces in a flexible job shop, constructing a machine coding sequence corresponding to the procedure coding sequence according to machine data of the flexible job shop, and forming an individual set by taking the procedure coding sequence and the corresponding machine coding sequence as individuals, wherein the procedure coding sequence is used for representing the arrangement sequence of processing tasks, and the processing tasks are used for representing each procedure of different workpieces; the machine coding sequence is used for representing the corresponding relation between the processing task and a machine for processing the processing task;
the first crossing module is used for crossing process coding sequences of any two different individuals in the individual set, and specifically comprises: acquiring a first cross segment of a first procedure coding sequence and a second cross segment of a second procedure coding sequence; matching each gene in a second cross segment in the first process coding sequence, and splicing the second cross segment to the tail end of the first process coding sequence after deleting the matched gene from the first process coding sequence; matching each gene in a first cross segment in the second process coding sequence, and splicing the first cross segment to the tail end of the second process coding sequence after deleting the matched gene from the second process coding sequence;
the second cross module is used for carrying out cross operation on machine coding sequences of any two different individuals in the individual set;
and the output module is used for repeating the process coding sequence cross operation and the machine coding sequence cross operation until reaching the preset iteration times, stopping iteration, and selecting one process coding sequence and the corresponding machine coding sequence from the obtained individual set as a task scheduling scheme.
9. An electronic device comprising a processor, and a memory coupled to the processor, the memory storing program instructions executable by the processor; the processor, when executing the program instructions stored in the memory, implements the improved genetic algorithm-based scheduling method of any one of claims 1 to 7.
10. A storage medium having stored therein program instructions which, when executed by a processor, implement the improved genetic algorithm based scheduling method of any one of claims 1 to 7.
CN202011539402.0A 2020-12-23 2020-12-23 Scheduling method, device, equipment and storage medium based on improved genetic algorithm Pending CN112926819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011539402.0A CN112926819A (en) 2020-12-23 2020-12-23 Scheduling method, device, equipment and storage medium based on improved genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011539402.0A CN112926819A (en) 2020-12-23 2020-12-23 Scheduling method, device, equipment and storage medium based on improved genetic algorithm

Publications (1)

Publication Number Publication Date
CN112926819A true CN112926819A (en) 2021-06-08

Family

ID=76162722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011539402.0A Pending CN112926819A (en) 2020-12-23 2020-12-23 Scheduling method, device, equipment and storage medium based on improved genetic algorithm

Country Status (1)

Country Link
CN (1) CN112926819A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113642264A (en) * 2021-10-19 2021-11-12 深圳须弥云图空间科技有限公司 Layout method and device based on genetic algorithm
CN113792927A (en) * 2021-09-16 2021-12-14 北京电子工程总体研究所 Aerospace flexible product process optimization method based on genetic algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070005522A1 (en) * 2005-06-06 2007-01-04 Wren William E Resource assignment optimization using direct encoding and genetic algorithms
CN103870647A (en) * 2014-03-14 2014-06-18 西安工业大学 Operation workshop scheduling modeling method based on genetic algorithm
CN106610654A (en) * 2015-12-29 2017-05-03 四川用联信息技术有限公司 Improved genetic algorithm for flexible workshop scheduling
CN106610653A (en) * 2015-12-25 2017-05-03 四川用联信息技术有限公司 Self-crossover genetic algorithm for solving flexible job-shop scheduling problem

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070005522A1 (en) * 2005-06-06 2007-01-04 Wren William E Resource assignment optimization using direct encoding and genetic algorithms
CN103870647A (en) * 2014-03-14 2014-06-18 西安工业大学 Operation workshop scheduling modeling method based on genetic algorithm
CN106610653A (en) * 2015-12-25 2017-05-03 四川用联信息技术有限公司 Self-crossover genetic algorithm for solving flexible job-shop scheduling problem
CN106610654A (en) * 2015-12-29 2017-05-03 四川用联信息技术有限公司 Improved genetic algorithm for flexible workshop scheduling

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792927A (en) * 2021-09-16 2021-12-14 北京电子工程总体研究所 Aerospace flexible product process optimization method based on genetic algorithm
CN113642264A (en) * 2021-10-19 2021-11-12 深圳须弥云图空间科技有限公司 Layout method and device based on genetic algorithm

Similar Documents

Publication Publication Date Title
CN104268722B (en) Dynamic flexible job-shop scheduling method based on multi-objective Evolutionary Algorithm
CN112926819A (en) Scheduling method, device, equipment and storage medium based on improved genetic algorithm
CN113379087A (en) Production, manufacturing and scheduling optimization method based on improved genetic algorithm
CN110555563B (en) Large-scale steel bar grouping and blanking optimization method and device
CN112559374A (en) Test case sequencing method and electronic equipment
CN111461402B (en) Logistics scheduling optimization method and device, computer-readable storage medium and terminal
CN114186749A (en) Flexible workshop scheduling method and model based on reinforcement learning and genetic algorithm
CN111832101A (en) Construction method of cement strength prediction model and cement strength prediction method
CN103065067B (en) The filter method of sequence fragment and system in short sequence assembling
CN108460463A (en) High-end equipment flow line production dispatching method based on improved adaptive GA-IAGA
CN107831740A (en) A kind of Optimization Scheduling during the distributed manufacturing applied to notebook part
CN114036717A (en) Method and device for determining cutting scheme of steel bar blanking and terminal equipment
CN111915011A (en) Single-amplitude quantum computation simulation method
CN115796510A (en) Multi-target flexible job shop scheduling method based on improved variable neighborhood genetic algorithm
Yin et al. Formation of manufacturing cells based on material flows
JP3524585B2 (en) Program creation device
CN113642264A (en) Layout method and device based on genetic algorithm
CN116451936A (en) Scheduling method, system and storage medium based on genetic algorithm
CN114859832A (en) T-beam production control method and system
CN113112171B (en) Batch scheduling method based on roulette and genetic algorithm
CN115204619A (en) Flexible workshop scheduling method, device and system based on improved genetic algorithm decoding
CN113344350B (en) Intelligent scheduling method, device, equipment and medium for assembly line resources
CN110147804B (en) Unbalanced data processing method, terminal and computer readable storage medium
CN106611267A (en) Hybrid genetic algorithm containing relief operator for multi-objective flexible job shop scheduling problem
JP2008299641A (en) Parallel solving method of simultaneous linear equations and node sequencing method

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
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240528