Engineering Design Optimization Method and Device Based on Genetic Algorithm and Surrogate Model

By improving the variation method of the genetic algorithm, the optimization efficiency and effect of the proxy model are improved, the problem of large amount of computation of the proxy model is solved, and the engineering design optimization cycle is shortened.

CN113935235BActive Publication Date: 2025-07-08SYSWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111188161.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-12
Publication Date
2025-07-08
Estimated Expiration
2041-10-12

AI Technical Summary

Technical Problem

In the existing engineering optimization methods, the calculation of establishing and optimizing agent models is large and time-consuming, which leads to a reduction in engineering practicality and limits its application areas.

Method used

The improved genetic algorithm variation method is adopted to increase the variation perturbation value of the design variable in the genetic algorithm, and improve the optimization efficiency and effect of the proxy model, and break out of the local optimal solution.

Benefits of technology

While ensuring global optimization accuracy, it significantly reduces the amount of calculation and shortens the engineering design optimization cycle, making more design work a reality and feasible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113935235B_ABST
    Figure CN113935235B_ABST
Patent Text Reader

Abstract

The present application discloses an engineering design optimization method and device based on a genetic algorithm and a surrogate model. The method includes: constructing a target surrogate model corresponding to an objective function and a constraint surrogate model corresponding to a constraint function based on a sample data set; solving the target surrogate model by using a genetic algorithm, wherein the mutation operation of the genetic algorithm includes: obtaining the fitness of each chromosome in a population S n in the population, determining a mutation perturbation value corresponding to each design variable according to the maximum value, minimum value, the fitness of each chromosome, and the value of each design variable in each chromosome in the fitness, and adding the corresponding mutation perturbation value to each design variable to obtain a mutated chromosome; if the simulation termination condition is not satisfied, adding new samples and updating the target surrogate model and the constraint surrogate model; if the simulation termination condition is satisfied, taking the optimal solution obtained by the solution as the optimization result of the design variable and outputting it.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of simulation optimization, and in particular, to an engineering design optimization method and device based on a genetic algorithm and a surrogate model. Background Art

[0002] For engineering optimization problems, initial sample point data of design variables is generated by an experimental design method, real calculations are performed on the sample points, and a surrogate model is established based on the sample points; then the optimal result based on the surrogate model is found, and real calculations are performed on the optimal result; if the accuracy of the calculation result does not meet the requirements, a new surrogate model is re-established based on the newly added sample points for optimization until the optimal result output by the surrogate model meets the accuracy requirements, and the optimal result output at this time is used as the simulation optimization result of the design variables. However, the computational cost of establishing and optimizing the surrogate model is large, which takes a lot of time, sometimes several weeks or months. Such a design cycle greatly reduces the engineering practicability and limits the application fields of the engineering optimization method. Summary of the Invention

[0003] An embodiment of the present application provides an engineering design optimization method, device, electronic device, and storage medium based on a genetic algorithm and a surrogate model. When using the genetic algorithm to optimize the surrogate model, the mutation method in the genetic algorithm is improved, so that the local optimum can be effectively jumped out during optimization, thereby improving the optimization efficiency and optimization effect of the surrogate model.

[0004] On the one hand, an embodiment of the present application provides an engineering design optimization method based on a genetic algorithm and a surrogate model, including:

[0005] S201. Obtain input parameters required for engineering design optimization, where the input parameters include: at least two design variables to be optimized, and an objective function and a constraint function for the design variables;

[0006] S202. Generate a sample data set, where each sample in the sample data set includes: a set of values of the at least two design variables, and real response values of the objective function and the constraint function obtained based on this set of values;

[0007] S203. Based on the sample data set, construct an objective surrogate model corresponding to the objective function and a constraint surrogate model corresponding to the constraint function;

[0008] S204. Use a genetic algorithm to solve the objective surrogate model to obtain an optimal solution of the objective surrogate model under the constraints of the constraint surrogate model, where the optimal solution includes optimal values of the at least two design variables; where, when performing genetic operations on each generation of population S n to obtain the next generation of population S n+1 when, the population S is processed in the following mannern Perform mutation operations on each chromosome in n to obtain the fitness of each chromosome in population S, determine the maximum fitness and the minimum fitness from the obtained fitness values, and determine the mutation perturbation value corresponding to each design variable in each chromosome according to the maximum fitness, the minimum fitness, the fitness of each chromosome, and the values of each design variable in each chromosome. Add the corresponding mutation perturbation value to each design variable in each chromosome to obtain the mutated chromosome; where population S n includes a preset number of chromosomes, and each chromosome includes a set of values of the at least two design variables;

[0009] S205. Determine whether the simulation termination condition is satisfied. If so, execute step S208; otherwise, execute step S206;

[0010] S206. Add q samples to the sample data set;

[0011] S207. Update the target surrogate model and the constraint surrogate model based on the sample data set after adding the new samples, and return to step S204;

[0012] S208. Output the optimal solution as the optimization result of the design variables.

[0013] On the one hand, an embodiment of the present application provides an engineering design optimization device based on a genetic algorithm and a surrogate model, including:

[0014] An input module for obtaining input parameters required for engineering design optimization, where the input parameters include at least two design variables to be optimized, and an objective function and a constraint function for the design variables;

[0015] An initial sample generation module for generating a sample data set, where each sample in the sample data set includes a set of values of the at least two design variables, and the true response values of the objective function and the constraint function obtained based on this set of values;

[0016] An initial model construction module for constructing a target surrogate model corresponding to the objective function and a constraint surrogate model corresponding to the constraint function based on the sample data set;

[0017] An optimization module for solving the target surrogate model using a genetic algorithm to obtain the optimal solution of the target surrogate model under the constraints of the constraint surrogate model, where the optimal solution includes the optimal values of the at least two design variables; where, for each generation of population S n perform genetic operations to obtain the next generation of population S n+1 when performing genetic operations on population S, the following method is used for population Sn Perform a mutation operation on each chromosome in n to obtain the fitness of each chromosome in population S, determine the maximum fitness and the minimum fitness from the obtained fitness values, and determine the mutation perturbation value corresponding to each design variable in each chromosome based on the maximum fitness, the minimum fitness, the fitness of each chromosome, and the value of each design variable in each chromosome. Add the corresponding mutation perturbation value to each design variable in each chromosome to obtain the mutated chromosome; where population S n includes a preset number of chromosomes, and each chromosome includes a set of values of the at least two design variables;

[0018] A simulation termination judgment module, configured to judge whether the simulation termination condition is satisfied. If so, execute the function of the output module; otherwise, execute the function of the new sample module;

[0019] The new sample module is configured to add q new samples to the sample data set;

[0020] The model update module is configured to update the target surrogate model and the constraint surrogate model based on the sample data set after adding new samples, and return to execute the function of the optimization module;

[0021] The output module is configured to output the optimal solution as the optimization result of the design variables.

[0022] On the one hand, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of any of the above methods are implemented.

[0023] On the one hand, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of any of the above methods are implemented.

[0024] On the one hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various alternative implementations of any of the above TCP transmission performance controls.

[0025] The engineering design optimization method, device, electronic device, and storage medium based on genetic algorithms and surrogate models provided by the embodiments of the present application improve the mutation method in the genetic algorithm when using the genetic algorithm to optimize the surrogate model, thereby effectively jumping out of local optima, improving the optimization efficiency and optimization effect of the surrogate model. While ensuring the design accuracy of global optimization, it realizes a quantitative reduction in the computational workload of traditional simulation optimization methods, greatly shortens the optimization cycle of actual engineering designs, and makes many design tasks that could not be carried out become a reality. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0027] Figure 1 Schematic diagram of the application scenario of the engineering design optimization method based on genetic algorithms and surrogate models provided by the embodiments of the present application;

[0028] Figure 2 Schematic diagram of the flow of the engineering design optimization method based on genetic algorithms and surrogate models provided by an embodiment of the present application;

[0029] Figure 3 Schematic diagram of the flow of generating a sample data set provided by the embodiments of the present application;

[0030] Figure 4 Schematic diagram of the structure of the engineering design optimization device based on genetic algorithms and surrogate models provided by the embodiments of the present application;

[0031] Figure 5 Schematic diagram of the structure of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] The following will describe the embodiments of the present invention in detail with reference to the accompanying drawings.

[0033] It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other; and, based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0034] Note that the following description relates to various aspects of embodiments within the scope of the appended claims. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of the aspects set forth herein can be used to implement an apparatus and / or practice a method. Additionally, this apparatus and / or method can be implemented using other structures and / or functionality in addition to one or more of the aspects set forth herein.

[0035] For ease of understanding, the following explains the terms involved in the embodiments of this application:

[0036] Surrogate model: Generally refers to an approximate mathematical model that can replace those relatively complex and time-consuming numerical analyses during the process of analysis and optimization design. It is also known as a response surface model, approximate model, or meta-model. For a simulation optimization design problem, the numerical analysis program or software can be regarded as an "input-output" system, that is, the objective function and constraint function as output quantities can be regarded as functions of design variables. By establishing surrogate models of the objective function and constraint function with respect to design variables, the optimal point can be predicted quickly. Therefore, the surrogate model method can not only greatly improve the efficiency of optimization design, but also reduce the difficulty of optimization, and is conducive to filtering out numerical noise and realizing parallel optimization design. In the research of surrogate model methods, various surrogate model methods have been developed currently, including polynomial response surface (RSM), Kriging model, radial basis function (RBFs), neural network (NN), support vector regression (SVR), multivariable interpolation and regression (MIR), polynomial chaos expansion (PCE), etc.

[0037] In the research on the reasonable selection of multi-dimensional space sample points, in addition to using classical experimental design methods (such as full factorial, central composite, D-optimization, etc.), modern experimental design methods suitable for computer numerical simulation experiments, such as Latin hypercube sampling (LHS), orthogonal design, and uniform design (UD), have also been developed currently.

[0038] GA (Genetic Algorithm): A search algorithm used in computational mathematics to solve optimization problems and is a type of evolutionary algorithm.

[0039] Fitness function: The evaluation function of the genetic algorithm, used to select the superior and eliminate the inferior in the population. The higher the fitness function value, the easier it is to survive, otherwise it is more likely to be eliminated.

[0040] Population S n: Represents the nth generation in the genetic process. The population of each generation evolves from the population of the previous generation. The population S n can be called the parental generation of population S n+1 , and correspondingly, population S n+1 can be called the offspring generation of population S n .

[0041] Selection operation: It refers to selecting chromosomes with higher quality from the newly obtained chromosomes through genetic evolution and adding them to the next-generation population S n+1 to gradually optimize the chromosome quality in the population. Generally, the probability of a chromosome being selected and inherited to the next generation can be determined through a fitness function, that is, chromosomes with higher fitness can be added to the next-generation population S n+1 , and chromosomes with lower fitness are eliminated. Or, the roulette wheel method can be used to randomly select the chromosomes to be added to the next-generation population S n+1 . The proportion of each chromosome in the roulette wheel can be determined according to the fitness of the chromosome. The higher the fitness of the chromosome, the higher its proportion in the roulette wheel, that is, the higher the probability of being selected.

[0042] Mutation operation: It is to perform genetic mutation on a single chromosome to obtain a new chromosome. For example, mutating the chromosome {p3, q1, x3} means mutating p3, q1, and x3 respectively, and the resulting variable combination is a new individual.

[0043] Crossover operation: It refers to the process of exchanging some genes between two chromosomes in a certain way to form two new chromosomes. For example, if the parental chromosomes are X and Y, and the chromosome length of X is less than or equal to Y, reorder Y, find the nearest neighbor gene corresponding to each gene in X, and then randomly select a point for single-point crossover. For example, when the chromosomes {p3, q1, x3} and {p5, q2, x4} perform crossover, p3 and p2 cross, q1 and q2 cross, and x3 and x4 cross, and the resulting combinations form new individuals.

[0044] The quantity of any element in the attached drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any restrictive meaning.

[0045] Currently, the computational workload of the optimization proxy model is large, which consumes a lot of time, sometimes several weeks or months. Such a design cycle greatly reduces the engineering practicability and limits the application fields of engineering optimization methods.

[0046] To this end, the present application provides an engineering design optimization method based on genetic algorithms and surrogate models. When using genetic algorithms to optimize surrogate models, the mutation method in genetic algorithms is improved. That is, according to the maximum value, minimum value, fitness of each chromosome, and the values of each design variable in each chromosome, the mutation perturbation value corresponding to each design variable in each chromosome is determined, and the corresponding mutation perturbation value is added to each design variable in each chromosome to obtain the mutated chromosome, increasing the diversity when the design variables mutate, effectively jumping out of the local optimum, and thus improving the optimization efficiency and optimization effect of the surrogate model.

[0047] After introducing the design concept of the embodiments of the present application, the following briefly introduces the application scenarios applicable to the technical solutions of the embodiments of the present application. It should be noted that the following introduced application scenarios are only for illustrating the embodiments of the present application rather than limiting. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

[0048] Refer to Figure 1 , which is a schematic diagram of the application scenario of the engineering design optimization method based on genetic algorithms and surrogate models provided by the embodiments of the present application. This application scenario includes a terminal device 101 and a server 102, and the terminal device 101 and the server 102 can be connected through a wireless or wired network. The terminal device 101 includes, but is not limited to, electronic devices such as desktop computers, laptops, and tablets. An application program for simulation optimization is installed inside the terminal device 101. The application program can display a corresponding operation interface through the terminal device 101, and the user configures simulation parameters, selects an optimization method and a surrogate model through the operation interface, and dynamically monitors the simulation process and simulation results in real time. The server 102 mainly provides the computing resources required during the simulation optimization process for the terminal device 101. The server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0049] The engineering design optimization method based on genetic algorithms and surrogate models provided by the embodiments of the present application can be applied to engineering design fields such as aerodynamic optimization design, structural optimization design, missile design, aerospace vehicle design, vehicle design, high-speed train shape optimization design, and multidisciplinary optimization design to optimize various design variables in engineering design, such as engineering design parameters like weight, size, and performance.

[0050] Of course, the method provided by the embodiments of the present application is not limited to Figure 1In the application scenarios shown, it can also be used in other possible application scenarios, and the embodiments of this application do not impose any restrictions. For Figure 1 The functions that can be achieved by each device in the application scenarios shown will be described together in the subsequent method embodiments, and will not be elaborated here for now.

[0051] To further illustrate the technical solutions provided by the embodiments of this application, the following will provide a detailed description in combination with the accompanying drawings and specific implementation manners. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, based on routine or non-creative labor, more or fewer operation steps may be included in the method. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of this application.

[0052] Referring to Figure 2 , the embodiments of this application provide an engineering design optimization method based on genetic algorithms and surrogate models, which can be applied to electronic devices such as terminal devices or servers, and includes the following steps:

[0053] S201. Obtain the input parameters required for engineering design optimization. The input parameters include: at least two design variables to be optimized, as well as the objective function and constraint function for the design variables.

[0054] In specific implementation, the user can input various input parameters required for simulation optimization of specific engineering design problems through the setting interface provided by the terminal device, such as various design variables to be optimized, the objective function describing the design variables, and the constraint function describing the constraint relationship between the design variables. One or more constraint functions can be set according to specific engineering design problems. For example, the configured design variables include a1, a2, a3, and a4, the objective function is f(a1, a2, a3, a4), and the constraint functions are g(a1, a2, a3) and h(a2, a4).

[0055] In practical applications, the input parameters that the user can configure may also include: the optimization target direction (such as maximizing or minimizing), the selection of optimization methods (such as gradient optimization algorithms such as genetic algorithms and quasi-Newton methods), the selection of surrogate models (such as polynomial response surfaces, Kriging models, radial basis functions, etc.), the selection of constraint condition methods (such as the Lagrangian method), the number of optimization iteration steps of the surrogate model, the convergence accuracy of the surrogate model, the associated parameters of the design variables, the value range of the design variables (including the lower limit and upper limit of the design variables), the number of initial sample points, etc. The specific configurable parameters included can be determined according to the functions provided by the application program and the user's selection. For example, when the user selects the genetic algorithm as the optimization method, the parameters required for executing the genetic algorithm can also be configured, including: the number of populations, the number of optimization generations, the lower limit of the mutation probability, the upper limit of the mutation probability, the upper limit of the crossover probability, the lower limit of the crossover probability, etc.

[0056] S202. Generate a sample data set. Each sample in the sample data set includes: a set of values of at least two design variables, and the true response values of the objective function and the constraint function obtained based on this set of values.

[0057] In specific implementation, the DOE experimental design method can be adopted. Based on the design variables in the input parameters and the value ranges of the design variables, a certain number of sample points are randomly generated. The number of sample points is determined by the configured number of initial sample points. For example, the configured design variables include a1, a2, a3, and a4, and the value ranges of a1, a2, a3, and a4 are (0, 1), [1, 10), [2, 100), and [3, 5] respectively, and the number of initial sample points is 20. Then 20 sample points with different values are generated. Each sample point contains a set of values of the 4 design variables a1 to a4. For example, one of the sample points can be {a1 = 0.1, a2 = 3, a3 = 20, a4 = 3}.

[0058] Then, the generated sample points are input into the existing commercial software (such as IDE) for calculating the objective function and the constraint function one by one, and the true response value of the objective function and the true response value of the constraint function corresponding to each sample point are obtained. All sample points and their corresponding true response values are organized into a sample data set. Each sample in the sample data set can be expressed as {a1, a2, a3, a4, f, g, h}, where f represents the true response value of the objective function, and g and h represent the true response values of the constraint function.

[0059] In specific implementation, it is also necessary to perform duplicate removal processing on the samples to ensure that there are no duplicate samples in the sample data set.

[0060] S203. Based on the sample data set, construct an objective surrogate model corresponding to the objective function and a constraint surrogate model corresponding to the constraint function.

[0061] In specific implementation, a surrogate model is established for the objective function to be optimized, denoted as the objective surrogate model, and the model file can be denoted as: optimization.sumo. A surrogate model is established for each constraint function, denoted as the constraint surrogate model, and the model files are respectively: restraint1.sumo, restraint2.sumo, etc. The specific method for constructing the surrogate model is determined by the type of the selected surrogate model. Taking the kriging model as an example, the specific process of constructing the surrogate model can refer to the paper "Research Progress on Kriging Model and Surrogate Optimization Algorithm". The specific construction method is prior art and will not be elaborated here.

[0062] S204. Use the genetic algorithm to solve the target surrogate model to obtain the optimal solution of the target surrogate model under the constraints of the constraint surrogate model. The optimal solution includes the optimal values of at least two design variables.

[0063] Specifically, the genetic algorithm can be used to call the target surrogate model for solution to find the target minimum value while considering the constraint situation. When there are constraints, different constraint surrogate models are called to obtain the optimal solution x of the target surrogate model. opt and input the optimal solution x opt into the target surrogate model to obtain the optimal target value (i.e., the predicted value). .

[0064] The process of using the genetic algorithm to solve the target surrogate model mainly includes the following steps: initializing the initial population S0, cross-selection, mutation selection, crossover operation, mutation operation, generating the offspring population, and finding the optimal chromosome. Specifically, the solution process includes:

[0065] The first step: Generate the initial population S0 of the design variables. The population S0 includes a preset number of chromosomes, and each chromosome includes a set of values of at least two design variables.

[0066] The second step: Perform mutation operation and crossover operation on the population S n to obtain the next-generation population S n+1 , where the initial value of n is 0.

[0067] The third step: Find the optimal chromosome from the population S n+1 .

[0068] The fourth step: Determine whether the termination condition of the genetic algorithm is satisfied. If so, use the optimal chromosome in the population S n+1 as the optimal solution of the target surrogate model; otherwise, increase the value of n by 1 and return to the second step.

[0069] In the above second step, the mutation operation is performed on each chromosome in the population S n in the following way: Obtain the fitness of each chromosome in the population S n , determine the maximum fitness and the minimum fitness from the obtained fitness, and determine the mutation perturbation value corresponding to each design variable in each chromosome according to the maximum fitness, the minimum fitness, the fitness of each chromosome, and the value of each design variable in each chromosome. Add the corresponding mutation perturbation value to each design variable in each chromosome to obtain the mutated chromosome.

[0070] where n is a natural number, and the population S nIt includes a preset number of chromosomes, and each chromosome includes a set of values of at least two design variables. When n = 0, the objective surrogate model and the constraint surrogate model used here are the objective surrogate model and the constraint surrogate model constructed through step S203; when n > 0, the objective surrogate model and the constraint surrogate model used here are the objective surrogate model and the constraint surrogate model obtained through step S207. The mutation perturbation value refers to the value added to the original chromosome when mutating the chromosome to change the chromosome within a reasonable range. Any existing fitness function can be used to calculate the fitness corresponding to the chromosome.

[0071] Specifically, first, according to the maximum fitness, the minimum fitness, and the fitness of each chromosome in the chromosome, the deviation degree of the fitness corresponding to each chromosome is determined; then, for each design variable in the chromosome, based on the value of the design variable in the chromosome, the upper limit value and the lower limit value of the corresponding value range of the design variable, and the deviation degree corresponding to the chromosome, the mutation perturbation value corresponding to the design variable in the chromosome is determined.

[0072] Specifically in implementation, fit k is denoted as the fitness of the k-th chromosome in the population S n fit min is denoted as the minimum fitness in the population S n fit max is denoted as the maximum fitness in the population S n For this reason, step S2042 includes the following steps:

[0073] First, randomly select the values of r and r1 within the range of (0, 1).

[0074] Then, judge whether fit min is equal to fit max ; when fit max ≠fit min , according to the formula t1 = t 3 and obtain the deviation degree t2 of the fitness of the k-th chromosome in the population S n ; when fit max = fit min , the deviation degree t2 of the fitness of the k-th chromosome in the population S n = r 3 .

[0075] Next, judge the size of r1: if r1 ≥ 0.5, then w corresponding to the i-th design variable in the k-th chromosome i = u i + (v i - u i)*(1 - t2), otherwise w i = u i -u i *(1 - t2), where u i = i value -i min , v i = i max -i min , i value is the value of the i-th design variable, and i min is the lower limit value of the value range of the i-th design variable, and i max is the upper limit value of the value range of the i-th design variable.

[0076] Finally, determine the mutation perturbation value W according to the specific value of w: If w i < 0, then for the i-th design variable of the k-th chromosome in the population S n , the mutation perturbation value W i = 0; If 0 ≤ w i ≤ v, then for the i-th design variable of the k-th chromosome in the population S n , the mutation perturbation value W i = w i ; If w i > v i , then for the i-th design variable of the k-th chromosome in the population S n , the mutation perturbation value W i = v i .

[0077] Based on this, assume that the k-th chromosome in the population S n is (a1, a2, a3, a4). After obtaining the mutation perturbation values of a1, a2, a3, and a4 as W1, W2, W3, and W4 respectively through the above steps, the value of this chromosome after mutation is (a1 + W1, a2 + W2, a3 + W3, a4 + W4).

[0078] It should be noted that the embodiments of this application mainly improve the mutation operation in the genetic process, and other steps can follow the processing methods in the existing genetic algorithms and will not be elaborated here.

[0079] S205. Determine whether the simulation termination condition is satisfied. If so, execute step S208; otherwise, execute step S206.

[0080] Among them, the simulation termination conditions include: the error accuracy output by the surrogate model is less than the required value, or the number of iterations reaches the upper limit value of the number of iterations.

[0081] Specifically in implementation, the currently obtained optimal solution x optInput the existing commercial software (such as IDE) for calculating the objective function to obtain the true response value of the objective function, denoted as y opt If |y opt | is less than the preset threshold (such as 0.0001), the error precision output by the surrogate model is Otherwise, the error precision output by the surrogate model is

[0082] S206. Add q samples to the sample data set.

[0083] Among them, the value of q can be set according to actual needs and is not limited here. The selection method of the added samples can also be selected according to actual needs.

[0084] Specifically, select the optimal solution x opt The corresponding y opt , use the surrogate models optimization.sumo, restraint1.sumo, restraint2.sumo..., calculate the expectation of the improvement of the objective function at any sample point x: E[I(x)], and find the sample point x when E[I(x)] is the largest e , substitute the sample point x e into the IDE process to complete the calculation to obtain the target value y e , substitute the sample point x opt , y opt and the sample point x e , y e are added to the sample data set. If the optimization is to find the maximum problem, then the sample point x opt , -y opt and the sample point x e , -y e are added to the sample data set.

[0085] In practical applications, the MSP point addition method can be used to add sample points, or the EI (expected improvement criterion) point addition method can be used to add sample points.

[0086] The MSP criterion minimizes the surrogate model prediction criterion, which is the simplest, most direct, and earliest adopted method. Its principle is to directly find the optimum of the objective function on the surrogate model, and the optimum solution x* of the objective function predicted on the surrogate model can be obtained. Then, precise numerical simulation analysis is carried out on x*, and the results are used as new sample data and added to the existing sample data set, and a new surrogate model is established until the entire optimization process converges.

[0087] The expected improvement criterion is also called the efficient global optimization (EGO) method, which is only applicable to the case of solving the minimum problem by the surrogate model. Therefore, when optimizing the surrogate model by the genetic algorithm above, all are transformed into finding the minimum problem.

[0088] By finding the x corresponding to the maximum value of E[I(x)] as the point to be added. That is:

[0089]

[0090] Among them: when establishing the sample point set of the surrogate model used for the current optimization, the minimum response value is selected as y opt . Selection method: when there is no constraint, the minimum value of the sample response is selected as y opt . When there are constraints, first select the minimum response value that satisfies all the constraint conditions as y opt ; if there are no sample points that satisfy all the constraints, preferentially select the minimum response value that satisfies the most constraint conditions as y opt . is the predicted value of the surrogate model for any x, and s is the standard deviation of optimization.sumo:

[0091] MSE = s 2 (x) = σ 2 {1 - r T R -1 r + (1 - F T R -1 r) 2 / F T R -1 F}

[0092] φ is the probability density of the standard normal distribution:

[0093]

[0094] Φ is the distribution function of the standard normal distribution:

[0095]

[0096] The genetic algorithm (the genetic algorithm is used here) is adopted to find the maximum value of E[I(x)] within the value range of x to obtain x e .

[0097] If the optimization problem has constraints, the processing is as follows: as known from the previous text, each constraint condition has a corresponding surrogate model, that is, restraint1.sumo, restraint2.sumo... The corresponding s1, s2, s3... are obtained by calculating the standard deviation using the above formula. For any x, only for the surrogate model with the constraint condition g(x) ≤ 0, the predicted values of the constraints calculated by each constraint surrogate model are g1, g2, g3... respectively. Suppose there are a total of N c constraint conditions, then the probability that any x satisfies the i-th constraint is:

[0098]

[0099] Then, the EI addition with constraints is to use an optimization algorithm to find the maximum value of the following formula within the range of x values to obtain x e :

[0100]

[0101] The obtained x e Complete the simulation calculation (substitute into the IDE process) to obtain the result y e , that is, the above steps 10 and 11, and add x e and y e to the sample data set.

[0102] S207. Based on the sample data set after adding new samples, update the target surrogate model and the constraint surrogate model, and return to step S204.

[0103] S208. Output the optimal solution as the optimization result of the design variable.

[0104] The engineering design optimization method based on genetic algorithm and surrogate model provided by the embodiments of the present application improves the mutation method in the genetic algorithm when using the genetic algorithm to optimize the surrogate model, increases the diversity during the mutation of design variables, effectively jumps out of the local optimum, and thus improves the optimization efficiency and optimization effect of the surrogate model. When using evolutionary algorithms such as genetic algorithms for optimization, the general computational amount requires thousands of times, while when using the optimization method combining surrogate model and genetic algorithm, the computational amount is generally several hundred times. Therefore, when using the method provided by the present application in engineering design optimization, it can ensure the design accuracy of global optimization while realizing a quantitative reduction in the computational amount of traditional simulation optimization methods, greatly shortening the optimization cycle of actual engineering design, and making many design works that cannot be carried out become a reality.

[0105] On the basis of any of the above embodiments, in the process of solving the target surrogate model using the genetic algorithm, the initial population S0 of design variables is generated in the following manner:

[0106] Step 1. Randomly generate sample points, where the sample points include a set of values of at least two design variables;

[0107] Step 2. Perform numerical analysis on the generated sample points and obtain the corresponding output values. If the output value is the true response value, add the sample point as a chromosome to the initial population S0; if the output value is an outlier, delete the sample point;

[0108] Repeat the above step 1 and step 2 until the number of chromosomes in the initial population S0 reaches the preset number.

[0109] In specific implementation, the sample points can be input into existing commercial software (such as IDE) to obtain the corresponding true response values. If the sample points are unreasonable, the commercial software will return outliers, and the unreasonable sample points need to be removed.

[0110] In order to ensure that the offspring obtained by crossover and mutation are still discrete terms, a binary coding method is used to encode the discrete variables in the chromosome, and the relationship between the binary and the discrete terms of the problem design variables is established. Then, on the basis of binary coding, it is converted into Gray code to increase the probability of jumping out of the local optimum. The continuous design variables in the chromosome can be represented by real number coding, and using real number coding can improve the operation efficiency. Therefore, the optimization simulation method based on genetic algorithm provided by this application supports both the simulation optimization problems of continuous design variables and the simulation optimization problems of discrete design variables, realizing the solution of discrete continuous hybrid problems.

[0111] Specifically, when randomly generating sample points, the following method is used to determine the values of the discrete design variables in the sample points: randomly select a value within the value range of the discrete design variables, convert the selected value into a binary code, and then convert the binary code into Gray code. The conversion between binary code and Gray code is a prior art and will not be elaborated here.

[0112] For example, the design variable randomly takes values between 0 and b i (i = 1, 2, 3…n), and then combines them as a chromosome of the parent generation. For example, the variable x1 randomly takes p3, the variable x2 randomly takes q2, and the corresponding Gray codes are 011 and 01 respectively. Then, according to the order of the design variables, the parent individual is {p3, q2}.

[0113] For discrete design variables, every time a new chromosome is generated, it needs to be compared with the chromosomes that have been generated, and there should be no duplicate chromosomes to ensure the diversity of the population. Therefore, when performing genetic mutation on the chromosome containing discrete design variables, if the new chromosome obtained by genetic mutation is repeated with the chromosome before genetic mutation, the chromosome needs to be re - genetically mutated. In specific implementation, it can be determined whether to check for duplicate chromosomes according to the number of solution spaces and the population size. If the number of solution spaces is greater than 3 times the population size, then it is necessary to check whether there are duplicate chromosomes, otherwise, there is no need to check for duplicate chromosomes.

[0114] When performing crossover operation on the chromosome, it is necessary to perform crossover operation on the design variables in the chromosome one by one. For example, for the chromosomes {p3, q2} and {p5, q1}, p3 and p5 are crossed, and q2 and q1 are crossed, resulting in two new chromosomes. The crossover process of discrete design variables is as follows:

[0115] Perform crossover on the first design variable in the chromosome (i.e., crossover between p3 and p5). Randomly select a position in the Gray code and exchange the information after that position. Note that this position cannot be the last one. For example, if the Gray code of design variable p3 is 011 and the Gray code of design variable p5 is 110, and the selected position is the second one, then exchange the third bits of p3 and p5. The new variables generated by crossover are: 111 and 010. Among them, 111 exceeds the value range of this design variable and needs to be discarded, and the crossover operation needs to be performed again. Perform crossover on the second design variable in the chromosome (crossover between q2 and q1), and the crossover process is the same as described above.

[0116] The mutation process of discrete design variables is as follows: Randomly select a position in the Gray code of the discrete design variable. If this position is 0, change it to 1; if it is 1, change it to 0.

[0117] For the new variables generated during crossover or mutation operations, it is necessary to determine whether the new variables exceed the value range of this design variable. If they exceed the value range, discard the new variables and re - execute the crossover operation or mutation operation.

[0118] Based on any of the above embodiments, the termination condition of the genetic algorithm may include: During the process of using the genetic algorithm to solve the target surrogate model, the absolute value of b is less than the threshold b for p consecutive times th , where the absolute value of b is the absolute value of the difference between the average fitness of population S n+1 and the average fitness of population S n .

[0119] Therefore, after obtaining the next - generation population S n based on population S n+1 , calculate the fitness of each chromosome in population S n+1 and obtain the average fitness of population S n+1 ; calculate the absolute value b of the difference between the average fitness of population S n+1 and the average fitness of population S n ; if the absolute value b obtained in p consecutive generations of genetic processes is less than the threshold b th , then terminate the genetic algorithm, and take the optimal chromosome in population S n+1 as the optimal solution of the target surrogate model; otherwise, continue to perform genetic operations based on population S n+1 .

[0120] The termination condition of the genetic algorithm can also include: The number of genetic operations reaches a preset number. If the absolute value b obtained in p consecutive generations of genetic processes is less than the threshold b th or the number of genetic operations reaches the preset number, then terminate the genetic algorithm, and take population S n+1The optimal chromosome in is used as the optimal solution of the target surrogate model. Otherwise, continue with the population-based S n+1 Perform genetic operations.

[0121] Among them, p, b th , and the values of the preset number of times can be determined according to application requirements and combined with experience. The embodiments of the present application do not make limitations. For example, in some application scenarios, the value of p is 5, and b th The value of is 0.00001, and the value of the preset number of times is 1500.

[0122] By optimizing the convergence judgment criterion of the genetic algorithm (i.e., the termination condition of the genetic algorithm) in the modeling process, automatic convergence judgment can be achieved, the loop can be stopped in time, the time spent on invalid calculations can be reduced, and thus the modeling efficiency can be optimized and improved. For example, setting the number of calculation iterations to 500 requires 500 loops to stop and output the optimal solution. However, using the automatic convergence judgment method provided in the present application, it may meet the stop condition after 100 calculations, end the calculation and output the calculation result, reducing 400 invalid calculations.

[0123] Based on any of the above embodiments, step S207 specifically includes: for each surrogate model, if the surrogate model meets the preset conditions corresponding to the incremental method, update the model parameters of the surrogate model based on the newly added q samples; otherwise, reconstruct the surrogate model based on the sample data set after the newly added samples. Among them, the surrogate model includes a target surrogate model and a constraint surrogate model.

[0124] Before starting each round of model iteration, a suitable method will be selected to update the surrogate model according to the update situation of the previous surrogate model. When the incremental method is selected, only the parameters of the surrogate model are updated based on the newly added q samples this time, and there is no need to reconstruct the surrogate model. This can greatly reduce the amount of calculation and improve the processing efficiency while ensuring the accuracy of the surrogate model; when the reconstruction method is selected, the surrogate model can be reconstructed based on all the samples in the sample data set to ensure the output accuracy of the surrogate model. When the internal matrix scale of the surrogate model is large, reconstructing the model may take several hours or even more than a dozen hours, while using the incremental method to update the model only takes a few seconds. Therefore, while ensuring the design accuracy of global optimization, it is possible to achieve a quantitative reduction in the amount of calculation of traditional simulation optimization methods, greatly reducing the optimization cycle of actual engineering design and making many design tasks that could not be carried out become a reality.

[0125] The reconstruction method in the embodiments of this application refers to: training the surrogate model based on all samples in the sample data set through methods such as maximum likelihood estimation or cross-validation to obtain the optimal model parameters corresponding to the surrogate model. The specific implementation method and steps of the reconstruction method are similar to those of step S203. Taking the kriging model as an example, reconstructing the surrogate model is to find the model parameter θ that maximizes L. The specific process is the prior art and will not be elaborated here.

[0126] The incremental method in the embodiments of this application refers to: on the basis of the existing surrogate model, keeping the model parameter θ unchanged and using the q newly added samples to update the modeling method of the model. Specifically, taking the kriging model as an example, the process of updating the surrogate model by the incremental method mainly includes: calculating the increment of the mathematical expectation value β0 related to the model parameters of the surrogate model based on the q newly added samples, and determining the updated model parameter θ' of the surrogate model based on the increment of β0 and the existing model parameter θ of the surrogate model.

[0127] Taking the kriging model as an example, the principle of the incremental method is as follows:

[0128] Perform Cholesky decomposition on the matrix R:

[0129] R = LL T

[0130] Let F' = L -1 F, y s ' = L -1 y s , where F and y s See the algorithm definition of the surrogate model component. L is an n*n lower triangular matrix.

[0131] Perform QR decomposition on F': F' = QG T , where Q is an n*1 column vector and G T is a real number, then: G T β0 = Q T y s ', and β0 can be obtained.

[0132] Among them, ||||| is to find the norm (square root) and then square.

[0133] In each round of iteration in the surrogate model optimization, the newly added sample point matrix is x (n1) , x (n2) ... x (nh) , where m is the number of design variables. The calculation results corresponding to the sample points are y (n1) , y (n2) ... y (nh) , and they are organized into a matrix: Δy s= [y (n1) , y (n2) …y (nh) T At this time, the matrix R in the agent model operation is as follows:

[0134]

[0135] Wherein, is the R matrix in the agent model in the previous iteration, denoted as R0.

[0136] Let

[0137]

[0138] Then, Perform Cholesky decomposition on R:

[0139]

[0140] Let Then there is: (That is, perform Cholesky decomposition on to obtain L3), then there is:

[0141]

[0142] Let the true response value y of the sample used in the previous iteration s = y s0 , the y' calculated in the previous iteration s = y' s0 , the F' obtained in the previous iteration = F'0, and the corresponding QR decomposition is Then:

[0143] In this round Wherein: Δy s is the vector of the true response values of the newly added sample points.

[0144] In this round Wherein: F0 = [1, 1... 1] T , F0 has n 1s; ΔF = [1, 1... 1] T , ΔF has h 1s.

[0145] Perform QR decomposition on ΔF': It is known that ΔQ is obtained

[0146] Then from the increment △β0 of β0 is obtained

[0147] So:​

[0148] The β0 of this round = the β0 of the previous round + Δβ0

[0149] Of this round y' of this round s - F' of this round * β0 of this round|| 2

[0150] Based on β0 and σ of this round 2 , the updated model parameter θ can be calculated. For the specific calculation formula, refer to the paper "Research Progress of Kriging Model and Surrogate Optimization Algorithm".

[0151] In a possible implementation manner, the preset condition corresponding to the incremental method can be: the proportion of the number of samples in the sample data set that have not participated in reconstructing the surrogate model is not less than the required proportion.

[0152] For example, the preset condition corresponding to the incremental method can be: the first quantity M B and the second quantity M A The ratio of is less than the preset value U. Among them, the first quantity M B is the number of samples in the sample data set that have not participated in reconstructing the surrogate model; the second quantity M A is the number of samples in the sample data set that have participated in reconstructing the surrogate model, that is, the number of samples used when establishing the surrogate model by the reconstruction method for the last time.

[0153] Suppose that 2 samples are added in each cycle of surrogate model optimization, the number of samples in the initial sample data set is 10, and U = 0.25.

[0154] First round: Based on the 10 samples in the initial sample data set, use the reconstruction method to construct a surrogate model. At this time, M A = 10. After the first round, 2 samples are added to the sample data set.

[0155] Second round: Among the samples in the sample data set that have participated in the reconstruction method are 10, and the samples that have not participated in the reconstruction method are 2. Then M A = 10, M B = 2. Therefore, M B / M A = 0.2 < U. Therefore, the surrogate model is updated using the incremental method in the second round. After the second round, 2 samples are added to the sample data set.

[0156] Third round: Since the reconstruction method was only used in the first round, at this time, among the samples in the sample data set that have participated in the reconstruction method are 10, and the 4 samples newly added at the end of the first round and the second round have not participated in the reconstruction of the surrogate model. Then M A = 10, M B= 4, so M B / M A = 0.4 > U, so the surrogate model is updated using the reconstruction method in the third round. At this time, all 14 samples in the sample data set participate in the reconstruction method. After the third round, 2 samples are added to the sample data set.

[0157] Fourth round: 14 samples participated in the reconstruction method in the third round, so M A = 14. The 2 newly added samples after the third round did not participate in the reconstruction method, so M B = 2. Therefore, M B / M A = 2 / 14 < U, so the surrogate model is updated using the incremental method in the fourth round. After the fourth round, 2 samples are added to the sample data set. And so on until the simulation termination condition is met.

[0158] In another possible implementation, the preset condition corresponding to the incremental method can be: the output error of the surrogate model constructed in the previous round is less than the error requirement.

[0159] For example, the preset condition corresponding to the incremental method can be: u sumoi ≤ u TH , where u TH is the preset threshold, y i is the true response value obtained based on the newly added samples, is the predicted value obtained after inputting the newly added samples into the surrogate model, s sumoi is the mean square error of the surrogate model calculated based on the newly added samples. Among them, the value of u TH can be determined according to actual needs combined with experience. For example, the value of u TH can be 3, 5, etc. In practical applications, the newly added samples can be input into existing commercial software for calculating the objective function (such as IDE) to obtain the true response value y i .

[0160] After each round of iteration, new samples are added. Before starting the next round of iteration, for each surrogate model obtained in this round, first calculate the output error of this surrogate model (including the target surrogate model and the constraint surrogate model):

[0161]

[0162] If u sumoi ≤ u TH , then the model parameters of this surrogate model are updated using the incremental method, otherwise the surrogate model is reconstructed using the reconstruction method.

[0163] For example, u THThe value of 1样本1 is 3. The parameters of the target surrogate model f in the previous round are β1 and σ1, the parameters of the constraint surrogate model g are β2 and σ2, and the parameters of the constraint surrogate model h are β3 and σ3. After adding 2 samples and before the next iteration, calculate the output error of the target surrogate model f on the first newly added sample as u 1样本2 = 2, and the output error on the second newly added sample is u 2样本1 = 1.8. Both output errors are less than 3, so the incremental method is used to update the target surrogate model; calculate the output error of the constraint surrogate model g on the first newly added sample as u 2样本2 = 4, and the output error on the second newly added sample is u 3样本1 = 0.6. One of the output errors is greater than 3, so the reconstruction method is used to establish a new constraint surrogate model g; calculate the output error of the constraint surrogate model h on the first newly added sample as u 3样本2 = 6, and the output error on the second newly added sample is u

[0164] = 6. Both output errors are greater than 3, so the reconstruction method is used to establish a new constraint surrogate model h.

[0164] When reconstructing the surrogate model each time, two options of the reconstruction method and the incremental method are provided. Based on the relevant data of the surrogate model constructed in the previous round, it is judged whether the preset conditions corresponding to the incremental method are met; if the preset conditions are met, the incremental method is used to update the surrogate model, that is, only the model parameters of the surrogate model are updated based on the newly added samples, and there is no need to reconstruct the surrogate model; if the preset conditions are not met, a new surrogate model is reconstructed based on all the samples in the sample data set after adding the newly added samples. Among them, the preset conditions can be: the output error of the surrogate model constructed in the previous round is less than the error requirement, or the proportion of the number of samples in the sample data set that did not participate in reconstructing the surrogate model is not less than the proportion requirement. Therefore, in the case where the output error of the surrogate model is small or the proportion of samples that did not participate in reconstructing the surrogate model is small, choosing the incremental method to update the model parameters of the surrogate model can greatly reduce the calculation amount and improve the processing efficiency on the premise of ensuring the accuracy of the surrogate model; while in the case where the output error of the surrogate model is large or the proportion of samples that did not participate in reconstructing the surrogate model is large, a new surrogate model is reconstructed based on all the samples in the sample data set to ensure the output accuracy of the surrogate model.

[0165] On the basis of any of the above embodiments, referring to Figure 3

[0166] S301. Divide the value range corresponding to each design variable into a intervals, randomly select a value from each interval of each design variable, and thus obtain a sample point set containing a sample points, where each sample point includes a set of values of at least two design variables.

[0167] For example, if the design variables include a1, a2, and a3, and the number of sample points is 10, then the value range of a1 is divided into 10 intervals, and one value is taken from each interval to obtain a 1,1 、a 1,2 ……a 1,10 ; in the same way, 10 values of a2, namely a 2,1 、a 2,2 ……a 2,10 are obtained, and 10 values of a3, namely a 3,1 、a 3,2 ……a 3,10 are obtained. Then, the 10 values of a1, a2, and a3 are randomly combined to obtain 10 sample points.

[0168] S302. For any sample point in the sample point set, perform numerical analysis on the sample point to obtain the corresponding output value. If the output value is the true response value, add the sample point and the corresponding true response value as a sample to the sample data set, and delete the sample point from the sample point set. If the output value is an outlier, delete the sample point.

[0169] Specifically, the sample point can be input into existing commercial software (such as IDE) to obtain the corresponding true response value. If the sample point is unreasonable, the commercial software will return an outlier, and the unreasonable sample point needs to be removed.

[0170] S303. Determine whether the number b of samples in the sample data set is equal to a. If so, execute step S203; otherwise, execute step S304.

[0171] S304. Divide the value range corresponding to each design variable into (a - b) intervals, randomly take one value from each interval of each design variable, and then obtain (a - b) sample points and add them to the sample point set, and then execute step S305.

[0172] S305. For any sample point in the sample point set, perform numerical analysis on the any sample point to obtain the corresponding output value. If the output value is the true response value, add the any sample point and the corresponding true response value as a sample to the sample data set, and delete the any sample point from the sample point set. If the output value is an outlier, delete the any sample point.

[0173] S306. Remove duplicates from the samples in the sample data set, and return to step S303.

[0174] When reselecting sample points, re - divide the spatial domain to ensure the diversity of the selected sample points.

[0175] For example Figure 4As shown, based on the same inventive concept as the above engineering design optimization method based on genetic algorithm and surrogate model, an embodiment of the present application further provides an engineering design optimization device 40 based on genetic algorithm and surrogate model, including:

[0176] An input module 401, configured to obtain input parameters required for engineering design optimization, where the input parameters include: at least two design variables to be optimized, and an objective function and a constraint function for the design variables;

[0177] An initial sample generation module 402, configured to generate a sample data set, where each sample in the sample data set includes: a set of values of the at least two design variables, and true response values of the objective function and the constraint function obtained based on this set of values;

[0178] An initial model construction module 403, configured to construct an objective surrogate model corresponding to the objective function and a constraint surrogate model corresponding to the constraint function based on the sample data set;

[0179] An optimization module 404, configured to solve the objective surrogate model by using a genetic algorithm to obtain an optimal solution of the objective surrogate model under the constraint of the constraint surrogate model, where the optimal solution includes optimal values of the at least two design variables; wherein, when performing genetic operations on each generation of population S n to obtain the next generation of population S n+1 a mutation operation is performed on each chromosome in the population S n in the following manner: obtaining the fitness of each chromosome in the population S n determining the maximum fitness and the minimum fitness from the obtained fitnesses, determining a mutation perturbation value corresponding to each design variable in each chromosome according to the maximum fitness, the minimum fitness, the fitness of each chromosome, and the value of each design variable in each chromosome, and adding the corresponding mutation perturbation value to each design variable in each chromosome to obtain a mutated chromosome; wherein the population S n includes a preset number of chromosomes, and each chromosome includes: a set of values of the at least two design variables;

[0180] A simulation termination determination module 405, configured to determine whether a simulation termination condition is satisfied. If so, execute the function of the output module 408; otherwise, execute the function of the new sample module 406;

[0181] A new sample module 406, configured to add q samples to the sample data set;

[0182] The model update module 407 is used to update the target proxy model and the constraint proxy model based on the sample data set after adding new samples, and return to execute the function of the optimization module 404;

[0183] The output module 408 is used to output the optimal solution as the optimization result of the design variables.

[0184] In a possible implementation manner, the optimization module 404 is specifically used for:

[0185] When fit max ≠fit min , according to the formula t1 = t 3 and t2 = r t1 , obtain the deviation degree t2 of the fitness of the k-th chromosome in the population S n , where fit k is the fitness of the k-th chromosome in the population S n , fit min is the minimum fitness in the population S n , fit max is the maximum fitness in the population S n ;

[0186] If r1 ≥ 0.5, then for the w i corresponding to the i-th design variable in the k-th chromosome, w i = u i +(v i -u i )*(1 - t2), otherwise w i = u i -u i *(1 - t2), where u value = i min -i i , v max = i min -i value is the value of the i-th design variable, i min is the lower limit value of the value range of the i-th design variable, i max is the upper limit value of the value range of the i-th design variable, r and r1 are random numbers in (0, 1);

[0187] If w i < 0, then the mutation perturbation value W n of the i-th design variable of the k-th chromosome in the population S i = 0;

[0188] If 0 ≤ w i ≤ v, then the population S nThe mutation perturbation value W of the i-th design variable of the k-th chromosome in i = w i ;

[0189] If w i > v i , then for the k-th chromosome in population S n the mutation perturbation value W of the i-th design variable i = v i .

[0190] In a possible implementation, when fit max = fit min , the deviation degree t2 of the k-th chromosome in population S n = r 3 .

[0191] In a possible implementation, the optimization module 404 is further configured to: after obtaining the next-generation population S n based on population S n+1 , calculate the fitness of each chromosome in population S n+1 and obtain the average fitness of population S n+1 ; calculate the absolute value b of the difference between the average fitness of population S n+1 and the average fitness of population S n ; if the absolute value b obtained in p consecutive generations of the genetic process is less than the threshold b th , then terminate the genetic algorithm, and use the optimal chromosome in population S n+1 as the optimal solution of the target surrogate model, otherwise, continue to perform genetic operations based on population S n+1 .

[0192] In a possible implementation, the optimization module 404 is further configured to generate an initial population S0 of design variables in the following manner:

[0193] Step 1: Randomly generate sample points, where the sample points include a set of values of the at least two design variables;

[0194] Step 2: Perform numerical analysis on the sample points and obtain the corresponding output values. If the output value is the true response value, add the sample point as a chromosome to the initial population S0. If the output value is an outlier, delete the sample point;

[0195] Repeat the above Step 1 and Step 2 until the number of chromosomes in the initial population S0 reaches the preset number.

[0196] In a possible implementation, the optimization module 404 is further configured to, when randomly generating sample points, determine the values of the discrete design variables in the sample points in the following manner: randomly select a value within the value range of the discrete design variables, convert the selected value into a binary code, and then convert the binary code into a Gray code.

[0197] In a possible implementation, the optimization module 404 is further configured to, when performing genetic variation on a chromosome containing discrete design variables, if the new chromosome obtained through genetic variation duplicates the chromosome before genetic variation, re-perform genetic variation on the chromosome.

[0198] In a possible implementation, the model update module 407 is specifically configured to, for each surrogate model, if the surrogate model meets the preset conditions corresponding to the incremental method, update the model parameters of the surrogate model based on the newly added q samples, and return to execute the functions of the optimization module 404; otherwise, re-construct the surrogate model based on the sample data set after the newly added samples, and return to execute the functions of the optimization module 404; wherein, the surrogate models include the target surrogate model and the constraint surrogate model.

[0199] In a possible implementation, the model update module 407 is specifically configured to: for each surrogate model, calculate the increment of the mathematical expectation value β0 related to the model parameters of the surrogate model based on the newly added q samples, and determine the updated model parameters θ' of the surrogate model based on the increment of β0 and the existing model parameters θ of the surrogate model; wherein, the surrogate models include the target surrogate model and the constraint surrogate model.

[0200] In a possible implementation, the preset conditions corresponding to the incremental method are: the ratio of the first quantity to the second quantity is less than a preset value, wherein the first quantity is the number of samples in the sample data set that did not participate in the re-construction of the surrogate model, and the second quantity is the number of samples in the sample data set that participated in the re-construction of the surrogate model.

[0201] In a possible implementation, the preset conditions corresponding to the incremental method are: u sumoi ≤u TH wherein, u TH is a preset threshold, y i is the true response value obtained based on the newly added samples, is the predicted value obtained by inputting the newly added samples into the surrogate model, s sumoi is the mean square error of the surrogate model calculated based on the newly added samples.

[0202] In a possible implementation, the initial sample generation module 402 is specifically configured to:

[0203] S301. Divide the value range corresponding to each design variable into a intervals, randomly select a value from each interval of each design variable, and thus obtain a set of sample points containing a sample points, where each sample point includes a set of values of the at least two design variables;

[0204] S302. For any sample point in the set of sample points, perform numerical analysis on the any sample point and obtain the corresponding output value. If the output value is the true response value, then use the any sample point and the corresponding true response value as a sample and add it to the sample data set, and delete the any sample point from the set of sample points. If the output value is an outlier, then delete the any sample point;

[0205] S303. Determine whether the number b of samples in the sample data set is equal to a. If so, execute step S203; otherwise, execute step S304;

[0206] S304. Divide the value range corresponding to each design variable into (a - b) intervals, randomly select a value from each interval of each design variable, and thus obtain (a - b) sample points and add them to the set of sample points, and then execute step S305;

[0207] S305. For any sample point in the set of sample points, perform numerical analysis on the any sample point and obtain the corresponding output value. If the output value is the true response value, then use the any sample point and the corresponding true response value as a sample and add it to the sample data set, and delete the any sample point from the set of sample points. If the output value is an outlier, then delete the any sample point;

[0208] S306. Remove duplicates from the samples in the sample data set, and return to step S303.

[0209] The engineering design optimization device based on the genetic algorithm and the surrogate model provided by the embodiments of the present application adopts the same inventive concept as the above-mentioned engineering design optimization method based on the genetic algorithm and the surrogate model, and can achieve the same beneficial effects, which will not be elaborated here.

[0210] Based on the same inventive concept as the above-mentioned engineering design optimization method based on the genetic algorithm and the surrogate model, the embodiments of the present application also provide an electronic device, which can specifically be a control device or a control system inside a smart device, or an external device communicating with the smart device, such as a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), a server, etc. For example Figure 5As shown, the electronic device 50 may include a processor 501 and a memory 502.

[0211] The processor 501 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0212] The memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory may include at least one type of storage medium, for example, it may include flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, and so on. The memory is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0213] Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments. The above computer storage medium can be any available medium or data storage device accessible by a computer, including but not limited to: removable storage devices, random access memory (RAM), magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid state drives (SSD)), etc., all kinds of media that can store program codes.

[0214] Alternatively, if the above integrated units of the present application are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application essentially or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present application. And the aforementioned storage medium includes: removable storage devices, random access memory (RAM), magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid state drives (SSD)), etc., all kinds of media that can store program codes.

[0215] As mentioned above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. An engineering design optimization method based on genetic algorithm and surrogate model, characterized in that, Including: S201. Obtain input parameters required for engineering design optimization, where the input parameters include: at least two design variables to be optimized, and an objective function and a constraint function for the design variables; S202. Generate a sample data set, where each sample in the sample data set includes: a set of values of at least two design variables, and true response values of the objective function and the constraint function obtained based on this set of values; S203. Based on the sample data set, construct an objective surrogate model corresponding to the objective function and a constraint surrogate model corresponding to the constraint function; S204. Use a genetic algorithm to solve the target surrogate model to obtain the optimal solution of the target surrogate model under the constraints of the constraint surrogate model. The optimal solution includes the optimal values of the at least two design variables. Among them, when performing genetic operations on each generation of population S n to obtain the next generation of population S n+1 , the mutation operation is performed on each chromosome in the population S n in the following way: Obtain the fitness of each chromosome in the population S n , determine the maximum fitness and the minimum fitness from the obtained fitness values. According to the maximum fitness, the minimum fitness, the fitness of each chromosome, and the values of each design variable in each chromosome, determine the mutation perturbation value corresponding to each design variable in each chromosome, and add the corresponding mutation perturbation value to each design variable in each chromosome to obtain the mutated chromosome. Among them, the population S n includes a preset number of chromosomes, and each chromosome includes a set of values of the at least two design variables. S205. Determine whether the simulation termination condition is satisfied. If so, execute step S208; otherwise, execute step S206; S206. Add q samples to the sample data set; S207. Based on the sample data set after adding the new samples, update the objective surrogate model and the constraint surrogate model, and return to step S204; S208. Output the optimal solution as the optimization result of the design variables; Determining the mutation perturbation value corresponding to each design variable in each chromosome according to the maximum fitness, the minimum fitness, the fitness of each chromosome, and the value of each design variable in each chromosome includes: When fit max ≠ fit min , according to the formula t1 = t 3 and obtain the deviation degree t2 of the fitness of the k-th chromosome in the population S n , where fit k is the fitness of the k-th chromosome in the population S n , fit min is the minimum fitness in the population S n , and fit max is the maximum fitness in the population S n ; If r1 ≥ 0.5, then w corresponding to the i-th design variable in the k-th chromosome i = u i + (v i - u i ) * (1 - t2), otherwise w i = u i - u i * (1 - t2), where u i = i value - i min , v i = i max - i min , i value is the value of the i-th design variable, i min is the lower limit value of the value range of the i-th design variable, i max is the upper limit value of the value range of the i-th design variable, r and r1 are random numbers in (0, 1); If w i < 0, then the mutation perturbation value W n of the i-th design variable of the k-th chromosome in population S i = 0; If 0 ≤ w i ≤ v i , then for the k-th chromosome in population S n , the mutation perturbation value W of the i-th design variable i = w i ; If w i > v i , then the mutation perturbation value W n of the i-th design variable of the k-th chromosome in population S i = v i .

2. The method according to claim 1, wherein When fit max = fit min the deviation degree t2 of the k-th chromosome in population S n is r 3 .

3. The method according to claim 1, characterized in that After obtaining the next-generation population S based on population S n obtain the next-generation population S n+1 the method further includes: Calculate the fitness of each chromosome in population S n+1 and obtain the average fitness of population S n+1 ; Calculate the average fitness of population S n+1 and the absolute value b of the difference between the average fitness of population S n and the average fitness of population S; If the absolute value b obtained in the continuous p-generation genetic process is less than the threshold b th , the genetic algorithm is terminated, and the optimal chromosome in the population S n+1 is used as the optimal solution of the target surrogate model. Otherwise, continue the genetic process based on the population S n+1 .

4. The method according to any one of claims 1 to 3, characterized in that, Generating an initial population S0 of design variables in the following manner: Step 1. Randomly generate sample points, where the sample points include a set of values of the at least two design variables; Step 2. Perform numerical analysis on the sample points and obtain corresponding output values. If the output value is a true response value, add the sample point as a chromosome to the initial population S0. If the output value is an outlier, delete the sample point; Repeat the above Step 1 and Step 2 until the number of chromosomes in the initial population S0 reaches the preset number.

5. The method according to claim 4, wherein When randomly generating sample points, determine the values of discrete design variables in the sample points in the following manner: Randomly select a value within the value range of the discrete design variable, convert the selected value into a binary code, and then convert the binary code into a Gray code.

6. The method according to claim 5, wherein The method further includes: When performing genetic mutation on a chromosome containing discrete design variables, if the new chromosome obtained through genetic mutation is the same as the chromosome before genetic mutation, re-perform genetic mutation on the chromosome.

7. An engineering design optimization device based on a genetic algorithm and a surrogate model, characterized in that, Including: An input module, configured to obtain input parameters required for engineering design optimization, where the input parameters include: at least two design variables to be optimized, and an objective function and a constraint function for the design variables; An initial sample generation module, configured to generate a sample data set, where each sample in the sample data set includes: a set of values of at least two design variables, and true response values of the objective function and the constraint function obtained based on this set of values; An initial model construction module, configured to construct an objective surrogate model corresponding to the objective function and a constraint surrogate model corresponding to the constraint function based on the sample data set; Optimization module, which is used to solve the target surrogate model by using a genetic algorithm to obtain the optimal solution of the target surrogate model under the constraint of the constraint surrogate model, and the optimal solution includes the optimal values of the at least two design variables; wherein, when performing genetic operations on each generation of population S n to obtain the next generation of population S n+1 at this time, the mutation operation is performed on each chromosome in the population S n in the following way: obtain the fitness of each chromosome in the population S n , determine the maximum fitness and the minimum fitness from the obtained fitnesses, and determine the mutation perturbation value corresponding to each design variable in each chromosome according to the maximum fitness, the minimum fitness, the fitness of each chromosome, and the value of each design variable in each chromosome, and add the corresponding mutation perturbation value to each design variable in each chromosome to obtain the mutated chromosome; wherein, the population S n includes a preset number of chromosomes, and each chromosome includes: a set of values of the at least two design variables; A simulation termination judgment module, configured to determine whether the simulation termination condition is satisfied. If so, execute the function of the output module; otherwise, execute the function of the new sample addition module; A new sample module for adding q samples to the sample data set; A model update module for updating the target proxy model and the constraint proxy model based on the sample data set after adding new samples, and returning to execute the function of the optimization module; An output module for outputting the optimal solution as the optimization result of the design variables; Specifically, the optimization module is used for: When fit max ≠ fit min , according to the formula t1 = t 3 and obtain the deviation degree t2 of the fitness of the k-th chromosome in the population S n , where fit k is the fitness of the k-th chromosome in the population S n , fit min is the minimum fitness in the population S n , and fit max is the maximum fitness in the population S n ; If r1 ≥ 0.5, then w corresponding to the i-th design variable in the k-th chromosome i = u i + (v i - u i ) * (1 - t2), otherwise w i = u i - u i * (1 - t2), where u i = i value - i min , v i = i max - i min , i value is the value of the i-th design variable, i min is the lower limit value of the value range of the i-th design variable, i max is the upper limit value of the value range of the i-th design variable, r and r1 are random numbers in (0, 1); If w i <0, then the mutation perturbation value W n of the i-th design variable of the k-th chromosome in the population S i = 0; If 0 ≤ w i ≤ v i , then for the k-th chromosome in population S n , the mutation perturbation value W of the i-th design variable is i = w i ; If w i > v i , then the mutation perturbation value W n of the i-th design variable of the k-th chromosome in population S i = v i .

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Engineering design optimization method and device based on proxy model and electronic equipment

    CN113821983A