CN116663660A - One-dimensional blanking method based on genetic evaluation genetic algorithm - Google Patents

One-dimensional blanking method based on genetic evaluation genetic algorithm Download PDF

Info

Publication number
CN116663660A
CN116663660A CN202310652588.8A CN202310652588A CN116663660A CN 116663660 A CN116663660 A CN 116663660A CN 202310652588 A CN202310652588 A CN 202310652588A CN 116663660 A CN116663660 A CN 116663660A
Authority
CN
China
Prior art keywords
gene
genes
chromosome
individual
selecting
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
CN202310652588.8A
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.)
Hebei University of Technology
Original Assignee
Hebei University of Technology
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 Hebei University of Technology filed Critical Hebei University of Technology
Priority to CN202310652588.8A priority Critical patent/CN116663660A/en
Publication of CN116663660A publication Critical patent/CN116663660A/en
Pending legal-status Critical Current

Links

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/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16BBIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
    • G16B20/00ICT specially adapted for functional genomics or proteomics, e.g. genotype-phenotype associations
    • 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)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Biophysics (AREA)
  • Business, Economics & Management (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Strategic Management (AREA)
  • Genetics & Genomics (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Development Economics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Proteomics, Peptides & Aminoacids (AREA)
  • Biotechnology (AREA)
  • Medical Informatics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Game Theory and Decision Science (AREA)
  • Artificial Intelligence (AREA)
  • Physiology (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)

Abstract

The application relates to a one-dimensional blanking method based on a genetic evaluation genetic algorithm, which can intuitively know the constitution of each gene by randomly combining gene materials, simultaneously know how each steel bar is cut, reduce the spending time on decoding, select excellent genes for mutation by scoring each gene in a chromosome, and finally obtain an optimal solution more easily and quickly; by using the new variation mode, the evaluation time of the individual is reduced, and the convergence rate of the algorithm is accelerated.

Description

One-dimensional blanking method based on genetic evaluation genetic algorithm
Technical Field
The method relates to the field of one-dimensional blanking combination optimization, in particular to the research of a genetic algorithm in the field of one-dimensional blanking problems.
Background
With the continuous promotion of industrialization and urbanization in China, more and more fields need steel support, and particularly the use of steel bars is increasing. The optimized material breaking of the reinforcing steel bars refers to the process of reasonably cutting the length of the reinforcing steel bars on the premise of meeting the structural design requirement, so that the waste of the reinforcing steel bars is reduced as much as possible, and the utilization rate of the reinforcing steel bars is improved. The method is characterized in that the optimized steel bar cutting belongs to one-dimensional blanking. The traditional steel bar optimizing and cutting method is to manually calculate the length of each steel bar according to the length requirement on the design drawing, and then cut. The disadvantages of this approach are inefficiency, susceptibility to error, high time and labor costs, and the inability to guarantee optimal solutions. The modern one-dimensional blanking method utilizes a computer technology and an optimization algorithm, and models and calculates the length, the material, the specification and other factors of the steel bars, so that an optimal blanking scheme is obtained, and the waste of the steel bars is reduced.
In recent decades, aiming at the one-dimensional blanking problem, a genetic algorithm is proposed in 1997 in China to solve the one-dimensional blanking problem, and then a hybrid genetic algorithm and an improved adaptive genetic algorithm are proposed. The improved adaptive genetic algorithm of the one-dimensional blanking problem of Wei Liangliang and the like introduces a descending order optimal adaptation strategy, so that the solving precision of the algorithm is improved, and the disadvantage is that the descending order optimal adaptation strategy greatly increases the evaluation time of each individual. After that, domestic scholars Zhou Shenglan et al prove that the genetic algorithm is suitable for large-scale situations in the research of the optimization algorithm of one-dimensional blanking problems, but the genetic algorithm has the defect of being insufficient in the aspect of genetic variation. In recent years, students Li, peng Yaoyao and the like issue an improved hybrid genetic algorithm for solving a one-dimensional blanking problem, a genetic algorithm based on an expansion-contraction mechanism solve the one-dimensional blanking problem and other documents, and the method ensures that population samples are more abundant, an optimal solution is easy to obtain, and the consumption of computer memory resources is increased.
Disclosure of Invention
In order to overcome the defects in the prior art, the application provides a genetic algorithm based on gene evaluation to solve the one-dimensional blanking problem, and the traditional one-dimensional blanking genetic algorithm only pays attention to evaluating the fitness of chromosomes.
The application adopts the technical scheme that:
a one-dimensional blanking method based on a genetic evaluation genetic algorithm, the blanking method comprising the following steps:
s1, inputting the length Len of a raw material and the length l of a required steel bar part 1 ,l 2 ,···,l s Quantity de 1 ,de 2 ,···,de s Iteration round number R, crossover probability p c Probability of variation p m The convergence rate c and the population scale n, wherein the length and the quantity of the parts are in one-to-one correspondence, the length and the quantity information of the usable steel bar parts are called as gene materials, the length of the parts is taken as an element in a gene, and de 1 ,de 2 ,···,de s The values of (a) are all less than or equal to Len, and s is the number of types of the part length;
s2, initializing a population according to the genetic material in the S1, and carrying out random combination coding, wherein the specific process is as follows:
S21、d 1 ,d 2 ,···,d s representing the real-time number of parts with different lengths, and initially letting d 1 ,d 2 ,···,d s Equal to de input in step S1 1 ,de 2 ,···,de s The method comprises the steps of carrying out a first treatment on the surface of the L represents the residual length of the raw material, and is initially made equal to Len;
s22, judging d 1 ,d 2 ,···,d s Which values are greater than 0;
s23, judge l 1 ,l 2 ,···,l s Which values are less than or equal to L;
s24, selecting the genetic material which simultaneously satisfies the step S22 and the step S23;
s25, randomly selecting one l from the results obtained in the step S24 r D, corresponding to it r Subtracting 1 and updating the remaining length of raw material L, i.e. subtracting the length of the selected one part from the remaining length of raw material L;
s26, repeating S22-S25 until the residual length L of the raw material is less than d 1 ,d 2 ,···,d s Not 0 in (B)l 1 ,l 2 ,···,l s Or d 1 ,d 2 ,···,d s All equal to 0, the lengths of the randomly selected parts at the moment are recorded and respectively marked as l x ,l y ,···,l z
S27, selecting l x ,l y ,···,l z The gene is combined with a stable marker bit and a replication marker bit to form a gene of an individual chromosome, the two marker bits are both placed into False when the genes are just combined, and the two marker bits disappear after the genes are disassembled, but elements in the genes do not disappear;
s28, selecting a plurality of raw materials, and repeatedly executing S22-S27 until d 1 ,d 2 ,···,d s All are equal to 0, and the obtained numerous gene combinations become individual chromosomes to realize random combination coding;
s29, executing the steps S21-S28 for n times to finish the initialization of the population, wherein n is the population scale;
s3, according to the cross probability p c Performing cross operation;
s4, scoring each gene of each individual chromosome in the population: finding out genes with all stable marker positions being False in an individual, adding and summing all elements in the genes with all stable marker positions being False into sum, wherein sum is gene score, selecting the gene with the maximum gene score for mutation operation, selecting the minimum gene score in the chromosome of the individual, calculating the fitness value of the individual by using the minimum gene score, and the fitness function f is:
f(k,minsuml)=(k-1)*Len+minsuml
wherein: k is the number of genes in the chromosome of the individual, minsuml is the minimum suml in the chromosome of the individual, and Len is the length of the raw material;
and S5, outputting an optimal solution if the evolution condition is met, and selecting an individual needing to be subjected to the next iteration according to the selection probability according to the fitness value if the evolution condition is not met, wherein the probability of being selected is larger as the fitness value is smaller.
Further, the evolution conditions are: whether the number of iterations R is reached or the stable and replication markers for all genes of all individual chromosomes in the population are all placed as True.
Further, the step S3 includes the following sub-steps:
s31, randomly generating a decimal 0-1, if the randomly generated decimal is smaller than the crossover probability p c S32, S33 are performed if p or more c Nothing is done;
s32, arbitrarily selecting two individuals from the population;
s33, arbitrarily selecting a gene with a stable marker bit of False from two individuals respectively for cross operation;
wherein the cross operation is: if the B genes of the B chromosome are required to be obtained, judging whether all the genes with stable marker positions of False and the a genes in the A chromosome are disassembled to form a crossed B gene, if so, disassembling the genes which can form the B genes in the A chromosome in a small range, and if the disassembled genes can form the B genes in the B chromosome, then not continuing to disassemble the A chromosome; combining a b gene, enabling the stable marker bit and the replication marker bit of the b gene to be False, and combining the disassembled residual gene materials according to the steps S22 to S28 until the disassembled gene materials are used; nothing is done if a crossed b gene cannot be composed; likewise, the same operation is performed on the B chromosome.
Further, the mutation operation includes:
after obtaining each gene score of the chromosome of the individual, the gene scores are arranged from large to small; selecting the gene with the highest gene score, and if a plurality of genes with the same largest suml value exist, selecting one gene; judging whether the selected gene meets the mutation condition, if so, performing mutation operation, otherwise, doing nothing;
wherein the mutation conditions are as follows: firstly judging whether the current iteration round number R is smaller than or equal to R/10, if so, then judging whether the suml value of the selected gene is equal to Len, and if so, performing mutation operation; if the current iteration round number R is larger than R/10, then judging whether the suml value of the selected gene is larger than or equal to L-c R (Len/10), and if so, performing mutation operation; nothing is done in the rest of the cases;
the current iteration round number meets the mutation condition, the stable marker bit and the replication marker bit of the gene to be mutated are both set as True, then all the genes with the stable marker bit being False in the chromosome of the individual are disassembled, then the gene material which is the same as the element in the gene to be mutated is selected from the disassembled gene materials to be replicated, and the stable marker bit and the replication marker bit of the replicated gene are also set as True until the replication is impossible, whether the gene to be mutated can be replicated is mainly judged whether the disassembled gene materials can be combined into the genes with the marker bit being True or not, if the genes can be combined, the genes can be replicated, and if the genes can not be combined, the replication is impossible; the remaining genetic material is combined according to steps S22 to S28 to form a new stable marker and a gene with a replication marker of False, until the disassembled genetic material is used.
Further, the specific process of selecting the individual needing to be subjected to the next iteration according to the fitness value and the selection probability is as follows: ranking fitness values from small to large, determining a selection probability according to a ranking exponential function, the selection probability of the individual chromosome ranked i being pi, where pi = m (1-m) i-1 I=1, 2, the terms, n, m is a constant less than 1, and selecting the individual chromosomes according to the selection probability for iteration.
The m=4/n.
Compared with the prior art, the application has the beneficial effects that:
(1) The traditional one-dimensional blanking genetic algorithm only pays attention to evaluating the fitness of the chromosome, and the optimal solution is easier and faster to finally obtain by scoring each gene in the chromosome and then selecting excellent genes for mutation.
(2) The application adopts a random combination coding mode, improves the coding mode of chromosomes in the traditional one-dimensional blanking genetic algorithm, and avoids the generation of illegal genes. The traditional coding mode is as follows: all raw materials are fed inLine number isLikewise, all parts are numbered +.>Random from->Selecting from the digitsThe numbers forming the individual chromosome code, e.g., (3, 5,2, &. 3) are the individual chromosome code, indicating that part No. 1 is placed on raw material No. 3, part No. 2 is placed on raw material No. 5, part No. 3 is placed on raw material No. 2, … …, part No. 2>The part number 3 is arranged on the raw material number 3. The conventional encoding method can cause huge time consumption during decoding, for example, the cutting mode of each steel bar needs to be known in the process of optimizing and cutting the steel bars, at this time, the chromosome needs to be decoded, and the decoding time complexity and the part number are->Proportional to the ratio. In the application, by randomly combining the genetic materials, the constitution of each gene can be intuitively known, and meanwhile, how each steel bar is cut is also known, so that the time spent on decoding is reduced.
(3) According to the application, through the proposed variation mode, the individual evaluation time is reduced, and the convergence rate of the algorithm is accelerated.
Drawings
FIG. 1 is a one-dimensional blanking method flow chart based on a genetic evaluation algorithm;
FIG. 2 is a schematic diagram of a population chromosome, with the stable and replicative marker bits omitted;
FIG. 3 is a schematic diagram of a chromosome A crossover, in which the stable and replication markers are omitted;
FIG. 4 is a schematic diagram of a B chromosome crossover, with the stable and replicative marker bits omitted;
FIG. 5 is a schematic diagram of a mutation operation, wherein the stable flag bit and the duplication flag bit are omitted;
FIG. 6 is a schematic diagram of one gene in a chromosome.
Detailed Description
The following description of the embodiments of the present application is provided to facilitate understanding of the present application by those skilled in the art, but it should be understood that the present application is not limited to the scope of the embodiments, and all the applications which make use of the inventive concept are protected by the spirit and scope of the present application as defined and defined in the appended claims to those skilled in the art.
As shown in fig. 1, the one-dimensional feeding method based on the genetic evaluation algorithm comprises the steps of S1-S8:
s1, inputting the length Len of a raw material and the length l of a required steel bar part 1 ,l 2 ,···,l s Quantity de 1 ,de 2 ,···,de s Iteration round number R, crossover probability p c Probability of variation p m The convergence rate c and the population scale n, wherein the length and the quantity of the parts are in one-to-one correspondence, the length and the quantity information of the usable steel bar parts are called as gene materials, the length of the parts is taken as an element in a gene, and de 1 ,de 2 ,···,de s The values of (a) are all less than or equal to the length Len (unit cm) of the raw material, and s is the number of types of the part length.
In an alternative embodiment of the present application, let len=1000, l 1 =512、l 2 =321、l 3 =128、l 4 =247、l 5 =290、de 1 =6、de 2 =8、de 3 =5、de 4 =10、de 5 =4、p c =0.2、p m =0.2、n=50、R=300、c=0.01。
S2, initializing the population according to the genetic material in the S1.
In an alternative embodiment of the present application, the initialization operation is performed based on the information in step S1, and the obtained initialization result may be represented in fig. 2.
Step S2 comprises the following sub-steps:
S21、d 1 ,d 2 ,···,d s representing the real-time number of parts with different lengths, and initially letting d 1 ,d 2 ,···,d s Equal to de input in step S1 1 ,de 2 ,···,de s The method comprises the steps of carrying out a first treatment on the surface of the L represents the residual length of the raw material, and is initially made equal to Len;
in an alternative embodiment of the application there are initially 6 512, 8 321, 5 128, 10 247, 4 290 genetic materials.
In an alternative embodiment of the application, let L be equal to 1000 initially.
S22, judging d 1 ,d 2 ,···,d s Which values are greater than 0;
in an alternative embodiment of the application, initially 6, 8, 5, 10, 4 are all greater than 0.
S23, judge l 1 ,l 2 ,···,l s Which values are less than or equal to L;
in an alternative embodiment of the application, initially 512, 321, 128, 247, 290 are all less than 1000.
S24, selecting the genetic material which simultaneously satisfies the step S22 and the step S23;
in an alternative embodiment of the application, initially 6 of 512, 8 of 321, 5 of 128, 10 of 247, 4 of 290 of genetic material are selected.
S25, randomly selecting one l from the results obtained in the step S24 r D, corresponding to it r Subtracting 1 and updating the remaining length of raw material L, i.e. subtracting the length of the selected one part from the remaining length of raw material L, in such a way that l=l-L r
In an alternative embodiment of the present application, initially selected 512, then d 1 1 is reduced to 5, and the raw materials remainThe excess length L minus 512 becomes 488. At this time, the genetic material was changed to 5 pieces 512, 8 pieces 321, 5 pieces 128, 10 pieces 247, 4 pieces 290.
S26, repeating S22-S25 until the residual length L of the raw material is less than d 1 ,d 2 ,···,d s L is not 0 in 1 ,l 2 ,···,l s Or d 1 ,d 2 ,···,d s All equal to 0, the lengths of the randomly selected parts at the moment are recorded and respectively marked as l x ,l y ,···,l z
In an alternative embodiment of the present application, step S22 judges that all of 5, 8, 5, 10, 4 are greater than 0, step S23 judges that 321, 128, 247, 290 are less than 488, step S24 judges that 8 genetic materials of 321, 5, 128, 10, 247, 4, 290 are selected, step S25 selects 321, and d 2 The decrease of 1 was 7, the remaining length L of the raw material was 321 was 167, and at this time, the genetic material was 5 pieces 512, 7 pieces 321, 5 pieces 128, 10 pieces 247, 4 pieces 290. Immediately after S22 judges that all of 5, 7, 5, 10, 4 are greater than 0, S23 judges that 128 is less than 167, S24 judges that 5 gene materials of 128 are selected, S25 selects 128, d 3 The decrease of 1 was changed to 4, and the remaining length L of the raw material was changed to 128 to 39, at which time the genetic material was changed to 5 pieces 512, 7 pieces 321, 4 pieces 128, 10 pieces 247, 4 pieces 290. At this time, the residual length L of the raw material is 39, 512, 321, 128, 247, 290 which is greater than L of 39,1 genes x ,l y ,l z And (5) finishing the selection.
The raw material remaining length L is explained herein as smaller than d 1 ,d 2 ,···,d s L is not 0 in 1 ,l 2 ,···,l s Meaning the minimum of (c). If the remaining length L of the raw material at this time is 250, the genetic material is 2 pieces 512,0 pieces 321,0 pieces 128,0 pieces 247,6 pieces 290, d 1 ,d 2 ,···,d s L is not 0 in 1 ,l 2 ,···,l s The minimum value of (2) is 290, 290 is more than 250, and the l of the selected gene is larger than the minimum value of (2) x ,l y ,···,l z The process ends.
S27, selecting l x ,l y ,···,l z And stable flag bit and replicationThe three parts of the marker bit are combined together to form one gene of the chromosome of the individual, the two marker bits are placed into False when the genes are just combined, and the two marker bits disappear after the genes are disassembled, but l x ,l y ,···,l z Isogenic material does not disappear, where x, y, the value in z is equal to 1, 2. Two marker bits are generated at the time of gene formation and disappear at the time of gene disassembly. In Gene l x ,l y ,···,l z Is arranged according to a randomly selected order.
In an alternative embodiment of the present application, 512, 321, 128, the stable flag bit with a value of False, and the replication flag bit with a value of False are combined into 1 gene, as shown in fig. 6.
S28, selecting a plurality of raw materials, and repeatedly executing S22-S27 until d 1 ,d 2 ,···,d s All equal to 0, and the resulting numerous genes are combined into the chromosome of the individual.
In an alternative embodiment of the application, 1 gene 247, 1 gene 512, 321, 1 gene 321, 247, 1 gene 290, 128, 512 in the chromosome of one individual, 1 gene 247, 128, 1 gene 290, 321, 290, 2 genes 321, 128, 512, 1 gene 512, 247, 1 gene 512, 290, which are combined into one chromosome of the individual.
S29, executing the steps S21-S28 for n times, completing the initialization of the population, and realizing random combination coding, wherein n is the population scale.
S3, according to the cross probability p c And performing a crossover operation.
In an alternative example of the present application, the crossover operation is as shown in fig. 3 and 4.
Step S3 comprises the following sub-steps:
s31, randomly generating a decimal 0-1, if the randomly generated decimal is smaller than the crossover probability p c S32, S33 are performed if p or more c Nothing is done;
in an alternative embodiment of the present application, the fraction randomly generated at this time is 0.18, and it is determined to continue to step S32, S33.
S32, arbitrarily selecting two individuals from the population;
s33, arbitrarily selecting a gene with a stable marker bit of False from two individuals respectively for crossing operation.
Wherein the cross operation is: if the B gene of the chromosome A (figure 3) is to be obtained, the B gene of the chromosome B (figure 4) is to be obtained, judging whether all the genes with stable marker positions of False in the chromosome A and the a gene are disassembled to form a crossed B gene, if so, disassembling the genes which can form the B gene in a small range, and the rest genes are not disassembled. The small range refers to that the judgment can be carried out in a sequential scanning mode during disassembly, and if the selected genes needing to be disassembled can form the b genes, other genes do not need to be disassembled any more, namely, only the genes are disassembled in the small range. And then combining a b gene, enabling the stable marker bit and the replication marker bit of the b gene to be False, and combining the disassembled residual gene materials according to the steps S22 to S28 until the disassembled gene materials are used, wherein if a crossed b gene cannot be formed, nothing is done. Likewise, the same operation is performed on the B chromosome. The operation mode of the application does not generate unqualified genes.
In an alternative embodiment of the application, the 321, 247 gene in chromosome A is swapped with the 321, 321 gene in chromosome B at a certain number of iteration cycles. At this time, it was found that the stable marker bits of 2 genes 321, 128 and 512 in the A chromosome were True, and the stable marker bits of the remaining genes were False without disassembling the two genes. It was found that genes 321, 247 in the A chromosome, 321, 247 can be combined into one 321, 321 gene in a small range. Therefore, genes 321, 247 and 247 in the A chromosome, genes 321, 321 and 247 are disassembled to be combined into 321, 321 and 321 genes which are exchanged, the rest of the genes are combined into 247, 247 and 247 genes, the stable marker positions and the replication marker positions of the 2 genes are set as False, and the genes with other stable marker positions of False in the A chromosome are not disassembled.
The stable marker of all genes of the B chromosome is found to be False, and genes 321, 321 and 321, genes 512 and 247 and genes 247 and 247 can be combined into one exchanged 321, 247 and 247 gene in a small range, so that the three genes are disassembled and combined into 1 321, 247 and 247 gene, 1 321 and 321 gene and 1 512 and 247 gene, the stable marker and the replication marker of the three genes are set to be False, and the genes with other stable markers of False in the B chromosome are not operated.
S4, scoring each gene of each individual chromosome in the population.
Step S4 comprises the following sub-steps:
s41, selecting one individual in the population;
s42, finding out genes with stable marker positions of False in individuals;
s43, element l in the gene obtained in step S42 x ,l y ,···,l z The sum of the values gives sumi, which is the score of the gene, and the larger sumi indicates the easier variation of the gene. The genes obtained in step S29 and the genes obtained after the crossover operation, the stable marker of which is False, were scored.
In an alternative embodiment of the application, genes 321, 128, 512, 321, 247, 290, etc. are scored and the genes 321, 128, 512 are selected for mutation if the sum of the genes 321, 128, 512 is found to be the greatest.
S44, each individual in the population executes steps S42 and S43.
S5, according to the mutation probability p m And performing mutation operation.
In an alternative embodiment of the present application, the mutation operation is shown in fig. 5.
Step S5 comprises the following sub-steps:
s51, selecting one individual in the population;
s52, finding out genes with stable marker positions of False in the chromosome of the individual;
s53, arranging the sums of the genes obtained in the step S52 from large to small;
s54, selecting a gene with the largest suml value, and if a plurality of genes with the same largest suml value exist, selecting one gene;
s55, judging whether the gene obtained in the step S54 meets the mutation condition, if so, performing mutation operation, otherwise, doing nothing;
wherein the mutation conditions are as follows: firstly judging whether the current iteration round number R is smaller than or equal to R/10, if yes, judging whether the sum value of the selected gene is equal to Len, if yes, performing mutation operation, if the current iteration round number R is larger than R/10, then judging whether the sum value of the selected gene is larger than or equal to Len-c R (Len/10), if yes, performing mutation operation, and normally, the larger the iteration round number R is, the smaller the convergence rate c is, and the rest is not performed.
Wherein the mutation operation is as follows: and (3) placing the stable marker bit and the replication marker bit of the genes to be mutated as True, then disassembling all the genes with the stable marker bit being False in the chromosome, then selecting the genes with the stable marker bit and the replication marker bit of the copied genes as True from disassembled genetic materials, and combining the rest genetic materials according to the steps S22 to S28 until the replication is impossible, so as to form new genes with the stable marker bit and the replication marker bit being False until the disassembled genetic materials are used up.
In an alternative embodiment of the present application, the stable marker and the replication marker of 2 genes 247, 247 have been mutated in the previous round, the stable marker and the replication marker have been set to True, and the genes 321, 128, 512 in this round are selected in step S54, and found to satisfy the mutation condition in step S55. At this time, the stable flag bit and the replication flag bit of the genes 321, 128, 512 are set to True. Therefore, all the genes except the 3 genes in the chromosome are disassembled, and the disassembled genetic materials comprise 5 genes 512, 7 genes 321, 4 genes 290, 2 genes 247 and 4 genes 128. Whether the genes to be mutated can be copied mainly is to see whether the disassembled genetic materials can be combined into the genes to be mutated, if the genes can be combined, the genes can be copied, if the genes cannot be combined, the genes cannot be copied, then the genes 321, 128 and 512 are copied according to the minimum number of lengths, the number of copying times is the minimum number of lengths, in an alternative embodiment, the number of copying times is 4, the stable marker bits and the copying marker bits of the copied 4 321, 128 and 512 genes are True, and at the moment, the genetic materials are changed into 1, 512, 3, 321, 4, 290, 2, 247 and 0, 128. The rest of the gene materials are randomly combined into 1 512 gene, 321 gene, 1 290 gene, 247 gene, 1 321 gene, 247 gene, 290 gene and 1 290 gene, 321 gene according to the conditions, but the stable marker bit and the replication marker bit of the genes formed by the genes are False.
S56, each individual chromosome in the population performs steps S52, S53, S54, S55.
And S6, evaluating the fitness of each individual in the population.
In an alternative embodiment of the application, there are 5 genes 321, 128, 512, 2 genes 247, 1 gene 512, 321, 1 gene 290, 247, 1 gene 321, 247, 1 gene 290, 321, and 247 in the chromosome of fig. 5, the minsuml value is 611, 11 genes are in the chromosome of the individual, k=11, and the fitness value is calculated to be 10611.
Step S6 comprises the following sub-steps:
s61, selecting one individual in the population;
s62, substituting the related data of the individual into an fitness function to obtain a fitness value, wherein the fitness function is as follows: f (k, minsuml) = (k-1) len+minsuml, wherein: k is the number of genes in the chromosome of the individual, minsuml is the minimum suml in the chromosome of the individual, and Len is the length of the raw material.
S63, executing step S62 by each individual in the population.
And S7, determining whether to continue evolution, if so, performing selection operation, and then continuing to execute S3, S4, S5, S6 and S7, otherwise, directly executing S8.
In an alternative embodiment of the present application, it is decided to discard the evolution after 300 iterations, and the optimal solution is outputted.
Further, step S7 includes the evolutionary conditions and selection operations:
wherein the evolution conditions are: whether the number of iterations R is reached or the stable and replication markers for all genes of all individual chromosomes in the population are all placed as True.
Wherein the selecting operation is as follows: arranging the obtained fitness values from small to large, and determining the selection probability by using an exponential function according to the ranking, wherein p is i =m·(1-m) i-1 I=1, 2, the terms, n, i represents the ranked i-th individual, p i Representing the probability of selecting the individual ranked i, where m=4/n, n is the population size, and selecting the individual for iteration based on the resulting probability.
S8, outputting an optimal solution.
In an alternative embodiment of the present application, the optimal solution for output is 1 gene 290, 128, 290, 1 gene 290, 321, 128, 2 genes 321, 1 gene 321, 512, 128, 2 genes 247, 2 genes 512, 247, 3 genes 512.
It will be appreciated by those of ordinary skill in the art that the examples described herein are intended to aid the reader in understanding the principles of the application and that the scope of the application is not limited to such specific statements and embodiments. Those of ordinary skill in the art can make various other specific modifications and combinations from the teachings of the present disclosure without departing from the spirit thereof, and such modifications and combinations remain within the scope of the present disclosure.
The application is applicable to the prior art where it is not described.

Claims (6)

1. The one-dimensional blanking method based on the genetic evaluation algorithm is characterized by comprising the following steps of:
s1, inputting the length Len of a raw material and the length l of a required steel bar part 1 ,l 2 ,···,l s Quantity de 1 ,de 2 ,···,de s Iteration round number R, crossover probability p c Probability of variation p m Convergence rate c, population size n, where part lengthCorresponding to the number one by one, namely the length and the number information of the usable steel bar parts are taken as gene materials, the length of the parts is taken as an element in the gene, and de 1 ,de 2 ,···,de s The values of (a) are all less than or equal to Len, and s is the number of types of the part length;
s2, initializing a population according to the genetic material in the S1, and carrying out random combination coding, wherein the specific process is as follows:
S21、d 1 ,d 2 ,···,d s representing the real-time number of parts with different lengths, and initially letting d 1 ,d 2 ,···,d s Equal to de input in step S1 1 ,de 2 ,···,de s The method comprises the steps of carrying out a first treatment on the surface of the L represents the residual length of the raw material, and is initially made equal to Len;
s22, judging d 1 ,d 2 ,···,d s Which values are greater than 0;
s23, judge l 1 ,l 2 ,···,l s Which values are less than or equal to L;
s24, selecting the genetic material which simultaneously satisfies the step S22 and the step S23;
s25, randomly selecting one l from the results obtained in the step S24 r D, corresponding to it r Subtracting 1 and updating the remaining length of raw material L, i.e. subtracting the length of the selected one part from the remaining length of raw material L;
s26, repeating S22-S25 until the residual length L of the raw material is less than d 1 ,d 2 ,···,d s L is not 0 in 1 ,l 2 ,···,l s Or d 1 ,d 2 ,···,d s All equal to 0, the lengths of the randomly selected parts at the moment are recorded and respectively marked as l x ,l y ,···,l z
S27, selecting l x ,l y ,···,l z The gene is combined with a stable marker bit and a replication marker bit to form an individual chromosome, the two marker bits are both placed into False when the genes are just combined, and the two marker bits disappear after the genes are disassembled, but the elements in the genes cannot disappearLoss of function;
s28, selecting a plurality of raw materials, and repeatedly executing S22-S27 until d 1 ,d 2 ,···,d s All are equal to 0, and the obtained numerous gene combinations become individual chromosomes to realize random combination coding;
s29, executing the steps S21-S28 for n times to finish the initialization of the population, wherein n is the population scale;
s3, according to the cross probability p c Performing cross operation;
s4, scoring each gene of each individual chromosome in the population: finding out genes with all stable marker positions being False in an individual, adding and summing all elements in the genes with all stable marker positions being False into sum, wherein sum is gene score, selecting the gene with the maximum gene score for mutation operation, selecting the minimum gene score in the chromosome of the individual, calculating the fitness value of the individual by using the minimum gene score, and the fitness function f is:
f(k,min suml)=(k-1)*Len+min suml
wherein: k is the number of genes in the chromosome of the individual, min sum is the minimum sum in the chromosome of the individual, and Len is the length of the raw material;
and S5, outputting an optimal solution if the evolution condition is met, and selecting an individual needing to be subjected to the next iteration according to the selection probability according to the fitness value if the evolution condition is not met, wherein the probability of being selected is larger as the fitness value is smaller.
2. The one-dimensional blanking method based on a genetic evaluation algorithm according to claim 1, wherein the evolution conditions are: whether the number of iterations R is reached or the stable and replication markers for all genes of all individual chromosomes in the population are all placed as True.
3. The one-dimensional blanking method based on a genetic evaluation algorithm according to claim 1, wherein the step S3 comprises the following sub-steps:
s31, randomly generating a decimal 0-1, if the randomly generated decimal is smaller than the crossover probability p c S32, S33 are performed if p or more c Nothing is done;
s32, arbitrarily selecting two individuals from the population;
s33, arbitrarily selecting a gene with a stable marker bit of False from two individuals respectively for cross operation;
wherein the cross operation is: if the B genes of the B chromosome are required to be obtained, judging whether all the genes with stable marker positions of False and the a genes in the A chromosome are disassembled to form a crossed B gene, if so, disassembling the genes which can form the B genes in the A chromosome in a small range, and if the disassembled genes can form the B genes in the B chromosome, then not continuing to disassemble the A chromosome; combining a b gene, enabling the stable marker bit and the replication marker bit of the b gene to be False, and combining the disassembled residual gene materials according to the steps S22 to S28 until the disassembled gene materials are used; nothing is done if a crossed b gene cannot be composed; likewise, the same operation is performed on the B chromosome.
4. The one-dimensional blanking method based on a genetic evaluation algorithm according to claim 1, wherein the mutation operation includes:
after obtaining each gene score of the chromosome of the individual, the gene scores are arranged from large to small; selecting the gene with the highest gene score, and if a plurality of genes with the same largest suml value exist, selecting one gene; judging whether the selected gene meets the mutation condition, if so, performing mutation operation, otherwise, doing nothing;
wherein the mutation conditions are as follows: firstly judging whether the current iteration round number R is smaller than or equal to R/10, if so, then judging whether the suml value of the selected gene is equal to Len, and if so, performing mutation operation; if the current iteration round number R is larger than R/10, then judging whether the suml value of the selected gene is larger than or equal to L-c R (Len/10), and if so, performing mutation operation; nothing is done in the rest of the cases;
the current iteration round number meets the mutation condition, the stable marker bit and the replication marker bit of the gene to be mutated are both set as True, then all the genes with the stable marker bit being False in the chromosome of the individual are disassembled, then the gene material which is the same as the element in the gene to be mutated is selected from the disassembled gene materials to be replicated, and the stable marker bit and the replication marker bit of the replicated gene are also set as True until the replication is impossible, whether the gene to be mutated can be replicated is mainly judged whether the disassembled gene materials can be combined into the genes with the marker bit being True or not, if the genes can be combined, the genes can be replicated, and if the genes can not be combined, the replication is impossible; the remaining genetic material is combined according to steps S22 to S28 to form a new stable marker and a gene with a replication marker of False, until the disassembled genetic material is used.
5. The one-dimensional blanking method based on a genetic evaluation algorithm according to claim 1, wherein the specific process of selecting the individual to be subjected to the next iteration according to the selection probability according to the fitness value is as follows: ranking the fitness values from small to large, determining a selection probability according to an exponential function for ranking, wherein the selection probability of the ith individual chromosome is p i Wherein p is i =m·(1-m) i-1 I=1, 2, the terms, n, m is a constant less than 1, and selecting the individual chromosomes according to the selection probability for iteration.
6. The one-dimensional blanking method based on a genetic evaluation algorithm according to claim 1, wherein m=4/n.
CN202310652588.8A 2023-06-05 2023-06-05 One-dimensional blanking method based on genetic evaluation genetic algorithm Pending CN116663660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310652588.8A CN116663660A (en) 2023-06-05 2023-06-05 One-dimensional blanking method based on genetic evaluation genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310652588.8A CN116663660A (en) 2023-06-05 2023-06-05 One-dimensional blanking method based on genetic evaluation genetic algorithm

Publications (1)

Publication Number Publication Date
CN116663660A true CN116663660A (en) 2023-08-29

Family

ID=87727473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310652588.8A Pending CN116663660A (en) 2023-06-05 2023-06-05 One-dimensional blanking method based on genetic evaluation genetic algorithm

Country Status (1)

Country Link
CN (1) CN116663660A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117407966A (en) * 2023-12-14 2024-01-16 中国建筑西南设计研究院有限公司 Multi-specification steel bar blanking method and device integrating distributed pruning and genetic algorithm

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117407966A (en) * 2023-12-14 2024-01-16 中国建筑西南设计研究院有限公司 Multi-specification steel bar blanking method and device integrating distributed pruning and genetic algorithm
CN117407966B (en) * 2023-12-14 2024-02-13 中国建筑西南设计研究院有限公司 Multi-specification steel bar blanking method and device integrating distributed pruning and genetic algorithm

Similar Documents

Publication Publication Date Title
CN111832101B (en) Construction method of cement strength prediction model and cement strength prediction method
Zhu et al. DNA sequence compression using adaptive particle swarm optimization-based memetic algorithm
Borodovsky et al. GENMARK: parallel gene recognition for both DNA strands
Yadav et al. An overview of genetic algorithm and modeling
CN109215740A (en) Full-length genome RNA secondary structure prediction method based on Xgboost
CN114186749A (en) Flexible workshop scheduling method and model based on reinforcement learning and genetic algorithm
CN105069220B (en) Microbial fermentation optimization method based on BP neural network immune genetic algorithm
CN112381343B (en) Flexible job shop scheduling method based on genetic-backbone particle swarm hybrid algorithm
CN116663660A (en) One-dimensional blanking method based on genetic evaluation genetic algorithm
CN112580259B (en) Intelligent mine automatic ore blending method and system based on genetic algorithm
CN105975701A (en) Parallel scheduling disassembly path forming method based on mixing fuzzy model
CN108470237A (en) A kind of more preference higher-dimension purpose optimal methods based on coevolution
CN113779842A (en) Reinforcing rib structure layout optimization design method based on genetic algorithm
CN113449930A (en) Optical fiber preform preparation quality prediction method based on BP neural network
US20240211825A1 (en) Job-shop batch scheduling method based on d3qn and genetic algorithm
CN114004341A (en) Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network
CN116705142A (en) Metabolite optimization method based on binary vector particle swarm optimization algorithm and flux balance analysis hybrid algorithm
CN112270962B (en) Method for optimizing reaction transition state by genetic algorithm
CN107451426A (en) A kind of biological multiple sequences alignments method based on multiple target artificial bee colony algorithm
Nie Research on optimizing intelligent test paper forming strategy based on improved genetic algorithms
Zhang et al. Aligning multiple protein sequence by an improved genetic algorithm
CN114023374A (en) DNA channel simulation and coding optimization method and device
Yoon et al. RNA secondary structure prediction using context-sensitive hidden Markov models
CN113111446A (en) Matching method
Chen et al. Improved Genetic Algorithm with Two‐Level Approximation for Truss Optimization by Using Discrete Shape Variables

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