The invention discloses a real-time
simulation model automatic modeling method based on generative
artificial intelligence, and belongs to the technical field of generative
artificial intelligence and real-time
simulation. Comprising the following steps: constructing a double-layer agent
structure based on
artificial intelligence, and configuring professional knowledge and a program
database; inputting an instruction by a user to automatically generate an
executable program, and performing self-correction; and finally, generating an
executable program and an AI reply, and mapping the
executable program and the AI reply to simulink through a mapping mechanism to realize automatic modeling. According to the method, a complete model is directly generated from a
natural language, a user can input demand description, AI automatically analyzes demands, deduces logic and generates the complete model, and manual intervention is reduced. The method not only complements all sub-codes, but can generate codes of complete structures including
function definition, input and output, parameter
processing, core logic and the like from demands.