Method and related products for controlling simulation speed

By acquiring the simulation speed of the simulation system and determining the speed control signal based on its deviation from the preset speed, the problem of the inability to achieve simulation speed acceleration in the prior art is solved, and the speed priority control of the simulation system is realized.

CN118519468BActive Publication Date: 2025-05-09JOINT WARFARE COLLEGE NAT DEFENSE UNIV OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410388054.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-01
Publication Date
2025-05-09
Estimated Expiration
2044-04-01

AI Technical Summary

Technical Problem

In existing combat simulation systems, the speed control strategy based on delay waiting cannot achieve the acceleration of simulation speed and cannot meet the speed priority requirements of discrete event simulation.

Method used

By collecting the simulation speed of the simulation system, the speed control signal is determined based on the deviation between the simulation speed and the preset speed, and the simulation speed of the simulation system is adjusted based on the signal.

Benefits of technology

Dynamic regulation of simulation speed of simulation system is realized, the need to prioritize simulation system speed is met, and the simulation speed regulation efficiency of simulation system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118519468B_ABST
    Figure CN118519468B_ABST
Patent Text Reader

Abstract

The present disclosure discloses a method for regulating simulation speed and related products, the method comprising: collecting the simulation speed of a simulation system; determining a speed control signal according to the deviation between the simulation speed and a preset speed; and regulating the simulation speed of the simulation system based on the speed control signal. According to the method of the embodiment of the present disclosure, the simulation speed of the simulation system can be regulated based on the speed control signal, thereby facilitating meeting the simulation requirements of the simulation system with speed priority.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of simulation technology. More specifically, the present disclosure relates to a method, device and computer-readable storage medium for regulating simulation speed. Background Art

[0002] This section is intended to provide background or context for the embodiments of the present disclosure set forth in the claims. The descriptions herein may include concepts that may be explored, but not necessarily concepts that have been previously thought of or explored. Therefore, unless noted herein, the content described in this section is not prior art with respect to the specification and claims of the present disclosure, and is not admitted to be prior art by inclusion in this section.

[0003] The waiting-based clock synchronization mechanism is the mainstream speed control strategy of combat simulation systems. Its core idea is to set checkpoints (i.e., the moment to compare the simulation time with the real event, simulation step, etc.), and compare the time advancement ratio between the astronomical time and the simulation time between the checkpoints. If the actual simulation speed is faster than the preset speed (i.e., the time advancement ratio is greater than the preset value), the system enters a delayed waiting state until the time advancement ratio between the two most recent checkpoints is less than or equal to the preset value, and then processes the next discrete event.

[0004] Such a delayed waiting strategy reduces the simulation speed of the system and fails to realize the acceleration function of the system simulation, thus failing to meet the speed priority requirement of discrete event simulation.

[0005] In view of this, there is an urgent need to provide a solution for regulating the simulation speed so that the simulation speed of the simulation system can be regulated to meet the speed priority requirement of discrete event simulation. Summary of the invention

[0006] In order to at least solve one or more of the technical problems mentioned above, the present disclosure proposes a method, a device and a computer-readable storage medium solution for regulating simulation speed in multiple aspects.

[0007] In a first aspect, the present disclosure provides a method for regulating simulation speed, comprising: acquiring a simulation speed of a simulation system; determining a speed control signal according to a deviation between the simulation speed and a preset speed; and regulating the simulation speed of the simulation system based on the speed control signal.

[0008] In some embodiments, collecting the simulation speed of the simulation system includes: determining the simulation time and astronomical time of the collection time point for collecting the simulation speed; and determining the simulation speed of the latter collection time point among the adjacent collection time points based on the ratio between the difference in simulation time between adjacent collection time points and the difference in astronomical time between the adjacent collection time points.

[0009] In other embodiments, determining the simulation time includes: obtaining the current system simulation time of the simulation system; in response to a difference between the current system simulation time and the simulation time at the previous acquisition time point being greater than a first threshold, determining the current system simulation time as the simulation time at the current acquisition time point.

[0010] In some other embodiments, determining the speed control signal based on the deviation between the simulation speed and the preset speed includes: determining the change of the speed control signal based on the deviation; and determining the speed control signal at the current acquisition time point based on the sum of the speed control signal determined at the previous acquisition time point and the change.

[0011] In some embodiments, determining the change amount of the speed control signal according to the deviation includes: determining the change amount based on at least one of a deviation ratio, a deviation cumulative value, and a deviation differential value, wherein the deviation ratio includes the ratio between the deviation and the preset speed, and the deviation is the difference between the preset speed and the simulation speed; the deviation cumulative value includes the sum of the deviation ratios of multiple acquisition time points, or the weighted sum of the deviation ratios of the multiple acquisition time points; the deviation differential value includes the difference between the deviation ratio and the deviation ratio at the previous acquisition time point.

[0012] In some other embodiments, the accumulated deviation value is calculated based on the following formula: Among them, e s (i) represents the accumulated deviation value, a represents the adaptive coefficient, e(j) represents the deviation ratio, i represents the i-th acquisition time point, and the value range of j is ia~i.

[0013] In some other embodiments, a=A*log 10 N, wherein N represents the number of simulation entities in the simulation system, and A represents a coefficient parameter.

[0014] In some embodiments, determining the change amount of the speed control signal further includes: performing a weighted summation on the deviation ratio, the deviation accumulation value, and the deviation difference value to determine the change amount.

[0015] In other embodiments, the method further includes: fixing the cumulative weighting coefficient of the deviation cumulative value and the differential weighting coefficient of the deviation differential value, and optimizing the proportional weighting coefficient of the deviation ratio; fixing the proportional weighting coefficient and the differential weighting coefficient, and optimizing the cumulative weighting coefficient; fixing the proportional weighting coefficient and the cumulative weighting coefficient, and optimizing the differential weighting coefficient.

[0016] In some other embodiments, the proportional weighting coefficient is optimized using a random optimization method until the simulation speed meets a first preset condition; the cumulative weighting coefficient is optimized using an incremental method until the deviation meets a second preset condition; and the differential weighting coefficient is optimized using an incremental method until the deviation meets a third preset condition.

[0017] In some embodiments, the first preset condition includes: a first ratio between the maximum value of the simulation speed and the preset speed is within a first preset range; and / or the second preset condition includes: a second ratio between the accumulated value of the absolute value of the deviation and the preset speed is within a second preset range; and / or the third preset condition includes: a third ratio between the accumulated value of the absolute value of the deviation and the preset speed is within a third preset range.

[0018] In some other embodiments, the second preset condition includes: Wherein, v(i) represents the simulation speed, V represents the preset speed, m represents the second preset range, b and c represent two different acquisition time points, wherein c>b; and / or the third preset condition includes: Wherein, v(i) represents the simulation speed, V represents the preset speed, n represents the third preset range, p and q represent two different acquisition time points, wherein q>p.

[0019] In some further embodiments, based on the speed control signal, regulating the simulation speed of the simulation system includes: providing simulation calculation modes of multiple granularities; based on the speed control signal, controlling the simulation system to enter the simulation calculation mode of the corresponding granularity so as to adjust the simulation speed of the simulation system.

[0020] In a second aspect, the present disclosure provides a device for regulating simulation speed, comprising: a processor for executing program instructions; and a memory storing the program instructions, wherein when the program instructions are loaded and executed by the processor, the processor executes any method described in the first aspect of the present disclosure.

[0021] In a third aspect, the present disclosure provides a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by one or more processors, implement the method as described in any one of the first aspects of the present disclosure.

[0022] Through the scheme for regulating the simulation speed provided above, the disclosed embodiment determines the speed control signal according to the deviation between the simulation speed and the preset speed, and regulates the simulation speed of the simulation system based on the speed control signal, thereby facilitating the realization of the simulation requirements of the simulation system with speed priority. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0024] Figure 1 An exemplary flow chart of a method for regulating simulation speed according to some embodiments of the present disclosure is shown;

[0025] Figure 2 An exemplary flow chart showing a method for regulating simulation speed according to other embodiments of the present disclosure is shown;

[0026] Figure 3 A schematic block diagram of a device for regulating simulation speed according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0028] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0029] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0030] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0031] The inventors have found that in some scenarios, discrete event simulation does not need to obtain a certain granularity of deduction results, but needs to fast forward in time to achieve a certain deduction situation or meet certain deduction requirements. For example, when two tanks are fighting, the damage results of the tanks can be more accurately calculated by simulating the ballistic situation. However, if 2,000 tanks are fighting and a rough damage result is required in a very short time, it is not necessary to calculate the ballistic situation of each tank to obtain the accurate damage result of each tank, but the probability theory can be used to calculate the damage result equivalently.

[0032] However, the simulation speed control strategy based on delayed waiting lacks corresponding regulation of the simulation granularity. Usually, after the simulation system determines the scale and granularity of the simulation, it is unable to dynamically adjust the fineness of the simulation granularity, or unable to regulate the simulation granularity with speed as the priority. Therefore, it is unable to meet the speed priority requirements of the discrete event simulation mentioned above.

[0033] Based on this, the present disclosure provides a new solution for discrete event-oriented simulation speed control, which realizes adaptive adjustment of the simulation speed signal by determining the speed control signal based on the simulation speed of the simulation system. The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0034] Figure 1 An exemplary flow chart of a method for regulating simulation speed according to some embodiments of the present disclosure is shown. Figure 1 As shown in , method 100 may include: in step 102, a simulation speed of a simulation system may be collected. In some embodiments, the simulation system may include a combat simulation system, etc. In other embodiments, multiple simulation speeds may be collected at multiple collection time points. In still other embodiments, the simulation speed may be determined based on a time advancement ratio between multiple collection time points.

[0035] In some embodiments, step 102 may include: determining the simulation time and astronomical time of the acquisition time point for acquiring the simulation speed; determining the simulation speed of the latter acquisition time point in the adjacent acquisition time points according to the ratio between the difference in simulation time between adjacent acquisition time points and the difference in astronomical time between the adjacent acquisition time points. The acquisition time point may be understood as the moment for acquiring the simulation speed. The number and time interval of the acquisition time points may be set as required, for example, the simulation speed may be acquired at acquisition time points at uniform time intervals, or at acquisition time points at non-uniform time intervals.

[0036] The astronomical time described above is an objectively consistent time with the background of the earth's revolution and rotation relative to the sun, which can be achieved by recording the time of the operating system (such as Linux, Windows, etc.) used to run the simulation system. In some embodiments, the simulation time at the acquisition time point can be determined according to the system simulation time of the simulation system. For example, in some examples, the system simulation time at the acquisition time point can be directly determined as the simulation time at the acquisition time point.

[0037] After the simulation time and the astronomical time are determined, the simulation speed can be determined by calculation. The adjacent acquisition time points can be two adjacent acquisition time points, and the latter acquisition time point among the adjacent acquisition time points can be the acquisition time point of the latter acquisition simulation speed among the adjacent acquisition time points. Taking the adjacent acquisition time points as the current acquisition time point and the previous acquisition time point as an example, the simulation speed of the current acquisition time point can be determined according to the ratio between the difference between the simulation time of the current acquisition time point and the simulation time of the previous acquisition time point and the difference between the astronomical time of the current acquisition time point and the astronomical time of the previous acquisition time point.

[0038] For example, suppose the simulation time is t s (i) is used to represent astronomical time, and t is used to represent astronomical time. r (i), where i is the ordinal number of the acquisition time point. The simulation speed can be calculated as follows:

[0039]

[0040] In formula 1, v(i) represents the simulation speed collected at the i-th acquisition time point, t s (i) represents the simulation time of the i-th acquisition time point, t s (i-1) represents the simulation time of the i-1th acquisition time point, t r (i) represents the astronomical time of the i-th acquisition time point, t r(i-1) represents the astronomical time of the i-1th collection time point. Among the i-1th collection time point and the i-th collection time point, the i-1th collection time point is the previous collection time point, and the i-th collection time point is the later collection time point.

[0041] After the simulation speed is determined, the process can proceed to step 104, where a speed control signal can be determined based on the deviation between the simulation speed and the preset speed. In some embodiments, the preset speed can be a fixed value, or can be changed as needed, such as setting different preset speeds at different acquisition time points. In other embodiments, the deviation between the simulation speed and the preset speed can be the deviation between the simulation speed and the preset speed at the same acquisition time point.

[0042] In some embodiments, the deviation between the simulation speed and the preset speed can be determined based on the difference between the simulation speed and the preset speed, or can be determined based on the difference between the preset speed and the simulation speed. In other embodiments, step 104 may include: in response to the simulation speed being less than the preset speed, increasing the speed control signal; in response to the simulation speed being greater than the preset speed, reducing the speed control signal. In yet other embodiments, in response to the simulation speed being equal to the preset speed, the speed control signal may be increased, decreased, or unchanged as needed. By adjusting the speed control signal, the simulation system may adjust the simulation speed with a corresponding granularity after receiving the adjusted speed control signal, so that the simulation speed changes in the control direction indicated by the speed control signal.

[0043] In some other embodiments, step 104 may further include: determining the variation of the speed control signal according to the deviation between the simulation speed and the preset speed; and determining the speed control signal at the current acquisition time point according to the sum of the speed control signal determined at the previous acquisition time point and the variation. In some embodiments, the greater the deviation between the simulation speed and the preset speed, the greater the required speed control degree, so the greater the variation of the speed control signal can be set accordingly; the smaller the deviation between the simulation speed and the preset speed, the smaller the required speed control degree, so the smaller the variation of the speed control signal can be set accordingly. In other embodiments, the mapping relationship between the above deviation and the variation can be preset, so that after determining the deviation, the corresponding variation can be found or calculated through the mapping relationship. For example, assuming that the mapping relationship can include a first deviation range corresponding to a first variation, a second deviation range corresponding to a second variation..., the corresponding variation can be found according to the deviation range where the deviation between the simulation speed and the preset speed calculated is located.

[0044] After determining the change amount of the speed control signal at the current acquisition time point, the speed control signal at the current acquisition time point can be determined based on the sum of the speed control signal determined at the previous acquisition time point and the current change amount. For example, assuming that f(i) represents the speed control signal at the i-th acquisition time point, f(i-1) represents the speed control signal at the i-1th acquisition time point, the i-1th acquisition time point is the previous acquisition time point of the i-th acquisition time point, and F(i) represents the change amount determined based on the deviation between the simulation speed collected at the i-th acquisition time point and the preset speed, the speed control signal can be implemented by the following formula:

[0045] f(i)=f(i-1)+F(i) (Formula 2).

[0046] like Figure 1 As further shown in, in step 106, the simulation speed of the simulation system can be regulated based on the speed control signal. In some embodiments, the simulation speed of the simulation system can be accelerated, slowed down or kept unchanged based on the size or change trend of the speed control signal. In other embodiments, simulation calculation modes of multiple granularities can be provided, and based on the size or change trend of the speed control signal, the simulation system is controlled to enter the simulation calculation mode of the corresponding granularity to adjust the simulation speed of the simulation system. The granularity here can be used to represent the degree of refinement of the simulation calculation, and simulation calculation modes of different granularities can represent simulation calculation modes of different calculation refinements. The change trend of the speed control signal can be the change trend (e.g., increase or decrease) and / or degree of change (e.g., the amount of increase or decrease) of the current speed control signal compared to the previous speed control signal.

[0047] For example, the correspondence between the size or change trend of the speed control signal and the simulation calculation modes of different granularities can be pre-set, so that after the speed control signal is determined in step 104, the simulation calculation mode of the corresponding granularity can be determined from the correspondence according to the size or change trend of the speed control signal.

[0048] In some other embodiments, step 106 may further include: providing simulation calculation modes of multiple granularities; and controlling the simulation system to enter the simulation calculation mode of the corresponding granularity based on the relationship between the speed control signal and the preset speed, so as to adjust the simulation speed of the simulation system. In some embodiments, the relationship between the speed control signal and the preset speed may include, for example, a size relationship between the two, a distance between the two (for example, the distance may be determined by calculating a ratio, a difference, etc. between the two), and the like.

[0049] For example, in some embodiments, assuming that two granularity simulation calculation modes are provided, namely a fine-grained simulation calculation mode (slow calculation speed) and a coarse-grained simulation calculation mode (fast calculation speed), if the speed control signal is greater than a preset speed, the simulation system can be controlled to enter the coarse-grained simulation calculation mode; if the speed control signal is less than the preset speed, the simulation system can be controlled to enter the fine-grained simulation calculation mode.

[0050] In order to further understand how to control the simulation speed of a simulation system based on a speed control signal, a specific example is provided below for explanation.

[0051] Assume that in a simulation system simulating tank combat, three simulation calculation modes are provided, namely the first simulation calculation mode, the second simulation calculation mode and the third simulation calculation mode. The first simulation calculation mode includes an algorithm for calculating the trajectory, which needs to fully simulate the flight trajectory of the artillery shell, and calculate the position, speed, angle of incidence and other information of the impact point, so as to judge whether the target tank is hit or damaged in combination with the nature of the target tank; the second simulation calculation mode includes calculating the impact point based on the position, posture and other information of the tank when firing the artillery shell, and then reading the CEP (circular error probability) of the artillery shell according to the model of the artillery shell, weather conditions and other information, and finally using random numbers to determine the position of the impact point, and judging whether the target tank can be damaged according to the nature of the target tank; the third simulation calculation mode includes directly determining whether the target tank can be damaged by random numbers based on the historical combat data of the two types of equipment.

[0052] In comparison, the simulation granularity of the first simulation calculation mode is finer than that of the second simulation calculation mode, and the simulation granularity of the second simulation calculation mode is finer than that of the third simulation calculation mode, so that the calculation speeds of the first simulation calculation mode, the second simulation calculation mode and the third simulation calculation mode increase successively.

[0053] Assuming that the size of the speed control signal, or the changing trend, or the relationship between it and the preset speed is within the first range (for example, the ratio of the speed control signal to the preset speed is between 0 and 1.5), the simulation system can be controlled to enter the first simulation calculation mode. Assuming that the size of the speed control signal, or the changing trend, or the relationship between it and the preset speed is within the second range (for example, the ratio of the speed control signal to the preset speed is between 1.5 and 3), the simulation system can be controlled to enter the second simulation calculation mode. Assuming that the size of the speed control signal, or the changing trend, or the relationship between it and the preset speed is within the third range (for example, the ratio of the speed control signal to the preset speed is greater than 3), the simulation system can be controlled to enter the third simulation calculation mode.

[0054] It can be understood that in the above-mentioned second simulation calculation mode and third simulation calculation mode, random numbers are used to simulate the calculation results instead of executing the specific calculation process, which can speed up the speed of obtaining the simulation calculation results, thereby being able to provide a multi-granularity calculation mode, and further facilitate the adaptive adjustment of the simulation granularity of the simulation system based on the speed control signal, thereby achieving the purpose of increasing the speed to meet the speed-first simulation needs.

[0055] Combination of the above Figure 1 An exemplary description is given of the method for regulating the simulation speed according to the embodiment of the present disclosure. It can be understood that the speed control signal that is adaptively adjusted by the deviation between the collected simulation speed and the preset speed can dynamically adjust the fineness of the simulation granularity of the simulation system to achieve speed-prioritized simulation granularity regulation. Specifically, in the scheme of the embodiment of the present disclosure, under ideal conditions, the simulation speed (i.e., the actual operating speed of the simulation system), the preset speed (i.e., the expected speed) and the speed control signal (i.e., the speed used to control the operation speed of the simulation system) are consistent, and when there is a deviation between the collected simulation speed and the expected speed, the value of the speed control signal will change adaptively to control the simulation speed to approach the expected speed, thereby achieving the purpose of regulating the simulation speed.

[0056] It can also be understood that the above description is exemplary rather than restrictive. For example, the simulation time may not be limited to being directly determined by the system simulation time as described above, but may also be determined based on the system simulation time under certain conditions. For another example, the change amount of the speed control signal may not be limited to being determined based only on the deviation between the simulation speed and the preset speed, but may also be determined based on other factors. Figure 2 Provide further explanation.

[0057] Figure 2 The following is an exemplary flow chart of a method for regulating simulation speed according to another embodiment of the present disclosure. Figure 2 The method 200 described above may be combined with Figure 1 The method 100 described above is a specific embodiment of the present invention. Figure 1 The description of method 100 may also be applicable to the following description of method 200 .

[0058] like Figure 2As shown in , method 200 may include: in step 201, the system simulation time of the simulation system may be obtained. The system simulation time is the time of the simulation event to be executed by the simulation system. In some scenarios, the system simulation time may be virtual. For example, in one example, assuming that the event currently being deduced is at 19:10 on August 1, 1927, then the current system simulation time may be 19:10 on August 1, 1927. It is understandable that the system simulation time may be fast-forwarded, that is, the advancement speed of the system simulation time may be inconsistent with the advancement speed of the astronomical time, and the advancement speed of the system simulation time may be related to the step size.

[0059] Next, in step 202, in response to the difference between the current system simulation time and the simulation time of the previous acquisition time point being greater than a first threshold, the current system simulation time may be determined as the simulation time of the current acquisition time point (or current simulation time).

[0060] In one example, first, the simulation time t s (i) and astronomical time t c (i) Initialize, for example, let t s (0) = 0, let t c (0) = 0; then the current system simulation time t of the simulation system can be read e ; Then we can simulate the current system time t e and the simulation time t of the previous acquisition time point i-1 s (i-1) Make a judgment; respond to t e -t s (i-1)>D, the current simulation time t can be recorded s (i) = t e , and judge the next simulation time (ie, let i=i+1); in response to t e -t s (i-1)<D, the operation of reading the current system simulation time can be continued until the current simulation time is determined, where D represents a first threshold. In some embodiments, D is a positive number, for example, it can be equal to 1 second, or it can be set to other time thresholds as needed.

[0061] In determining the simulation time t s (i) At the same time, determine the astronomical time t at the same acquisition time point r (i), then the process can proceed to step 203 to calculate the simulation speed. Step 201, step 202 and step 203 can be combined as described above. Figure 1A specific implementation of step 102 described above is a simulation speed automatic collection operation for discrete event queues, which can be used to track the current state of the simulation system in real time and collect system data. The specific calculation process of the simulation speed has been described in detail in conjunction with step 102 in the previous text, and will not be repeated here.

[0062] Further, it can be understood that by setting the first threshold D, the simulation speed within the simulation time D can be calculated in step 203, for example, the simulation speed within 1 second of the simulation time, so that by controlling the acquisition frequency of the simulation speed, too frequent speed control operations and interference with the normal simulation process can be avoided, which is also beneficial to avoid the speed acquisition operation consuming too many CPU resources.

[0063] Then, if Figure 2 As further shown in , the process can proceed to step 204, and the deviation ratio can be calculated. In some embodiments, the deviation ratio can include a ratio between the deviation and the preset speed, where the deviation can be the difference between the preset speed and the simulation speed. In other embodiments, the deviation ratio can be calculated by the following formula:

[0064]

[0065] Wherein, e(i) represents the deviation ratio at the i-th acquisition time point, V represents the preset speed, and v(i) represents the simulation speed acquired at the i-th acquisition time point.

[0066] Next, in step 205, the deviation cumulative value may be calculated. In some embodiments, the deviation cumulative value may include the sum of the deviation ratios of multiple acquisition time points, or the weighted sum of the deviation ratios of multiple acquisition time points. In some embodiments, the multiple acquisition time points may be a plurality of consecutive acquisition time points. In other embodiments, the weighted sum of the deviation ratios of multiple acquisition time points may be a weighted sum of equal weights, or may be a weighted sum of unequal weights.

[0067] Taking the weighted sum of the equally divided weights as an example, in one example, the accumulated deviation value can be calculated based on the following formula:

[0068]

[0069] Among them, e s (i) can represent the accumulated deviation value at the i-th acquisition time point, a can represent the adaptive coefficient, e(j) can represent the deviation ratio, i represents the i-th acquisition time point, and j ranges from ia to i. In formula 4, It can be used as the weight coefficient of each deviation ratio in the weighted sum of the multiple deviation ratios, that is, the deviation ratios of multiple acquisition time points are weighted and summed with equal weights. In addition, the calculation of formula 4 can be performed when i>a.

[0070] In some embodiments, a can be set to a fixed value as needed, such as 1, 10, 20, 30, 50, etc. In some other embodiments, a=A*log 10 N, where N represents the number of simulation entities in the simulation system, and A represents a coefficient parameter. In one example, A may be equal to 2, or may be adjusted as needed. In some embodiments, the simulation entity may include a simulation object (or simulation target) in the simulation system. For example, in a combat simulation system, the simulation entity may include entities such as aircraft, missiles, radars, and troops.

[0071] Further, in step 206, a deviation difference value may be calculated. In some embodiments, the deviation difference value may include the difference between the deviation ratio and the deviation ratio at the last acquisition time point. In other embodiments, the deviation difference value may be determined by the following formula:

[0072] e d (i)=e(i)-e(i-1) (Formula 5),

[0073] Among them, e d (i) can represent the deviation difference value at the i-th acquisition time point, e(i) represents the deviation ratio at the i-th acquisition time point, and e(i-1) represents the deviation ratio at the i-1-th acquisition time point.

[0074] Then, the process can proceed to step 207, and the speed control signal can be output. In some embodiments, the change amount of the speed control signal at the current acquisition time point can be determined based on at least one of the deviation ratio, the deviation accumulation value, and the deviation difference value at the current acquisition time point; and the speed control signal at the current acquisition time point can be determined based on the sum of the speed control signal determined at the previous acquisition time point and the change amount.

[0075] The variation of the speed control signal can indicate the size of the speed adjustment amplitude. In some embodiments, the variation of the speed control signal can be determined based only on the deviation ratio. The deviation ratio can quickly reduce the deviation, so that it can be better used to express the speed control signal. However, using only the deviation ratio may lead to the existence of static errors. The existence of static errors makes it possible to adjust the simulation speed using the variation, and the adjusted simulation speed will always have a certain error compared with the preset speed. Based on this, in a preferred embodiment, the variation of the speed control signal can be determined based on the deviation ratio and the deviation cumulative value, wherein the deviation cumulative value can be used to eliminate the static error caused by the deviation ratio regulation to achieve the effect of zero-difference regulation. Further, in a more preferred embodiment, the variation of the speed control signal can be determined based on the combined effect of the deviation ratio, the deviation cumulative value and the deviation differential value. The introduction of the deviation differential value can achieve the effect of accelerating the correction speed of the deviation through early correction, thereby helping to improve the control efficiency of the simulation speed.

[0076] In some embodiments, step 207 may further include: performing weighted summation on the deviation ratio, the deviation accumulation value, and the deviation difference value to determine the change amount of the speed control signal. For example, in one example, the change amount of the speed control signal F(i)=k p *e(i)+k s *e s (i)+k d *e d (i), the speed control signal can be determined based on the following formula:

[0077] f(i)=f(i-1)+k p *e(i)+k s *e s (i)+k d *e d (i) (Formula 6),

[0078] Where, f(i) represents the speed control signal at the i-th acquisition time point, f(i-1) represents the speed control signal at the i-1-th acquisition time point, e(i) represents the deviation ratio at the i-th acquisition time point, and e s (i) represents the accumulated deviation value at the i-th acquisition time point, e d (i) represents the deviation difference value at the i-th acquisition time point, k p The proportional weighting coefficient representing the deviation ratio, k s Indicates the cumulative weighting coefficient of the accumulated deviation value, k d A difference weighting coefficient representing the deviation difference value.

[0079] In some embodiments, the specific values ​​of the proportional weighting coefficient, the cumulative weighting coefficient and the differential weighting coefficient can be determined based on empirical values. In other embodiments, the proportional weighting coefficient, the cumulative weighting coefficient and the differential weighting coefficient may be affected by factors such as the algorithm implementation method of the simulation system and the data characteristics of the simulation scene, and therefore need to be determined in combination with the specific scene and the simulation system version. Therefore, the proportional weighting coefficient, the cumulative weighting coefficient and the differential weighting coefficient can be optimized and dynamically adjusted to adaptively obtain coefficient values ​​that meet factors such as application scenarios and simulation algorithm characteristics. For ease of understanding, the coefficient optimization will be described exemplarily below.

[0080] In some embodiments, method 200 may further include: fixing the cumulative weighting coefficient of the deviation cumulative value and the differential weighting coefficient of the deviation differential value, optimizing the proportional weighting coefficient of the deviation ratio; fixing the proportional weighting coefficient and the differential weighting coefficient, optimizing the cumulative weighting coefficient; fixing the proportional weighting coefficient and the cumulative weighting coefficient, optimizing the differential weighting coefficient. By fixing two of the three coefficients and then optimizing another one of the coefficients, each coefficient can be optimized separately, which can avoid mutual influence between multiple coefficients during the optimization process and avoid the optimized coefficient from changing again. The fixed coefficient in this embodiment refers to the value of the fixed coefficient, and the fixed coefficient is not changed during the optimization process.

[0081] In other embodiments, the proportional weighting coefficient can be optimized using a random optimization method; the cumulative weighting coefficient can be optimized using an incremental method; and the differential weighting coefficient can be optimized using an incremental method. In some embodiments, the random optimization can be implemented using an existing or future implementable random optimization algorithm, such as a stochastic gradient descent method, etc., which is not limited herein. In other embodiments, the incremental method refers to a method in which the value is continuously increased, and the magnitude of each increase can be the same or different. For example, in one example, a coarse adjustment can be performed in the early stage of optimization, and a larger increase can be used, while a fine adjustment can be performed in the later stage of optimization, and a smaller increase can be used.

[0082] After optimizing and fixing the proportional weighting coefficients, the simulation system will be more sensitive to changes in the cumulative weighting coefficients and the differential weighting coefficients. By using an incremental approach rather than continuing to use random optimization for optimization, the subsequent increase can be determined in real time based on the current state after each increase in value, thereby optimizing the cumulative weighting coefficients and the differential weighting coefficients more accurately and stably. Otherwise, blind optimization may result in a fluctuating simulation speed.

[0083] Furthermore, in some other embodiments, the proportional weighting coefficient can be optimized using a random optimization method until the simulation speed meets the first preset condition; the cumulative weighting coefficient can be optimized using an incremental method until the deviation between the simulation speed and the preset speed meets the second preset condition; the differential weighting coefficient can be optimized using an incremental method until the deviation between the simulation speed and the preset speed meets the third preset condition.

[0084] In some embodiments, the first preset condition may include: a first ratio between the maximum value of the simulation speed and the preset speed is within a first preset range; and / or the second preset condition may include: a second ratio between the accumulated value of the absolute value of the deviation and the preset speed is within a second preset range; and / or the third preset condition may include: a third ratio between the accumulated value of the absolute value of the deviation and the preset speed is within a third preset range.

[0085] In one example, the cumulative weighting coefficient and the differential weighting coefficient may be set to 0 first, and the proportional weighting coefficient may be adjusted by random optimization until a first preset condition is met, where the first preset condition may include:

[0086]

[0087] Wherein, max(v(i)) represents the maximum value among the i simulation speeds, V represents the preset speed, and K represents the first preset range. In some embodiments, the value of K can be obtained based on the simulation speed data in the historical simulation calculation. For example, the K value (i.e., the empirical value) is roughly estimated based on the maximum simulation speed collected in the historical simulation calculation, and the empirical K value is used in the speed control signal calculation of the current simulation calculation. In one embodiment, K can be equal to 1.2, or other empirical values.

[0088] In another example, the proportional weighting coefficient and the differential weighting coefficient may be kept unchanged, and the cumulative weighting coefficient may be optimized in an incremental manner until a second preset condition is met, where the second preset condition may include:

[0089]

[0090] Wherein, v(i) represents the simulation speed, V represents the preset speed, m represents the second preset range, b and c represent two different acquisition time points, where c>b. In some embodiments, b can be equal to c-100, for example, c can be equal to 3600 and b can be equal to 3500, or c can be equal to 100 and b can be equal to 0, and cb represents the number of deviations (i.e., |v(i)-V|) participating in the cumulative weighted coefficient optimization calculation, and of course, the number can also be limited to 100. In other embodiments, c can be equal to the ordinal value of the current acquisition time point, and the cumulative calculation in Formula 8 is the cumulative value of nearly cb deviations. In some other embodiments, m can be equal to 0.01, or other values. m can be an empirical value calculated according to Formula 8 and using cb deviation data in historical simulation calculations.

[0091] In yet another example, the proportional weighting coefficient and the cumulative weighting coefficient may be kept unchanged, and the differential weighting coefficient may be optimized in an incremental manner until a third preset condition is met, wherein the third preset condition may include:

[0092]

[0093] Wherein, v(i) represents the simulation speed, V represents the preset speed, n represents the third preset range, p and q represent two different acquisition time points, wherein q>p. In some embodiments, p may be equal to q-10, for example, q may be equal to 60 and p may be equal to 50, or q may be equal to 100 and p may be equal to 90, and qp represents the number of deviations (i.e., |v(i)-V|) involved in the optimization calculation of the differential weighted coefficient, and of course, the number may not be limited to 10. In other embodiments, q may be equal to the ordinal value of the current acquisition time point, and the cumulative calculation in Formula 9 is the cumulative value of nearly qp deviations. In some other embodiments, n may be equal to 0.05, or other values. n may be an empirical value calculated according to Formula 9 and using qp deviation data in historical simulation calculations.

[0094] Based on the above, it can be understood that when the proportional weighting coefficient k p , cumulative weighting coefficient k s and the difference weighting coefficient k d In the optimization process, the change of the speed control signal is not necessarily based on the deviation ratio, the deviation accumulation value and the deviation difference value. For example, after satisfying the conditions of formula 7, the proportional weighting coefficient k can be determined. p , and then we can use f(i-1) and k p *e(i) to generate the speed control signal. Then k can be fixed p , and start optimizing the cumulative weighted coefficient k s , in each round of optimization, the weighted coefficient k is accumulateds In the process, the cumulative weighting coefficient k can be determined according to the change of simulation speed. s The next round of increments is completed until the condition of formula 8 is met, and the accumulated weighted coefficient k is completed. s Similarly, the fixed proportion weighting coefficient k p and cumulative weighting coefficient k s , start to weight the difference coefficient k d The optimization process is similar to the cumulative weighting coefficient k. s The optimization process is similar until the condition of Formula 9 is met. Taking cb = 100 as an example, at the 100 acquisition time points at the beginning of the simulation, the output speed control signal may be based only on f(i-1) and k in Formula 6. p *e(i), and after the 101st acquisition time point, the output speed control signal may be based on f(i-1), k p *e(i) and k s *e s (i) Three or all elements are used to produce it.

[0095] After the optimized coefficients are obtained, a complete speed control signal can be output. It can be understood that step 204, step 205, step 206 and step 207 can be combined with the above. Figure 1 After the speed control signal is output, the process can proceed to step 208, and the simulation speed of the simulation system can be regulated based on the speed control signal. Step 208 can be combined with the above Figure 1 The step 106 described above is the same or similar and will not be described in detail here. Further, after a round of simulation speed control is performed, the steps 201 to 208 may be repeatedly performed until the simulation ends.

[0096] Combination of the above Figure 2 The method according to another embodiment of the present disclosure is described exemplarily. It is understood that the above description is exemplary rather than restrictive. For example, step 204, step 205, and step 206 in the diagram may be executed sequentially in a sequence other than the order indicated by the arrows in the diagram, or may be executed synchronously. For another example, the specific values ​​of the parameters listed above are only exemplary, and those skilled in the art may adjust them according to actual application conditions.

[0097] In summary, in the embodiments of the present disclosure, by collecting the simulation speed and determining the speed control signal according to the deviation between the simulation speed and the preset speed, the speed control signal can have an adaptive adjustment capability that changes with the simulation speed. This can not only realize adaptive control of the simulation speed of the simulation system based on the speed control signal, but also have the characteristics of fast simulation speed adjustment, high adjustment stability and small error.

[0098] Figure 3 FIG. 2 is a schematic block diagram of a device for regulating simulation speed according to an embodiment of the present disclosure. Figure 3 As shown, the device 300 may include a processor 301 and a memory 302. The processor 301 is used to execute program instructions, and the memory 302 stores program instructions for adjusting the simulation speed. When the program instructions are loaded and run by the processor 301, the processor 301 executes the aforementioned combined Figure 1 or Figure 2 Describes the method used to control the simulation speed.

[0099] For example, in some embodiments, the device 300 may have the functions of receiving astronomical time, system simulation time, etc., and performing simulation speed calculation, speed control signal calculation, etc. Therefore, the device 300 may adaptively adjust and calculate the speed control signal in executing the request task related to regulating the simulation speed, which is conducive to realizing the rapid, accurate and stable regulation of the simulation speed of the simulation system.

[0100] In addition, the present disclosure also provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by one or more processors, the aforementioned method for regulating the simulation speed is implemented.

[0101] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0102] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for regulating simulation speed, characterized in that: include: Collect the simulation speed of the simulation system; Determining a speed control signal according to a deviation between the simulated speed and a preset speed; as well as Based on the speed control signal, regulating the simulation speed of the simulation system; Wherein, determining the speed control signal according to the deviation between the simulation speed and the preset speed includes: Determining a change in the speed control signal according to the deviation; Determine the speed control signal at the current acquisition time point according to the sum of the speed control signal determined at the previous acquisition time point and the variation; Based on the speed control signal, regulating the simulation speed of the simulation system includes: Provide simulation calculation modes with multiple granularities; Based on the speed control signal, controlling the simulation system to enter a simulation calculation mode of a corresponding granularity so as to adjust the simulation speed of the simulation system; By collecting the deviation between the simulation speed and the preset speed, the speed control signal is adaptively adjusted to dynamically adjust the fineness of the simulation granularity of the simulation system.

2. The method according to claim 1, characterized in that The simulation speed of the acquisition simulation system includes: Determine the simulation time and the astronomical time of the acquisition time point of the simulation speed; The simulation speed of the latter one of the adjacent acquisition time points is determined according to the ratio between the difference in simulation time between the adjacent acquisition time points and the difference in astronomical time between the adjacent acquisition time points.

3. The method according to claim 2, characterized in that Determining the simulation time includes: Get the current system simulation time of the simulation system; In response to the difference between the current system simulation time and the simulation time at the last acquisition time point being greater than a first threshold, the current system simulation time is determined as the simulation time at the current acquisition time point.

4. The method according to claim 1, characterized in that: Wherein, determining the change amount of the speed control signal according to the deviation comprises: The change amount is determined based on at least one of a deviation ratio, a deviation accumulation value, and a deviation difference value, wherein: The deviation ratio includes the ratio between the deviation and the preset speed, and the deviation is the difference between the preset speed and the simulation speed; The deviation accumulated value includes the sum of the deviation ratios of multiple acquisition time points, or the weighted sum of the deviation ratios of the multiple acquisition time points; The deviation difference value includes the difference between the deviation ratio and the deviation ratio at the previous acquisition time point.

5. The method according to claim 4, characterized in that The accumulated deviation value is calculated based on the following formula: in, represents the accumulated value of the deviation, represents the adaptive coefficient, represents the deviation ratio, represents the i-th acquisition time point, The value range is ~ .

6. The method according to claim 5, characterized in that in, Wherein, N represents the number of simulation entities in the simulation system, and A represents a coefficient parameter.

7. The method according to any one of claims 4 to 5, characterized in that: Wherein determining the change amount of the speed control signal further comprises: The deviation ratio, the deviation accumulated value and the deviation differential value are weightedly summed to determine the variation.

8. The method according to claim 7, characterized in that Further including: Fixing the cumulative weighting coefficient of the deviation cumulative value and the differential weighting coefficient of the deviation differential value, and optimizing the proportional weighting coefficient of the deviation ratio; Fixing the proportional weighting coefficient and the differential weighting coefficient, and optimizing the cumulative weighting coefficient; The proportional weighting coefficient and the cumulative weighting coefficient are fixed, and the differential weighting coefficient is optimized.

9. The method according to claim 8, characterized in that in Optimizing the proportional weighting coefficient by using a random optimization method until the simulation speed meets a first preset condition; Optimizing the accumulated weighting coefficient in an incremental manner until the deviation satisfies a second preset condition; The differential weighting coefficient is optimized in an incremental manner until the deviation satisfies a third preset condition.

10. The method according to claim 9, characterized in that in The first preset condition includes: A first ratio between the maximum value of the simulation speed and the preset speed is within a first preset range; and / or The second preset condition includes: A second ratio between the accumulated value of the absolute value of the deviation and the preset speed is within a second preset range; and / or The third preset condition includes: A third ratio between the accumulated value of the absolute values ​​of the deviations and the preset speed is within a third preset range.

11. The method according to claim 10, characterized in that in The second preset condition includes: in, represents the simulation speed, V represents the preset speed, m represents the second preset range, b and c represent two different acquisition time points, wherein c>b; and / or The third preset condition includes: in, represents the simulation speed, V represents the preset speed, n represents the third preset range, p and q represent two different acquisition time points, wherein q>p.

12. A device for regulating simulation speed, characterized in that: include: a processor for executing program instructions; as well as A memory storing the program instructions, which, when loaded and executed by the processor, enables the processor to execute the method according to any one of claims 1-11.

13. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by one or more processors, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Real-time data traffic simulation method and system

    CN103971517A