A method and an apparatus for generating a simulation model and a simulation code based on discrete event system specification (DEVS) are provided. The apparatus generates a component corresponding to an atomic model of DEVS and a component corresponding to a coupling model of the DEVS according to data input through a user interface, and generates metadata corresponding to the generated component of the atomic model and/or the component of the coupling model. Furthermore, a structure and a meaning of the model are verified by parsing the metadata, a DEVS-based template code is generated by using a metadata parsing result, and an execution code is generated by compiling the template code.
展开▼