METHOD FOR EVENT-BASED SIMULATION OF A SYSTEM
20210081585 ยท 2021-03-18
Assignee
Inventors
Cpc classification
G06F2111/02
PHYSICS
G06F9/4881
PHYSICS
G06F9/468
PHYSICS
H04L12/4633
ELECTRICITY
International classification
G06F1/04
PHYSICS
G06F9/455
PHYSICS
Abstract
A method for event-based simulation of a system, the simulation comprising a first computing unit and at least one second computing unit, the first computing unit has a simulation time, the second processor has an operating system layer and an application layer. The second computing unit has a system time in the operating system layer, with at least the second computing unit executing a simulation application. At least one simulation object is executable on the simulation application, and the first computing unit manages an event queue, with at least one event per simulation step being listed in the event queue. The event is associated with a process to be executed by the simulation object and a simulation time provided for execution of the process.
Claims
1. A method for event-based simulation of a system, the method comprising: providing a computer system to perform the simulation, the computer system comprising a first computing unit and at least one second computing unit, the first computing unit having a simulation time, the second computing unit having an operating system layer and an application layer, the second computing unit having a system time in the operating system layer; performing, via the second computing unit, a simulation application, at least one simulation object being executed on the simulation application; and managing, via the first computing unit, an event queue, wherein in the event queue at least one event is listed for each simulation step, and the at least one event is associated with a process to be executed via the simulation object and with a simulation time point provided for the execution of the process; providing the second computing unit with a virtual clock generator; transmitting, via the first computing unit, a start signal to the virtual clock generator for executing the next simulation step in the second computing unit; incrementing, based on a time difference between a past simulation step and the simulation time, the system time of the second computing unit; and executing the upcoming process at the simulation time point associated with the process.
2. The method according to claim 1, wherein the time difference between the past simulation step and the simulation time is calculated by the first computing unit and is transmitted to the second computing unit with the start signal.
3. The method according to claim 1, wherein the simulation time is transmitted by the first computing unit with the start signal to the second computing unit and the second computing unit calculates the time difference between the past simulation step and the simulation time.
4. The method according to claim 1, wherein the first computing unit has a first network interface and the second computing unit has a second network interface, wherein the first and second network interfaces are interconnected via a bus system, and wherein the transmission of the start signal takes place via the network interface and the bus system.
5. The method according to claim 1, wherein the simulation objects are executed on the same operating system as the associated simulation application.
6. The method according to claim 5, wherein the simulation objects are executed in a closed environment, wherein the simulation objects in the closed environment are granted access to a first set of hardware resources of the computing unit associated with the simulation application, and wherein the first set of hardware resources are defined by the simulation application.
7. The method according to claim 6, wherein the simulation objects in the closed environment are denied access to a second set of hardware resources of the computing units associated with the simulation application.
8. The method according to claim 5, wherein at least two of the simulation objects each have a virtual network interface, wherein the virtual network interface is able to receive or send calculation results via a virtual bus system.
9. The method according to claim 5, wherein at least one of the simulation objects on the first or second computing unit is a virtual control device.
10. The method according to claim 8, wherein the calculation results is sent from the virtual network interface of a first computing unit via a network tunnel to the virtual network interface of a second computing unit.
11. The method according to claim 5, wherein the computing units are physical computing nodes.
12. The method according to claim 7, wherein at least one computing unit is a virtual computing node, the operating system of the respective computing unit being executed by a hypervisor.
13. The method according to claim 1, wherein the virtual clock generator is implemented in the application level.
14. The method according to claim 1, wherein the virtual clock generator is implemented at the operating system level.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus, are not limitive of the present invention, and wherein:
[0031]
[0032]
[0033]
DETAILED DESCRIPTION
[0034]
[0035] The simulation applications SAP2 and SAP3 on the computing units RE2 and RE3 are tasked in turn with initiating the computing of the events by the respective responsible distributed computing unit RE2 or RE3 as soon as the starting signal S1 has been received and the moment of the simulation time has arrived at which the event is to be processed by the computing unit that is associated with the event. After the event has been processed, the simulation application of the respective executing computing unit sends a completion signal S2 (not shown in
[0036] To exchange the start and completion signals, the computing units RE1, RE2, and RE3 each also have a network interface ETH1, ETH2, and ETH3, which are connected to a bus system BUS, which allow for the simulation applications SAP1, SAP2 and SAP3 to exchange messages between the central processing unit RE1 and the distributed computing units RE2 and RE3. These network interfaces ETH1, ETH2, and ETH3 can be implemented, for example, by an Ethernet controller. The computing units then exchange messages based on an Ethernet protocol.
[0037] In the exemplary embodiment on which
[0038] In this embodiment, the computing units RE2 and RE3 each have a virtual clock generator VCLK. The task of the virtual clock generator VCLK is to increment the system time in the operating system kernel KRN of the distributed computing units according to a clock difference determined between a past simulation step and the simulation time applicable at the time of determination. In this sense, the virtual clock generator is to be understood as a virtual replacement for the original clock that the computing unit in question would use to increment its system time. Since the determined clock difference is directly related to the simulation time, which is specified by the central computing unit RE1, the distributed computing units thus indirectly use the central simulation time as the system time. The determination of the clock difference can take place by the virtual clock generator VCLK itself, or it can already have been calculated by the first computing unit RE1 and transmitted to the virtual clock generator. In both cases, the virtual clock generator uses the clock difference to increment the system time in the distributed computing unitin this exemplary embodiment computing units RE2 or RE3and to synchronize it with the simulation time.
[0039] In the illustration in
[0040]
[0041] The first simulation step, Step 1, starts with the start signal S2, and the simulation objects SO1 and SO2 respectively perform the processes PRZ1 and PRZ2. As soon as they have completed these, they report the completion back to the simulation application SAP with a completion signal S2. In this example, simulation object SO1 is finished first, followed by simulation object SO2. Once both simulation objects tasked with processes are finished, the simulation step ends. After completion of the simulation step, the calculation results of the simulation objects are transmitted to other simulation objects that require the calculation result for their next process executed. In the example, the calculation result of simulation object SO1 is transmitted to simulation object SO2 via a bus system before the start of simulation step, Step 2. The calculation result of simulation object SO2 is required for the next simulation step of simulation object SO3 and is transmitted to the latter.
[0042] With the next start signal S1, the next simulation step, Step 2, starts, and on computing unit RE1, simulation object SO1 performs the process PRZ3, simulation object SO2 performs the process PRZ4 using the calculation result of Step 1 of simulation object SO1, and on computing unit 2, the simulation object SO3 performs the process PRZ5. As soon as the simulation objects SO1 and SO2 have finished calculating their processesPRZ3 and PRZ4they again report a completion signal S2 to the simulation application SAP. Since simulation object SO3 is not simulated synchronously in this example, but instead only reacts to the calculation results of simulation object SO2, the simulation step ends before the simulation object SO3 can finalize the calculation of the process PRZ5. While the calculation continues here, further processes are simulated in simulation objects SO1 and SO2. In the simplest case, these are CHECK processes which only check as to whether there are new calculation results. If this is not the case, the simulation step is ended again by reporting the completion signal S2 to the simulation application SAP. This query is repeated and simulation steps are accumulated until a simulation object SO3 provides a new calculation result for SO2. In this exemplary embodiment, this is the case when the simulation object SO3 on computing unit RE2 has finished calculating the process PRZ5. After the end of the calculation, simulation object SO3 sends its calculation result to the previously specified recipienthere it is the simulation object SO2which writes it into a buffer in the following simulation step, Step 1000. In this example, the calculation result of PRZ5 can only be transmitted to simulation object SO2 in simulation step, Step 1000. Since each simulation step is assigned a simulation time, SO2 incorrectly receives the calculation result at the 1000th simulation time, although the calculation result should already be available after the second simulation step due to the zero step-time assumption.
[0043] The illustration in
[0044]
[0045] The first simulation step, Step 1, starts with the start signal, and the simulation objects SO1 and SO2 respectively perform the processes PRZ1 and PRZ2. As soon as they are finished, they report the completion back to the simulation application SAP 1 with a completion signal S2. In this example, simulation object SO1 is finished first, followed by simulation object SO2. The simulation step ends as soon as both simulation objects assigned with processes are finished. After the simulation step has been completed, the simulation objects transmit their calculation results to other simulation objects that need the calculation result for their next process executed. In the example, simulation object SO1 transmits its calculation result to simulation object SO2 via a bus system before the start of simulation step, Step 2. The calculation result of simulation object SO2 is required for the next simulation step by simulation object SO3 and is transmitted to it. A network tunnel, for example (indicated by the dashed arrow), which enables communication between the simulation objects on different computing units, can be used to transmit the calculation result.
[0046] The next simulation step, Step 2, starts with the next start signal S1, and simulation object SO1 performs the process PRZ3 on computing unit RE1; simulation object SO2 performs the process PRZ4 using the calculation result of simulation object SO1 from Step 1. The already completed process PRZ2 has initiated a subsequent process PRZ5 that is to be performed on computing unit 2 by the simulation object S03. After completion of simulation step, Step 1, the simulation object SO2 sends its calculation result to the simulation object S03. With the start signal S1, the computing unit RE2 implicitly receives the information about the simulation time and can increment its system time accordingly. The simulation object SO3 can then start with the calculation of the process PRZ5 at the right simulation time that is stored in the event queue.
[0047] As soon as the simulation objects SO1 and SO2 have finished calculating their processesPRZ3 and PRZ4they again report a completion signal S2 to the simulation application SAP1. While the simulation objects SO1 and SO2 have finished their calculations, the calculation of the process PRZ5 continues on the computing unit RE2. In contrast to the example described with respect to
[0048] After the calculation of the process PRZ5 on computing unit RE1 has been completed, the calculation result is sent to the simulation object SO2 on computing unit RE1.
[0049] Since the simulation is performed under a zero step-time assumption, no simulation time elapses during the calculation of the processes. The simulation step, STEP 2, is therefore not completed until the calculation of the process PRZ5 on computing unit RE2 by simulation object SO3 has been completed. During this time, from the point of view of the simulation, no time passes.
[0050] The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are to be included within the scope of the following claims.