CN111124592B - Simulation task execution method and device - Google Patents

Simulation task execution method and device Download PDF

Info

Publication number
CN111124592B
CN111124592B CN201811287177.9A CN201811287177A CN111124592B CN 111124592 B CN111124592 B CN 111124592B CN 201811287177 A CN201811287177 A CN 201811287177A CN 111124592 B CN111124592 B CN 111124592B
Authority
CN
China
Prior art keywords
simulation
execution
software model
task
clock
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.)
Active
Application number
CN201811287177.9A
Other languages
Chinese (zh)
Other versions
CN111124592A (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.)
Apollo Intelligent Technology Beijing Co Ltd
Original Assignee
Apollo Intelligent Technology Beijing 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 Apollo Intelligent Technology Beijing Co Ltd filed Critical Apollo Intelligent Technology Beijing Co Ltd
Priority to CN201811287177.9A priority Critical patent/CN111124592B/en
Publication of CN111124592A publication Critical patent/CN111124592A/en
Application granted granted Critical
Publication of CN111124592B publication Critical patent/CN111124592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a simulation task execution method and device. The method comprises the following steps: acquiring a simulation task of a simulation algorithm node, wherein the simulation task comprises initial task parameters and execution time; under the condition that the simulation algorithm node is aligned with the clock of the simulation software model, acquiring an execution result parameter aiming at the simulation task; and sending the execution result parameters to the simulation algorithm node. According to the embodiment of the invention, the clocks of the simulation software model and the simulation algorithm nodes are aligned, then the simulation algorithm nodes can perform subsequent simulation operation by utilizing the execution result parameters after the alignment of the simulation software model, a unified consistency solution can be abstracted for different simulation software models, and different simulation software models can be connected into different simulation algorithm nodes according to strict consistency support.

Description

Simulation task execution method and device
Technical Field
The present invention relates to the field of computer simulation technologies, and in particular, to a method and an apparatus for executing a simulation task.
Background
Operating system consistency is an important evaluation index for how well the simulation system is running. Consistency refers to the fact that the same simulation task is performed multiple times under the same experimental environment, and the results are not different. Typically, a highly consistent simulation system is highly available and trusted. The consistency of the simulation system fused with the commercial simulation software is also an important index for measuring the fusion quality of the commercial software.
Disclosure of Invention
The embodiment of the invention provides a simulation task execution method and device, which are used for solving one or more technical problems in the prior art.
In a first aspect, an embodiment of the present invention provides a method for executing a simulation task, including:
acquiring a simulation task of a simulation algorithm node, wherein the simulation task comprises initial task parameters and execution time;
under the condition that the simulation algorithm node is aligned with the clock of the simulation software model, acquiring an execution result parameter aiming at the simulation task;
and sending the execution result parameters to the simulation algorithm node.
In one embodiment, when the simulation algorithm node is aligned with the clock of the simulation software model, acquiring the execution result parameter for the simulation task includes:
acquiring the execution capacity information of the simulation algorithm node and the simulation software model;
and acquiring an execution result parameter aiming at the simulation task according to the execution time in the simulation task and the execution capacity information of the simulation algorithm node and the simulation software model.
In one embodiment, obtaining the execution result parameter for the simulation task according to the execution time in the simulation task and the execution capacity information of the simulation algorithm node and the simulation software model, includes:
if the execution time in the simulation task is M, the execution frequency of the simulation algorithm node is N1, and the execution frequency of the simulation software model is N2, obtaining an execution result parameter of the simulation task according to the S-th execution result of the simulation software model;
where s=m/(N2/N1), where M, N1, N2 and S are greater than 0.
In one embodiment, when the simulation algorithm node is aligned with the clock of the simulation software model, obtaining the execution result parameter for the simulation task includes:
aligning the simulation algorithm node with a clock of the simulation software model by utilizing a virtual clock of the ROS;
sending a clock alignment instruction to the simulation software model, wherein the clock alignment instruction comprises aligned execution time;
and receiving an execution result parameter obtained after the simulation software model executes the simulation task according to the aligned execution time.
In one embodiment, using a virtual clock of an ROS to align a simulation algorithm node with a clock of a simulation software model, comprising:
acquiring the execution frequency of a simulation algorithm node and a simulation software model which are accessed into the ROS by utilizing a virtual clock counter of the ROS;
calculating a common multiple of a simulation algorithm node accessed to the ROS and a simulation software model;
and aligning the simulation algorithm nodes with clocks of the simulation software model according to the common multiple to obtain the aligned execution time.
In a second aspect, an embodiment of the present invention provides a simulation task execution apparatus, including:
the task acquisition module is used for acquiring a simulation task of the simulation algorithm node, wherein the simulation task comprises initial task parameters and execution time;
the clock alignment module is used for acquiring the execution result parameters aiming at the simulation task under the condition that the simulation algorithm node is aligned with the clock of the simulation software model;
and the result sending module is used for sending the execution result parameters to the simulation algorithm node.
In one embodiment, the clock alignment module includes:
the execution capacity acquisition sub-module is used for acquiring the execution capacity information of the simulation algorithm nodes and the simulation software model;
and the execution result acquisition sub-module is used for acquiring execution result parameters aiming at the simulation task according to the execution time in the simulation task and the execution capacity information of the simulation algorithm node and the simulation software model.
In one embodiment, the execution result obtaining sub-module is further configured to obtain, if the execution time in the simulation task is M, the execution frequency of the simulation algorithm node is N1, and the execution frequency of the simulation software model is N2, an execution result parameter of the simulation task according to the execution result of the S-th time of the simulation software model;
where s=m/(N2/N1), where M, N1, N2 and S are greater than 0.
In one embodiment, the clock alignment module includes:
a virtual clock sub-module for aligning the simulation algorithm node with the clock of the simulation software model using the virtual clock of the ROS;
an alignment instruction submodule, configured to send a clock alignment instruction to the simulation software model, where the clock alignment instruction includes aligned execution time;
and the result receiving sub-module is used for receiving the execution result parameters obtained after the simulation software model executes the simulation task according to the aligned execution time.
In one embodiment, the virtual clock sub-module is further configured to obtain, using a virtual clock counter of the ROS, an execution frequency of the simulation algorithm node and the simulation software model that access the ROS; calculating a common multiple of a simulation algorithm node accessed to the ROS and a simulation software model; and aligning the simulation algorithm nodes with clocks of the simulation software model according to the common multiple to obtain the aligned execution time.
In a third aspect, an embodiment of the present invention provides a simulation task execution apparatus, where the function of the apparatus may be implemented by hardware, or may be implemented by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In one possible design, the apparatus includes a processor and a memory in a structure thereof, the memory storing a program for supporting the apparatus to perform the above simulation task execution method, the processor being configured to execute the program stored in the memory. The apparatus may also include a communication interface for communicating with other devices or communication networks.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium for storing computer software instructions for use by a simulation task execution apparatus, which includes a program for executing the simulation task execution method described above.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising a computer program which, when executed by a processor, implements a method as described above.
One of the above technical solutions has the following advantages or beneficial effects: the simulation software model is aligned with the clock of the simulation algorithm node, then the simulation algorithm node can utilize the execution result parameters after the alignment of the simulation software model to carry out subsequent simulation operation, a unified consistency solution can be abstracted for different simulation software models, and different simulation software models can be connected into different simulation algorithm nodes according to strict consistency support.
The foregoing summary is for the purpose of the specification only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will become apparent by reference to the drawings and the following detailed description.
Drawings
In the drawings, the same reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily drawn to scale. It is appreciated that these drawings depict only some embodiments according to the disclosure and are not therefore to be considered limiting of its scope.
FIG. 1 illustrates a flow chart of a simulation task execution method in accordance with an embodiment of the present invention.
FIG. 2 illustrates a flow chart of a simulation task execution method in accordance with an embodiment of the present invention.
FIG. 3 illustrates a flow chart of a simulation task execution method in accordance with an embodiment of the present invention.
Fig. 4 shows a block diagram of a simulation task execution apparatus according to an embodiment of the present invention.
Fig. 5 shows a block diagram of a simulation task execution apparatus according to an embodiment of the present invention.
FIG. 6 shows a block diagram of a simulation task execution apparatus according to an embodiment of the present invention.
Detailed Description
Hereinafter, only certain exemplary embodiments are briefly described. As will be recognized by those of skill in the pertinent art, the described embodiments may be modified in various different ways without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature and not as restrictive.
FIG. 1 illustrates a flow chart of a simulation task execution method in accordance with an embodiment of the present invention. As shown in fig. 1, the simulation task execution method may include a determination process, and specifically may include:
step S11, acquiring simulation tasks of the simulation algorithm nodes, wherein the simulation tasks comprise initial task parameters and execution time.
And step S12, under the condition that the simulation algorithm node is aligned with the clock of the simulation software model, acquiring an execution result parameter aiming at the simulation task.
And step S13, sending the execution result parameters to the simulation algorithm node.
The simulation software model comprises a dynamics model,
The simulation software model may differ from the execution capability information of the simulation algorithm nodes. The execution capability information may include, but is not limited to, execution frequency, execution duration, execution period, execution step size, and the like. For example, the execution frequency may be how many times a task is executed per second, the execution duration may be how many seconds it takes to execute a task, the execution period may be how many seconds a task is executed per interval, and the execution step may be several times in a certain time range. A simulation software model, such as a dynamics model, may simulate the actual operating environment of the vehicle, e.g., the actual frequency of the vehicle chassis controller is typically 100hz, and in a simulation software model the frequency of the vehicle chassis controller may be simulated, setting the frequency of the task of performing the step on the accelerator to 100hz.
In one example, if the execution frequency of a certain simulation software model is different from the execution frequency of a simulation algorithm node. The execution frequency can be utilized to align the simulation algorithm node with the clock of the simulation software model, and then the parameters adopted by the simulation algorithm node are determined to be the execution result parameters.
In the embodiment of the invention, various ways of aligning the simulation algorithm node with the clock of the simulation software model are exemplified as follows.
Example one: the execution capability information is used to align the simulation algorithm nodes with the clocks of the simulation software model.
In this example, as shown in fig. 2, step S12 may include:
and S21, acquiring the execution capacity information of the simulation algorithm nodes and the simulation software model.
And S22, acquiring an execution result parameter aiming at the simulation task according to the execution time in the simulation task and the execution capacity information of the simulation algorithm node and the simulation software model.
In one embodiment, taking the example that the execution capability information includes the execution frequency, step S22 includes:
if the execution time in the simulation task is M, the execution frequency of the simulation algorithm node is N1, and the execution frequency of the simulation software model is N2, obtaining an execution result parameter of the simulation task according to the S-th execution result of the simulation software model; where s=m/(N2/N1), where M, N1, N2 and S are greater than 0.
For example, the simulation task is to expect to return to a speed 100ms after the task of stepping on the accelerator is performed at a certain accelerator value. Wherein the throttle value belongs to the task parameter and 100ms belongs to the execution time. The execution frequency of the simulation software model is 100hz, and the execution frequency of the simulation algorithm nodes is 10hz. And the simulation algorithm node continuously calculates the next throttle value according to the 10 th execution result of the received simulation software model.
For another example, the simulation task is to expect to return to a speed 200ms after the task of stepping on the accelerator is performed at a certain accelerator value. The execution frequency of the simulation software model is 100hz, and the execution frequency of the simulation algorithm nodes is 10hz. And the simulation algorithm node continuously calculates the next throttle value according to the 20 th execution result of the received simulation software model.
Example two: the virtual clock of the ROS is utilized to align the simulation algorithm node with the clock of the simulation software model.
In this example, as shown in fig. 3, step S12 may include:
step S31, aligning the simulation algorithm node with the clock of the simulation software model using the virtual clock of ROS (Robot Operating System ). ROS are widely accepted operating systems in the robot field, enabling message transfer between simulation software models and simulation algorithm nodes.
And step S32, sending a clock alignment instruction to the simulation software model, wherein the clock alignment instruction comprises the aligned execution time.
And step S33, receiving an execution result parameter obtained after the simulation software model executes the simulation task according to the aligned execution time.
In one embodiment, step S31 includes: acquiring the execution frequency of a simulation algorithm node and a simulation software model which are accessed into the ROS by utilizing a virtual clock counter of the ROS; calculating a common multiple of a simulation algorithm node accessed to the ROS and a simulation software model; and aligning the simulation algorithm nodes with clocks of the simulation software model according to the common multiple to obtain the aligned execution time.
For example, the simulation task is to expect to return to a speed 300ms after the task of stepping on the accelerator is performed at a certain accelerator value. The execution time of the simulation software model is 10ms, the execution time of the simulation algorithm node is 100ms, and the common multiple of the simulation algorithm node and the simulation algorithm node is 100ms. The execution time after the alignment was calculated to be 100ms. The clock alignment indication sent to the simulation software model includes an aligned execution time of 100ms. Thus, after 10 times of execution of the simulation software model, the execution result parameters are returned to the ROS. The ROS sends the execution result parameters to the simulation algorithm node. And the simulation algorithm node continues to calculate the next throttle value according to the received execution result parameters.
For another example, if there are multiple (including one) simulation software models corresponding to multiple (including one) simulation algorithm nodes. For example, 3 simulation software models correspond to 2 simulation algorithm nodes, and are totalized to 5 simulation modules, and their running times are respectively 10ms, 20ms, 30ms, 40ms and 50ms. Calculating the least common multiple of the 5 modules to be 600ms, the 5 modules respectively execute 60 times, 30 times, 20 times, 15 times and 12 times and then align their states, and then calculate the next state.
In addition, the execution capability information of the simulation software model and the simulation algorithm node can be obtained in advance, so that if the clock cannot be aligned, the clock can be properly adjusted. For example, the execution frequency of a certain simulation algorithm node is adjusted so that the simulation algorithm node can be aligned with the clock of a certain simulation software model.
Typically, alignment of task clocks is required to resolve consistency. By adopting the embodiment of the invention, a unified consistency solution can be abstracted for different simulation software models.
In an application example, the simulation task execution method specifically includes the following steps:
1. and acquiring a simulation task of the simulation algorithm node, wherein the simulation task comprises task parameters and execution time.
2. And acquiring the step length, frequency, time and other execution capacity information of the simulation software model.
3. Aligning the simulation algorithm nodes with the clocks of the simulation software model, see the following two ways:
(1) The simulation algorithm nodes and the simulation software model are subjected to clock alignment according to a contract mode, and the specific contract method can be seen from the execution capacities of the two parties.
For example, the simulation algorithm node sends the throttle value (e.g., throttle opening) at the current time to the simulation software model via the ROS, expecting to return to a speed 100ms after the task of stepping on the throttle with that throttle value. Wherein the throttle value belongs to the task parameter and 100ms belongs to the execution time. The execution frequency of the simulation software model is 100hz, and the execution frequency of the simulation algorithm nodes is 10hz. The simulation algorithm node continues to calculate the next throttle value according to the 10 th execution result of the received simulation software model, such as the throttle value.
(2) The virtual clock of the ROS is utilized to align the simulation algorithm nodes with the clock of the simulation software model.
In particular, the virtual clock counter of the ROS is utilized to obtain the execution frequency of each module, such as a simulation software model and a simulation algorithm node, which is accessed to the ROS. A common multiple of these execution frequencies is calculated. And aligning the simulation algorithm nodes with clocks of the simulation software model according to the common multiple. And sending a clock alignment instruction to the simulation software model, wherein the clock alignment instruction comprises the aligned execution time. And receiving task parameters of the simulation software model after the simulation task is executed at the aligned execution time.
By adopting the process, different simulation software models can be connected into different simulation algorithm nodes according to strict consistency support.
Fig. 4 shows a block diagram of a simulation task execution apparatus according to an embodiment of the present invention. As shown in fig. 4, the apparatus may include:
the task acquisition module 41 is configured to acquire a simulation task of a simulation algorithm node, where the simulation task includes an initial task parameter and an execution time;
the clock alignment module 42 is configured to obtain an execution result parameter for the simulation task when the simulation algorithm node is aligned with a clock of a simulation software model;
and the result sending module 43 is configured to send the execution result parameter to the simulation algorithm node.
In one embodiment, as shown in fig. 5, the clock alignment module 42 includes:
an execution capability obtaining sub-module 51, configured to obtain execution capability information of the simulation algorithm node and the simulation software model;
and the execution result obtaining sub-module 52 is configured to obtain an execution result parameter for the simulation task according to the execution time in the simulation task and the execution capability information of the simulation algorithm node and the simulation software model.
In one embodiment, the execution result obtaining sub-module 52 is further configured to obtain, if the execution time in the simulation task is M, the execution frequency of the simulation algorithm node is N1, and the execution frequency of the simulation software model is N2, an execution result parameter of the simulation task according to the S-th execution result of the simulation software model;
where s=m/(N2/N1), where M, N1, N2 and S are greater than 0.
In one embodiment, the clock alignment module 42 includes:
a virtual clock sub-module 53 for aligning the simulation algorithm node with the clock of the simulation software model using the virtual clock of the ROS;
an alignment instruction submodule 54, configured to send a clock alignment instruction to the simulation software model, where the clock alignment instruction includes an execution time after alignment;
and the result receiving sub-module 55 is configured to receive an execution result parameter obtained after the simulation software model executes the simulation task according to the aligned execution time.
In one embodiment, the virtual clock sub-module 53 is further configured to obtain, using a virtual clock counter of the ROS, an execution frequency of the simulation algorithm node and the simulation software model that access the ROS; calculating a common multiple of a simulation algorithm node accessed to the ROS and a simulation software model; and aligning the simulation algorithm nodes with clocks of the simulation software model according to the common multiple to obtain the aligned execution time.
The functions of each module in each device of the embodiments of the present invention may be referred to the corresponding descriptions in the above methods, and are not described herein again.
FIG. 6 shows a block diagram of a simulation task execution apparatus according to an embodiment of the present invention. As shown in fig. 6, the apparatus includes: memory 910 and processor 920, memory 910 stores a computer program executable on processor 920. The processor 920 implements the transaction commit method in the above-described embodiments when executing the computer program. The number of the memories 910 and the processors 920 may be one or more.
The apparatus further comprises:
and the communication interface 930 is used for communicating with external equipment and carrying out data interaction transmission.
The memory 910 may include high-speed RAM memory or may further include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 910, the processor 920, and the communication interface 930 are implemented independently, the memory 910, the processor 920, and the communication interface 930 may be connected to each other and perform communication with each other through buses. The bus may be an industry standard architecture (ISA, industry Standard Architecture) bus, a peripheral component interconnect (PCI, peripheral Component) bus, or an extended industry standard architecture (EISA, extended Industry Standard Component) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 910, the processor 920, and the communication interface 930 are integrated on a chip, the memory 910, the processor 920, and the communication interface 930 may communicate with each other through internal interfaces.
An embodiment of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements a method as in any of the above embodiments.
Embodiments of the present invention provide a computer program product comprising a computer program/instruction which, when executed by a processor, implements a method as described in any of the embodiments above.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that various changes and substitutions are possible within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A simulation task execution method, comprising:
acquiring a simulation task of a simulation algorithm node, wherein the simulation task comprises initial task parameters and execution time;
under the condition that the simulation algorithm node is aligned with the clock of the simulation software model, acquiring an execution result parameter aiming at the simulation task;
sending the execution result parameters to the simulation algorithm node;
under the condition that the simulation algorithm node is aligned with the clock of the simulation software model, acquiring the execution result parameters aiming at the simulation task comprises the following steps:
aligning the simulation algorithm node with a clock of the simulation software model by utilizing a virtual clock of the ROS;
sending a clock alignment instruction to the simulation software model, wherein the clock alignment instruction comprises aligned execution time;
and receiving an execution result parameter obtained after the simulation software model executes the simulation task according to the aligned execution time.
2. The method of claim 1, wherein obtaining execution result parameters for the simulation task with the simulation algorithm node aligned with a clock of a simulation software model comprises:
acquiring the execution capacity information of the simulation algorithm node and the simulation software model;
and acquiring an execution result parameter aiming at the simulation task according to the execution time in the simulation task and the execution capacity information of the simulation algorithm node and the simulation software model.
3. The method according to claim 2, wherein obtaining the execution result parameters for the simulation task according to the execution time in the simulation task and the execution capacity information of the simulation algorithm node and the simulation software model, comprises:
if the execution time in the simulation task is M, the execution frequency of the simulation algorithm node is N1, and the execution frequency of the simulation software model is N2, obtaining an execution result parameter of the simulation task according to the S-th execution result of the simulation software model;
where s=m/(N2/N1), where M, N1, N2 and S are greater than 0.
4. A method according to claim 3, wherein aligning the simulation algorithm node with the clock of the simulation software model using the virtual clock of the ROS comprises:
acquiring the execution frequency of a simulation algorithm node and a simulation software model which are accessed into the ROS by utilizing a virtual clock counter of the ROS;
calculating a common multiple of a simulation algorithm node accessed to the ROS and a simulation software model;
and aligning the simulation algorithm nodes with clocks of the simulation software model according to the common multiple to obtain the aligned execution time.
5. A simulation task execution apparatus, comprising:
the task acquisition module is used for acquiring a simulation task of the simulation algorithm node, wherein the simulation task comprises initial task parameters and execution time;
the clock alignment module is used for acquiring the execution result parameters aiming at the simulation task under the condition that the simulation algorithm node is aligned with the clock of the simulation software model;
the result sending module is used for sending the execution result parameters to the simulation algorithm node;
wherein the clock alignment module comprises:
a virtual clock sub-module for aligning the simulation algorithm node with the clock of the simulation software model using the virtual clock of the ROS;
an alignment instruction submodule, configured to send a clock alignment instruction to the simulation software model, where the clock alignment instruction includes aligned execution time;
and the result receiving sub-module is used for receiving the execution result parameters obtained after the simulation software model executes the simulation task according to the aligned execution time.
6. The apparatus of claim 5, wherein the clock alignment module comprises:
the execution capacity acquisition sub-module is used for acquiring the execution capacity information of the simulation algorithm nodes and the simulation software model;
and the execution result acquisition sub-module is used for acquiring execution result parameters aiming at the simulation task according to the execution time in the simulation task and the execution capacity information of the simulation algorithm node and the simulation software model.
7. The apparatus of claim 6, wherein the execution result obtaining sub-module is further configured to obtain an execution result parameter of the simulation task according to an execution result of an S-th time of the simulation software model if an execution time in the simulation task is M, an execution frequency of the simulation algorithm node is N1, and an execution frequency of the simulation software model is N2;
where s=m/(N2/N1), where M, N1, N2 and S are greater than 0.
8. The apparatus of claim 7, wherein the virtual clock sub-module is further configured to obtain, using a virtual clock counter of the ROS, an execution frequency of the simulation algorithm node and the simulation software model that access the ROS; calculating a common multiple of a simulation algorithm node accessed to the ROS and a simulation software model; and aligning the simulation algorithm nodes with clocks of the simulation software model according to the common multiple to obtain the aligned execution time.
9. A simulation task execution apparatus, comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-4.
10. A computer readable storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1 to 4.
CN201811287177.9A 2018-10-31 2018-10-31 Simulation task execution method and device Active CN111124592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811287177.9A CN111124592B (en) 2018-10-31 2018-10-31 Simulation task execution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811287177.9A CN111124592B (en) 2018-10-31 2018-10-31 Simulation task execution method and device

Publications (2)

Publication Number Publication Date
CN111124592A CN111124592A (en) 2020-05-08
CN111124592B true CN111124592B (en) 2023-07-28

Family

ID=70485505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811287177.9A Active CN111124592B (en) 2018-10-31 2018-10-31 Simulation task execution method and device

Country Status (1)

Country Link
CN (1) CN111124592B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022120717A1 (en) * 2020-12-10 2022-06-16 华为技术有限公司 Simulation task scheduling method, execution method, simulation implementation method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102982197A (en) * 2012-10-30 2013-03-20 北京华力创通科技股份有限公司 Multi-domain collaborative distribution type simulation system
US8600726B1 (en) * 2008-04-16 2013-12-03 Maneesh Varshney System and method for virtualization of networking system software via emulation
CN105677446A (en) * 2016-01-28 2016-06-15 中国电子科技集团公司第十研究所 Visual modeling method for distributed simulation platform
CN106529056A (en) * 2016-11-17 2017-03-22 东南大学 Master-slave power communication integrated simulation platform and simulation method
CN106951627A (en) * 2017-03-15 2017-07-14 北京百度网讯科技有限公司 Emulation test method, device, equipment and the computer-readable recording medium of Vehicular automatic driving
CN107302446A (en) * 2017-05-15 2017-10-27 深圳怡化电脑股份有限公司 A kind of algorithm simulating verification method, client and terminal device based on bank note

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5332006B2 (en) * 2009-08-07 2013-11-06 株式会社日立製作所 Computer system, program, and method for allocating computing resources for use in simulation
US10235480B2 (en) * 2016-06-15 2019-03-19 International Business Machines Corporation Simulation of internet of things environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8600726B1 (en) * 2008-04-16 2013-12-03 Maneesh Varshney System and method for virtualization of networking system software via emulation
CN102982197A (en) * 2012-10-30 2013-03-20 北京华力创通科技股份有限公司 Multi-domain collaborative distribution type simulation system
CN105677446A (en) * 2016-01-28 2016-06-15 中国电子科技集团公司第十研究所 Visual modeling method for distributed simulation platform
CN106529056A (en) * 2016-11-17 2017-03-22 东南大学 Master-slave power communication integrated simulation platform and simulation method
CN106951627A (en) * 2017-03-15 2017-07-14 北京百度网讯科技有限公司 Emulation test method, device, equipment and the computer-readable recording medium of Vehicular automatic driving
CN107302446A (en) * 2017-05-15 2017-10-27 深圳怡化电脑股份有限公司 A kind of algorithm simulating verification method, client and terminal device based on bank note

Also Published As

Publication number Publication date
CN111124592A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN107317853B (en) Method, device and system for displaying dynamic effect of message popup window
CN109739700B (en) Interface testing method and device
CN111858296B (en) Interface testing method, device, equipment and storage medium
CN114417780B (en) State synchronization method and device, electronic equipment and storage medium
CN111123728B (en) Unmanned vehicle simulation method, device, equipment and computer readable medium
CN111124592B (en) Simulation task execution method and device
CN109473121A (en) Speech synthesis quality detecting method and device
CN110380936B (en) Test method and device
US9709967B2 (en) Method and device for creating a data-based function model
CN111125857A (en) Distributed simulation method and device
CN109032853B (en) Method and device for controlling FPGA card group
CN109902001A (en) To the detection method and terminal device of uninitialized variable
CN110213106B (en) Equipment information management method, device and system and electronic equipment
CN110320800B (en) Compensation method and device of control system, medium and intelligent equipment
CN111726186B (en) Synchronous configuration method of embedded chip and external equipment and embedded chip
CN111175055B (en) Automatic driving distributed collaborative simulation method and device and terminal
CN111090269B (en) Sensor simulation method, device and storage medium based on generation of countermeasure network
CN105956251A (en) Design method and device of I2C (Inter-Integrated Circuit) bus
CN111199084A (en) Access method and device of dynamic model
CN113055209A (en) Arranging method and device for edge calculation
CN111106954A (en) Map-based topological node display method and device
CN111176134B (en) Simulation system adaptation method, device and terminal
CN111782499A (en) Test case generation method and system
CN111124700B (en) Method and device for accessing simulation software model
CN111177877A (en) Local simulation method and device based on application container engine and 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
TA01 Transfer of patent application right

Effective date of registration: 20211014

Address after: 105 / F, building 1, No. 10, Shangdi 10th Street, Haidian District, Beijing 100085

Applicant after: Apollo Intelligent Technology (Beijing) Co.,Ltd.

Address before: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing

Applicant before: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant