A method and system for supporting joint simulation of simulation software and distributed simulation nodes

By splitting the simulation process and generating a communication model, data transmission and scheduling control between the host and distributed clients are realized, which solves the problem of model compatibility between different simulation tools and ensures the correctness and efficiency of joint simulation results of complex systems.

CN117312016BActive Publication Date: 2024-10-11AVICIT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311345254.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-18
Publication Date
2024-10-11
Estimated Expiration
2043-10-18

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the problem of model reuse and compatibility between different simulation tools in heterogeneous model integration and co-simulation of large-scale complex systems, resulting in low simulation efficiency and incorrect co-simulation results.

Method used

By splitting the simulation process, the communication model between the host and the distributed client is generated to realize data transfer, and a scheduling control algorithm is used to ensure the correct running sequence of the simulation model and model integration and data interaction of different simulation tools.

Benefits of technology

Without remodeling or exporting the model, the problem of model compatibility is solved, ensuring the correctness and efficiency of the joint simulation results of the simulation software and distributed simulation nodes, and avoiding time misalignment of simulation data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312016B_ABST
    Figure CN117312016B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for supporting joint simulation of simulation software and distributed simulation nodes, respectively creating a one-to-one communication model for data interaction between the simulation software and each distributed simulation node; loading the communication model into the corresponding simulation software and the distributed simulation node, establishing a data connection relationship through each pair of host-side communication model and client-side communication model, so that the entire joint simulation process conforms to the business logic; in the joint simulation process of the simulation software and the distributed simulation node, the execution order between the simulation models in the host-side simulation process is scheduled and controlled to ensure the correct running order between the simulation models. The present invention performs joint simulation of the simulation software of other computers and the simulation software of the local computer without remodeling or exporting the model, thereby solving the compatibility problem of the model, being able to ensure the correct simulation calculation order in a complex process, and ensuring the correctness of the joint simulation result of the simulation software and the distributed simulation node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of simulation engineering, and in particular to a method and system for supporting joint simulation of simulation software and distributed simulation nodes. Background Art

[0002] With the development of science and technology, the means of designing and analyzing complex systems have gradually become richer and more complete. Among them, simulation technology has received more and more attention and has been maturely and widely used in multiple industrial fields (aviation, aerospace, automobile, shipbuilding, nuclear industry, etc.). In the development process of large and complex equipment systems, due to the increasing demand for functions and performance, the design of the system has become more and more complex, often involving multiple professional disciplines. At present, most engineering design simulation tools and technologies are only carried out within various professional disciplines such as hydraulics, machinery, software and network optics, and have not been jointly designed and simulated with other professional disciplines. In addition, in these professional fields, there are already a large number of design and simulation models, but these models are basically in a relatively independent state and have not been connected. When the design of complex equipment systems requires system integration across professional disciplines, these problems will lead to many results that are inconsistent with the expected design, such as incomplete or incorrect design, or conflicting requirements. These problems are serious for system design, which will bring a lot of rework, increase design costs, and delay design progress.

[0003] To address the above problems, there are currently two main solutions at home and abroad. One is to carry out secondary development for the specific version of commercial or open source simulation software involved in the integrated simulation, develop controls that match the data services defined by it, and then complete the integrated simulation of multi-source heterogeneous models. The disadvantage of this method is that when the simulation software version is upgraded, the existing integrated simulation client controls may become invalid and need to be redeveloped, which is a large workload and brings troubles to the use, maintenance and after-sales of the integrated simulation software; the other method is to export the simulation model built in the commercial tool as an FMU file, and then load all FMU files on a custom-developed simulation platform for distributed integrated simulation. The disadvantage of this method is that the simulation tool must support the export of FMU in Co-Simulation format, but many mainstream simulation tools, due to commercial interests and intellectual property considerations, often have compatibility issues when the exported FMU is used in other tools, and cannot run well in other simulation tools.

[0004] In summary, in terms of heterogeneous model integration and joint simulation of large-scale complex systems, the existing technical implementation methods cannot effectively solve the problem of model reuse between different simulation tools, the compatibility between different modeling and simulation tools, the low simulation efficiency, the difficulty in realizing model integration of different simulation tools, and the inability to guarantee the correctness of joint simulation results. Summary of the invention

[0005] The technology of the present invention solves the problem: overcomes the shortcomings of the prior art, provides a method and system that supports joint simulation of simulation software and distributed simulation nodes, so as to solve the above problems, improve the compatibility and simulation efficiency between different modeling and simulation tools, and realize model integration of different simulation tools to ensure the correctness of the joint simulation results.

[0006] The technical solution of the present invention is:

[0007] In a first aspect, the present invention provides a method for supporting joint simulation of simulation software and distributed simulation nodes, comprising the following steps:

[0008] Step S1: In order to realize distributed simulation, the simulation process composed of the connection between the input (parameters) and output (parameters) of multiple simulation models in the host-side simulation software and the distributed client-side simulation software is split, and the split simulation processes are formed in the host-side simulation software and the distributed client, i.e., the distributed simulation node; the input and output data that need to be transmitted between the host and the distributed client are determined according to the simulation process before the split; according to the input and output data that need to be transmitted between the host and the distributed client, a pair of simulation models with opposite input and output for communication are generated, which are respectively called the host-side communication model and the distributed client communication model, and each distributed client communication model corresponds to the distributed client to which it belongs; the host-side communication model and the distributed client communication model transmit data to each other in their respective iteration functions, and the data transmission method is: first transmit data to the other party, and then obtain data from the other party; to avoid deadlock, during the first data transmission, the host-side communication model does not transmit data to the distributed client communication model, or the distributed client communication model does not transmit data to the host-side communication model;

[0009] Step S2: all host-side communication models are imported into the host-side simulation process, and the host-side communication models are connected to the original host-side process according to the simulation process before the split; the distributed client communication models are imported into the corresponding distributed client simulation process respectively, and the distributed client communication models are connected to the corresponding distributed client original process according to the simulation process before the split;

[0010] Step S3: During the joint simulation process between the host-side simulation software and all distributed client-side simulation software, the execution order between the simulation models including the communication model in the simulation process of the host-side is scheduled and controlled to ensure the correct running timing between all simulation models.

[0011] In particular, in step S3, during the joint simulation process of the host-side simulation software and all the distributed client-side simulation software, the execution order between the simulation models including the communication model in the simulation process of the host-side is scheduled and controlled to ensure the correct running order between all the simulation models. The algorithm of the scheduling control is as follows:

[0012] First execute each communication model on the host side, and then execute other simulation models in the host side simulation process; if the input of other simulation models is not connected to the output of each communication model on the host side, they can be executed in parallel with the communication model on the host side; if the input and output of each communication model on the host side are directly connected, the host side simulation software needs to control the execution order between the interconnected host side communication models: for each connection, first execute the simulation model to which the starting point of the connection belongs, that is, the upstream simulation model, and then execute the simulation model to which the end point of the connection belongs, that is, the downstream simulation model, and before the downstream simulation model is simulated, it is necessary to obtain the simulation results from the upstream simulation model and set the input data of the downstream simulation model according to the connection.

[0013] In a second aspect, the present invention provides a simulation system supporting simulation software and distributed simulation nodes, including a simulation module, a communication module and a simulation control module:

[0014] Simulation module: including host-side simulation module and distributed simulation node simulation modules of the client side. The host-side simulation module is used to run the host-side simulation model. The distributed simulation node simulation modules of the client side are used to run the client-side simulation model. The host-side simulation model and the distributed client-side simulation model exchange simulation data through the simulation communication module.

[0015] Communication module: It is a communication model with multiple pairs of opposite input / output, used for communication between the host simulation module and the simulation modules of each distributed simulation node of the client, and realizes the simulation data interaction between the host simulation model and the client simulation model during the simulation execution process in the iterative function of the communication model;

[0016] Simulation control module: used to control the simulation execution order of the host-side simulation model and all distributed client-side simulation models; in the joint simulation process of the host-side simulation software and all distributed client-side simulation software, the execution order between the simulation models including the communication model in the simulation process of the host side is scheduled and controlled to ensure the correct running timing between all simulation models.

[0017] In particular, in the simulation control module, the scheduling control algorithm is implemented as follows: first execute each communication model on the host side, and then execute other simulation models in the host side simulation process; if the input of other simulation models is not connected to the output of each communication model on the host side, they can be executed in parallel with the communication model on the host side; if the input and output between the communication models on the host side are directly connected, the host side simulation software needs to control the execution order between the interconnected communication models on the host side: for each connection, first execute the simulation model to which the starting point of the connection belongs, that is, the upstream simulation model, and then execute the simulation model to which the end point of the connection belongs, that is, the downstream simulation model, and before the downstream simulation model is simulated, it is necessary to first obtain the simulation results from the upstream simulation model and set the input data of the downstream simulation model according to the connection.

[0018] In a third aspect, the present invention provides an electronic device, including a memory and a processor;

[0019] Memory, used to store computer programs;

[0020] The processor is used to execute the computer program stored in the memory, and implement the method or system described above during execution.

[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, the aforementioned method or the aforementioned system is implemented.

[0022] Compared with the prior art, the present invention has the following advantages:

[0023] (1) In the method of the present invention, the original model still runs on the original simulation software, and there is no need to export the model. Data interaction and synchronization are performed through the network, and each distributed simulation node uses the original model under its own simulation software to perform joint simulation with the model under the host simulation software. Compared with other joint simulation technologies at home and abroad, the present invention can perform joint simulation on the simulation software of other computers and the simulation software of the local computer without remodeling or exporting the model, solving the compatibility problem of the model, and at the same time, it can ensure the correct simulation calculation order in a complex process, thereby ensuring the correctness of the joint simulation results of the simulation software and the distributed simulation nodes.

[0024] (2) There is no unified joint distributed simulation interface (DISTRIBUTED CO-SIMULATION PROTOCOL, referred to as DCP, which was released in 2019, but very few software support it) between the simulation software, and it is impossible to achieve the purpose of joint simulation by controlling other simulation software. In the present invention, the method of communication in the simulation model (communication model) is adopted to realize the data transmission of each simulation software. However, according to the conventional simulation iteration algorithm, it will lead to inconsistency with the conventional simulation data transmission timing: because the models of the host side and the distributed client (including the communication model) are input first and then output in each simulation iteration, the output of the communication model of one of the host side or the distributed client must be time-displaced, which is the previous moment, and the scheduling control algorithm described in the present invention can well solve the problem of time dislocation of simulation data.

[0025] In summary, the present invention creates a one-to-one communication model for data interaction between the simulation software and each distributed simulation node; the communication model is loaded into the corresponding simulation software and the distributed simulation node, and a data connection relationship is established through each pair of host-side communication models and client-side communication models, so that the entire joint simulation process conforms to the business logic; in the joint simulation process of the simulation software and the distributed simulation nodes, the execution order between the simulation models in the host-side simulation process is scheduled and controlled to ensure the correct running timing between the simulation models. The present invention jointly simulates the simulation software of other computers and the simulation software of the local computer without remodeling or exporting the model, which solves the compatibility problem of the model, and can ensure the correct running timing between the simulation models, and ensures the correctness of the joint simulation results of the simulation software and the distributed simulation nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 A flowchart of a method for supporting joint simulation between simulation software and distributed simulation nodes in an embodiment of the present invention;

[0028] Figure 2 A schematic diagram of a communication model editing interface in an embodiment of the present invention;

[0029] Figure 3 This is an example of a simulation flow chart with a distributed simulation function in an embodiment of the present invention;

[0030] Figure 4 In the embodiment of the present invention Figure 3 An example of simulation control flow in the simulation flow chart;

[0031] Figure 5 It is a structural block diagram of a joint simulation system supporting simulation software and distributed simulation nodes in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0033] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0034] The present invention provides a method for supporting joint simulation of simulation software and distributed simulation nodes, which can not only solve the compatibility problem of simulation models in different professional fields, but also ensure the correct simulation calculation sequence in complex processes, thereby ensuring the correctness of the joint simulation results of the simulation software and distributed simulation nodes.

[0035] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below through specific implementations and in conjunction with the accompanying drawings.

[0036] In the development process of large-scale complex equipment systems, when the system design needs to be integrated across professional fields, the relatively independent status of different professional simulation tools will lead to many results that are inconsistent with the expected design, such as incomplete or incorrect design, or conflicting requirements. These problems are serious for system design and will lead to product rework, increased design costs, and delayed design progress. Therefore, an embodiment of the present invention provides a method for supporting joint simulation of simulation software and distributed simulation nodes, each simulation model uses its own simulation software for joint simulation, and the data interaction between the host-side simulation model and each distributed simulation node simulation model adopts a one-to-one communication mode. A simulation communication model specifically used for data transmission is inserted into each simulation software, and the timing of data transmission is controlled by the simulation control module. It has good maintainability and practicality, the operation process is very convenient, and the data compatibility problem is effectively solved.

[0037] Example 1

[0038] like Figure 1 As shown, an embodiment of the present invention provides a method for supporting joint simulation of simulation software and distributed simulation nodes, comprising the following steps:

[0039] Step S1: creating a one-to-one communication model for data interaction between the simulation software (host) and each distributed simulation node (client);

[0040] Step S2: Load the communication model into the corresponding simulation software (host side) and the distributed simulation node (client side), and establish a data connection relationship through each pair of host side communication model and client side communication model, so that the entire joint simulation process conforms to the business logic;

[0041] Step S3: During the joint simulation process between the simulation software (host side) and the distributed simulation nodes (client side), the execution order between the simulation models in the simulation process on the host side is scheduled and controlled to ensure the correct running timing between the simulation models.

[0042] In one embodiment, the above step S1: creates a one-to-one communication model for data interaction between the simulation software (host end) and each distributed simulation node (client end).

[0043] The communication model includes the host-side communication model and the client-side communication model. The host-side communication model and the client-side communication model communicate based on the interface provided by FMI. FMI is a set of interface standards for the reuse of functional and performance models proposed by the International Modelica Association. Through the FMI standard, the model making software exports a compressed package file with the suffix FMU. FMU mainly contains two types of files: one is the xml file used to describe the definition of all exposed public variables of the model and other static information; the other is the specific implementation of a series of FMI standard functions required for joint simulation.

[0044] The host-side simulation model and each client-side distributed node simulation model set up a pair of communication models with opposite input / output directions. As shown in Table 1, the data that needs to be edited for each communication model is as follows:

[0045] Table 1 Communication model data information

[0046]

[0047] Figure 2 A schematic diagram of the communication model editing interface is shown. The corresponding data can be edited. After the data editing is completed, the host and client communication models can be generated according to the interface information.

[0048] The host communication model and the client communication model use network communication (such as TCP / IP) to transfer data. The interface data of the host communication model is shown in Table 2. The client communication model first obtains data from the host communication model, and then sends the data to the host, thereby realizing data interaction between the client and the host.

[0049] Table 2 Host communication model interface data description

[0050]

[0051]

[0052] As shown in Table 3, the host-side communication model provides HTTP interface services to the outside world. The host-side communication model is loaded into the host-side simulation model in the form of FMU and provides host-side interface call services. When the host communicates through FMU, a port number must first be configured (such as 9900, which cannot be occupied by other programs and other communication models). In the Fmi*SetInterger function with the configured port, the HTTP service is enabled to provide interface services for the client component. The host initializes the communication model through / init so that the client can obtain the basic input / output information of the interface during initialization. In the simulation iteration function Fmi*DoStep, the / s2c function is first enabled so that the client can obtain input data; after the client completes data acquisition, the / c2s function is enabled so that the client can pass output data to the host. The host-side communication model and the client-side communication model must exchange data once at each simulation step, and the host-side communication model and the client-side communication model are offset by half a step in timing.

[0053] Table 3 Communication model interface service description

[0054] / init Used to obtain basic information of the interface from the host / s2c Used to get data from the host / c2s Used to send data to the host

[0055] The client communication model interface data is shown in Table 4. The client communication model is loaded into the simulation model of the client distributed simulation node, and can be connected to the host by setting the same communication port to send data to the host or receive data from the host. When the host and the distributed simulation node are jointly simulated, data is sent to the host and received from the host through the / s2c and / c2s sub-websites of the HTTP service provided by the host.

[0056] Table 4 Client communication model interface data description

[0057] name Type and description Server address String. The host address of the distributed simulation, which can be an IP. Port Number Used to distinguish different clients, the model can be modified in simulation Input variable list All input variables correspond to output variables on the host side. Output variable list All output variables correspond to input variables on the host side.

[0058] The client communication model has two parameters: server address and port number. These two parameters can be modified before the simulation starts. In the simulation iteration function Fmi*DoStep, the host's / s2c service is first accessed through the HTTP protocol to obtain the data transmitted by the host with the GET method; then the host's / c2s service is accessed through the HTTP protocol to upload the data to the host with the POST method. In order to ensure the synchronization of host and client data, data exchange is required for each simulation step. The client communication model first performs a joint simulation with the host communication model for half a step.

[0059] In one embodiment, the above step S2: loads the communication model into the corresponding simulation software (host side) and the distributed simulation node (client side), establishes a data connection relationship through each pair of host side communication model and client side communication model, so that the entire joint simulation process conforms to the business logic.

[0060] All host-side communication models are loaded into the simulation process of the host-side simulation software, and client-side communication models are loaded into the corresponding distributed client-side simulation process. Since the input and output interfaces of each communication model are established according to business needs, after each communication model is loaded into each simulation process, it can be connected according to business logic, so that the entire joint simulation process conforms to business logic.

[0061] In one embodiment, the above step S3: in the joint simulation process of the simulation software and the distributed simulation nodes, the simulation process is scheduled and controlled by controlling the communication model to ensure the running order between the simulation models. The scheduling and control of the simulation process follows the following rules: first execute each communication model on the host side, and then execute other simulation models in the simulation process; if the input of other simulation models is not connected to the output of each communication model on the host side, it can be executed in parallel with the host-side communication model; if the input and output between the communication models on the host side are directly connected, the host-side simulation software needs to control the execution order between the interconnected communication models: for each connection, first execute the simulation model to which the starting point of the connection belongs, that is, the upstream simulation model, and then execute the simulation model to which the end point of the connection belongs, that is, the downstream simulation model, and before the downstream simulation model is simulated, it is necessary to obtain the simulation results from the upstream simulation model and set the input data of the downstream simulation model according to the connection.

[0062] To more clearly demonstrate the simulation control algorithm of the present invention, Figure 3 Take the flowchart in as an example. Figure 3The flowchart shown in the figure has 5 non-communication FMUs and 4 distributed communication FMUs. The figure shows the common connection relationship between non-communication FMUs and distributed communication FMUs, where the connection arrow points to the end point of the connection. For each connection, the simulation model to which the starting point of the connection belongs is called the upstream simulation model, and the simulation model to which the end point of the connection belongs is called the downstream simulation model. The upstream simulation model corresponding to each connection is the input of the downstream simulation model, and the downstream simulation model is the output of the upstream simulation model. The communication FMUs are named distributed communication FMU1, distributed communication FMU2, distributed communication FMU3 and distributed communication FMU4. The 5 non-communication FMUs are named other FMU 1, other FMU 2, other FMU 3, other FMU 4 and other FMU 5. Other FMU 1 is not connected to the communication FMU; other FMU 2 is the input of distributed communication FMU1; other FMU3 is the output of distributed communication FMU2; distributed communication FMU3 is the input of distributed communication FMU4; other FMU4 is the input of distributed communication FMU3; other FMU5 is the output of distributed communication FMU4.

[0063] Figure 4 It is shown in Figure 3 The simulation control algorithm of the flowchart in the figure. After the simulation starts, it is initialized first. From the node "Start a new time step simulation", the simulation loop process begins until the simulation ends. During the simulation loop, the time advances one time step each time. Since other FMU1, other FMU2 and other FMU4 do not have input from the communication FMU, these FMUs can be executed in parallel with the communication FMU, see the nodes "Set other FMU inputs without communication FMU input" and "Simulate other FMUs without communication FMU input in one step". Distributed communication FMU4 is the downstream of distributed communication FMU3 and can only be simulated after the simulation of communication FMU3 is completed. Distributed communication FMU1 and distributed communication FMU2 are not connected to other communication FMUs, so the distributed communication FMU can be divided into 3 independent threads for parallel execution (distributed communication FMU3 and distributed communication FMU4 are in one thread). Other FMU3 and other FMU5 have communication FMU as input and can only be simulated after the upstream simulation is completed. The nodes for obtaining output and setting input in the figure, such as "Get distributed communication FMU3 output" and "Set distributed communication FMU4 input", are designed to pass the upstream simulation results to the downstream before the downstream simulation starts.

[0064] The present invention discloses a method for supporting joint simulation of simulation software and distributed simulation nodes, wherein the host-side simulation software and each distributed simulation node perform data interaction and synchronization through a network, and can implement scheduling control of the simulation process. Compared with other joint simulation technologies at home and abroad, the present invention solves the compatibility problem of the model by opening up the data interaction interface between various software tools and coordinating the joint simulation of multiple client simulation tools without remodeling or exporting the model, and can ensure the correct simulation calculation sequence in a complex simulation process, thereby ensuring the correctness of the joint simulation results of the simulation software and the distributed simulation nodes. At the same time, through multi-machine distributed simulation, it can also effectively solve the problem of slow single-machine operation or inability to simulate large-scale simulation models.

[0065] Example 2

[0066] like Figure 5 As shown, an embodiment of the present invention provides a system for supporting joint simulation of simulation software and distributed simulation nodes, including the following modules:

[0067] The simulation module 41 includes a host-side simulation module and simulation modules of distributed simulation nodes of the client. The host-side simulation module is used to run the host-side simulation model. The distributed simulation node simulation modules of the client are used to run the client simulation model. The host-side simulation model and the client simulation model exchange simulation data through the simulation communication module.

[0068] Communication module 42, the communication module is a communication model with multiple pairs of opposite input / output, used for communication between the host-side simulation module and the simulation modules of each distributed simulation node of the client, and realizing the simulation data interaction between the host-side simulation model and the client-side simulation model during the simulation execution process in the iterative function of the communication model;

[0069] The simulation control module 43 is used to schedule the execution order between the models (including the communication model) on the host side. In the joint simulation process, the control logic of the simulation control module is as follows: first execute the communication models on the host side, and then execute other simulation models in the simulation process; if the input of other simulation models is not connected to the output of the communication models on the host side, they can be executed in parallel with the communication models on the host side; if the input and output between the communication models on the host side are directly connected, the simulation software on the host side needs to control the execution order between the interconnected communication models: for each connection, first execute the simulation model to which the starting point of the connection belongs, that is, the upstream simulation model, and then execute the simulation model to which the end point of the connection belongs, that is, the downstream simulation model, and before the downstream simulation model is simulated, it is necessary to obtain the simulation results from the upstream simulation model and set the input data of the downstream simulation model according to the connection.

[0070] Example 3

[0071] The present invention also provides an electronic device (computer, server, smart phone, network device, etc.), including a memory and a processor, wherein the memory is used to store a computer program executable by the processor, and when the processor executes the computer program, the above-mentioned method embodiment or system embodiment is implemented.

[0072] Embodiment 4, the present invention also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment or system embodiment when executed by a processor.

[0073] The above embodiments are provided only for the purpose of describing the present invention, and are not intended to limit the scope of the present invention. The scope of the present invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the present invention should all be included within the scope of the present invention.

Claims

1. A method for supporting joint simulation of simulation software and distributed simulation nodes, characterized in that: include: Step S1: split the simulation process composed of the connection between the input and output of multiple simulation models in the host-side simulation software and the distributed client simulation software, and form the split simulation processes in the host-side simulation software and the distributed client, i.e., the distributed simulation node; determine the input and output data that the host-side and the distributed client need to transmit according to the simulation process before splitting; generate a pair of simulation models for communication with opposite input and output according to the input and output data that the host-side and the distributed client need to transmit, respectively referred to as the host-side communication model and the distributed client communication model, each distributed client communication model corresponds to the distributed client to which it belongs; the host-side communication model and the distributed client communication model transmit data to each other in their respective iteration functions, and the data transmission method is: first transmit data to the other party, and then obtain data from the other party; to avoid deadlock, during the first data transmission, the host-side communication model does not transmit data to the distributed client communication model, or the distributed client communication model does not transmit data to the host-side communication model; Step S2: all host-side communication models are imported into the host-side simulation process, and the host-side communication models are connected to the original host-side process according to the simulation process before the split; the distributed client communication models are imported into the corresponding distributed client simulation process respectively, and the distributed client communication models are connected to the corresponding distributed client original process according to the simulation process before the split; Step S3: During the joint simulation process between the host-side simulation software and all distributed client-side simulation software, the execution order between the simulation models including the communication model in the simulation process of the host-side is scheduled and controlled to ensure the correct running timing between all simulation models.

2. The method for co-simulating supporting simulation software and distributed simulation nodes according to claim 1, characterized in that: Step S3: During the joint simulation process between the host-side simulation software and all the distributed client-side simulation software, the execution order between the simulation models including the communication model in the simulation process of the host-side is scheduled and controlled to ensure the correct running order between all the simulation models. The scheduling control algorithm is as follows: First execute each communication model on the host side, and then execute other simulation models in the host side simulation process; if the input of other simulation models is not connected to the output of each communication model on the host side, then execute them in parallel with the communication model on the host side; if the input and output between each communication model on the host side are directly connected, the host side simulation software needs to control the execution order between the interconnected host side communication models: for each connection, first execute the simulation model to which the starting point of the connection belongs, that is, the upstream simulation model, and then execute the simulation model to which the end point of the connection belongs, that is, the downstream simulation model, and before simulating the downstream simulation model, it is necessary to first obtain the simulation results from the upstream simulation model and set the input data of the downstream simulation model according to the connection.

3. A simulation system supporting simulation software and distributed simulation nodes, characterized in that: Including simulation module, communication module and simulation control module: Communication module: split the simulation process composed of the connection between the input and output of multiple simulation models in the host-side simulation software and the distributed client simulation software, and form the split simulation processes in the host-side simulation software and the distributed client, i.e., the distributed simulation node; determine the input and output data that the host-side and the distributed client need to transmit according to the simulation process before splitting; generate a pair of simulation models with opposite input and output for communication according to the input and output data that the host-side and the distributed client need to transmit, respectively called the host-side communication model and the distributed client communication model, each distributed client communication model corresponds to the distributed client to which it belongs; the host-side communication model and the distributed client communication model transmit data to each other in their respective iteration functions, and the data transmission method is: first transmit data to the other party, and then obtain data from the other party; to avoid deadlock, during the first data transmission, the host-side communication model does not transmit data to the distributed client communication model, or the distributed client communication model does not transmit data to the host-side communication model; Simulation module: All host-side communication models are imported into the host-side simulation process, and the host-side communication models are connected to the original host-side process according to the simulation process before splitting; The distributed client communication model is respectively imported into the corresponding distributed client simulation process, and the distributed client communication model is connected to the corresponding distributed client original process according to the simulation process before splitting; Simulation control module: During the joint simulation process between the host-side simulation software and all distributed client-side simulation software, the execution order between the simulation models in the simulation process on the host side, including the communication model, is scheduled and controlled to ensure the correct running timing between all simulation models.

4. The support simulation software and distributed simulation node joint simulation system according to claim 3, characterized in that: In the simulation control module, the scheduling control algorithm is implemented as follows: first execute each communication model on the host side, and then execute other simulation models in the host side simulation process; if the input of other simulation models is not connected to the output of each communication model on the host side, then execute them in parallel with the communication model on the host side; if the input and output between the communication models on the host side are directly connected, the host side simulation software needs to control the execution order between the interconnected communication models on the host side: for each connection, first execute the simulation model to which the starting point of the connection belongs, that is, the upstream simulation model, and then execute the simulation model to which the end point of the connection belongs, that is, the downstream simulation model, and before the downstream simulation model is simulated, it is necessary to obtain the simulation results from the upstream simulation model and set the input data of the downstream simulation model according to the connection.

5. An electronic device, characterized in that: including memory and processor; Memory, used to store computer programs; A processor, used to execute a computer program stored in a memory, and when executed, implements the method described in any one of claims 1-2 or the system described in claims 3-4.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the method described in any one of claims 1-2 or the system described in claims 3-4 is implemented.

Citation Information

Patent Citations

  • FMI-based multi-source heterogeneous model co-simulation method and device, equipment and medium

    CN113791793A

  • Engine control software simulation platform integration method and system

    CN115238437A

  • Method for providing an integrated process for control unit development and a simulation device for control unit development

    US20190102149A1