A simulation experiment scheduling method, system and computer-readable storage medium
By calculating the remaining execution time of the simulation experiment to set the priority and dynamically scheduling the simulation tasks, the problem of long waiting time of the simulation experiment is solved, and efficient utilization of resources and fast execution of simulation tasks are achieved.
Patent Information
- Application Number
- CN202210415415.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-04-20
AI Technical Summary
In existing simulation experiment scheduling, the simulation task of a single scenario cannot support the results of the entire simulation experiment, resulting in the simulation process occupying too many system resources, other tasks cannot be carried out, and the average waiting time of the simulation experiment is increased.
By calculating the remaining execution time of unscheduled simulation tasks in the simulation experiment, the priority is set. The shorter the remaining execution time, the higher the priority of the simulation experiment. The simulation task is used as the scheduling unit, and the simulation experiments are scheduled from high to low priority. The priority is dynamically adjusted to optimize resource utilization.
The average waiting time of the simulation experiment is optimized, resource occupation is reduced, the execution efficiency of the simulation task is improved, and resource waste and scheduling failure are avoided.
Smart Images

Figure CN114861416B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of simulation experiment scheduling, and in particular to a simulation experiment scheduling method, system, and computer-readable storage medium. Background Art
[0002] To achieve autonomous driving systems, testing is essential. Simulation tests performed in real-world environments are the most common and practical testing method to maximize the effectiveness of road tests. Currently, when conducting simulation tests, a single scenario's simulation task cannot support the results of the entire simulation experiment. Therefore, the simulation process typically consists of a large number of simulation scenarios, and each simulation experiment requires testing multiple scenarios. This means that a simulation experiment often includes multiple simulation tasks, and the results of a simulation experiment must wait for the completion of multiple simulation tasks. Simulation experiments with a large number of scenarios can occupy a significant amount of system resources, preventing other simulation tasks from proceeding. This in turn increases the average waiting time for simulation experiments. Therefore, scheduling these simulation scenarios to minimize the waiting time for each simulation experiment becomes a critical issue for simulation platforms. Summary of the Invention
[0003] To this end, embodiments of the present application provide a simulation experiment scheduling method, system, and computer-readable storage medium, which can solve the technical problem of long waiting time in existing simulation experiment scheduling. The specific technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a simulation experiment scheduling method, the method comprising:
[0005] receiving at least two simulation experiments, wherein the simulation experiments include at least one simulation task;
[0006] Calculating the remaining execution time of the simulation experiment according to the unscheduled simulation tasks in the simulation experiment;
[0007] Set the priority of the simulation experiment based on the remaining execution time. The shorter the remaining execution time, the higher the priority of the simulation experiment.
[0008] Take a simulation task as the scheduling unit and schedule the simulation experiments from high to low priority.
[0009] Furthermore, the execution time of the simulation tasks is the same, and the calculating of the remaining execution time of the simulation experiment based on the unscheduled simulation tasks in the simulation experiment includes:
[0010] Taking one simulation task as one unit time, the remaining execution time of the simulation experiment is calculated according to the number of unscheduled simulation tasks of the simulation experiment.
[0011] Furthermore, setting the priority of the simulation experiment according to the remaining execution time, where the simulation experiment with a shorter remaining execution time has a higher priority, includes:
[0012] After the current simulation task is scheduled, the remaining execution time of the simulation experiment is updated;
[0013] The priority of the simulation experiment is set according to the remaining execution time. The simulation experiment with shorter remaining execution time has higher priority.
[0014] Furthermore, the method includes:
[0015] Maintaining a waiting queue, wherein the waiting queue maintains a dequeue order of the simulation experiment according to priority.
[0016] Furthermore, the method further comprises:
[0017] Continuously receive simulation experiments and dynamically adjust the priority of simulation experiments.
[0018] Furthermore, the method further comprises:
[0019] If at least two simulation tasks can be scheduled simultaneously, obtain the resources required by the simulation tasks in the simulation experiment and the currently scheduled available resources;
[0020] Set the priority of the simulation experiment based on the currently scheduled available resources and the remaining execution time.
[0021] Furthermore, setting the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time includes:
[0022] Collocating the simulation tasks to form a simulation task combination, wherein the simulation task combination includes the number of simulation tasks that can be currently scheduled at one time;
[0023] Calculate the resources required for the combined scheduling of simulation tasks;
[0024] Simulation task combinations whose required resources are less than the currently scheduled available resources are screened, and the simulation task with the highest priority in the simulation task combination is used as the priority of the simulation task combination.
[0025] Furthermore, setting the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time includes:
[0026] Obtain the simulation task that is currently scheduled, and calculate the remaining resources after deducting the required resources of the simulation task that is currently scheduled from the available resources for scheduling;
[0027] Simulation tasks whose required resources are less than the remaining resources are obtained, and the simulation task with the highest priority among the simulation tasks is selected and scheduled together with the simulation task to be scheduled.
[0028] In a second aspect, an embodiment of the present application provides a simulation experiment scheduling system, the system comprising:
[0029] A receiving module, configured to receive at least two simulation experiments, each of which includes at least one simulation task;
[0030] A calculation module, configured to calculate the remaining execution time of the simulation experiment based on unscheduled simulation tasks in the simulation experiment;
[0031] The priority setting module is used to set the priority of the simulation experiment according to the remaining execution time. The shorter the remaining execution time, the higher the priority of the simulation experiment.
[0032] The scheduling module is used to schedule simulation experiments from high to low priority, taking a simulation task as the scheduling unit.
[0033] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the simulation experiment scheduling method described in any one of the above are implemented.
[0034] In summary, compared with the prior art, the technical solutions provided by the embodiments of the present application have at least the following beneficial effects:
[0035] 1. After obtaining the simulation experiment, the priority of the received simulation experiment is set by setting the priority of the remaining execution time of the simulation experiment. The simulation task with the shorter remaining execution time has a higher priority. The task with the shorter execution time is executed earlier, which can optimize the average waiting time of all simulation experiments.
[0036] 2. The method of calculating the remaining execution time is to set the execution time of all simulation tasks to one unit time. When calculating the remaining execution time of the simulation experiment, only the number of simulation tasks that have not been executed in the simulation experiment can be calculated without calculating the actual execution time of the simulation tasks, which simplifies the calculation logic and reduces the amount of data obtained;
[0037] 3. When scheduling simulation tasks, if multiple simulation tasks can be scheduled at a time, schedule them according to the priority of the simulation tasks and the required resources to avoid scheduling failures caused by the available resources not meeting the required resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a flow chart of a simulation experiment scheduling method provided in one embodiment of the present application.
[0039] Figure 2This is one of the flow charts of a simulation experiment scheduling method provided in another embodiment of the present application.
[0040] Figure 3 This is the second flow chart of a simulation experiment scheduling method provided in another embodiment of the present application.
[0041] Figure 4 This is the third flow chart of a simulation experiment scheduling method provided in another embodiment of the present application. DETAILED DESCRIPTION
[0042] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed, but as long as they are within the scope of the claims of the present application, they are protected by the patent law.
[0043] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0044] In addition, the term "and / or" in this application is simply a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this application, unless otherwise specified, generally indicates that the related objects are in an "or" relationship.
[0045] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on the quantity and execution order.
[0046] In the present application, the term "at least one" means one or more, and the term "plurality" means three or more. For example, a plurality of first positions means three or more first positions.
[0047] The embodiments of the present application are described in further detail below with reference to the accompanying drawings.
[0048] Reference Figure 1 In one embodiment of the present application, a simulation experiment scheduling method is provided, and the main steps of the method are described as follows:
[0049] S1: Receive at least two simulation experiments, each of which includes at least one simulation task;
[0050] S2: Calculating the remaining execution time of the simulation experiment according to the unscheduled simulation tasks in the simulation experiment;
[0051] S3: Set the priority of the simulation experiment according to the remaining execution time. The simulation experiment with shorter remaining execution time has higher priority.
[0052] S6: Take a simulation task as the scheduling unit and schedule the simulation experiment from high to low priority.
[0053] Specifically, in this embodiment, a simulation experiment includes at least one simulation task, that is, a simulation experiment may also include two or more simulation tasks, and one simulation task corresponds to one scenario; the remaining execution time is the time required for the simulation experiment to be scheduled and completed.
[0054] In one scheduling, a simulation experiment is received. If there is only one simulation experiment in the current scheduling cycle, the current simulation experiment is directly scheduled. The scheduling method in this application is applied to the situation where there are at least two or more simulation experiments in one scheduling.
[0055] The user submits a simulation experiment, the scheduler receives the simulation experiment submitted by the user, and calculates the remaining execution time of the simulation experiment. Specifically, in this embodiment, the remaining execution time of the simulation experiment can be calculated by calculating the time of the unexecuted simulation tasks of the simulation experiment. In other implementations of the present application, other calculation methods can also be used.
[0056] The simulation task is an atomic task. When scheduling a simulation experiment, the simulation task is used as the scheduling unit, that is, each time a simulation task is scheduled, it is a simulation task in the simulation experiment.
[0057] After obtaining the simulation experiments, the priority of the received simulation experiments is set by sorting the remaining execution time of the simulation experiments. The simulation tasks with shorter remaining execution time have higher priorities. Tasks with shorter execution time are executed earlier, which can optimize the average waiting time of all simulation experiments.
[0058] Furthermore, the method includes:
[0059] S7: Continuously receive simulation experiments and dynamically adjust the priority of simulation experiments.
[0060] Specifically, S7 is carried out continuously during the entire task scheduling period, that is, the priority of the simulation experiment is not fixed. During the scheduling, new simulation experiments submitted by users are continuously received, and the scheduler is constantly scheduling simulation tasks. The remaining execution time of the simulation experiments of the scheduled simulation tasks is decreasing. By dynamically adjusting the priority of the simulation experiments, the currently existing simulation experiments with the shortest remaining execution time are executed first, thereby reducing the waiting time of all simulation experiments.
[0061] Specifically, in this embodiment, the time of calculating all unscheduled simulation tasks in the simulation experiment is the remaining execution time of the simulation experiment. That is, when calculating the remaining execution time, if some tasks in a simulation experiment have been scheduled, the remaining execution time is calculated based on the time of the simulation tasks that have not been executed in the simulation experiment. If there is another simulation experiment whose remaining execution time is less than the remaining execution time of the aforementioned simulation experiment, the priority of the other simulation experiment is higher than the aforementioned simulation experiment.
[0062] Reference Figure 2 , Optionally, the execution time of the simulation tasks is the same. In another embodiment, S2 is S2':
[0063] S2': taking one simulation task as one unit time, the remaining execution time of the simulation experiment is calculated according to the number of unscheduled simulation tasks of the simulation experiment.
[0064] In actual use, each simulation task is cut out according to the same set of preset standards, such as data packets such as 10s and 15s, so the data volume is basically the same. When the execution time of the simulation tasks differs by no more than 5 seconds, the execution time of the simulation tasks is considered to be the same. In this embodiment, the method of calculating the remaining execution time is to set the execution time of all simulation tasks to the same unit time. When calculating the remaining execution time of the simulation experiment, only the number of simulation tasks that have not been executed in the simulation experiment can be calculated, without calculating the actual execution time of the simulation tasks, thereby simplifying the calculation logic and reducing the amount of data obtained.
[0065] Reference Figure 3 , optionally, in another embodiment, S3 includes:
[0066] S31: After the current simulation task is scheduled, the remaining execution time of the simulation experiment is updated;
[0067] S32: Setting the priority of the simulation experiment according to the remaining execution time. The shorter the remaining execution time, the higher the priority of the simulation experiment.
[0068] Specifically, in this embodiment, after the scheduler schedules a simulation task to a simulation service and the result processor returns the simulation result, the remaining execution time of the simulation experiment is updated, and the scheduling result is more accurate. During the simulation task scheduling process, it is possible that the scheduling fails. If the simulation task scheduling fails, the remaining execution time of the simulation experiment corresponding to the simulation task needs to be added with the simulation task. Therefore, if the remaining execution time is calculated after the simulation task is scheduled but not successfully scheduled, the remaining execution time will be inaccurate.
[0069] Optionally, in another embodiment, the method further comprises:
[0070] S8: Maintaining a waiting queue, wherein the waiting queue maintains a dequeueing order of the simulation experiment according to priority.
[0071] Specifically, a waiting queue is set up to sort the simulation experiments for easy scheduling.
[0072] Reference Figure 4 , optionally, in another embodiment, the method further comprises:
[0073] S4: If at least two simulation tasks can be scheduled simultaneously, obtain the resources required by the simulation tasks in the simulation experiment and the currently scheduled available resources;
[0074] S5: Set the priority of the simulation experiment based on the currently scheduled available resources and the remaining execution time.
[0075] Specifically, in this embodiment, in one scheduling, the simulation service can schedule at least two simulation tasks, and the currently scheduled available resources are obtained before the simulation task is scheduled. The currently scheduled available resources are the available resources reserved by the system for the simulation experiment, such as CPU, GPU, etc.
[0076] When scheduling simulation tasks according to priority, the simulation resources to be scheduled are selected based on the currently available resources. When there are multiple options, the one with the highest priority among the schedulable tasks is selected.
[0077] Through the setting of this embodiment, when scheduling simulation tasks, if multiple simulation tasks can be scheduled at one time, they can be scheduled according to the priority of the simulation tasks and the required resources, avoiding the situation where the available resources do not meet the required resources and cause scheduling failure.
[0078] Optionally, in another embodiment, S5 includes:
[0079] S51: Collocate the simulation tasks to form a simulation task combination, where the simulation task combination includes the number of simulation tasks that can be scheduled at one time;
[0080] S52: Calculate the resources required for simulation task combination scheduling;
[0081] S53: Screening simulation task combinations whose required resources are less than the currently scheduled available resources, and taking the simulation task with the highest priority in the simulation task combination as the priority of all simulation experiments in the simulation task combination.
[0082] Specifically, in this embodiment, when preparing to schedule simulation tasks, all simulation tasks that need to be scheduled are combined to form a simulation task scheduling combination based on the number of resources that can be scheduled at one time for the current simulation service. Simulation task combinations whose sum of required resources is less than the currently available resources for scheduling are screened in the simulation task scheduling combination, and the priority of the simulation task with the highest priority in the simulation task combination is used as the priority of the simulation combination. During scheduling, the simulation task combination is scheduled according to the priority, that is, the priority of the simulation task in the simulation task combination is the priority of its corresponding simulation experiment in the current scheduling cycle.
[0083] Furthermore, after a simulation task combination scheduling is completed and the result is returned, the currently scheduled available resources are obtained again, and the simulation task combination and the priority of the simulation task combination are updated.
[0084] Optionally, in another embodiment, S5 includes:
[0085] S54: Obtain the simulation task to be scheduled currently, and calculate the remaining resources after deducting the required resources of the simulation task to be scheduled from the currently scheduled available resources;
[0086] S55: Acquire simulation tasks whose required resources are less than the remaining resources, select the simulation task with the highest priority among the simulation tasks, and schedule it together with the simulation task to be scheduled.
[0087] Specifically, according to the pre-calculated priority of the simulation experiment, when scheduling a simulation task with a high priority, the remaining resources after deducting the currently scheduled simulation task from the currently scheduled available resources are calculated, and then simulation tasks with required resources less than the remaining resources are screened out, and the screened-out simulation tasks are scheduled based on the principle of high priority first. Through this implementation, resource waste can be fully reduced when performing resource scheduling, and resource overflow can also be prevented after reasonable scheduling according to the principle of high priority first.
[0088] The following are three scenarios of this embodiment:
[0089] Scenario 1: In a static scenario, simulation experiments A, B, and C are generated at the same time. Simulation experiment A has 6 simulation tasks, simulation experiment B has 4 simulation tasks, and simulation experiment C has 5 simulation tasks. One simulation task is one unit of time, so the three simulation experiments need to consume 6, 4, and 5 unit times respectively. Without loss of generality, if the simulation service can only handle one simulation task at a time, and the simulation tasks are generated in sequence, the waiting + execution time of each simulation experiment is 6 unit times for simulation experiment A, 10 (6+4) unit times for simulation experiment B, and 15 (6+4+5) unit times for simulation experiment C, totaling 31 unit times. However, using the method of this application for priority setting, the waiting plus execution time of each task is 15 unit times for simulation experiment A, 4 unit times for simulation experiment B, and 9 unit times for simulation experiment C, totaling 28 unit times, saving about 10% of time.
[0090] Scenario 2: In a dynamic scenario, when scheduling simulation tasks, simulation experiments are generated one after another. Simulation experiment A is generated first and has 6 simulation tasks. Simulation experiment B is generated at the time corresponding to the 3rd simulation task of simulation experiment A and has 3 simulation tasks. Simulation experiment C is generated at the time corresponding to the 5th simulation task of simulation task A and has 5 simulation tasks. If the simulation service can only process one simulation task at a time and execute them in the order of their generation time, the waiting and execution time of each simulation experiment will be 6, 7, and 9 unit time respectively, for a total of 22 unit time. However, if the priority is set according to the method of the present application, the waiting and execution time of each task will be 9 unit time for simulation experiment A, 3 unit time for simulation experiment B, and 9 unit time for simulation experiment C, for a total of 21 unit time, saving 1 unit time.
[0091] Scenario 3: In a dynamic scenario, a simulation service can execute multiple simulation tasks. Simulation experiment A is generated first and has 6 simulation tasks, and the simulation tasks in simulation experiment A need to consume 40% of the CPU resources; simulation experiment B is generated at the time corresponding to the third simulation task of simulation experiment A and has 3 simulation tasks, and the simulation tasks in simulation experiment B consume 70% of the CPU resources; simulation experiment C is generated at the time corresponding to the fifth simulation task of simulation task A and has 5 simulation tasks, and the simulation tasks in simulation experiment C need to consume 50% of the CPU resources; if the simulation experiments are executed sequentially according to their generation time, the waiting plus execution time of each simulation experiment is 6, 7, and 8 unit times respectively, totaling 21 unit times. However, according to the method of the present application, the waiting and execution time of each task are 9 unit times for simulation experiment A, 3 unit times for simulation experiment B, and 5 unit times for simulation experiment C, totaling 17 unit times, saving 4 unit times; simulation experiment A executes 2 simulation tasks, and according to the priority, simulation experiment B is executed first (because simulation experiment B requires 70% of the resources and cannot run together with simulation experiment A), so simulation experiment B is executed first; then simulation experiment A will be executed, so simulation experiment A is its own 6 unit times plus 3 time units of waiting for simulation experiment B to execute, which is 9 time units; and the resource occupancy of simulation experiment C is 50%, which can just run together with simulation experiment A, so No. 3 does not need to wait and can run directly, which is its own 5 unit times.
[0092] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0093] In one embodiment of the present application, a simulation experiment scheduling system is provided, which corresponds one-to-one to the simulation experiment scheduling method in the above embodiment. The simulation experiment scheduling system includes:
[0094] A receiving module, configured to receive at least two simulation experiments, each of which includes at least one simulation task;
[0095] A calculation module, configured to calculate the remaining execution time of the simulation experiment based on unscheduled simulation tasks in the simulation experiment;
[0096] The priority setting module is used to set the priority of the simulation experiment according to the remaining execution time. The shorter the remaining execution time, the higher the priority of the simulation experiment.
[0097] The scheduling module is used to schedule simulation experiments from high to low priority, taking a simulation task as the scheduling unit.
[0098] Optionally, in another embodiment, the execution time of the simulation tasks is the same, and the calculation module is further used to calculate the remaining execution time of the simulation experiment according to the number of unscheduled simulation tasks of the simulation experiment, taking one simulation task as one unit time.
[0099] Optionally, in another embodiment, the priority setting module is also used to re-update the remaining execution time of the simulation experiment after the current simulation task is scheduled to be completed; the priority of the simulation experiment is set according to the remaining execution time, and the shorter the remaining execution time, the higher the priority of the simulation experiment.
[0100] Optionally, in another embodiment, a waiting queue is maintained, and the waiting queue maintains a dequeue order of the simulation experiment according to priority.
[0101] Optionally, in another embodiment, simulation experiments are continuously received and the priorities of the simulation experiments are dynamically adjusted.
[0102] Optionally, in another embodiment, the resource query module is used to obtain the resources required by the simulation tasks in the simulation experiment and the currently scheduled available resources if at least two simulation tasks can be scheduled simultaneously;
[0103] The priority adjustment module is used to set the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time.
[0104] Optionally, in another embodiment, the priority adjustment module is also used to match simulation tasks to form a simulation task combination, wherein the simulation task combination includes the number of simulation tasks that can be currently scheduled at one time; calculates the resources required for scheduling the simulation task combination; and screens simulation task combinations whose required resources are less than the currently scheduled available resources, and takes the simulation task with the highest priority in the simulation task combination as the priority of the simulation task combination.
[0105] Optionally, in another embodiment, the priority adjustment module is also used to obtain the simulation task that is currently to be scheduled, calculate the remaining resources after deducting the required resources of the simulation task to be scheduled from the currently scheduled available resources; obtain the simulation task whose required resources are less than the remaining resources, select the simulation task with the highest priority among the simulation tasks, and schedule it together with the simulation task to be scheduled.
[0106] Each module of the simulation experiment scheduling system described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0107] In one embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the simulation experiment scheduling method described in the above embodiment are implemented. The computer-readable storage medium includes a ROM (Read-Only Memory), a RAM (Random-Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic disk, a floppy disk, and the like.
[0108] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, the division of the above-mentioned functional units and modules is only used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system described in this application is divided into different functional units or modules to complete all or part of the functions described above.
Claims
1. A simulation experiment scheduling method, characterized in that: The method comprises: receiving at least two simulation experiments, wherein the simulation experiments include at least one simulation task; Calculating the remaining execution time of the simulation experiment according to the unscheduled simulation tasks in the simulation experiment; Set the priority of the simulation experiment based on the remaining execution time. The shorter the remaining execution time, the higher the priority of the simulation experiment. Take a simulation task as the scheduling unit and schedule the simulation experiment from high to low priority; If at least two simulation tasks can be scheduled simultaneously, obtain the resources required by the simulation tasks in the simulation experiment and the currently scheduled available resources; set the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time; The method of setting the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time includes: combining simulation tasks to form a simulation task combination, wherein the simulation task combination includes simulation tasks of the number of simulation tasks that can be scheduled at one time; calculating the resources required for scheduling the simulation task combination; screening simulation task combinations whose required resources are less than the currently scheduled available resources, and taking the simulation task with the highest priority in the simulation task combination as the priority of the simulation task combination; the priority of the simulation task in the simulation task combination is the priority of the corresponding simulation experiment in the current scheduling cycle.
2. The simulation experiment scheduling method according to claim 1, characterized in that: The execution time of the simulation tasks is the same, and the calculating of the remaining execution time of the simulation experiment according to the unscheduled simulation tasks in the simulation experiment includes: Taking one simulation task as one unit time, the remaining execution time of the simulation experiment is calculated according to the number of unscheduled simulation tasks of the simulation experiment.
3. The simulation experiment scheduling method according to claim 1, characterized in that: The priority of the simulation experiment is set according to the remaining execution time, and the priority of the simulation experiment with a shorter remaining execution time is higher, including: After the current simulation task is scheduled, the remaining execution time of the simulation experiment is updated; The priority of the simulation experiment is set according to the remaining execution time. The simulation experiment with shorter remaining execution time has higher priority.
4. The simulation experiment scheduling method according to claim 1, characterized in that: The method comprises: Maintaining a waiting queue, wherein the waiting queue maintains a dequeue order of the simulation experiment according to priority.
5. The simulation experiment scheduling method according to claim 1, characterized in that: The method further comprises: Continuously receive simulation experiments and dynamically adjust the priority of simulation experiments.
6. The simulation experiment scheduling method according to claim 1, characterized in that: Setting the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time includes: Obtain the simulation task that is currently scheduled, and calculate the remaining resources after deducting the required resources of the simulation task that is currently scheduled from the available resources for scheduling; Simulation tasks whose required resources are less than the remaining resources are obtained, and the simulation task with the highest priority among the simulation tasks is selected and scheduled together with the simulation task to be scheduled.
7. A simulation experiment scheduling system, characterized in that: The system comprises: A receiving module, configured to receive at least two simulation experiments, each of which includes at least one simulation task; A calculation module, configured to calculate the remaining execution time of the simulation experiment based on unscheduled simulation tasks in the simulation experiment; The priority setting module is used to set the priority of the simulation experiment according to the remaining execution time. The shorter the remaining execution time, the higher the priority of the simulation experiment. The scheduling module is used to schedule simulation experiments from high to low priority, taking a simulation task as the scheduling unit; The resource query module is used to obtain the resources required by the simulation tasks in the simulation experiment and the currently scheduled available resources if at least two simulation tasks can be scheduled simultaneously; and to set the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time; The priority adjustment module is used to set the priority of the simulation experiment according to the currently scheduled available resources and the remaining execution time, including: matching simulation tasks to form a simulation task combination, wherein the simulation task combination contains simulation tasks of the number of simulation tasks that can be scheduled at one time; calculating the resources required for scheduling the simulation task combination; screening simulation task combinations whose required resources are less than the currently scheduled available resources, and taking the simulation task with the highest priority in the simulation task combination as the priority of the simulation task combination; the priority of the simulation task in the simulation task combination is the priority of its corresponding simulation experiment in the current scheduling cycle.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the simulation experiment scheduling method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Task scheduling method and device, equipment and storage medium
CN113886052A
Automatic integrated circuit parallel simulation method
CN114021507A