[0024] see figure 1 figure 2. In the creation of the real-time distributed simulation platform architecture, the simulation platform framework is divided into five-layer models from top to bottom. The hierarchical structure model includes five levels: application layer, management layer, service layer, interaction layer, and resource layer. There are related models and components, and a mapping table is used to describe the attributes, functions, parameters and other information of the models and components at this level. Each level is relatively independent, and only provides an interface to the upper level but cannot access it, and accesses the next level through the interface of the next level. The data interaction between various model resources is realized through the service interface in the service layer; then the sub-nodes are divided into two modes of control management and simulation calculation, which are included in the application layer.
[0025] a) Application layer
[0026]In the application layer, control management includes model explorer or node explorer, view browser and event browser. The application layer contains at least two application modes of the distributed simulation platform: control management mode and simulation calculation mode. The application mode is an attribute of the simulation nodes in the distributed simulation system.
[0027] (1) Control management mode
[0028] The control management mode enables this node to have the control management functions of other nodes, and guides the user interface (UI) of the management layer to load the interface related to the control management. In addition, the control management mode also includes the control management function of the entire simulation system. Some services of the service layer can only be used in the control management mode, such as clock service, clock management, node synchronization management, data synchronization management and other services.
[0029] (2) Simulation calculation mode
[0030] The simulation calculation mode mainly performs calculation on the simulation model according to the simulation clock, model health management, event interaction with the control management node, and data interaction with the simulation computing node.
[0031] b) management
[0032] The management layer is a reconfigurable user interface (UI), which at least includes a model resource manager or node resource manager, a view browser, and an event browser; the model resource manager loads model information according to the resource mapping table, and has a The switch performs human-computer interaction and displays the health status of the model; the node resource manager loads the input and output information of the node according to the interaction mapping table, and performs human-computer interaction on the switch of the node and displays the health status of the node; the view browser according to the service mapping table and The interface mapping table loads visual view tags, each view tag corresponds to a visualization service, and performs human-computer interaction for different types of visualization services. Interface mapping table It is a structured document that contains at least the visual view label information of the simulation node.
[0033] c) service layer
[0034] The service layer includes: data interaction service thread, visualization service external interface, data monitoring service thread, control management service thread and clock management service, at least including clock management service subprogram, visualization service subprogram, data interaction service subprogram, control management service Subroutines, data monitoring services, and service mapping tables. The clock management service includes at least two modes of real-time clock advancement and synchronous clock advancement; the visualization service supports at least two-dimensional, three-dimensional situation display and curve monitoring and other visualization functions; the control management service at least has the control and management functions for the model of this node, including at least model loading. , model switch, model health management and other functions; the data monitoring service at least has the online monitoring function of the simulation data; the data interaction service as a task at least completes the interaction task of the model data of this node, and this task accompanies the start to the end of the simulation; service mapping A structured document that contains at least configuration information of services related to this simulation node.
[0035] The data interaction service thread completes the real-time update function of all node interaction data through the real-time communication middleware. This service accompanies the start to the end of the simulation task. The external interface of the visualization service is the window handle of the visualization component, so that the visualization component window can be displayed on the label of the visualization view manager. The data monitoring service thread completes the online monitoring function of the specified simulation data through the real-time communication middleware. The clock management service includes two modes: real-time clock advancement and synchronous clock advancement. The real-time clock advancement mode advances according to the real time and simulation step size, while the synchronous clock has nothing to do with the real clock. As long as all nodes complete the simulation task, the clock will move forward. advance.
[0036] d) Interaction layer
[0037] The interaction layer includes real-time communication middleware. Real-time communication middleware is a real-time network communication middleware designed for the characteristics of distributed simulation. It at least includes real-time optimization of communication links and provides corresponding software development kits (SDKs) to realize communication data. Interaction; data distribution service is a network communication middleware provided for real-time distributed application systems, and an application standard for distributed system communication recommended by the Object Management Group (OMG). Real-time communication middleware includes interactive data packets, events, messages, virtualization, and simulation model virtualization. The interaction mapping table contains at least the relationship between the simulation node and all its models and communication links, input and output ports or memory address mapping information.
[0038] The real-time communication middleware abstracts the communication link of the resource layer into a local virtualized memory, and the interaction mapping table describes the partition list of the interactive data packet in the local virtualized memory; the real-time communication middleware virtualizes and abstracts the simulation model of the resource layer , which describes the interaction data packets and event messages of model publishing/subscribing, and the interaction mapping table also describes the interface definition of the virtualization model. The principle of the real-time communication middleware is to update the interactive data packets that need to be published/subscribed by the virtual model to the partition list of the virtualized memory in real time according to the description in the interactive mapping table. To ensure the security of data interaction, different interaction data packets should be designed to be placed in different partitions.
[0039] e) Resource layer
[0040] The resource layer includes communication links and simulation models. In order to ensure the real-time performance of the system, the resource layer at least includes communication link resources, model resources and resource mapping tables. packaged components. The model resource encapsulation specification stipulates that the model resource contains at least three meta-functions: model initialization, model running, and model ending, and the meta-function names of all models are the same, the input parameters of the initialization meta-function contain at least node metadata, and the input parameters of the model running meta-function at least It includes node metadata and simulation clock, and there is no requirement for the input parameters of the meta-function at the end of the model. In addition to the above data, the input and output functions of the meta-function cannot have parameter information related to the model calculation. Node metadata is a data structure that contains at least the input and output data of this simulation node model. The resource mapping table is a structured document, which at least contains the input and output parameter information, model configuration information, communication link parameter information, and communication link configuration information of the simulation node model.
[0041] To ensure real-time performance, at least one communication link with nanosecond delay is selected as the real-time network for distributed simulation, such as reflective memory network. The simulation model resources are encapsulated into components, which include at least three interfaces of model initialization, model operation, and model end, and all model component interface names are the same. Design resource mapping table using XML technology. The resource mapping table contains at least input and output parameter information of the simulation model, model configuration information, communication link parameter information, communication link configuration information, node type, simulation application mode, node name and attribute information of visualization components. The input and output data structures of all models are combined and packaged as input parameters for model initialization and model running interfaces. Taking the reflection memory network as an example, the interactive mapping table is first designed using XML technology, and the shared memory is partitioned for nodes to use, for example:
[0042]
[0043]
[0044] Then call the reflective memory API to realize the functions of data interaction and message sending and receiving of the distributed simulation system. The real-time communication middleware will vary according to the communication link and the engineering experience of the designer, as long as the communication middleware can realize all the functions required by the upper-layer service.
[0045] The simulation model objects corresponding to different simulation computing tasks at the relevant levels are packaged into model resource components according to the model packaging specification, and the simulation object model component resources are loaded through the mapping table; the simulation node automatically generates the corresponding software interface and corresponding service components through the platform mapping table , the interface resources loaded by the software of each node type in the node software interface of the simulation platform are dynamically realized through the mapping table, and the different simulation tasks of the relevant levels are loaded through the corresponding view window resource mapping table.
[0046] see image 3. In the reconstruction process of the distributed simulation platform, a distributed simulation deployment scheme is designed, such as how many simulation nodes there are, what is the function of each simulation node, and what are the interactive data between nodes. Configure the platform mapping table of each node according to the deployment plan, and determine which nodes are the simulation computing types and which nodes are the control and management nodes. Configure an interface mapping table for each node to increase or decrease node interface resources; configure a service mapping table for each node to increase or decrease node services; configure an interaction mapping table for each node, and refine the data interaction content of each node according to the deployment plan; Configure a resource mapping table for nodes in the simulation computing mode, the simulation computing nodes will load model resource information, and the control and management nodes will load network resource information. Start the platform.
[0047] see Figure 4. In the simulation process of the distributed simulation platform: start the platform, load the platform mapping table, determine the type of the node, and enter the simulation calculation or control management mode; load the interface mapping table according to the control management mode to generate the view manager, node manager and other interfaces resources; or load interface mapping tables and resource mapping tables according to the simulation computing mode to generate interface resources such as view managers and model managers. Then load the service mapping table for the control management mode, and start the management service; in the control management mode, the user manages and configures the simulation through the human-computer interaction interface; in the simulation calculation mode, the user uses the human-computer interaction interface to configure the model of the node through the human-computer interaction interface. Perform management configuration, load the interface mapping table to generate the view manager, node manager, load the service mapping table, and start the management service; the user starts the simulation initialization, sends the initialization command to all other nodes according to the control management mode, loads the interactive mapping table, All nodes are ready for data interaction. After the simulation starts, real-time simulation operation management, node monitoring, node health management and clock advance services are performed. Or according to the simulation calculation mode, load the interface mapping table and the resource mapping table to generate the view manager and model manager; then load the service mapping table and start the simulation service; the node calls the initialization interface of all models to initialize the model; Data interaction, run the model, and perform model calculation, model monitoring, model health management, and data interaction services in real time according to the external clock, and the simulation ends. After the simulation is over, for the control management mode, stop the simulation operation management, node monitoring, node health management, and stop the clock advance service. For the simulation calculation mode, stop the running of all models and stop the data interaction service.