Simulation code automatic generation and inspection method and system for complex product and storable medium
Through the automatic generation and verification method of simulation code for X language, the problem of time-consuming and labor-intensive development of traditional simulation models and the difficulty in meeting the requirements of rapid changes and technical iteration is solved, and the code generation and verification of complex product simulation models of high efficiency and high quality is achieved, and the design iteration speed and product innovation efficiency are improved.
Patent Information
- Application Number
- CN202411589239.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-08
AI Technical Summary
During the development of traditional simulation models, model construction and verification rely on the experience of professionals, which is time-consuming and labor-intensive, and it is difficult to meet the needs of rapid changes and technical iteration in complex product designs, especially in terms of model accuracy and verification efficiency.
The automatic generation and verification method of simulation code for X language is adopted to analyze user needs, build prompt words, and use a generative big model to automatically generate simulation model code and annotations. Use X language compiler and computer scripts to verify the simulation model code, feedback error prompt words and correct the code until all compilation errors are eliminated.
It realizes high-efficiency and high-quality code generation and verification of complex product simulation models, improves design iteration speed and product innovation efficiency, and meets the simulation requirements of performance, reliability and security of complex system design models.
Smart Images

Figure CN119512518A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital design and manufacturing technology, and more specifically to a method, system and storable medium for automatically generating and inspecting simulation codes for complex products. Background Art
[0002] At present, in the field of digital design and manufacturing technology, with the growing demand for research and development of complex products such as spacecraft, high-end mechanical equipment, and large-scale transportation vehicles, higher requirements are placed on the generation and verification of simulation model codes.
[0003] In the traditional simulation model development process, the construction and verification of the model mainly rely on the experience of professionals through manual coding and verification, which is not only time-consuming and labor-intensive, but also particularly clumsy and inefficient when facing the rapid changes in requirements and technical iterations in complex product design; especially in terms of model accuracy and verification efficiency, traditional methods face significant challenges, limiting the speed of design iteration and the efficiency of product innovation. As the design of complex systems becomes more sophisticated and highly integrated, the requirements for simulation models are also increasing, not only functional simulation, but also high-precision simulation in terms of performance, reliability, and safety; however, due to inherent limitations, manual coding and traditional model verification methods cannot meet the dual requirements of high efficiency and high quality in the development of simulation model codes for complex products.
[0004] Therefore, how to provide a high-efficiency and high-quality method for automatically generating and verifying simulation codes for complex products is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0005] In view of this, the present invention provides a method, system and storable medium for automatically generating and verifying simulation code of a complex product. An automatic simulation code generation method is developed for X language, and the simulation code is verified, so as to obtain the simulation model code of the complex product with high efficiency and high quality.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] The present invention discloses a method for automatically generating and inspecting simulation codes for complex products, and the specific steps are as follows:
[0008] Parse user requirements and construct prompt words based on the parsed results of user requirements, X language modeling specifications, domain specifications, and demonstration models in the X language model library;
[0009] According to the prompt words, using the generative large model to automatically generate simulation model code and annotations;
[0010] The simulation model code is checked by using an X language compiler and a computer script, and error prompt words are obtained according to the check result and fed back to the generative large model to correct the simulation model code.
[0011] Furthermore, the prompt word includes three parts: Task, Introduction, and Input; wherein the Input part is the user demand, the Task part is the X language simulation model generated according to the Input part, and the Introduction part includes the X language modeling specification, domain specification, and X language demonstration case.
[0012] Furthermore, the construction prompt words specifically include:
[0013] Determining model parameters and model functions of the simulation model according to the analysis results;
[0014] According to the model parameters and the model functions, sampling a demonstration model from the X language model library to generate a corresponding simulation model;
[0015] Determine the type definition of the parameter according to the X language modeling specification and the model parameter; determine the instruction definition according to the X language modeling specification and the model function;
[0016] Determining parameter constraints of the model parameters and logical constraints of the model functions according to the domain specification to which the simulation model belongs;
[0017] The prompt word is constructed by combining the simulation model, the model parameters for determining type definition and parameter constraints, and the model functions for determining instruction definition and logic constraints.
[0018] Furthermore, the generative big model is obtained by fine-tuning and training the open source generative big model, specifically including:
[0019] The model in the X language model library is used as the answer, the natural language description corresponding to the model is used as the question, and the question-answer pair is used as a sample to construct a dataset;
[0020] 80% of the samples in the data set are used as training data sets, 10% of the samples are used as validation data sets, and 10% of the samples are used as test data sets;
[0021] The parameters of the open source generative large model are fine-tuned by a low adaptive rank method, and the open source generative large model is fine-tuned using the training data set.
[0022] Furthermore, the low adaptive rank method obtains the approximate parameters of the open source generative large model by introducing a low rank decomposition matrix. During the fine-tuning process, only the parameters in the low rank decomposition matrix are updated, and the parameters in the remaining layers of the open source generative large model are fixed.
[0023] Further, the checking of the simulation model code includes:
[0024] Using an X language compiler to check the simulation model code, obtaining error prompt words according to the check result and feeding back to the generative large model, correcting the simulation model code until all compilation errors are eliminated;
[0025] The computer script in the script library is used to check the code after being checked and corrected by the X language compiler, and error prompt words are obtained according to the check result and fed back to the generative large model, and the simulation model code is corrected to obtain the final simulation model code.
[0026] Further, the simulation model code is checked by using the X language compiler, specifically including: detecting whether there are spelling errors in the simulation model code, wherein the spelling errors include instruction spelling errors and illegal characters in parameter naming;
[0027] Check whether the simulation model code has simulation logic errors, including sequence and logic errors of each step, and the number of equations and parameters in the X language continuous class are not equal, and there are jump instructions in the infinite time stage.
[0028] Furthermore, the script library includes common sense check scripts and domain standard check scripts corresponding to the domain specifications; the common sense check scripts are used to detect whether the model parameters comply with the common sense constraints of real-world physical theorems; the domain standard check scripts are used to detect whether the model parameters comply with the domain constraints of the corresponding domain physical quantities.
[0029] The present invention also discloses a complex product simulation code automatic generation and inspection system, comprising:
[0030] Prompt word construction module: parses user requirements and constructs prompt words based on the parsed results of user requirements, X language modeling specifications, domain specifications, and models in the model library;
[0031] Simulation code generation module: according to the prompt words, using the generative large model to automatically generate simulation model code and annotations;
[0032] Model verification module: using X language compiler and computer script to check the simulation model code, obtain error prompt words according to the test results and feed them back to the generative large model, and correct the simulation model code.
[0033] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for automatically generating and verifying simulation code for a complex product described in any one of the above items is implemented.
[0034] It can be seen from the above technical solution that, compared with the prior art, the present invention discloses a method, system and storable medium for automatically generating and verifying simulation codes for complex products, and provides a method for automatically generating and verifying simulation codes for complex products with high efficiency and high quality, which solves the problems of low efficiency of manual coding and difficulty in coping with changes in design requirements and technical upgrades, improves the speed of design iteration and the efficiency of product innovation, meets the simulation requirements of complex system design model performance, reliability and security, and has certain application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0036] Figure 1 The figure is a schematic diagram of the overall process of the method according to the embodiment of the present invention.
[0037] Figure 2 Schematic diagram of the system structure of an embodiment of the present invention.
[0038] Figure 3 Schematic diagram of the aircraft simulation model architecture according to an embodiment of the present invention.
[0039] Figure 4 The present invention is a schematic diagram of the aircraft simulation model code verification process according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] The embodiment of the present invention discloses a method for automatically generating and verifying simulation codes for complex products. Figure 1 As shown, the specific steps are as follows:
[0042] Parse user requirements and construct prompt words based on the parsed results of user requirements, X language modeling specifications, domain specifications, and demonstration models in the X language model library;
[0043] According to the prompt words, the simulation model code and comments are automatically generated using the generative large model;
[0044] The simulation model code is checked by using X language compiler and computer script, and error prompt words are obtained according to the check results and fed back to the generative large model to correct the simulation model code.
[0045] Among them, X language adopts X language modeling specification, including X language application scenario class definition, syntax definition, application cases, etc. Engineers with simulation modeling foundation can master X language through X language modeling specification. X language fully supports model-based system engineering, provides standardized graphical modeling description in the product concept design stage, and can also automatically compile and convert standardized graphical models into text-based underlying simulation models. Driven by the simulation engine, it supports seamless integrated simulation of the whole system, the whole process, and multiple perspectives, and realizes unified integrated description and simulation from conceptual model design, system architecture design, multi-physical domain models to simulation models.
[0046] In a specific embodiment, the prompt word includes three parts: Task, Introduction, and Input; wherein the Input part is the user demand, the Task part is the X language simulation model generated according to the Input part, and the Introduction part includes the X language modeling specification, the domain specification, and the X language demonstration case.
[0047] Specifically, the X language modeling specification is a BNF grammar file of the X language that conforms to the BNF paradigm; the BNF paradigm of the X language defines the grammatical structure of the language through productions, so that the language designer can clearly describe the grammatical rules, and the compiler developer can implement the grammar analyzer according to these grammatical rules. The BNF paradigm is an important tool for understanding and implementing programming languages. The X language BNF paradigm specifically defines the overall storage framework, class definition, class prefix, class structure, components, definition modules, ports, components, value variable parts, plans, states, statements and expressions, lexical elements and other important concepts. These definitions together constitute the grammatical rules of the X language, which describe in detail how to write code that conforms to the X language specification, including the structure of the class, the behavior of the state machine, the way to write equations, and how to handle input and output.
[0048] Field specifications refer to the main specifications in different fields, such as aviation field specifications (1. The flight altitude of civil aircraft needs to be greater than 8,800 meters; 2. The speed of the aircraft cannot exceed the maximum structural speed; 3...);
[0049] X language demonstration cases refer to multiple sets of model descriptions and model X language codes in the X language model library.
[0050] In a specific embodiment, constructing the prompt word specifically includes:
[0051] Determine the model parameters and model functions of the simulation model according to the analysis results;
[0052] According to the model parameters and model functions, sample demonstration models from the X language model library and generate corresponding simulation models;
[0053] Determine the type definition of the parameter according to the X language modeling specification and the model parameters; determine the instruction definition according to the X language modeling specification and the model function;
[0054] Determine the parameter constraints of model parameters and the logical constraints of model functions according to the domain specifications to which the simulation model belongs;
[0055] The prompt words are constructed by combining the simulation model, the model parameters that determine the type definition and parameter constraints, and the model functions that determine the instruction definition and logic constraints.
[0056] Specifically, model function refers to the design of a system or tool or the specific operation and ability of a program, describing its execution function and performance in a specific task or field; model parameters are variables that describe the properties of the system, such as mass, length, elastic coefficient, etc., and these parameters are adjusted to simulate and analyze the behavior of the system. For the X language modeling specification, type definition and instruction definition need to be clarified. Type definition refers to the specification used to declare and describe data types, defining the properties and methods of variables or objects. Types in X language include couple class, discrete class, continuous class, etc.; instruction definition refers to the description of specific operations, including commands, parameters and execution steps, used to implement specific functions in the program. For domain specifications, parameter constraints and logical constraints need to be clarified. Parameter constraints refer to the restrictions and regulations on the input of functions or models to ensure that the input meets specific conditions to ensure the stability and correctness of the system; logical constraints refer to the regulations on the relationship between events, behaviors or conditions in the system or problem to ensure that they follow a certain logical order and rationality. The above content and the demonstration cases sampled from the X language model library are used to construct sample learning prompts. The following is a simple example of a completed prompt word. The completed few-shot learning prompt word includes three parts: Task, Introduction, and Input. The specific format is as follows: Task: "Please generate a simulation model in language X based on Input." Introduction: modeling specifications of language X, domain specifications, and demonstration cases of language X. Input: "This is an airplane takeoff model. The airplane should be able to receive tower signals and take off normally. The landing gear should be retracted during takeoff, and the takeoff speed should be greater than 180 knots."
[0057] In a specific embodiment, the generative big model is obtained by fine-tuning and training the open source generative big model, which specifically includes:
[0058] The model in the X language model library is used as the answer, the natural language description corresponding to the model is used as the question, and the question-answer pair is used as a sample to construct a dataset; and without affecting the meaning of the language, the way of expressing the question is randomized to reduce the homogeneity of the corpus and increase the number of samples.
[0059] 80% of the samples in the dataset are used as training datasets to fine-tune the model parameters; 10% of the samples are used as validation datasets to tune the model training process; and 10% of the samples are used as test datasets to finally evaluate the performance of the model.
[0060] The parameters of the open source generative large model are fine-tuned through the low adaptive rank method, and the open source generative large model is fine-tuned using the training dataset.
[0061] In a specific embodiment, the low adaptive rank method obtains the approximate parameters of the open source generative large model by introducing a low rank decomposition matrix. During the fine-tuning process, only the parameters in the low rank decomposition matrix are updated, and the parameters in the remaining layers of the open source generative large model are fixed.
[0062] In a specific embodiment, the low-rank decomposition method approximates the original parameters by decomposing the original model parameter matrix into the product of two low-rank matrices. This method can significantly reduce the number of parameters that need to be updated by the model, thereby reducing the training and computational burden. First, select the weight matrix in the self-attention layer in the model. Take a weight matrix W as an example, assuming that its dimension is d×d′. We hope to decompose it into two low-rank matrices U and V, where the dimension of U is d×r and the dimension of V is r×d′, and r is the rank of the low rank (much smaller than d and d′). The weight matrix in the model is decomposed using the low-rank decomposition method, and the weight matrix W is decomposed into W=UV. During the fine-tuning process, all parameters in the original model except the low-rank decomposition matrix are first fixed. That is, during fine-tuning, the rest of the model is not updated, and only the low-rank decomposition matrices U and V are trained. The standard gradient descent method is used to optimize the loss function of the model to update U and V. During the training process, the gradient is calculated by the back-propagation algorithm, and the parameters of U and V are adjusted to minimize the loss function.
[0063] The low adaptive rank method is a fine-tuning method with high parameter efficiency. It introduces a set of low-rank decomposition matrices to approximate the parameters of the model, thereby reducing the number of parameters that need to be updated during the fine-tuning process and improving the fine-tuning efficiency. During the fine-tuning process, some layers of the model are fixed, and the parameters in the low-rank decomposition matrix are updated, so that the model is adjusted in a targeted manner while maintaining most of the knowledge of the open source generative large model, so as to better adapt to the X language code generation task. During the fine-tuning process, the performance of the model is regularly evaluated using the validation set. When the performance of the model on the validation set reaches a preset threshold, the fine-tuning is stopped to obtain a new model, namely the generative large model used in this embodiment.
[0064] In a specific embodiment, checking the simulation model code includes:
[0065] Use the X language compiler to check the simulation model code, get error prompts based on the test results and feed them back to the generative large model, and correct the simulation model code until all compilation errors are eliminated;
[0066] The X language compiler is a text compiler for the X language. It can check the syntax and logic problems in the X language text and compile the X language into C++. The X language compiler checks syntax errors by identifying the model code structure through specific identifiers, such as "connection", "end", "state", etc. If the specific identifier is not detected or the specific identifier is in the wrong position, an error is reported, and the error content is "missing specific identifier or identifier spelling error". For the parameter name in the recognized model code, if there are illegal characters, such as "+", "=", etc., an error is reported, and the error content is "there are illegal characters in the parameter name". The X language compiler checks syntax errors in the following ways: Since the X language requires that the number of equations in a continuous model must be the same as the number of parameters, the X language compiler will calculate the number of equations in the equation part of the continuous model and the number of parameters in the value part and the port part. If the two are not equal, an error "the number of equations is not equal to the number of parameters" will be reported; since the state in the discrete model has a state duration, if a statehold(infinite) instruction is detected in a state and there is no transition() instruction in the state, an error "infinite state duration and no jump instruction" will be reported.
[0067] The computer scripts in the script library are used to check the code after being checked and corrected by the X language compiler. Error prompt words are obtained according to the check results and fed back to the generative large model to correct the simulation model code and obtain the final simulation model code.
[0068] In a specific embodiment, the simulation model code is checked using an X language compiler, specifically including: detecting whether the simulation model code has spelling errors, the spelling errors include instruction spelling errors, and illegal characters in parameter names;
[0069] Check whether there are simulation logic errors in the simulation model code. Simulation logic errors include errors in the order and logic of each step, as well as the inequality between the number of equations and the number of parameters in the X language continuous class, infinite state duration, and the absence of jump instructions.
[0070] In a specific embodiment, the script library includes common sense check scripts and domain standard check scripts corresponding to domain specifications; common sense check scripts are used to detect whether model parameters meet the common sense constraints of real-world physical theorems, such as the gravity parameter in the simulation should be equal to 9.8; domain standard check scripts are used to detect whether model parameters meet the domain constraints of corresponding domain physical quantities, such as the flight speed of the aircraft cannot exceed the maximum structural speed. The method of distinguishing common sense constraints from domain constraints is: domain constraints refer to constraints in a specific domain, which are based on the professional knowledge and standards of the domain and are applicable to specific types of models, while common sense constraints are applicable to all physical models. The following is a specific script example for checking whether the speed of the aircraft meets the domain standard constraints. Suppose we have a model of an aircraft whose current speed is 550m / s and its maximum allowed speed is 300m / s (domain constraint). The script traverses the aircraft model program to find aircraft speed-related parameters and compares them with the domain constraints. In this case, the flight speed of the aircraft exceeds the domain constraint, so the script will give an error of "speed exceeds domain constraint".
[0071] In a specific embodiment, model code generation and verification are described by taking an aircraft as an example. An aircraft is a typical complex system, and its design involves multiple interrelated components and subsystems, including the body structure, power system, navigation system, flight control, etc. These parts interact with each other to form a highly coordinated whole. Complex aerodynamics, mechanical engineering and electronic systems are integrated together, requiring engineers to consider various factors in design and maintenance. Through the analysis of existing public information and aircraft models, the following are obtained: Figure 3 The aircraft model architecture diagram shown in the figure describes the various functions of the aircraft and the connection relationship between various subsystems. The central control system calculates the control quantities of the aircraft control elements (engine, elevator, etc.) according to the trajectory input. The input of each control quantity is calculated by the control system to obtain the force and torque of the aircraft under the attitude. The body system calculates the flight state of the aircraft at that moment according to the force and torque of the aircraft, and obtains the flight trajectory of the aircraft over time.
[0072] Through the description of the functions and parameters of the aircraft model, the fine-tuned generative large model is used to generate the simulation code of the aircraft model, and the simulation code is detected by the X language compiler. The detection shows that the simulation code of the aircraft model has logical errors, and the output result of the detector is fed back to the generative large model as a prompt word until the simulation code passes the X language compiler detection. The aircraft model code that has passed the X language compiler is tested by a specific computer script, and it is detected that its wing parameters do not conform to aerodynamics. The result and aerodynamic-related formulas are fed back to the generative large model as prompt words. The regenerated model needs to be tested by the X language compiler and the specific computer script again. The inspection process of the aircraft simulation model code is as follows: Figure 4 Finally, the models that pass the X language compiler and computer script verification will be added to the X language model library and can also be used as prompts to generate other models when necessary.
[0073] The embodiment of the present invention also discloses a system for automatically generating and verifying simulation codes for complex products, such as Figure 2 As shown, including:
[0074] Prompt word construction module: parses user requirements and constructs prompt words based on the parsed results of user requirements, X language modeling specifications, domain specifications, and models in the model library;
[0075] Simulation code generation module: according to the prompt words, the generative large model is used to automatically generate simulation model codes and comments;
[0076] Model verification module: Use X language compiler and computer script to check the simulation model code, get error prompt words according to the test results and feed them back to the generative large model to correct the simulation model code.
[0077] An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for automatically generating and verifying simulation code for a complex product according to any one of the above embodiments is implemented.
[0078] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0079] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for automatically generating and verifying simulation codes for complex products, characterized in that: The specific steps are as follows: Parse user requirements and construct prompt words based on the parsed results of user requirements, X language modeling specifications, domain specifications, and demonstration models in the X language model library; According to the prompt words, using the generative large model to automatically generate simulation model code and annotations; The simulation model code is checked by using an X language compiler and a computer script, and error prompt words are obtained according to the check result and fed back to the generative large model to correct the simulation model code.
2. The method for automatically generating and verifying simulation code for a complex product according to claim 1, characterized in that: The prompt words include three parts: Task, Introduction, and Input; wherein the Input part is the user demand, the Task part is the X language simulation model generated according to the Input part, and the Introduction part includes the X language modeling specification, domain specification, and X language demonstration case.
3. The method for automatically generating and verifying simulation code for a complex product according to claim 1, characterized in that: The construction prompt words specifically include: Determining model parameters and model functions of the simulation model according to the analysis results; According to the model parameters and the model functions, sampling a demonstration model from the X language model library to generate a corresponding simulation model; Determine the type definition of the parameter according to the X language modeling specification and the model parameter; determine the instruction definition according to the X language modeling specification and the model function; Determining parameter constraints of the model parameters and logical constraints of the model functions according to the domain specification to which the simulation model belongs; The prompt word is constructed by combining the simulation model, the model parameters for determining type definition and parameter constraints, and the model functions for determining instruction definition and logic constraints.
4. The method for automatically generating and verifying simulation code for a complex product according to claim 1, characterized in that: The generative big model is obtained by fine-tuning and training the open source generative big model, specifically including: The model in the X language model library is used as the answer, the natural language description corresponding to the model is used as the question, and the question-answer pair is used as a sample to construct a dataset; 80% of the samples in the data set are used as training data sets, 10% of the samples are used as validation data sets, and 10% of the samples are used as test data sets; The parameters of the open source generative large model are fine-tuned by a low adaptive rank method, and the open source generative large model is fine-tuned using the training data set.
5. The method for automatically generating and verifying simulation code for a complex product according to claim 4, characterized in that: The low adaptive rank method obtains the approximate parameters of the open source generative large model by introducing a low rank decomposition matrix. During the fine-tuning process, only the parameters in the low rank decomposition matrix are updated, and the parameters in the remaining layers of the open source generative large model are fixed.
6. The method for automatically generating and verifying simulation code for a complex product according to claim 1, characterized in that: The checking of the simulation model code comprises: Using an X language compiler to check the simulation model code, obtaining error prompt words according to the check result and feeding back to the generative large model, correcting the simulation model code until all compilation errors are eliminated; The computer script in the script library is used to check the code after being checked and corrected by the X language compiler, and error prompt words are obtained according to the check result and fed back to the generative large model, and the simulation model code is corrected to obtain the final simulation model code.
7. The method for automatically generating and verifying simulation code for a complex product according to claim 6, characterized in that: Using the X language compiler, checking the simulation model code, specifically including: detecting whether the simulation model code has spelling errors, the spelling errors include instruction spelling errors, and parameter naming has illegal characters; Check whether the simulation model code has simulation logic errors, including sequence and logic errors of each step, and the number of equations and parameters in the X language continuous class are not equal, and there are jump instructions in the infinite time stage.
8. The method for automatically generating and verifying simulation code for a complex product according to claim 6, characterized in that: The script library includes common sense check scripts and domain standard check scripts corresponding to the domain specifications; the common sense check scripts are used to detect whether the model parameters conform to the common sense constraints of real-world physical theorems; the domain standard check scripts are used to detect whether the model parameters conform to the domain constraints of the corresponding domain physical quantities.
9. A complex product simulation code automatic generation and verification system, characterized in that: include: Prompt word construction module: parses user requirements and constructs prompt words based on the parsed results of user requirements, X language modeling specifications, domain specifications, and models in the model library; Simulation code generation module: according to the prompt words, using the generative large model to automatically generate simulation model code and annotations; Model verification module: using X language compiler and computer script to check the simulation model code, obtain error prompt words according to the test results and feed them back to the generative large model, and correct the simulation model code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for automatically generating and verifying simulation code for a complex product as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Coding auxiliary plug-in development system based on large language model
CN118069109A
Garment pattern design system and method based on natural language dialogue
CN118071885A
Source code vulnerability detection method and system based on large model
CN118332557A
Simulation model generating and solving method and device
CN118519679A
Cited By
Full-automatic intelligent simulation method and system for power system driven by large language model
CN120430024A