CN111767652A - Simulation operation method and device and electronic equipment - Google Patents

Simulation operation method and device and electronic equipment Download PDF

Info

Publication number
CN111767652A
CN111767652A CN202010619006.2A CN202010619006A CN111767652A CN 111767652 A CN111767652 A CN 111767652A CN 202010619006 A CN202010619006 A CN 202010619006A CN 111767652 A CN111767652 A CN 111767652A
Authority
CN
China
Prior art keywords
simulation
project
operation process
bit width
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010619006.2A
Other languages
Chinese (zh)
Other versions
CN111767652B (en
Inventor
张桥
李京燕
郭明昊
余慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shi Guan Jin Yang Technology Development Co ltd
Original Assignee
Beijing Shi Guan Jin Yang Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shi Guan Jin Yang Technology Development Co ltd filed Critical Beijing Shi Guan Jin Yang Technology Development Co ltd
Priority to CN202010619006.2A priority Critical patent/CN111767652B/en
Publication of CN111767652A publication Critical patent/CN111767652A/en
Application granted granted Critical
Publication of CN111767652B publication Critical patent/CN111767652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a simulation operation method, a simulation operation device and electronic equipment, wherein the method comprises the following steps: acquiring a simulation project to be simulated and operated, wherein the simulation project comprises a plurality of simulation models; acquiring a bit width parameter of each simulation model; and under the condition that the bit width parameters are at least two, starting at least two operation processes, wherein each operation process corresponds to the simulation model with the same bit width parameter, and each operation process is used for carrying out simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.

Description

Simulation operation method and device and electronic equipment
Technical Field
The present application relates to the field of computer simulation technologies, and in particular, to a simulation operation method and apparatus, and an electronic device.
Background
The created simulation model may have different bit widths subject to modeling systems of different bit widths. For example, the FMU model generated by the 16-bit modeling software is a 16-bit simulation model, the FMU model generated by the 32-bit modeling software is a 32-bit simulation model, and the FMU model generated by the 64-bit modeling software is a 64-bit simulation model.
When a simulation project comprising a plurality of simulation models is operated on the current simulation platform, the simulation models in the simulation project are generally required to be simulation models with the same bit width, and only a modeling system needs to follow a simulation protocol with a corresponding bit width. For example, simulation operations may be performed on simulation items of a simulation model that only includes 32 bits on the simulation platform, or simulation operations may be performed on simulation items of a simulation model that only includes 64 bits on the simulation platform.
However, if the simulation project includes both a 32-bit simulation model and a 64-bit simulation model, the current simulation platform cannot realize simulation operation.
Disclosure of Invention
In view of the above, the present application provides a simulation operation method, a simulation operation device and an electronic device, as follows:
a method of simulation operations, the method comprising:
obtaining a simulation project to be simulated and operated, wherein the simulation project comprises a plurality of simulation models;
obtaining a bit width parameter of each simulation model;
and starting at least two operation processes under the condition that the bit width parameters are at least two, wherein each operation process corresponds to a simulation model with the same bit width parameter, and each operation process is used for performing simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
In the above method, preferably, a first operation process of the at least two operation processes is further configured to: transmitting a first process operation result obtained by the first operation process performing simulation operation on the corresponding simulation model to a second operation process of the at least two operation processes, so that the second operation process performs simulation operation on the simulation model corresponding to the second operation process according to the first process operation result to obtain a project simulation result of the simulation project;
and the second operation process is also used for transmitting the project simulation result of the simulation project to the first operation process.
In the above method, preferably, a first operation process of the at least two operation processes is further configured to: and receiving a second process operation result obtained by performing simulation operation on the simulation model corresponding to the second operation process in the at least two operation processes, so that the first operation process performs simulation operation on the simulation model corresponding to the first operation process according to the second process operation result to obtain a project simulation result of the simulation project.
In the above method, preferably, the first operation process is further configured to output the project simulation result.
In the method, preferably, data transmission is performed between the operation processes of the at least two operation processes through a transmission control protocol TCP.
The above method, preferably, further comprises:
and starting a third operation process under the condition that the bit width parameter is one, wherein the third operation process is used for carrying out simulation operation on the simulation model in the simulation project so as to obtain a project simulation result of the simulation project.
In the above method, preferably, the third operation process is further configured to: and outputting the project simulation result of the simulation project.
In the above method, preferably, the obtaining the bit width parameter of each simulation model includes:
obtaining a model file of each simulation model in the simulation project;
and analyzing the model file to obtain the bit width parameter of each simulation model.
An emulation operation device, comprising:
the simulation system comprises a first acquisition unit, a second acquisition unit and a simulation unit, wherein the first acquisition unit is used for acquiring a simulation project to be simulated and operated, and the simulation project comprises a plurality of simulation models;
the second obtaining unit is used for obtaining the bit width parameter of each simulation model;
the first processing unit is configured to start at least two operation processes under the condition that the bit width parameter is at least two, where each operation process corresponds to a simulation model having the same bit width parameter, and each operation process is used to perform simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
An electronic device, the electronic device comprising:
according to the technical scheme, the application discloses a method.
The memory is used for storing an application program and data generated by the running of the application program;
a processor for executing the application to implement: obtaining a simulation project to be simulated and operated, wherein the simulation project comprises a plurality of simulation models; obtaining a bit width parameter of each simulation model; and starting at least two operation processes under the condition that the bit width parameters are at least two, wherein each operation process corresponds to a simulation model with the same bit width parameter, and each operation process is used for performing simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
According to the technical scheme, the simulation operation method, the simulation operation device and the electronic equipment, firstly, a simulation project to be simulated and operated and including a plurality of simulation models is obtained, then at least two operation processes can be started under the condition that bit width parameters are at least two by obtaining the bit width parameter of each simulation model, each operation process in the started operation processes corresponds to a simulation model with the same bit width parameter, and therefore each operation process is used for carrying out simulation operation on the corresponding simulation model respectively, and a project simulation result of the simulation project is obtained. Therefore, whether the simulation models with different bit width parameters exist in the simulation project or not is automatically identified when the simulation operation is started, so that the corresponding operation processes are started for the simulation models with different bit width parameters to perform corresponding simulation operation processing and output project simulation results.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a simulation operation method according to an embodiment of the present application;
FIG. 2 is another flowchart of a simulation calculation method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a simulation computing device according to a second embodiment of the present application;
fig. 4 is a schematic structural diagram of another simulation computing device according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present application;
FIG. 6 is a flowchart illustrating a specific implementation of a simulation operation in the embodiment of the present application;
FIG. 7 is a schematic diagram of an operation scheme of a simulation system composed of a pure 32-bit or pure 64-bit FMU simulation model according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an operation scheme of a simulation system with coexisting 32-bit and 64-bit FMU simulation models according to an embodiment of the present application.
Detailed Description
When a simulation project comprising a plurality of simulation models is operated on the current simulation platform, the simulation models in the simulation project are generally required to be simulation models with the same bit width, and only a modeling system needs to follow a simulation protocol with a corresponding bit width.
In order to solve the above problems, the inventor of the present application has made further research to provide a simulation operation method, which can implement mixed real-time simulation operation in which simulation models with different bit widths coexist in the same simulation project, and improve the efficiency of the simulation operation, specifically as follows:
firstly, obtaining a simulation project to be simulated and operated, wherein the simulation project comprises a plurality of simulation models; and obtaining a bit width parameter of each of the simulation models; and finally, starting at least two operation processes under the condition that the bit width parameters are at least two, wherein each operation process corresponds to a simulation model with the same bit width parameter, and each operation process is used for performing simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
Therefore, when the simulation operation is started, whether the simulation item contains the simulation models with the same bit width parameter or the simulation item with the coexisting simulation models with different bit width parameters is automatically identified, so that the corresponding simulation operation processing is carried out, and the item simulation result is output.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, a simulation operation method provided in an embodiment of the present application may be applied to an electronic device capable of performing data processing, such as a computer or a server. The technical scheme in the embodiment is mainly used for starting the corresponding operation process for processing according to the bit width parameter of each obtained simulation model when simulation operation is performed, so as to obtain a project simulation result of a simulation project.
In a specific implementation, the method in this embodiment may include the following steps:
step 101: and acquiring a simulation project to be simulated and operated.
The simulation project includes a plurality of simulation models, and the simulation model may be a simulation model encapsulated based on a standard protocol, for example, an FMU (Functional module-Up Unit) simulation model encapsulated based on an FMI (Functional module-Up Interface) protocol.
Specifically, the simulation project refers to a simulation system project including various meta-models to be operated, where the meta-models are simulation models.
In a specific implementation, in this embodiment, a simulation project including a simulation model to be operated may be loaded on an implemented simulation platform, for example, an application program of the simulation platform is first opened, a simulation system project including a plurality of FMU simulation models, which is required and has been created in advance, is manually selected on a loading interactive interface of the simulation platform, that is, the simulation project is clicked to open the simulation system project, so as to implement loading of the simulation system project.
Step 102: and obtaining the bit width parameter of each simulation model.
The bit width refers to a data amount which can be transmitted by the memory or the video memory at one time, the bit width parameter refers to a system bit width parameter of the modeling system when the simulation model is modeled, and the bit width parameter of each simulation model may be the same or different, that is, each simulation model may be created based on the modeling system with different system bit widths. Specifically, the bit width parameter may have 16 bits, 32 bits, or 64 bits, etc.
In specific implementation, in this embodiment, after loading a simulation project on a simulation platform, a bit width parameter of each simulation model in the simulation project is obtained, for example, there are 3 simulation models in the simulation project, and the bit width parameters of the 3 simulation models are all 32 bits, or there are 4 simulation models in the simulation project, and the bit width parameters of the 4 simulation models are all 64 bits, or there are 5 simulation models in the simulation project, and the bit width parameter of 2 simulation models in the 5 simulation models is 32 bits, and the bit width parameter of the other 3 simulation models is 64 bits.
Step 103: and judging whether the bit width parameters are at least two, if so, executing the step 104.
Specifically, in this embodiment, the bit width parameter may be classified to obtain the type of the bit width parameter, for example, the bit width parameter of all simulation models in the simulation project may be only one, for example, all simulation models in the simulation project are 64-bit simulation models; or, there may be two bit width parameters of all simulation models in the simulation project, such as 32-bit simulation models and 64-bit simulation models in the simulation project; or, there may be three bit width parameters of all simulation models in the simulation project, and the simulation project has 16-bit simulation models, 32-bit simulation models, and 64-bit models; and so on.
Step 104: and under the condition that the bit width parameters are at least two, starting at least two operation processes, wherein each operation process corresponds to the simulation model with the same bit width parameter, and each operation process is used for carrying out simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
In this embodiment, the operation process refers to an operation activity capable of implementing simulation operation on a simulation project. The simulation operation is to establish an equivalent mathematical model, write a simulation program on a computer, compile and run.
In a specific implementation, in this embodiment, under the condition that bit width parameters of the simulation model in the acquired simulation project are at least two, at least two operation processes are correspondingly started, and the simulation models with the same bit width parameter perform simulation operation by using the same operation process, so that the operation processes are respectively used to perform simulation operation on one or more simulation models with corresponding bit width parameters, and finally, a project simulation result of the simulation project is obtained.
For example, the acquired simulation project includes two simulation models, namely a simulation model with a bit width parameter of 32 bits and a simulation model with a bit width parameter of 64 bits, and two operation processes are correspondingly started, wherein one operation process is used for executing simulation operation on the simulation model with the bit width parameter of 32 bits, and the other operation process is used for executing simulation operation on the simulation model with the bit width parameter of 64 bits, so as to obtain a project simulation result of the simulation project;
or, the acquired simulation project comprises three simulation models, namely a simulation model with a bit width parameter of 32 bits and two simulation models with a bit width parameter of 64 bits, and two operation processes are correspondingly started, wherein one operation process is used for executing simulation operation on the simulation model with the bit width parameter of 32 bits, and the other operation process is used for executing simulation operation on the simulation models with the bit width parameter of 64 bits, so as to obtain a project simulation result of the simulation project;
or, the acquired simulation items include three simulation models, namely a simulation model with a bit width parameter of 16 bits, a simulation model with a bit width parameter of 32 bits, and a simulation model with a bit width parameter of 64 bits, and three operation processes are correspondingly started, wherein one operation process is used for executing simulation operation on the simulation model with a bit width parameter of 16 bits, one operation process is used for executing simulation operation on the simulation model with a bit width parameter of 32 bits, and the other operation process is used for executing simulation operation on the simulation model with a bit width parameter of 64 bits, so as to obtain an item simulation result of the simulation item.
As can be seen from the foregoing solution, in the simulation operation method provided in the first embodiment of the present application, a simulation item to be subjected to simulation operation and including a plurality of simulation models is obtained, and then at least two operation processes can be started under the condition that bit width parameters are at least two by obtaining a bit width parameter of each simulation model, where each operation process in the started operation processes corresponds to a simulation model having the same bit width parameter, and thus each operation process is used for performing simulation operation on the simulation model corresponding to each operation process, so as to obtain a project simulation result of the simulation item. Therefore, whether the simulation models with different bit width parameters exist in the simulation project or not is automatically identified when the simulation operation is started, so that the corresponding operation processes are started for the simulation models with different bit width parameters to perform corresponding simulation operation processing and output project simulation results.
In one implementation, the first operation process of the at least two operation processes started in step 104 is further configured to transmit the operation result to the second operation process. The first process operation result is an operation result obtained by performing simulation operation on one or more simulation models corresponding to the first process operation result by the first operation, and specifically includes the following steps:
the first operation process transmits a first process operation result obtained by the first operation process performing simulation operation on the corresponding simulation model to a second operation process of the at least two operation processes, so that the second operation process performs simulation operation on the simulation model corresponding to the second operation process according to the first process operation result to obtain a project simulation result of the second operation process;
and the second operation process is also used for transmitting the project simulation result of the simulation project to the first operation process.
Further, the first operation process is further configured to output the project simulation result, for example, the first operation process outputs the project simulation result of the second operation process. For example, the first operation process may also transmit the project simulation result to an interactive interface, such as a UI interface, through an interface between the first operation process and the interactive interface on the simulation platform, so as to perform subsequent processing according to the result sent by the first operation process, for example, outputting data such as a corresponding table or an image on the UI interface.
Furthermore, data transmission is performed between the operation processes of the at least two operation processes through a tcp (transmission control protocol).
It should be noted that "first" and "second" in the first operation process and the second operation process are used to distinguish two different master and slave processes, and the project simulation result is generated by the second operation process.
In a specific implementation, in at least two started operation processes in this embodiment, one operation process is used as a first operation process, that is, a master operation process, and the other operation processes are used as second operation processes, that is, slave operation processes, and the first operation process transmits an operation result of the first operation process, which is obtained by performing simulation operation on a simulation model corresponding to the first operation process by the first operation process, to the second operation process through TCP, so that the second operation process performs simulation operation on a simulation model corresponding to the second operation process according to the operation result of the first operation process to obtain a project simulation result of a simulation project, transmits the obtained project simulation result to the first operation process through TCP, and finally, the first operation process outputs the project simulation result of the second operation process.
For example, the simulation model in the simulation project comprises a simulation model with a bit width parameter of 32 bits and a simulation model with a bit width parameter of 64 bits, when the simulation operation is required, two operations are correspondingly started, the operation process corresponding to the simulation model with the bit width parameter of 32 bits is used as a master operation process, the operation process corresponding to the simulation model with the bit width parameter of 64 bits is used as a slave operation process, at the beginning of the operation, the master operation process transmits the operation result of the master operation process obtained by performing the simulation operation on the simulation model with the bit width parameter of 32 bits to the slave operation process through the TCP, so that the slave operation process performs the simulation operation on the simulation model with the bit width parameter of 64 bits corresponding to the slave operation process according to the operation result of the master operation process to obtain the project simulation result of the simulation project, and then the slave operation process transmits the obtained project simulation result to the master operation process through the TCP, the main operation process outputs the data, for example, the data is output to an interactive interface on the simulation platform, so that subsequent processing, such as generating an icon on the interactive interface, can be conveniently carried out;
or, the simulation model in the simulation project comprises: a simulation model with a bit width parameter of 32 bits, a simulation model with a bit width parameter of 64 bits and a simulation model with a bit width parameter of 128 bits, correspondingly starting three operation processes, taking the operation process corresponding to the simulation model with a bit width parameter of 32 bits as a master operation process, taking the operation process corresponding to the simulation model with a bit width parameter of 64 bits and the operation process corresponding to the simulation model with a bit width parameter of 128 bits as slave operation processes, when starting operation, the master operation process transmitting the operation result of the master operation process obtained by simulation operation on the simulation model with a bit width parameter of 32 bits to the slave operation process needing the operation result through TCP, such as the operation process corresponding to the simulation model with a bit width parameter of 64 bits, so that the slave operation process corresponding to the simulation model with a bit width parameter of 64 bits can carry out simulation operation on the simulation model with a bit width parameter of 64 bits according to the operation result of the master operation process, and the slave operation process corresponding to the simulation model with the bit width parameter of 64 bits transmits the obtained simulation operation result to the slave operation process corresponding to the simulation model with the bit width parameter of 128 bits through the TCP, the slave operation process corresponding to the simulation model with the bit width parameter of 128 bits performs simulation operation on the simulation model with the bit width parameter of 128 bits according to the received operation result to obtain a project simulation result of a simulation project, and finally, the slave operation process corresponding to the simulation model with the bit width parameter of 128 bits transmits the obtained project simulation result to the master operation process through the TCP and outputs the project simulation result by the master operation process.
In one implementation, the first operation process of the at least two operation processes started in step 104 is further configured to receive an operation result of the second operation process, and perform simulation operation on the simulation model corresponding to the first operation process according to the operation result. The method comprises the following specific steps:
the first operation process receives a second process operation result obtained by simulation operation of a second operation process of the at least two operation processes on the simulation model corresponding to the second operation process, so that the first operation process carries out simulation operation on the simulation model corresponding to the first operation process according to the second process operation result to obtain a project simulation result of the simulation project.
Further, the first operation process is further configured to output the project simulation result, for example, the first operation process outputs the project simulation result of the first operation process.
The first operation process may also transmit the project simulation result to an interactive interface, such as a UI interface, through an interface between the first operation process and the interactive interface on the simulation platform, so as to perform subsequent processing according to the project simulation result sent by the first operation process, for example, outputting data such as a corresponding table or an image on the UI interface.
It should be noted that "first" and "second" in the first operation process and the second operation process are used to distinguish two different master-slave processes, and the project simulation result is generated by the first operation process.
In a specific implementation, in the at least two started operation processes in this embodiment, one operation process is used as a first operation process, that is, a master operation process, and the other operation processes are used as second operation processes, that is, slave operation processes, and the master operation process receives a slave operation process result obtained by performing simulation operation on a simulation model corresponding to the slave operation process by the slave operation process through a TCP, so that the master operation process performs simulation operation on the simulation model corresponding to the master operation process according to the slave operation process result to obtain an item simulation result of the master operation process, and the master operation process outputs the item simulation result obtained by the master operation process, such as to a UI interface, and outputs data such as a corresponding table or an image on the UI interface.
For example, the simulation model in the simulation project comprises two simulation models with a bit width parameter of 32 bits and three simulation models with a bit width parameter of 64 bits, when simulation operation is required, two operation processes are correspondingly started, the operation process corresponding to the simulation model with a bit width parameter of 64 bits is used as a main operation process, the operation process corresponding to the simulation model with a bit width parameter of 32 bits is used as a slave operation process, at the beginning of operation, the main operation process receives an operation process result obtained by simulation operation of the slave operation process on the simulation model with a bit width parameter of 32 bits through TCP, then the main operation process determines to allocate the operation process result sent by the slave operation process to the three simulation models with a bit width parameter of 64 bits according to the requirement parameters of the three simulation models with a bit width parameter of 64 bits on the operation result of the slave operation process and the calculation mode, the main operation process carries out simulation operation on the simulation model with the bit width parameter of 64 bits according to the received operation process result to obtain a project simulation result of the main operation process, and the main operation process outputs the project simulation result obtained by the main operation process, such as to a UI interface, and outputs corresponding data such as tables or images and the like on the UI interface;
or, the simulation model in the simulation project comprises: a simulation model with a bit width parameter of 32 bits, a simulation model with a bit width parameter of 64 bits and a simulation model with a bit width parameter of 128 bits are correspondingly started, an operation process corresponding to the simulation model with a bit width parameter of 128 bits is used as a master operation process, an operation process corresponding to the simulation model with a bit width parameter of 32 bits and an operation process corresponding to the simulation model with a bit width parameter of 64 bits are used as slave operation processes, the master operation process receives slave operation process results obtained by simulation operation of the simulation model with a bit width parameter of 32 bits and the simulation model with a bit width parameter of 64 bits respectively through TCP, so that the master operation process carries out simulation operation on the simulation model with a bit width parameter of 128 bits according to the slave operation process results to obtain project simulation results of the master operation process, and the master operation process outputs the project simulation results obtained by the master operation process, for example, outputting the data to the UI interface, and outputting the corresponding table or image data on the UI interface.
Based on the method disclosed in fig. 1 in the embodiment of the present application, if it is determined that there is one bit width parameter in step 103, the method in the embodiment may further include the following steps, as shown in fig. 2.
Step 105: and starting a third operation process, wherein the third operation process is used for carrying out simulation operation on the simulation model in the simulation project so as to obtain a project simulation result of the simulation project.
Furthermore, the third operation process is also used for outputting the project simulation result of the simulation project.
In a specific implementation, in this embodiment, under the condition that only one bit width parameter is used, only one operation process, that is, a third operation process, is started, where the third operation process is used to perform simulation operation on a simulation model in a simulation project to obtain a project simulation result of the simulation project, and the third operation process outputs the project simulation result, for example, to a UI interface, and outputs data such as a corresponding table or an image on the UI interface.
For example, if the simulation model in the simulation project is single and is a simulation model with a bit width parameter of 32 bits, starting an operation process, performing simulation operation on the simulation model with the bit width parameter of 32 bits by the operation process to obtain a project simulation result of the simulation project, and outputting the project simulation result by the operation process;
or, if the simulation model in the simulation project is multiple and three simulation models with 64-bit width parameters are used, starting an operation process, and performing simulation operation on the three simulation models with 64-bit width parameters by the operation process to obtain a project simulation result of the simulation project, and outputting the project simulation result by the operation process.
In one implementation, the bit width parameter of each simulation model is obtained by parsing the model file in step 102.
Specifically, when the bit width parameter of each simulation model is obtained in step 102, the following method may be specifically implemented:
firstly, obtaining a model file of each simulation model in a simulation project; and analyzing the model file to obtain the bit width parameter of each simulation model.
The model file may be various FMU files included in the simulation model.
In a specific implementation, after obtaining a simulation model that needs to perform simulation operation in this embodiment, a model file of each simulation model is obtained, where the model files are files generated when a simulation model is built in a modeling system, and the model files are configured with the simulation model, so that after the model files are obtained, the bit width parameter of each simulation model can be obtained by analyzing attributes such as a text or a field in the model files.
For example, after obtaining the FMU simulation model of the simulation operation, an FMU file is obtained from the FMU simulation model, and the FMU file is analyzed to obtain the bit width parameter of each FMU simulation model, so as to determine whether the simulation models are all the same bit width parameters or have different bit width parameters in common.
Referring to fig. 3, a schematic structural diagram of a simulation operation device according to a second embodiment of the present application is provided, where the simulation operation device may be configured in an electronic device capable of performing data processing, and the technical solution in this embodiment is mainly used for starting a corresponding operation process for processing according to an obtained bit width parameter of each simulation model when performing simulation operation, so as to obtain a project simulation result of a simulation project.
Specifically, the apparatus may include the following units:
a first obtaining unit 301, configured to obtain a simulation project to be subjected to simulation operation, where the simulation project includes multiple simulation models;
a second obtaining unit 302, configured to obtain a bit width parameter of each simulation model;
the second obtaining unit 302 is specifically configured to: obtaining a model file of each simulation model in a simulation project; and analyzing the model file to obtain the bit width parameter of each simulation model.
The first processing unit 303 is configured to start at least two operation processes under the condition that the bit width parameter is at least two, where each operation process corresponds to a simulation model having the same bit width parameter, and each operation process is used to perform simulation operation on the corresponding simulation model, so as to obtain a project simulation result of the simulation project.
Wherein, the first operation process of the at least two operation processes in the first processing unit 303 is further configured to:
transmitting a first process operation result obtained by the simulation operation of the first operation process on the corresponding simulation model to a second operation process in at least two operation processes, so that the second operation process performs the simulation operation on the simulation model corresponding to the second operation process according to the first process operation result to obtain a project simulation result of the simulation project; and the second operation process is also used for transmitting the project simulation result of the simulation project to the first operation process.
And receiving a second process operation result obtained by performing simulation operation on the simulation model corresponding to the second operation process in the at least two operation processes, so that the first operation process performs simulation operation on the simulation model corresponding to the first operation process according to the second process operation result to obtain a project simulation result of the simulation project.
Further, the first operation process is also used for outputting the project simulation result.
And further, data transmission is carried out between the operation processes in the at least two operation processes through a Transmission Control Protocol (TCP).
As can be seen from the foregoing solution, in the emulation operation device provided in the second embodiment of the present application, first, a emulation item to be emulated and including a plurality of emulation models is obtained, then, by obtaining a bit width parameter of each emulation model, at least two operation processes can be started under the condition that the bit width parameter is at least two, and each operation process in the started operation processes corresponds to an emulation model having the same bit width parameter, so that each operation process is respectively used for performing emulation operation on the emulation model corresponding to each operation process, so as to obtain an item emulation result of the emulation item. Therefore, whether the simulation models with different bit width parameters exist in the simulation project or not is automatically identified when the simulation operation is started, so that the corresponding operation processes are started for the simulation models with different bit width parameters to perform corresponding simulation operation processing and output project simulation results.
Referring to fig. 4, the apparatus in the second embodiment of the present application further includes a second processing unit 304, configured to, in a case that the bit width parameter is one, start a third operation process, where the third operation process is used to perform a simulation operation on a simulation model in a simulation project, so as to obtain a project simulation result of the simulation project.
Wherein, the third operation process in the second processing unit 304 is further configured to: and outputting the project simulation result of the simulation project.
It should be noted that, for the specific implementation of each unit in the present embodiment, reference may be made to the corresponding content in the foregoing, and details are not described here.
Referring to fig. 5, a schematic structural diagram of an electronic device according to a third embodiment of the present disclosure is provided, where the electronic device may be an electronic device capable of performing data processing, such as a computer or a server. The technical scheme in the embodiment is mainly used for starting the corresponding operation process for processing according to the bit width parameter of each obtained simulation model when simulation operation is performed, so as to obtain a project simulation result of a simulation project.
Specifically, the electronic device in this embodiment may include the following structure:
a memory 501 for storing applications and data generated by the application operations;
a processor 502 for executing an application to implement: obtaining a simulation project to be simulated and operated, wherein the simulation project comprises a plurality of simulation models; obtaining a bit width parameter of each simulation model; and starting at least two operation processes under the condition that the bit width parameters are at least two, wherein each operation process corresponds to a simulation model with the same bit width parameter, and each operation process is used for performing simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
According to the scheme, the electronic device provided by the third embodiment of the application first obtains a simulation item to be subjected to simulation operation and including a plurality of simulation models, and then starts at least two operation processes under the condition that bit width parameters are at least two by obtaining bit width parameters of each simulation model, wherein each operation process in the started operation processes corresponds to a simulation model with the same bit width parameters, and therefore each operation process is used for performing simulation operation on the simulation model corresponding to the operation process to obtain a project simulation result of the simulation item. Therefore, whether the simulation models with different bit width parameters exist in the simulation project or not is automatically identified when the simulation operation is started, so that the corresponding operation processes are started for the simulation models with different bit width parameters to perform corresponding simulation operation processing and output project simulation results.
It should be noted that, the specific implementation of the processor in the present embodiment may refer to the corresponding content in the foregoing, and is not described in detail here.
Fig. 6 is a flowchart of a simulation operation applied to a 32-bit simulation model and a 64-bit simulation model coexisting in a simulation project according to an embodiment of the present application:
(1) after a simulation system project (namely a simulation project) is loaded in a simulation platform realized by the application, a user starts and starts simulation operation, and the simulation platform preferentially identifies whether a bit width parameter of an FMU simulation model existing in the project is pure 32 bits or pure 64 bits or the coexistence of 32-bit FMU simulation models and 64-bit FMU simulation models.
(2) If the simulation system project is composed of the FMU simulation model with the stored 64-bit width parameter, a 64-bit simulation operation engine process (i.e., a third operation process) is used for performing simulation operation, and the project simulation result is transmitted back to the simulation platform through the TCP, as shown in fig. 7.
(3) If the simulation system project is composed of a pure FMU simulation model with 32-bit width parameters, a 32-bit simulation operation engine process (namely, a third operation process) is started to perform simulation operation, and a project simulation result is transmitted back to the simulation platform through a Transmission Control Protocol (TCP), as shown in FIG. 7.
(4) If the simulation system project is a simulation system project with coexisting FMU simulation models with 32-bit and 64-bit width parameters, after a 32-bit simulation operation engine process (namely a first operation process) is started, the process pulls up a Slave operation engine process (namely a second operation process), so that the Slave process carries out simulation operation on the FMU simulation models with 64-bit width parameters, project simulation results are returned to the first operation process, the first operation process comprehensively processes 32-bit FMU simulation model project simulation results generated by the process and 64-bit FMU simulation model project simulation results generated by the second operation process, and the comprehensively processed project simulation results are returned to a simulation platform in real time through a Transmission Control Protocol (TCP), as shown in figure 8.
(5) After the simulation is finished, if the Slave operation process is started, the Slave process is recovered by the first operation process.
In conclusion, the method and the device perfectly realize the real-time operation of the simulation system when the 32-bit 64-bit FMU simulation models coexist, expand the application range of the simulation platform and provide powerful technical guarantee for the flexible construction of the simulation system.
Therefore, in the simulation operation process, a user can not completely feel the simulation operation difference caused by the coexistence of the 32-bit 64-bit FMU simulation models, the simulation efficiency is greatly improved, and the time for user configuration is greatly shortened.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of simulation operations, the method comprising:
obtaining a simulation project to be simulated and operated, wherein the simulation project comprises a plurality of simulation models;
obtaining a bit width parameter of each simulation model;
and starting at least two operation processes under the condition that the bit width parameters are at least two, wherein each operation process corresponds to a simulation model with the same bit width parameter, and each operation process is used for performing simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
2. The method of claim 1, wherein a first computing process of the at least two computing processes is further configured to: transmitting a first process operation result obtained by the first operation process performing simulation operation on the corresponding simulation model to a second operation process of the at least two operation processes, so that the second operation process performs simulation operation on the simulation model corresponding to the second operation process according to the first process operation result to obtain a project simulation result of the simulation project;
and the second operation process is also used for transmitting the project simulation result of the simulation project to the first operation process.
3. The method of claim 1, wherein a first computing process of the at least two computing processes is further configured to: and receiving a second process operation result obtained by performing simulation operation on the simulation model corresponding to the second operation process in the at least two operation processes, so that the first operation process performs simulation operation on the simulation model corresponding to the first operation process according to the second process operation result to obtain a project simulation result of the simulation project.
4. The method of claim 2 or 3, wherein the first calculation process is further configured to output the project simulation result.
5. The method according to claim 2 or 3, wherein data transmission is performed between the operation processes of the at least two operation processes through a Transmission Control Protocol (TCP).
6. The method of claim 1, further comprising:
and starting a third operation process under the condition that the bit width parameter is one, wherein the third operation process is used for carrying out simulation operation on the simulation model in the simulation project so as to obtain a project simulation result of the simulation project.
7. The method of claim 6, wherein the third computing process is further configured to: and outputting the project simulation result of the simulation project.
8. The method of claim 1, wherein obtaining bit width parameters for each of the simulation models comprises:
obtaining a model file of each simulation model in the simulation project;
and analyzing the model file to obtain the bit width parameter of each simulation model.
9. An emulation operation device, comprising:
the simulation system comprises a first acquisition unit, a second acquisition unit and a simulation unit, wherein the first acquisition unit is used for acquiring a simulation project to be simulated and operated, and the simulation project comprises a plurality of simulation models;
the second obtaining unit is used for obtaining the bit width parameter of each simulation model;
the first processing unit is configured to start at least two operation processes under the condition that the bit width parameter is at least two, where each operation process corresponds to a simulation model having the same bit width parameter, and each operation process is used to perform simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
10. An electronic device, comprising:
the memory is used for storing an application program and data generated by the running of the application program;
a processor for executing the application to implement: obtaining a simulation project to be simulated and operated, wherein the simulation project comprises a plurality of simulation models; obtaining a bit width parameter of each simulation model; and starting at least two operation processes under the condition that the bit width parameters are at least two, wherein each operation process corresponds to a simulation model with the same bit width parameter, and each operation process is used for performing simulation operation on the corresponding simulation model to obtain a project simulation result of the simulation project.
CN202010619006.2A 2020-06-30 2020-06-30 Simulation operation method and device and electronic equipment Active CN111767652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010619006.2A CN111767652B (en) 2020-06-30 2020-06-30 Simulation operation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010619006.2A CN111767652B (en) 2020-06-30 2020-06-30 Simulation operation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111767652A true CN111767652A (en) 2020-10-13
CN111767652B CN111767652B (en) 2023-06-23

Family

ID=72724338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010619006.2A Active CN111767652B (en) 2020-06-30 2020-06-30 Simulation operation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111767652B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905366A (en) * 2021-04-26 2021-06-04 北京世冠金洋科技发展有限公司 Operation control method and device of simulation model and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777992A (en) * 2012-10-18 2014-05-07 北京临近空间飞行器系统工程研究所 Input/output (I/O) intensive collaborative interactive simulation method for cross-heterogeneity operation system
CN104899369A (en) * 2015-06-01 2015-09-09 浪潮集团有限公司 Simulator multithread running method using PERL scripts
CN105301983A (en) * 2015-11-09 2016-02-03 苏州同元软控信息技术有限公司 Distributed combined simulation system based on FMI and construction method
CN108205263A (en) * 2016-12-16 2018-06-26 帝斯贝思数字信号处理和控制工程有限公司 For creating the method for the model compatible with simulator
US20190102149A1 (en) * 2017-09-29 2019-04-04 dSPACE digital signal processing and control engin eering GmbH Method for providing an integrated process for control unit development and a simulation device for control unit development

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777992A (en) * 2012-10-18 2014-05-07 北京临近空间飞行器系统工程研究所 Input/output (I/O) intensive collaborative interactive simulation method for cross-heterogeneity operation system
CN104899369A (en) * 2015-06-01 2015-09-09 浪潮集团有限公司 Simulator multithread running method using PERL scripts
CN105301983A (en) * 2015-11-09 2016-02-03 苏州同元软控信息技术有限公司 Distributed combined simulation system based on FMI and construction method
CN108205263A (en) * 2016-12-16 2018-06-26 帝斯贝思数字信号处理和控制工程有限公司 For creating the method for the model compatible with simulator
US20190102149A1 (en) * 2017-09-29 2019-04-04 dSPACE digital signal processing and control engin eering GmbH Method for providing an integrated process for control unit development and a simulation device for control unit development

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905366A (en) * 2021-04-26 2021-06-04 北京世冠金洋科技发展有限公司 Operation control method and device of simulation model and electronic equipment

Also Published As

Publication number Publication date
CN111767652B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US7835891B2 (en) Method and apparatus for generating alternative representation of optimization models
US20030016206A1 (en) Partitioning for model-based design
CN111209203B (en) Model verification method based on source code
CN108600311B (en) Method and device for simulating interface data by client
CN112905366A (en) Operation control method and device of simulation model and electronic equipment
CN103593142A (en) Lyric sharing method and device
CN108038241A (en) Integrated WEB visual workflows method, apparatus, readable storage medium storing program for executing and system
CN111767652B (en) Simulation operation method and device and electronic equipment
CN110750446A (en) System testing method and related device
US20020174193A1 (en) Split client-server software development architecture
JP2004118842A (en) Method of providing enhanced dynamic system simulation ability outside original modelling environment
CN107203471B (en) Joint debugging method, service platform and computer storage medium
CN117492743A (en) Target application generation method and device based on large language model and storage medium
US9256405B1 (en) Code generation based on regional upsampling-based delay insertion
CN110414021B (en) System, device and method for generating event rules of edge equipment of industrial Internet of things
CN113495723B (en) Method, device and storage medium for calling functional component
CN111240972B (en) Model verification device based on source code
CN110877332B (en) Robot dance file generation method and device, terminal device and storage medium
US8046201B1 (en) Communication system for use with a block diagram environment
CN111783313A (en) Model operation control method and device and electronic equipment
Lee et al. Collecting big data from automotive ECUs beyond the CAN bandwidth for fault visualization
US8694293B2 (en) Simulation support method, computer-readable storage medium storing simulation support program, and simulation support apparatus
CN113973060A (en) Internet of things simulation method, device and system and storage medium
CN105915601A (en) Resource downloading control method and terminal
CN110618778A (en) Method and system for automatically generating business data, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant