Simulation model construction method, device, equipment and medium based on particle swarm optimization
Through the particle swarm optimization method, the structural and functional factors of the simulation model are optimized, which solves the problem that model accuracy depends on input parameters in the prior art, and achieves higher model accuracy and reliability.
Patent Information
- Application Number
- CN202510052020.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2045-01-14
AI Technical Summary
In the existing simulation model construction methods, the model accuracy is highly dependent on the accuracy of input parameters, which leads to the model that may deviate from the actual situation when it is difficult to obtain accurate data.
Using a particle swarm optimization method, an initial simulation model is constructed by obtaining the object characteristics of the object to be modeled and divided into sub-objects. Then, the model is optimized based on the structural influence factor of the sub-object to obtain a second simulation model. Next, the functional influencing factor is optimized using the particle swarm optimization algorithm, and the second simulation model is further optimized based on the optimized factors to obtain the final simulation model.
On the premise of reducing the dependence on parameter accuracy, the accuracy of simulation model construction is improved and the stability and reliability of the model are enhanced.
Smart Images

Figure CN119476049B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation technology, and in particular to a simulation model construction method, device, equipment and medium based on particle swarm optimization. Background Art
[0002] Simulation model building plays a key role in many fields. It can simulate the behavior and process of real systems through virtual environments, helping decision makers predict the performance of the system in advance, so as to evaluate the feasibility and effectiveness of different solutions without actual implementation. Whether it is process optimization in industrial production, traffic flow prediction in urban planning, or aircraft design verification in the aerospace field, simulation models provide strong support for reducing costs, improving efficiency, and enhancing system reliability. They are an indispensable means for modern scientific research and engineering practice.
[0003] Today's simulation model building technologies are rich and varied and continue to improve. Traditional numerical calculation methods play a fundamental role in many scientific computing scenarios, while emerging computer simulation technologies such as agent-based modeling can simulate complex social behaviors, virtual reality technology can create an immersive simulation experience, and big data-driven modeling methods can use massive data to improve the accuracy and adaptability of models. These technologies have greatly expanded the construction capabilities and application scenarios of simulation models.
[0004] However, in the prior art, the accuracy of the model is highly dependent on the accuracy of the input parameters and the rationality of the assumptions. However, it is often difficult to obtain accurate data, which may cause the model to deviate from the actual situation. Summary of the invention
[0005] The present invention provides a simulation model construction method, device, electronic device and storage medium based on particle swarm optimization to solve the problem that the model accuracy is highly dependent on the accuracy of input parameters in the existing simulation model construction method.
[0006] In a first aspect, the present invention provides a method for constructing a simulation model based on particle swarm optimization, comprising:
[0007] Obtaining object features of the object to be modeled;
[0008] Constructing a first simulation model of the object to be modeled based on the object features, and dividing the object to be modeled into a plurality of sub-objects based on a pre-set division rule;
[0009] Determining a structural influence factor of each sub-object based on the sub-object characteristics of the sub-object, and optimizing the first simulation model based on all the structural influence factors to obtain a second simulation model;
[0010] Based on the object characteristics, multiple functional influencing factors of the object to be modeled are determined, and each functional influencing factor is optimized based on the particle swarm optimization algorithm. Based on all the optimized functional influencing factors, the second simulation model is optimized to obtain a simulation model of the object to be modeled.
[0011] In a second aspect, the present invention provides a simulation model construction device based on particle swarm optimization, comprising:
[0012] An acquisition module, used for acquiring object features of an object to be modeled;
[0013] A division module, used for constructing a first simulation model of the object to be modeled based on the object features, and dividing the object to be modeled into a plurality of sub-objects based on a preset division rule;
[0014] A structure optimization module, used for determining a structure influence factor of each sub-object based on the sub-object characteristics of the sub-object, and optimizing the first simulation model based on all the structure influence factors to obtain a second simulation model;
[0015] The function optimization module is used to determine multiple function influencing factors of the object to be modeled based on the object characteristics, and optimize each function influencing factor based on the particle swarm optimization algorithm, and optimize the second simulation model based on all the optimized function influencing factors to obtain the simulation model of the object to be modeled.
[0016] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the first aspect or any possible implementation method of the first aspect are implemented.
[0017] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the first aspect or any possible implementation method of the first aspect.
[0018] The present invention provides a simulation model construction method, device, electronic device and storage medium based on particle swarm optimization. A first simulation model is constructed by object features of an object to be modeled, and the object to be modeled is divided into multiple sub-objects according to preset rules. The first simulation model is further optimized according to the structural influence factor of each sub-object to obtain a second simulation model. After obtaining the second simulation model, multiple functional influence factors are determined according to the object features, and the functional influence factors are optimized by a particle swarm optimization algorithm. The second simulation model is optimized according to the optimized functional influence factors to obtain a simulation model of the object to be modeled. When input parameters are not accurate enough, the first simulation model can be optimized by the structural influence factors to obtain the second simulation model, and the second simulation model can be optimized by the functional influence factors to obtain the simulation model of the object to be modeled. The accuracy of the construction of the simulation model of the object to be modeled can be improved under the premise of reducing the dependence on the accuracy of the parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 It is a flow chart of the implementation of the method for constructing a simulation model based on particle swarm optimization provided by an embodiment of the present invention;
[0021] Figure 2 It is a schematic diagram of city division of a simulation model construction method based on particle swarm optimization provided by an embodiment of the present invention;
[0022] Figure 3 It is a structural schematic diagram of a simulation model construction method based on particle swarm optimization provided by an embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0025] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0026] Figure 1 is a flow chart of the implementation of the method for constructing a simulation model based on particle swarm optimization provided by an embodiment of the present invention, referring to Figure 1 , as detailed below:
[0027] S110, obtaining object features of the object to be modeled.
[0028] In some embodiments, the objects to be modeled may be entities or systems widely existing in various fields. In the field of engineering, such as mechanical devices (such as automobiles, aircraft engines, CNC machine tools, etc.), building structures (including high-rise buildings, bridges, tunnels, etc.), electronic devices (such as mobile phones, computers, communication base stations, etc.) and industrial production systems (such as production lines, factory workshop layouts, etc.); in the field of natural science research, it covers ecosystems (such as forest ecosystems, marine ecosystems, etc.), celestial systems (such as solar systems, galaxies, etc.), physical experimental devices (such as particle accelerators, optical resonators, etc.); in the field of social sciences, it involves transportation systems (such as urban transportation networks, subway systems, etc.), economic systems (such as market supply and demand models, financial transaction systems, etc.), organizational management systems (such as internal organizational structures of enterprises, supply chain management systems, etc.), etc. In short, there are various types of objects to be modeled, and their modeling aims to deeply understand and optimize the behavior and performance of these objects in different situations through simulation methods.
[0029] In some embodiments, object features include structural features of the object to be modeled (such as geometric shape, size specifications, internal structure), material properties (mechanical properties, physical properties), functional features (functional description, working principle), external interface features (connection method, input and output interface parameters), environmental adaptability characteristics (working environment requirements, environmental influencing factors) and other features (reliability indicators, maintainability characteristics) and other feature information.
[0030] S120, constructing a first simulation model of the object to be modeled based on the object features, and dividing the object to be modeled into a plurality of sub-objects based on a preset division rule.
[0031] Among them, the first simulation model is preliminarily constructed according to the characteristics of the object, and the initial simulation model of the object to be modeled is obtained. According to the acquired characteristics of the object to be modeled, such as structural characteristics (geometric shape, size specifications, internal structure, etc.), material properties, functional characteristics, external interface characteristics, environmental adaptability characteristics and other related characteristics, these object characteristics are converted into parameters, components and logical relationships in the model, and constructed using appropriate modeling tools and techniques. The preliminary construction can obtain a model that can simulate the basic behavior and characteristics of the object to be modeled to a certain extent, that is, the first simulation model. The first simulation model can provide a basic framework for subsequent further optimization.
[0032] In some embodiments, the pre-set division rule is a criterion for reasonably dividing the object to be modeled into multiple sub-objects. The division rule can be obtained from many aspects. For example, it can be divided by physical structural components or functional structural modules, such as automobiles by components and electronic equipment by functional modules; it can be divided by spatial location, such as by region or level, such as Figure 2 As shown, the city is divided into regions, and six regions are obtained (region 1, region 2, region 3, region 4, region 5, and region 6). It can also be divided according to behavioral characteristics, such as by dynamic behavior stages or response characteristics, such as rocket launches are divided by stages and control systems are divided by responses. It can also be divided according to data characteristics, according to data type or frequency, such as database systems are divided by data type and power systems are divided by data frequency.
[0033] In some embodiments, the sub-object is a relatively independent part obtained by dividing the object to be modeled according to a preset division rule, and is a part of the object to be modeled.
[0034] S130, determining a structural influence factor of each sub-object based on the sub-object characteristics of the sub-object, and optimizing the first simulation model based on all the structural influence factors to obtain a second simulation model.
[0035] In some embodiments, sub-object characteristics refer to structural characteristics of the sub-object (such as geometric shape, size specifications, internal structure), material properties (mechanical properties, physical properties), functional characteristics (functional description, working principle), external interface characteristics (connection method, input and output interface parameters), environmental adaptability characteristics (working environment requirements, environmental influencing factors) and other characteristics (reliability indicators, maintainability characteristics) and other characteristic information.
[0036] In some embodiments, the structural influence factor is a parameter determined according to the sub-object characteristics of the object to be modeled, and is mainly used to quantitatively describe the structural characteristics of the sub-object and its influence on the whole.
[0037] Optimizing the first simulation model through structural influencing factors can accurately reflect the structural complexity and material properties of the sub-object, so that the essential characteristics of the structure can be deeply grasped during modeling. After the first simulation model is built, it can provide key basis for adjusting the model parameters, optimize key parameters in a targeted manner, improve model accuracy, help predict the impact of object structure changes on behavior, and assist in understanding the transmission and distribution of internal forces, thereby enhancing model stability and reliability, providing strong support for engineering design, optimization and performance evaluation, and helping to better understand and optimize the behavior of objects in the system.
[0038] In a possible implementation, the specific processing method of step S130 is: for each sub-object, perform the following steps: based on the sub-object characteristics of the sub-object, perform data extraction to obtain the structural complexity and material information of the sub-object; input the structural complexity and material information into the structural influence factor calculation formula to obtain the structural influence factor of the sub-object.
[0039] In some embodiments, data extraction is a process of obtaining structural complexity and material information of a sub-object from sub-object features.
[0040] In some embodiments, the material information includes material chemical properties (such as chemical composition, physical state), mechanical properties (such as strength parameters, elastic modulus, Poisson's ratio) and physical properties (such as density, thermal properties, etc.).
[0041] In some embodiments, the structural impact factor is calculated as follows:
[0042]
[0043] in, For the The structural influence factor of each sub-object, For the The structural complexity of each sub-object, is the complexity ratio, is the material information proportion, For the The first Materials, For the The total amount of material in the sub-objects, For the In the sub-object The influence of the physical properties of a material, For the In the sub-object The maximum allowable total error of the physical properties of a material is For the In the sub-object The influence of chemical properties of each material, For the In the sub-object The maximum allowable total error of the chemical properties of each material is For the In the sub-object The influence of mechanical properties of materials For the In the sub-object The maximum allowable total error in the mechanical properties of a material.
[0044] In a possible implementation, the specific processing method of step S130 is: based on the sub-object characteristics of each sub-object, determine the optimization weight of each corresponding sub-object; based on all optimization weights and all structural influencing factors, determine the optimization parameters of the first simulation model, and optimize the first simulation model based on the optimization parameters to obtain the second simulation model.
[0045] In some embodiments, the quantization parameters of the sub-objects can be obtained through the sub-object features, and the optimization weight of the sub-objects can be determined according to the quantization parameters. The quantization parameters can be importance or volume, which is specifically determined according to the actual type of the object to be modeled.
[0046] The optimization weight is proportional to the quantization parameter. The larger the quantization parameter, the higher the optimization weight. For example, the running result of a process needs to be obtained through the object to be modeled. For example, the sub-object is the engine in the car. Since the engine is more important in the whole car, the quantization parameter of the sub-object is larger, and accordingly, the optimization weight is also higher.
[0047] In some embodiments, during the modeling process, these optimized parameters can be substituted into the first simulation model, and the structural parameter settings of the model can be adjusted and improved in a targeted manner so that the model can more accurately reflect the actual structure of the object to be modeled. After this optimization process, a second simulation model with improved structural accuracy is ultimately obtained, providing stronger support for subsequent analysis, prediction, and decision-making.
[0048] S140, based on the object features, multiple functional influencing factors of the object to be modeled are determined, and each functional influencing factor is optimized based on the particle swarm optimization algorithm, and based on all the optimized functional influencing factors, the second simulation model is optimized to obtain a simulation model of the object to be modeled.
[0049] In some embodiments, the function impact factor is a quantitative indicator used to measure the relative importance of the functions of various components (such as sub-objects or modules) in the system to the overall system function. Each work link corresponds to a function impact factor.
[0050] From a functional perspective, in a complex system (such as mechanical devices, electronic equipment, software systems, etc.), each part has a specific function. The functional impact factor can comprehensively consider many factors such as the criticality of the function, the irreplaceability of the function, and the contribution of the function to the overall performance of the system.
[0051] For example, in a robot system, the functional impact factor of the motion control function module may be high, because it directly determines whether the robot can move normally, which is the basis for the robot to complete many tasks (such as handling, assembly, etc.). The functional impact factor of the robot's appearance decoration module is relatively low, because it makes less direct contribution to the robot's completion of the main task.
[0052] In some embodiments, the number of functional influencing factors is equal to the number of working links. For example, if the object A to be modeled includes three working links, three functional influencing factors can be obtained.
[0053] In a possible implementation, the specific processing method of step S140 is: based on the object characteristics, determine the functional information of the object to be modeled, and based on the functional information, determine multiple working links and corresponding link characteristics of the object to be modeled; for each working link, based on the link characteristics of the working link, determine the sub-function influence factor of the working link, and based on all the sub-function influence factors, determine the function influence factor of the working link.
[0054] In some embodiments, the functional information includes multiple working links of the function, the irreplaceability of each working link, the criticality of each working link, the contribution of each working link to the functional link, etc. Through the functional information, multiple functional links and link characteristics of each functional link can be obtained.
[0055] In some embodiments, the link characteristics of a certain work link include the irreplaceability of the work link, the criticality of the work link, and the contribution of the work link to the functional link.
[0056] In some embodiments, each factor in the characteristics of a link corresponds to a sub-function influence factor. For example, the irreplaceability of a link can be represented by a sub-function influence factor representing importance, the criticality of a work link can be represented by a sub-function influence factor representing criticality, and the contribution of a work link to the functional link can be represented by a sub-function influence factor representing contribution.
[0057] In some embodiments, after the sub-function influence factors are obtained, these sub-function influence factors can be superimposed according to the weight of each factor in the link characteristics of the work link to obtain the function influence factor of the work link.
[0058] In a possible implementation, the specific processing method of step S140 is: obtaining a historical input feature data set and a historical output feature data set of the object to be modeled; obtaining a simulation output feature data set based on the historical input feature data set and the second simulation model, and determining a simulation difference data set of the object to be modeled based on the simulation output feature data set and the historical output feature data set; inputting the data in the simulation difference data set into the particle swarm optimization algorithm to optimize each functional influencing factor.
[0059] In some embodiments, the historical input feature data set is input into the second simulation model for simulation, and the output results of the second simulation model can be obtained. These output results together constitute the simulation output feature data set.
[0060] In some embodiments, based on the simulation output data set and the historical output characteristic data set, the error between the simulation result of the second simulation model and the actual result under the same input data can be obtained. The simulation difference data set is used to represent the error between the simulation result of the second simulation model and the actual result. For example, in actual situations, car A travels 100 kilometers and the fuel consumption is a. However, in the second simulation model of car A, when traveling 100 kilometers, the fuel consumption is b, then the difference between a and b is the error between the simulation result of the second simulation model and the actual result.
[0061] It should be noted that the simulation difference data set not only includes the difference data of the model output results, such as the difference between the actual output value and the simulation results in terms of predicted object motion trajectory, force magnitude, performance indicators, etc., but also includes the difference data between the simulated input and actual input, and the simulated output and actual output of each working link. In the complex model calculation process, the difference in variable changes involved in each intermediate link can also assist in analyzing the internal calculation logic of the second simulation model and the correlation and influence between each part.
[0062] In some embodiments, the particle swarm optimization algorithm is mainly used to optimize each functional influencing factor by simulating a difference data set.
[0063] In a possible implementation, the specific processing method of step S140 is: based on the simulation difference data set, determine the link simulation difference data set corresponding to each functional influence factor; for each functional influence factor, determine multiple optimization parameters of the functional influence factor based on the link simulation difference data set, input the multiple optimization parameters into the particle swarm optimization algorithm, and obtain the optimization result of the functional influence factor.
[0064] In some embodiments, the data in the simulation difference data set is divided according to the working links, so as to obtain the link simulation difference data set of the working link corresponding to each functional influencing factor.
[0065] In some embodiments, when determining the optimization parameters, it is possible to judge whether the difference is within the allowable error range based on the difference between the simulated input and the actual input in the link simulation difference data set and the difference between the simulated output and the actual output. If it is within the allowable error range, no optimization is required and the optimization parameter is 0. If it is not within the allowable error range, optimization is required. The optimization parameter is related to the difference. The larger the difference, the larger the optimization parameter.
[0066] In some embodiments, when optimizing the functional influencing factors by the particle swarm optimization algorithm, it is first necessary to set the particle swarm optimization algorithm parameters to determine the population size. The population size of the particle swarm can be reasonably set according to the complexity of the functional influencing factors to be optimized and the size of the data set. For example, for the optimization of functional influencing factors in a complex industrial production process simulation model, due to the involvement of numerous variables and complex relationships, it may be necessary to set a larger population size, such as 50-100 particles, to ensure that the algorithm can fully search the solution space and find the optimal or near-optimal optimization result.
[0067] Then you need to set the inertia weight, which is usually used to balance the global and local search capabilities of particles. In the initial stage, you can set a larger inertia weight so that particles can explore a wider solution space; as the iteration proceeds, gradually reduce the inertia weight so that particles are more inclined to conduct local fine searches. For example, the initial inertia weight can be set to 0.9, and during the iteration process, it is gradually reduced to about 0.4 according to a certain attenuation strategy (such as linear attenuation or nonlinear attenuation).
[0068] It is also necessary to determine the learning factor, which includes cognitive factors and social factors, which affect the degree to which particles learn from their own historical optimal position and the group's optimal position respectively. In general, the cognitive factor can be set to 1.5-2.5, and the social factor can be set to 0.5-1.5. The sum of the two is usually kept at around 4 to ensure that particles can fully utilize their own experience and refer to group information during the search process to avoid premature convergence or falling into a local optimal solution.
[0069] After determining these data, you can enter the optimization parameters for iterative calculation. During the calculation, you need to initialize the particle position and velocity, use the determined multiple optimization parameters as the particle's initial position vector, and randomly initialize the particle's velocity vector. Each particle represents a possible optimization scheme for the functional influencing factor, and each element in its position vector corresponds to the value of an optimization parameter. For example, for the optimization of the functional influencing factor in the electronic product performance simulation model mentioned above, the position vector of a particle may be [2, 0.5, 3], corresponding to the values of "output result deviation optimization parameter" and "intermediate variable deviation optimization parameter", and the velocity vector is randomly initialized to a value within a certain range.
[0070] In the iterative process, the fitness of the particles needs to be calculated. Usually, the fitness of each particle can be calculated by a predefined fitness function based on the position of the particle (i.e., the value of the optimization parameter). The fitness function is usually related to the goal of optimizing the functional influencing factor, such as minimizing the error between the model output result and the actual result. In the calculation process, the particle's optimization parameters are substituted into the model, the model is run to obtain the simulation results, and then the fitness value is calculated based on the difference between the simulation results and the actual results. The smaller the fitness value, the better the optimization solution represented by the particle.
[0071] After calculating the fitness, the particle position and speed need to be updated. That is, according to the fitness value of the particle, the current position of each particle is compared with its own historical optimal position and the optimal position of the group, and the particle position and speed are updated according to the update formula of the particle swarm optimization algorithm. In the update formula, the new speed of the particle is determined by factors such as the current speed, the difference between its own historical optimal position and the current position, and the difference between the optimal position of the group and the current position. The new position is calculated from the current position and the new speed. Through continuous iterative updates, the particles gradually approach the optimal solution.
[0072] In addition, it is also necessary to set the iteration termination condition, such as reaching the maximum number of iterations (such as 100-500 times) or the optimal fitness value of the group no longer improves significantly after several consecutive iterations. When the termination condition is met, the iterative calculation is stopped, and the position of the optimal particle in the current group is output, that is, the optimization result of the functional influence factor is obtained. This optimization result is the best parameter combination after multiple iterations of optimization, which can make the functional influence factor better reflect the actual situation in the model and improve the accuracy and reliability of the model. For example, after optimization, the optimization parameter corresponding to a functional influence factor in the electronic product performance simulation model changes from the initial [2, 0.5, 3] to [1, 0.3, 2], which shows that a better parameter setting has been found through the particle swarm optimization algorithm, so that the performance of the model related to the functional influence factor has been improved.
[0073] By obtaining the historical input and output feature data sets of the object to be modeled, we can make full use of past experience data to provide rich basis for model optimization. According to the historical input and the second simulation model, we can obtain the simulation output feature data set, and then determine the simulation difference data set. We can accurately quantify the deviation between the model simulation results and the actual situation, making the subsequent optimization more targeted. The data in the simulation difference data set is input into the particle swarm optimization algorithm, and further subdivided into the simulation difference data set of each functional influencing factor to determine the optimization parameters. This meticulous processing can deeply explore the problems of each functional link within the model, realize the precise optimization of each functional influencing factor, and finally obtain a more realistic and accurate functional influencing factor optimization result, which effectively improves the reliability and practicality of the entire simulation model, and provides an efficient and scientific solution for the modeling and optimization of complex systems.
[0074] In a possible implementation, the specific processing method of step S140 is: based on all optimized functional influencing factors, determine the optimization matrix of the second simulation model; according to the optimization matrix, optimize the second simulation model to obtain the simulation model of the object to be modeled.
[0075] In some embodiments, the optimization matrix is as follows:
[0076]
[0077] in, To optimize the matrix, is the difference between the first functional influencing factor after optimization and before optimization, is the total number of functional influencing factors, For the n The difference between the functional influencing factors before and after optimization.
[0078] In some embodiments, after obtaining the optimization matrix, the optimization matrix can be substituted into the second simulation model, and the function-related parameter settings of the model can be adaptively adjusted and improved to obtain a simulation model of the object to be modeled, which can make the model more realistic and improve the accuracy and reliability of the model's functional simulation, thereby obtaining a better quality simulation model of the object to be modeled.
[0079] By acquiring the object features of the object to be modeled to construct the first simulation model and divide it into multiple sub-objects, the structural influence factor is determined according to the sub-object features to optimize the second simulation model, and then the functional influence factor is determined. By acquiring the historical input and output feature data set, the simulation difference data set is obtained and the functional influence factor is optimized by the particle swarm optimization algorithm. The optimization matrix is determined based on the optimized functional influence factor to optimize the second simulation model to obtain the final simulation model. Its advantages are that through the optimization of structural and functional influence factors, the dependence on parameter accuracy is reduced, and the model accuracy can be effectively improved; the historical data is fully used to determine the simulation difference data set to make the optimization more targeted; the data of each link is carefully processed to achieve accurate optimization, which improves the reliability and practicality of the model and provides an efficient and scientific method for simulation modeling of various objects.
[0080] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0081] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.
[0082] Figure 3 : is a schematic diagram of the structure of a simulation model construction device based on particle swarm optimization provided by an embodiment of the present invention. For the sake of convenience, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0083] Reference Figure 3 , the simulation model construction device 3 based on particle swarm optimization includes:
[0084] An acquisition module 31 is used to acquire object features of an object to be modeled;
[0085] A division module 32, used to construct a first simulation model of the object to be modeled based on the object features, and divide the object to be modeled into a plurality of sub-objects based on a preset division rule;
[0086] A structure optimization module 33, used to determine the structure influence factor of each sub-object based on the sub-object characteristics of the sub-object, and optimize the first simulation model based on all the structure influence factors to obtain a second simulation model;
[0087] The function optimization module 34 is used to determine multiple function influencing factors of the object to be modeled based on the object characteristics, and optimize each function influencing factor based on the particle swarm optimization algorithm, and optimize the second simulation model based on all the optimized function influencing factors to obtain the simulation model of the object to be modeled.
[0088] In a possible implementation, the structure optimization module 33 is specifically used to: for each sub-object, perform the following steps: extract data based on the sub-object characteristics of the sub-object to obtain the structural complexity and material information of the sub-object; input the structural complexity and material information into the structural influence factor calculation formula to obtain the structural influence factor of the sub-object.
[0089] In a possible implementation, the structural optimization module 33 is further used to: determine the optimization weight of each corresponding sub-object based on the sub-object characteristics of each sub-object; determine the optimization parameters of the first simulation model based on all optimization weights and all structural influencing factors, and optimize the first simulation model based on the optimization parameters to obtain the second simulation model.
[0090] In one possible implementation, the function optimization module 34 is specifically used to: determine the function information of the object to be modeled based on the object characteristics, and determine multiple working links and corresponding link characteristics of the object to be modeled based on the function information; for each working link, determine the sub-function influencing factor of the working link based on the link characteristics of the working link, and determine the function influencing factor of the working link based on all the sub-function influencing factors.
[0091] In one possible implementation, the function optimization module 34 is also used to: obtain a historical input feature data set and a historical output feature data set of the object to be modeled; obtain a simulation output feature data set based on the historical input feature data set and the second simulation model, and determine a simulation difference data set of the object to be modeled based on the simulation output feature data set and the historical output feature data set; input the data in the simulation difference data set into the particle swarm optimization algorithm to optimize each function influencing factor.
[0092] In a possible implementation, the function optimization module 34 is also used to: determine the link simulation difference data set corresponding to each function influence factor based on the simulation difference data set; for each function influence factor, determine multiple optimization parameters of the function influence factor based on the link simulation difference data set, input the multiple optimization parameters into the particle swarm optimization algorithm, and obtain the optimization result of the function influence factor.
[0093] In a possible implementation, the function optimization module 34 is further used to: determine the optimization matrix of the second simulation model based on all optimized function influencing factors; and optimize the second simulation model according to the optimization matrix to obtain a simulation model of the object to be modeled.
[0094] Figure 4 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 4As shown, the electronic device 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned various embodiments of the simulation model construction method based on particle swarm optimization are implemented, for example Figure 1 Alternatively, when the processor 40 executes the computer program 42, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 3 Functionality of the modules / units 31 to 34 shown.
[0095] Exemplarily, the computer program 42 may be divided into one or more modules / units, one or more modules / units are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the electronic device 4. For example, the computer program 42 may be divided into Figure 3 Modules / units 31 to 33 are shown.
[0096] The electronic device 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of the electronic device 4 and does not constitute a limitation of the electronic device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0097] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0098] The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used to store computer programs and other programs and data required by the electronic device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
[0099] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0100] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0101] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0102] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0105] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned simulation model construction method based on particle swarm optimization can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.
[0106] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A simulation model construction method based on particle swarm optimization, characterized in that: include: Obtaining object features of the object to be modeled; Constructing a first simulation model of the object to be modeled based on the object features, and dividing the object to be modeled into a plurality of sub-objects based on a preset division rule; For each sub-object, the following steps are performed: based on the sub-object features of the sub-object, data is extracted to obtain the structural complexity and material information of the sub-object; the structural complexity and the material information are input into a structural influence factor calculation formula to obtain the structural influence factor of the sub-object, and the first simulation model is optimized based on all structural influence factors to obtain a second simulation model; The calculation formula of the structural impact factor is: in, For the The structural influence factor of each sub-object, For the The structural complexity of each sub-object, is the complexity ratio, is the material information proportion, For the The first Materials, For the The total amount of material in the sub-objects, For the In the sub-object The influence of the physical properties of a material, For the In the sub-object The maximum allowable total error of the physical properties of a material is For the In the sub-object The influence of chemical properties of each material, For the In the sub-object The maximum allowable total error of the chemical properties of each material is For the In the sub-object The influence of mechanical properties of materials For the In the sub-object The maximum allowable total error of the mechanical properties of a material; Based on the object features, multiple functional influencing factors of the object to be modeled are determined, and each functional influencing factor is optimized based on a particle swarm optimization algorithm. Based on all optimized functional influencing factors, the second simulation model is optimized to obtain a simulation model of the object to be modeled.
2. The method for constructing a simulation model based on particle swarm optimization according to claim 1, characterized in that: The step of optimizing the first simulation model based on all structural influencing factors to obtain a second simulation model includes: Determining an optimization weight for each corresponding sub-object based on the sub-object features of each sub-object; Based on all optimization weights and all structural influencing factors, optimization parameters of the first simulation model are determined, and the first simulation model is optimized based on the optimization parameters to obtain a second simulation model.
3. The method for constructing a simulation model based on particle swarm optimization according to claim 1, characterized in that: The determining of a plurality of functional influencing factors of the object to be modeled based on the object features includes: Based on the object features, determining the functional information of the object to be modeled, and based on the functional information, determining a plurality of working links of the object to be modeled and corresponding link features; For each work link, based on the link characteristics of the work link, the sub-function influencing factor of the work link is determined, and based on all the sub-function influencing factors, the function influencing factor of the work link is determined.
4. The method for constructing a simulation model based on particle swarm optimization according to claim 1, characterized in that: The optimization of each functional influencing factor based on the particle swarm optimization algorithm includes: Acquire a historical input feature data set and a historical output feature data set of the object to be modeled; Based on the historical input feature data set and the second simulation model, a simulation output feature data set is obtained, and based on the simulation output feature data set and the historical output feature data set, a simulation difference data set of the object to be modeled is determined; The data in the simulation difference data set is input into the particle swarm optimization algorithm to optimize each functional influencing factor.
5. The method for constructing a simulation model based on particle swarm optimization according to claim 4, characterized in that: The step of inputting the data in the simulation difference data set into the particle swarm optimization algorithm to optimize each functional influencing factor includes: Based on the simulation difference data set, determine the link simulation difference data set corresponding to each functional influencing factor; For each functional impact factor, multiple optimization parameters of the functional impact factor are determined based on the link simulation difference data set, and the multiple optimization parameters are input into the particle swarm optimization algorithm to obtain the optimization result of the functional impact factor.
6. The method for constructing a simulation model based on particle swarm optimization according to claim 1, characterized in that: The step of optimizing the second simulation model based on all optimized functional influencing factors to obtain a simulation model of the object to be modeled includes: Based on all optimized functional influencing factors, determining an optimization matrix of the second simulation model; The second simulation model is optimized according to the optimization matrix to obtain a simulation model of the object to be modeled.
7. A simulation model construction device based on particle swarm optimization, characterized in that: include: An acquisition module, used for acquiring object features of an object to be modeled; A division module, used for constructing a first simulation model of the object to be modeled based on the object features, and dividing the object to be modeled into a plurality of sub-objects based on a preset division rule; The structural optimization module is used to perform the following steps for each sub-object: extract data based on the sub-object features of the sub-object to obtain the structural complexity and material information of the sub-object; input the structural complexity and the material information into the structural influence factor calculation formula to obtain the structural influence factor of the sub-object, and optimize the first simulation model based on all the structural influence factors to obtain the second simulation model; The calculation formula of the structural impact factor is: in, For the The structural influence factor of each sub-object, For the The structural complexity of each sub-object, is the complexity ratio, is the material information proportion, For the The first Materials, For the The total amount of material in the sub-objects, For the In the sub-object The influence of the physical properties of a material, For the In the sub-object The maximum allowable total error of the physical properties of a material is For the In the sub-object The influence of chemical properties of each material, For the In the sub-object The maximum allowable total error of the chemical properties of each material is For the In the sub-object The influence of mechanical properties of materials For the In the sub-object The maximum allowable total error of the mechanical properties of a material; A function optimization module is used to determine multiple function influencing factors of the object to be modeled based on the object characteristics, and optimize each function influencing factor based on the particle swarm optimization algorithm, and optimize the second simulation model based on all the optimized function influencing factors to obtain a simulation model of the object to be modeled.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the simulation model construction method based on particle swarm optimization as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing a simulation model based on particle swarm optimization as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Simulation method and system based on nuclear power system operation
CN111897240A
System design optimization method based on influence factors, server and storage medium
CN117592385A