Vehicle dispatching simulation method, device and system
By performing vehicle scheduling simulation tasks in parallel and using tree structure to cache task data, the problem of low vehicle scheduling simulation efficiency in the existing technology is solved, and a more efficient simulation process is achieved.
Patent Information
- Application Number
- CN202111653789.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing vehicle scheduling simulation methods are low in efficiency and require multiple serial executions in different simulation scenarios, resulting in a long time.
By obtaining the task data of multiple vehicle scheduling simulation tasks for isolation and storage, and performing each vehicle scheduling simulation task in parallel based on the stored task data and the target vehicle scheduling algorithm, the simulation results of each vehicle scheduling simulation task are obtained, and a tree structure is used. Cache task data to support parallel execution.
The parallel execution of multiple vehicle scheduling simulation tasks is realized, reducing the time cost required for simulation and improving the efficiency of vehicle scheduling simulation.
Smart Images

Figure CN114418196B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a vehicle dispatching simulation method, device and system. Background Art
[0002] Vehicle dispatching refers to organizing vehicle operations and supervising and inspecting them at any time based on the vehicle operation plan, so that vehicles can pass through a series of loading and unloading points in an orderly manner under certain constraints to achieve goals such as shortest distance, minimum cost, and least time.
[0003] With the development of computer and information technology, automatic dispatch of vehicles can be realized based on vehicle dispatch algorithm. As the core of automatic dispatch, the quality of vehicle dispatch algorithm will directly affect the orderly operation of vehicles.
[0004] Vehicle scheduling can be simulated based on the vehicle scheduling algorithm. Usually, in order to obtain more accurate simulation results, vehicle scheduling simulation needs to be simulated multiple times in different simulation scenarios. When there are multiple vehicle scheduling simulation tasks in different simulation scenarios that need to be executed, the existing vehicle scheduling simulation method usually needs to execute the above vehicle scheduling simulation tasks in a serial manner, which takes a long time to accumulate, resulting in low efficiency of vehicle scheduling simulation. Summary of the invention
[0005] The present invention provides a vehicle dispatching simulation method, device and system, which are used to solve the defect of low efficiency of vehicle dispatching simulation in the prior art and improve the efficiency of vehicle dispatching simulation.
[0006] The present invention provides a vehicle scheduling simulation method, comprising:
[0007] Acquire task data of multiple vehicle scheduling simulation tasks, and store the task data of each of the vehicle scheduling simulation tasks in isolation;
[0008] Based on the stored task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm, executing each vehicle scheduling simulation task in parallel to obtain a simulation result of each vehicle scheduling simulation task;
[0009] Based on the simulation results of each of the vehicle scheduling simulation tasks, a target simulation result of the target vehicle scheduling algorithm is obtained.
[0010] According to a vehicle scheduling simulation method provided by the present invention, the task data of each vehicle scheduling simulation task is isolated and stored, specifically comprising:
[0011] Cache the task data of each of the vehicle scheduling simulation tasks in a tree structure, and obtain the simulation data model corresponding to each of the vehicle scheduling simulation tasks;
[0012] The task data includes static configuration data and scheduling configuration data; the scheduling configuration data includes road network information, simulated vehicle information and pre-acquired scheduling calculation factors.
[0013] According to a vehicle scheduling simulation method provided by the present invention, the static configuration data includes: a simulation period and / or a simulation speed change multiple; the simulation period is a period for simulation in a simulation scenario.
[0014] According to a vehicle scheduling simulation method provided by the present invention, the vehicle scheduling simulation tasks are executed in parallel based on the stored task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm, specifically including:
[0015] For each vehicle scheduling simulation task, based on the task data of each vehicle scheduling simulation task, each simulated vehicle corresponding to each vehicle scheduling simulation task is determined, and based on the task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm, a dispatch order corresponding to each simulated vehicle is generated;
[0016] Based on the dispatch order corresponding to each simulated vehicle, simulation dispatch is performed on each simulated vehicle.
[0017] According to a vehicle dispatch simulation method provided by the present invention, after performing simulation dispatch on each simulated vehicle based on the dispatch order corresponding to each simulated vehicle, the method further comprises:
[0018] The simulation operation data of each simulated vehicle at the current moment is obtained, and the simulation operation data of each simulated vehicle at the current moment is cached in the simulation data model corresponding to each vehicle scheduling simulation task.
[0019] According to a vehicle scheduling simulation method provided by the present invention, after obtaining the simulation operation data of each simulated vehicle at the current moment, the method further includes:
[0020] The simulation operation data of each simulation vehicle at the current moment is sent to the terminal, so that the terminal updates the simulation operation data of each simulation vehicle at the previous moment displayed on the display interface to the simulation operation data of each simulation vehicle at the current moment.
[0021] The present invention also provides a vehicle dispatching simulation device, comprising:
[0022] A first data configuration module is used to obtain task data of multiple vehicle scheduling simulation tasks, and to store the task data of each of the vehicle scheduling simulation tasks in isolation;
[0023] A simulation scheduling module, used to execute each of the vehicle scheduling simulation tasks in parallel based on the stored task data of each of the vehicle scheduling simulation tasks and the target vehicle scheduling algorithm, and obtain the simulation result of each of the vehicle scheduling simulation tasks;
[0024] The algorithm simulation module is used to obtain the target simulation result of the target vehicle scheduling algorithm based on the simulation results of each vehicle scheduling simulation task.
[0025] The present invention also provides a vehicle dispatching simulation system, comprising: the vehicle dispatching simulation device and a terminal as described above.
[0026] The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned vehicle scheduling simulation methods are implemented.
[0027] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned vehicle scheduling simulation methods are implemented.
[0028] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned vehicle scheduling simulation methods are implemented.
[0029] The vehicle scheduling simulation method, device and system provided by the present invention isolate and store the acquired task data of multiple vehicle scheduling simulation tasks, and execute the above-mentioned vehicle scheduling simulation tasks in parallel based on the stored task data of each vehicle scheduling task and the target vehicle scheduling algorithm, obtain the simulation result of each vehicle scheduling simulation task, and obtain the target simulation result of the target vehicle scheduling algorithm based on the simulation result of each vehicle scheduling simulation task, so as to realize the parallel execution of multiple vehicle scheduling simulation tasks, reduce the time cost required for vehicle scheduling simulation, and improve the efficiency of vehicle scheduling simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 It is one of the flow charts of the vehicle dispatching simulation method provided by the present invention;
[0032] Figure 2 It is one of the structural schematic diagrams of the simulation data model in the vehicle scheduling simulation method provided by the present invention;
[0033] Figure 3 This is the second structural schematic diagram of the simulation data model in the vehicle scheduling simulation method provided by the present invention;
[0034] Figure 4 This is the third structural schematic diagram of the simulation data model in the vehicle scheduling simulation method provided by the present invention;
[0035] Figure 5 It is a structural schematic diagram of the vehicle dispatching simulation device provided by the present invention;
[0036] Figure 6 This is the second flow chart of the vehicle dispatching simulation method provided by the present invention;
[0037] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0040] It should be noted that in scenarios such as mining, infrastructure construction, and logistics transportation, transport vehicles need to travel back and forth between multiple destinations to complete operations such as loading, running, and unloading. Reasonable scheduling of the above-mentioned transport vehicles can achieve the goals of shortest distance, minimum cost, and least time consumption. Automatic scheduling based on vehicle scheduling algorithms has the advantages of high efficiency, safety, and convenience, and has been widely used in various transportation scenarios. The vehicle scheduling simulation method provided by the present invention can simulate and test the vehicle scheduling algorithm and evaluate the advantages and disadvantages of the vehicle scheduling algorithm, so that the vehicle scheduling algorithm can be improved to achieve more accurate and efficient automatic scheduling of vehicles.
[0041] Figure 1 FIG. 1 is a flow chart of the vehicle dispatching simulation method provided by the present invention. Figure 1 As shown, the simulation method of the present invention includes: step 101, obtaining task data of multiple vehicle scheduling simulation tasks, and isolating and storing the task data of each vehicle scheduling simulation task.
[0042] Specifically, a vehicle dispatch simulation task refers to a task that simulates vehicle operation and dispatch in a certain simulation scenario. The simulation scenarios of different vehicle dispatch simulation tasks can be the same or different, but the task data of different vehicle dispatch simulation tasks are different. Based on the task data of the vehicle dispatch simulation task, the simulation scenario, simulated road network information, and simulated vehicle information can be limited, so as to obtain a simulation result that is as close to the real vehicle dispatch scenario as possible.
[0043] For any vehicle scheduling simulation task, the task data of the vehicle scheduling simulation task can be obtained in a variety of ways. For example, the task data of the vehicle scheduling simulation task can be obtained based on user input; or, the task data of the vehicle scheduling simulation task can be obtained based on big data analysis based on pre-acquired vehicle operation data and road network information.
[0044] After acquiring the task data of multiple vehicle scheduling simulation tasks, the task data of each vehicle scheduling simulation task can be stored in isolation to ensure that the task data of any two vehicle scheduling simulation tasks are isolated from each other, and each vehicle scheduling simulation task constitutes a hierarchical namespace.
[0045] The task data of each vehicle scheduling simulation task can be stored in isolation in a variety of ways. For example, the task data of each vehicle scheduling simulation task can be stored in a tree structure; or, the task data of each vehicle scheduling simulation task can be packaged separately and the task data packet of each vehicle scheduling simulation task can be stored.
[0046] It should be noted that the task data of each vehicle scheduling simulation task can be isolated and stored in a cache and / or a database.
[0047] Step 102: Based on the stored task data and the target vehicle scheduling algorithm, each vehicle scheduling simulation task is executed in parallel to obtain a simulation result of each vehicle scheduling simulation task.
[0048] Specifically, based on the stored task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm, each vehicle scheduling simulation task can be executed in parallel using multiple threads.
[0049] It should be noted that the target vehicle scheduling algorithm is the simulation object of the vehicle scheduling simulation method provided by the present invention. The target vehicle scheduling algorithm can be pre-generated based on actual needs, and based on the target vehicle scheduling algorithm, automatic scheduling of vehicles can be achieved.
[0050] For each vehicle scheduling simulation task, when the vehicle scheduling simulation task is executed based on the task data of the vehicle scheduling simulation task, the simulation operation data of each simulated vehicle corresponding to the vehicle scheduling simulation task can be obtained, and after the execution of the vehicle scheduling simulation task is completed, the simulation result of the vehicle scheduling simulation task can be obtained based on the obtained simulation operation data.
[0051] It should be noted that the simulation operation data of the simulated vehicle can express the operation status of the simulated vehicle during the simulation operation and simulation scheduling process, and may include but is not limited to: the driving status, real-time speed, real-time location information and working status of the simulated vehicle.
[0052] It should be noted that in the embodiment of the present invention, task data of a first number of vehicle scheduling simulation tasks can be obtained and stored in isolation, and based on the stored task data of the first number of vehicle scheduling simulation tasks, a second number of vehicle scheduling simulation tasks can be executed in parallel. The first number is greater than or equal to the second number. The second number of vehicle scheduling simulation tasks can be determined from the first number of vehicle scheduling simulation tasks based on user input.
[0053] When the second number is 1, only the task data of the vehicle scheduling simulation task may be called from the task data of each stored vehicle scheduling simulation task, and the vehicle scheduling simulation task may be executed based on the task data of the vehicle scheduling simulation task.
[0054] Step 103: Based on the simulation results of each vehicle scheduling simulation task, a target simulation result of the target vehicle scheduling algorithm is obtained.
[0055] After obtaining the simulation results of each vehicle scheduling simulation task, the target simulation results of the target vehicle scheduling algorithm can be obtained based on mathematical statistics, numerical calculation and other methods, and then the advantages and disadvantages of the target vehicle scheduling algorithm can be evaluated based on the above target simulation results.
[0056] The embodiment of the present invention isolates and stores the acquired task data of multiple vehicle scheduling simulation tasks, and executes the above-mentioned vehicle scheduling simulation tasks in parallel based on the stored task data of each vehicle scheduling task and the target vehicle scheduling algorithm, obtains the simulation result of each vehicle scheduling simulation task, and obtains the target simulation result of the target vehicle scheduling algorithm based on the simulation result of each vehicle scheduling simulation task, thereby realizing the parallel execution of multiple vehicle scheduling simulation tasks, reducing the time cost required for vehicle scheduling simulation, and improving the efficiency of vehicle scheduling simulation.
[0057] Based on the contents of the above embodiments, the task data of each vehicle scheduling simulation task is stored in isolation, specifically including: caching the task data of each vehicle scheduling simulation task in a tree structure, and obtaining the simulation data model corresponding to each vehicle scheduling simulation task; wherein the task data includes: static configuration data and scheduling configuration data; the scheduling configuration data includes: road network information, simulated vehicle information and pre-acquired scheduling calculation factors.
[0058] Specifically, after acquiring task data of multiple vehicle scheduling simulation tasks, for each vehicle scheduling simulation task, the task data of the vehicle scheduling simulation task can be stored in a cache in a tree structure, so as to construct a simulation data model corresponding to the vehicle scheduling simulation task in the cache.
[0059] Optionally, for each vehicle scheduling simulation task, the task data of the vehicle scheduling simulation task may include static configuration data and scheduling configuration data.
[0060] Static configuration data may include simulation parameters predetermined according to simulation requirements, including but not limited to simulation duration, simulation task start execution time, etc.
[0061] It should be noted that the simulation duration is the duration of the vehicle operation and scheduling simulation in the real scenario. The simulation task start time is the time to start the simulation task determined according to user needs in the real scenario.
[0062] The dispatch configuration data may include road network information, simulated vehicle information, and pre-acquired dispatch calculation factors. Among them, the dispatch calculation factors may include calculation factors for different paths. The calculation factors for each path may include calculation factors for different simulated vehicles under the path. The calculation factors for any simulated vehicle under any path may include, but are not limited to, the heavy-load driving time, empty-load driving time, heavy-load driving speed, empty-load driving speed, loading time, unloading time, and path coefficient of the simulated vehicle.
[0063] It should be noted that based on the pre-acquired road network information and metering summary, the scheduling calculation factors can be obtained through mathematical statistics, numerical calculations, etc. Before executing multiple vehicle scheduling simulation tasks in parallel, a lot of time for obtaining task data through manual statistics can be saved, thereby improving the simulation efficiency of vehicle scheduling simulation.
[0064] Based on the task data of the vehicle scheduling simulation task, the simulation scene, simulated road network, simulated vehicles, etc. can be determined to realize the simulation of vehicle operation and scheduling.
[0065] Figure 2 This is one of the structural schematic diagrams of the simulation data model in the vehicle scheduling simulation method provided by the present invention. Figure 2 As shown, after acquiring the task data of multiple vehicle scheduling simulation tasks, multiple root nodes can be created under the same namespace in the cache, and each root node can correspond to a vehicle scheduling simulation task.
[0066] For each vehicle scheduling simulation task, the identification information field of the vehicle scheduling simulation task may be stored in a root node, and multiple levels of child nodes may be created under the root node.
[0067] Specifically, for each root node, a first-level child node can be created under the root node to store the task data field. Two parallel second-level child nodes can be created under the first-level child node storing the task data field to store the static configuration data field and the scheduling configuration data field of the vehicle scheduling simulation task respectively.
[0068] A plurality of parallel third-level sub-nodes may be created under the second-level sub-node storing the static configuration data field, and the static configuration data such as the simulation duration of the vehicle scheduling simulation task and the start time of the simulation task may be stored respectively.
[0069] Three parallel third-level sub-nodes can be created under the second-level sub-node storing the scheduling configuration data field, respectively storing the road network information field, the simulation vehicle information field and the scheduling calculation factor field.
[0070] Figure 3 This is the second structural diagram of the simulation data model in the vehicle scheduling simulation method provided by the present invention. Figure 3As shown, for each vehicle scheduling simulation task, multiple parallel fourth-level sub-nodes can be created under the third-level sub-node storing the scheduling calculation factor field of the vehicle scheduling simulation task, respectively storing the different path calculation factor fields of the vehicle scheduling simulation task. Under each of the above-mentioned fourth-level sub-nodes storing the path calculation factor field, multiple parallel fifth-level sub-nodes can also be created to respectively store the calculation factors of different simulated vehicles under the path. Under each of the above-mentioned fifth-level sub-nodes storing the calculation factors of different simulated vehicles under the path, multiple sixth-level sub-nodes can also be created to respectively store the heavy-load driving time, empty-load driving time, heavy-load driving speed, empty-load driving speed, loading time, unloading time, and path coefficient of the simulated vehicle under the route.
[0071] By caching the task data of each vehicle scheduling simulation task in a tree structure, a simulation data model of a tree structure corresponding to each vehicle scheduling simulation task can be obtained. By caching the task data of each vehicle scheduling simulation task in a tree structure, the task data of each vehicle scheduling simulation task can be called more quickly and accurately when multiple vehicle scheduling simulation tasks are executed in parallel, and the task data of any vehicle scheduling simulation task in the cache can be updated more conveniently and quickly based on actual needs.
[0072] Optionally, the tree-structured simulation data models corresponding to each vehicle scheduling simulation task can constitute a simulation cache model. As an integration of various simulation data models, the simulation cache model can simulate the vehicle scheduling operation framework, improve the simulation calculation speed and the isolation level of the task data of each vehicle scheduling simulation task.
[0073] It should be noted that Figure 2 and Figure 3 This is an example diagram of a simulation data model, and not all child nodes under each root node are shown.
[0074] The embodiment of the present invention caches the task data of each vehicle scheduling simulation task in a tree structure and obtains the simulation data model corresponding to each vehicle scheduling simulation task, which can improve the isolation level of the task data of each vehicle scheduling simulation task, better support the parallelization of vehicle scheduling simulation, improve the simulation calculation speed, and further improve the simulation efficiency of vehicle scheduling simulation.
[0075] Based on the contents of the above embodiments, the static configuration data also includes: a simulation period and / or a simulation speed change multiple; the simulation period is a period for simulation in a simulation scenario.
[0076] Specifically, for any vehicle scheduling simulation task, the static configuration data of the vehicle scheduling simulation task may also include a first simulation start time.
[0077] In an embodiment of the present invention, a virtual simulation time system can be created in a simulation scenario, so that when executing any vehicle scheduling simulation task, the real time system can be separated and the vehicle operation and scheduling can be simulated in the virtual simulation time system.
[0078] The static configuration data of any vehicle dispatch simulation task may also include a simulation period, which indicates the period of simulation in the simulation scenario, that is, the period of simulated vehicle operation and / or dispatch in the virtual simulation time system. For example, the simulation period of any vehicle dispatch simulation task is from 9:00 a.m. to 9:00 p.m., which means that the time when the simulation task is started in the real scenario is any time, and in the virtual simulation time system of the simulation scenario, the simulation period is from 9:00 a.m. to 9:00 p.m.
[0079] It should be noted that the simulation can be paused and continued according to the time offset in the simulation scenario and the actual scenario.
[0080] For any vehicle scheduling simulation task, the static configuration data of the vehicle scheduling simulation task may also include a simulation speed change multiple.
[0081] In the embodiment of the present invention, when executing any vehicle scheduling simulation task, the speed of time passing in the simulation scene can be controlled based on the simulation speed change multiple in the vehicle scheduling simulation task. For example, based on the simulation speed change multiple of the vehicle scheduling simulation task, the speed of time passing in the simulation scene can be doubled or multiple times faster, or the speed of time passing can be slowed down by one or more times.
[0082] It should be noted that, for any vehicle scheduling simulation task, the static configuration data of the vehicle scheduling simulation task may include only the simulation time period or the simulation speed multiple, or may include both the simulation time period and the simulation speed multiple.
[0083] The task data of the vehicle scheduling simulation task in the embodiment of the present invention includes a simulation time period and / or a simulation speed change multiple, which can virtualize the simulation time and break away from the time system in the real scene to achieve a more flexible and personalized vehicle scheduling simulation. The simulation speed change multiple can be set according to actual needs to achieve simulation speed change, pause and continuation, which can better meet various simulation needs.
[0084] Based on the contents of the above-mentioned embodiments, based on the stored task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm, each vehicle scheduling simulation task is executed in parallel, specifically including: for each vehicle scheduling simulation task, based on the task data of each vehicle scheduling simulation task, each simulated vehicle corresponding to each vehicle scheduling simulation task is determined, and based on the task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm, a dispatch order corresponding to each simulated vehicle is generated.
[0085] Specifically, when executing multiple vehicle scheduling simulation tasks in parallel, for each vehicle scheduling simulation task, based on the static configuration data of the vehicle scheduling simulation task, the operation and scheduling of the simulated vehicle can be simulated when the current moment is the second simulation moment, and the simulated vehicles corresponding to the vehicle scheduling simulation task can be determined based on the scheduling configuration data of the vehicle scheduling simulation task.
[0086] After determining each simulated vehicle corresponding to the vehicle scheduling simulation task, a dispatch order corresponding to each simulated vehicle can be generated based on the static configuration data and the scheduling configuration data of the vehicle scheduling simulation task and the target vehicle scheduling algorithm.
[0087] It should be noted that, in the process of simulating the operation and scheduling of the simulated vehicle, the number of dispatch orders corresponding to each simulated vehicle is at least one.
[0088] Based on the dispatch order corresponding to each simulated vehicle, each simulated vehicle is simulated and dispatched.
[0089] Specifically, after generating a dispatch order corresponding to each simulated vehicle, for each simulated vehicle, simulation scheduling can be performed on the simulated vehicle based on the dispatch order corresponding to the simulated vehicle.
[0090] It should be noted that, under normal circumstances, when performing vehicle operation and scheduling simulation, it takes a certain amount of time to generate a dispatch order based on the target vehicle scheduling algorithm, while when scheduling vehicles in actual scenarios, no additional time is required to issue a dispatch order to any vehicle. Therefore, in the embodiment of the present invention, when performing vehicle operation and scheduling simulation under a virtual simulation time system, the average time required to generate a dispatch order based on the predetermined target vehicle scheduling algorithm is deducted from the time spent on generating all dispatch orders, so that the vehicle operation and scheduling simulation can be performed more accurately.
[0091] The embodiment of the present invention determines, for each vehicle scheduling simulation task, each simulated vehicle corresponding to the vehicle scheduling simulation task based on the task data of the vehicle scheduling simulation task, generates a dispatch order corresponding to each simulated vehicle based on the task data of the vehicle scheduling simulation task and a target vehicle scheduling algorithm, and simulates each simulated vehicle based on the dispatch order corresponding to each simulated vehicle. By executing each vehicle scheduling simulation task in parallel based on the task data of each vehicle scheduling simulation task, a simpler, more efficient and more accurate evaluation target vehicle scheduling algorithm can be achieved.
[0092] Based on the contents of the above embodiments, after each simulated vehicle is simulated and scheduled based on the dispatch order corresponding to each simulated vehicle, the above method also includes: obtaining the simulation operation data of each simulated vehicle at the current moment, and caching the simulation operation data of each simulated vehicle at the current moment into the simulation data model corresponding to each vehicle scheduling simulation task.
[0093] Specifically, for each vehicle scheduling simulation task, a dispatch order corresponding to each simulated vehicle is generated based on the task data of the vehicle scheduling simulation task and the target vehicle scheduling algorithm, and based on the dispatch order corresponding to each simulated vehicle, during the simulation scheduling of each simulated vehicle, the simulation operation data of each simulated vehicle can be obtained periodically or according to preset acquisition rules.
[0094] When the simulation operation data of the simulation vehicle at the current moment is obtained, the simulation operation data of the simulation vehicle at the current moment can be cached in the simulation data model corresponding to the vehicle scheduling simulation task.
[0095] Figure 4 This is the third structural diagram of the simulation data model in the vehicle scheduling simulation method provided by the present invention. Figure 4 As shown, for each vehicle scheduling simulation task, a first-level child node can be created under the root node corresponding to the vehicle scheduling simulation task to store the scheduling data field.
[0096] For each vehicle scheduling simulation task, multiple second-level sub-nodes can be created under the first-level sub-node storing the scheduling data field in the simulation data model corresponding to the vehicle scheduling simulation task, respectively storing each simulated vehicle identification information field. Under each second-level sub-node storing the simulated vehicle identification information field, multiple third-level sub-nodes can also be created to respectively store the status information of the dispatch order corresponding to the simulated vehicle, the intermediate data of the target vehicle scheduling algorithm, and other simulation operation data.
[0097] It should be noted that, after obtaining the simulation operation data of each simulated vehicle at the next moment, the simulation operation data of each simulated vehicle at the next moment can be cached in the simulation data model and / or database corresponding to the vehicle scheduling simulation task. When the simulation data model corresponding to the vehicle scheduling simulation task caches the simulation operation data of each simulated vehicle at the next moment, the simulation operation data of each simulated vehicle at the current moment cached in the simulation data model can be replaced, or the simulation operation data of each simulated vehicle at the current moment and the simulation operation data of each simulated vehicle at the next moment can be stored separately.
[0098] The embodiment of the present invention can realize real-time monitoring of vehicle scheduling simulation by caching the simulation operation data of each simulated vehicle at the current moment into the simulation data model corresponding to the vehicle scheduling simulation task, provide a data basis for obtaining simulation results and evaluating the target vehicle scheduling algorithm, and provide more accurate input parameters for later updating of the target vehicle scheduling algorithm.
[0099] Based on the contents of the above embodiments, after obtaining the simulation operation data of each simulated vehicle at the current moment, the above method also includes: sending the simulation operation data of each simulated vehicle at the current moment to the terminal, so that the terminal updates the simulation operation data of each simulated vehicle at the previous moment displayed on the display interface to the simulation operation data of each simulated vehicle at the current moment.
[0100] Specifically, for each vehicle scheduling simulation task, the display interface of the terminal can display the simulation operation data of each simulated vehicle at the last moment in a variety of ways, for example: displaying the simulation operation data of each simulated vehicle at the last moment in the form of tables, graphics, etc.
[0101] After the simulation operation data of each simulation vehicle at the current moment is acquired, the simulation operation data of each simulation vehicle at the current moment may also be sent to the terminal.
[0102] After the terminal receives the simulation operation data of each simulated vehicle at the current moment, it can also update and display the received simulation operation data of each simulated vehicle at the current moment on the display interface in a variety of ways. For example, the simulation operation data of each simulated vehicle at the current moment can be added to a table to realize the scrolling display of the simulation operation data of each simulated vehicle at each historical moment and the current moment; or, based on the simulation operation data of each simulated vehicle at the current moment, the position of the corresponding graphic of each simulated vehicle can be updated to realize the updated display of the simulation operation data of each simulated vehicle at the current moment.
[0103] It should be noted that the display interface of the terminal may include multiple display areas, each display area may correspond to a vehicle scheduling simulation task, and display the simulation operation data of each simulated vehicle corresponding to the vehicle scheduling simulation task.
[0104] The embodiment of the present invention sends the simulation operation data of each simulated vehicle at the current moment to the terminal, and the terminal updates and displays the above simulation operation data on the display interface, which can realize real-time display of simulation dynamics and improve user perception.
[0105] Figure 5 Schematic diagram of the structure of the vehicle dispatching simulation device provided by the present invention. The vehicle dispatching simulation device described below and the vehicle dispatching simulation method described above can be referred to each other. Figure 5As shown, the device includes: a first data configuration module 501, a simulation scheduling module 502 and an algorithm simulation module 503.
[0106] The first data configuration module 501 is used to obtain task data of multiple vehicle scheduling simulation tasks, and to store the task data of each vehicle scheduling simulation task in isolation.
[0107] The simulation scheduling module 502 is used to execute various vehicle scheduling simulation tasks in parallel based on the stored task data and the target vehicle scheduling algorithm to obtain the simulation result of each vehicle scheduling simulation task.
[0108] The algorithm simulation module 503 is used to obtain the target simulation result of the target vehicle scheduling algorithm based on the simulation results of each vehicle scheduling simulation task.
[0109] Specifically, the first data configuration module 501, the simulation scheduling module 502 and the algorithm simulation module 503 are electrically connected.
[0110] For any vehicle scheduling simulation task, the first data configuration module 501 can obtain the task data of the vehicle scheduling simulation task in a variety of ways, for example: based on user input, the task data of the vehicle scheduling simulation task can be obtained; or, based on pre-acquired vehicle operation data and road network information, big data analysis can be performed to obtain the task data of the vehicle scheduling simulation task.
[0111] After the first data configuration module 501 obtains the task data of multiple vehicle scheduling simulation tasks, the task data of each vehicle scheduling simulation task can be stored in isolation to ensure that the task data of any two vehicle scheduling simulation tasks are isolated from each other, and each vehicle scheduling simulation task constitutes a hierarchical namespace. The task data of each vehicle scheduling simulation task can be stored in isolation in a variety of ways, for example: the task data of each vehicle scheduling simulation task can be stored in a tree structure; or the task data of each vehicle scheduling simulation task can be packaged separately, and the task data packet of each vehicle scheduling simulation task can be stored.
[0112] The simulation scheduling module 502 can execute each vehicle scheduling simulation task in parallel in multiple threads based on the stored task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm. For each vehicle scheduling simulation task, when executing the vehicle scheduling simulation task based on the task data of the vehicle scheduling simulation task, the simulation operation data of the simulated vehicle corresponding to the vehicle scheduling simulation task can be obtained, and after the execution of the vehicle scheduling simulation task is completed, the simulation result of the vehicle scheduling simulation task can be obtained based on the obtained simulation operation data.
[0113] It should be noted that the target vehicle scheduling algorithm is the test object of the vehicle scheduling algorithm testing method provided by the present invention. The target vehicle scheduling algorithm can be pre-generated based on actual needs, and based on the target vehicle scheduling algorithm, automatic scheduling of vehicles can be achieved.
[0114] The algorithm simulation module 503 can obtain the target simulation results of the target vehicle scheduling algorithm based on the simulation results of each vehicle scheduling simulation task through mathematical statistics, numerical calculation and other methods, and then can evaluate the advantages and disadvantages of the target vehicle scheduling algorithm based on the above simulation results.
[0115] Optionally, the first data configuration module 501 can be specifically used to cache the task data of each vehicle scheduling simulation task in a tree structure, and obtain the simulation data model corresponding to each vehicle scheduling simulation task; wherein the task data includes: static configuration data and scheduling configuration data; the static configuration data includes: simulation duration; the scheduling configuration data includes: road network information, simulated vehicle information and pre-acquired scheduling calculation factors.
[0116] Optionally, the algorithm simulation module 503 can be specifically used to determine the simulated vehicles corresponding to each vehicle scheduling simulation task based on the task data of each vehicle scheduling simulation task, and generate a dispatch order corresponding to each simulated vehicle based on the task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm; based on the dispatch order corresponding to each simulated vehicle, simulate and schedule each simulated vehicle.
[0117] Optionally, the vehicle dispatching simulation device may further include a data processing module.
[0118] The data processing module can be used to obtain the simulation operation data of each simulated vehicle at the current moment, and cache the simulation operation data of each simulated vehicle at the current moment into the simulation data model corresponding to each vehicle scheduling simulation task.
[0119] The first data configuration module 501 can also be used to send the simulation operation data of each simulated vehicle at the current moment to the terminal, so that the terminal updates the simulation operation data of each simulated vehicle at the previous moment displayed on the display interface to the simulation operation data of each simulated vehicle at the current moment.
[0120] The embodiment of the present invention isolates and stores the acquired task data of multiple vehicle scheduling simulation tasks, and executes the above-mentioned vehicle scheduling simulation tasks in parallel based on the stored task data of each vehicle scheduling task and the target vehicle scheduling algorithm, obtains the simulation result of each vehicle scheduling simulation task, and obtains the target simulation result of the target vehicle scheduling algorithm based on the simulation result of each vehicle scheduling simulation task, thereby realizing the parallel execution of multiple vehicle scheduling simulation tasks, reducing the time cost required for vehicle scheduling simulation, and improving the efficiency of vehicle scheduling simulation.
[0121] Based on the contents of the above embodiments, a vehicle scheduling simulation system includes: the vehicle scheduling simulation device and terminal as described above.
[0122] Specifically, the terminal is a terminal used by a user, and the terminal can obtain task data of each vehicle scheduling simulation task in response to the user's input. The terminal can also receive simulation operation data of each simulated vehicle sent by the vehicle scheduling simulation device, and display the above simulation operation data on the display interface.
[0123] Based on the vehicle dispatching simulation system including the vehicle dispatching simulation device and the terminal, multiple vehicle dispatching simulation tasks can be executed in parallel, the time cost required for vehicle dispatching simulation can be reduced, and the efficiency of vehicle dispatching simulation can be improved. The specific structure, workflow and interaction of the vehicle dispatching simulation device with the terminal can refer to the contents of the above embodiments, and will not be repeated in the embodiments of the present invention.
[0124] In order to facilitate the understanding of the vehicle scheduling simulation method and the vehicle scheduling simulation system provided by the present invention, the vehicle scheduling simulation method and the vehicle scheduling simulation system provided by the present invention are explained below by using an example. Figure 6 FIG. 2 is a flow chart of the vehicle dispatching simulation method provided by the present invention. Figure 6 As shown, the vehicle scheduling simulation method provided by the present invention includes: after the second data configuration module 603 in the terminal 602 receives the simulation configuration request input by the user, it can parse the above simulation configuration request, obtain the task data of multiple vehicle scheduling simulation tasks, and call the first data configuration module 501 in the vehicle scheduling simulation device 601 to create a simulation cache model in the cache. Among them, the above simulation cache model is composed of a simulation data model corresponding to each vehicle scheduling simulation task. The above first data configuration module 501 can send the above simulation cache model to the data processing module 609 in the vehicle scheduling simulation device 601, and the above first data configuration module 501 can also send the above simulation cache model to the database 610 for storage.
[0125] In response to the user clicking the simulation start control, the terminal 602 can send a start instruction to the state identification module 606 in the vehicle scheduling simulation device 601 to start the simulation initialization. After receiving the start instruction sent by the terminal, the state identification module 606 can first traverse all simulated vehicles for each vehicle scheduling simulation task, determine each simulated vehicle corresponding to the vehicle scheduling simulation task, and generate a device power-on message corresponding to each simulated vehicle and store it in the message middleware 607.
[0126] The message listener 608 in the vehicle dispatch simulation device 601 can capture the device power-on message sent by the state recognition module, and obtain the information of each simulated vehicle based on the device power-on message. The message listener 608 can send the information of each simulated vehicle to the simulation dispatch module 502 in the vehicle dispatch simulation device 601.
[0127] The simulation scheduling module 502 can call the task data of the vehicle scheduling simulation task obtained by the data processing module 609 as an input parameter, and generate a dispatch order corresponding to each of the above simulated vehicles based on the target vehicle scheduling algorithm. Based on the dispatch order corresponding to each of the above simulated vehicles, each of the above simulated vehicles can be dispatched.
[0128] In the process of scheduling each of the simulated vehicles based on the dispatching orders corresponding to each of the simulated vehicles, the simulation scheduling module 502 can simulate the operation and scheduling of the vehicles in a virtual simulation time system.
[0129] The state identification module 606 may also periodically poll the execution status of the command, and when it is determined that the execution of any command has been completed, it generates a device state switching message of the simulated vehicle corresponding to the command and stores it in the message middleware 607 .
[0130] When the message listener 608 captures the above device state switching message, it can repeat the above process and start a new round of scheduling.
[0131] The data processing module 609 in the vehicle dispatching simulation device 601 may obtain the simulation operation data of each simulated vehicle periodically or according to a preset acquisition rule, and may send the simulation operation data to the data processing module 609 .
[0132] The data processing module 609 can obtain the simulation results based on the above simulation operation data, and can send the above simulation results to the database 610 for storage. The database 610 can also send the above simulation results to the result display module 605 of the terminal 602. The data processing module 609 can also send the above simulation results to the algorithm simulation module 503, and the algorithm simulation module can obtain the target simulation results of the target simulation scheduling algorithm based on the above simulation results, and send the above target simulation results to the result display module 605. After receiving the above simulation results and the above target simulation results, the result display module 605 can display the above simulation results and the above target simulation results on the display interface in a variety of ways.
[0133] The data processing module 609 may also send the obtained simulation operation data of each simulated vehicle to the first data configuration module 501 for caching, and the first data configuration module 501 may also send the above simulation operation data of each simulated vehicle to the simulation state monitoring module 604 in the terminal 602. After receiving the simulation operation data of each simulated vehicle, the simulation state monitoring module 604 may display the above simulation operation data of each simulated vehicle on the display interface in a variety of ways.
[0134] It should be noted that, during the execution of the vehicle scheduling simulation task, if a simulated vehicle is added or deleted in the simulation cache model, the vehicle scheduling simulation device 601 will be reinitialized to determine each simulated vehicle corresponding to the vehicle scheduling simulation task. The vehicle scheduling simulation device 601 can determine whether a simulated vehicle is added or deleted in the simulation cache model by periodically polling the status of each simulated vehicle.
[0135] It should be noted that the second data configuration module 603 can also send a query request to the first data configuration module 501 to query simulation operation data, task data, test results or simulation results, etc. in response to the user's operation. The first data configuration module 501 can respond to the above query request, query in the database, and return the query result to the second data configuration module.
[0136] The embodiment of the present invention isolates and stores the acquired task data of multiple vehicle scheduling simulation tasks, and executes the above-mentioned vehicle scheduling simulation tasks in parallel based on the stored task data of each vehicle scheduling task and the target vehicle scheduling algorithm, obtains the simulation result of each vehicle scheduling simulation task, and obtains the target simulation result of the target vehicle scheduling algorithm based on the simulation result of each vehicle scheduling simulation task, thereby realizing the parallel execution of multiple vehicle scheduling simulation tasks, reducing the time cost required for vehicle scheduling simulation, and improving the efficiency of vehicle scheduling simulation.
[0137] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the vehicle scheduling algorithm testing method, which includes: obtaining task data of multiple vehicle scheduling simulation tasks, and storing the task data of each vehicle scheduling simulation task in isolation; based on the stored task data and the target vehicle scheduling algorithm, executing each vehicle scheduling simulation task in parallel to obtain the simulation result of each vehicle scheduling simulation task; based on the simulation results of each vehicle scheduling simulation task, obtaining the target simulation result of the target vehicle scheduling algorithm.
[0138] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0139] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the vehicle scheduling simulation method provided by the above-mentioned methods, which includes: obtaining task data of multiple vehicle scheduling simulation tasks, and storing the task data of each vehicle scheduling simulation task in isolation; based on the stored task data and the target vehicle scheduling algorithm, executing each vehicle scheduling simulation task in parallel to obtain the simulation result of each vehicle scheduling simulation task; based on the simulation results of each vehicle scheduling simulation task, obtaining the target simulation result of the target vehicle scheduling algorithm.
[0140] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the vehicle scheduling simulation method provided by the above-mentioned methods. The method includes: obtaining task data of multiple vehicle scheduling simulation tasks, and storing the task data of each vehicle scheduling simulation task in isolation; based on the stored task data and the target vehicle scheduling algorithm, executing each vehicle scheduling simulation task in parallel to obtain a simulation result of each vehicle scheduling simulation task; based on the simulation results of each vehicle scheduling simulation task, obtaining a target simulation result of the target vehicle scheduling algorithm.
[0141] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle scheduling simulation method, characterized in that: include: Acquire task data of multiple vehicle scheduling simulation tasks, and store the task data of each of the vehicle scheduling simulation tasks in isolation; Based on the stored task data and the target vehicle scheduling algorithm, each of the vehicle scheduling simulation tasks is executed in parallel to obtain a simulation result of each of the vehicle scheduling simulation tasks; Based on the simulation results of each of the vehicle scheduling simulation tasks, obtaining a target simulation result of the target vehicle scheduling algorithm; The isolating and storing the task data of each vehicle scheduling simulation task specifically includes: Cache the task data of each of the vehicle scheduling simulation tasks in a tree structure, and obtain the simulation data model corresponding to each of the vehicle scheduling simulation tasks; The task data includes static configuration data and scheduling configuration data; the scheduling configuration data includes road network information, simulated vehicle information and pre-acquired scheduling calculation factors.
2. The vehicle dispatching simulation method according to claim 1, characterized in that: The static configuration data includes: a simulation period and / or a simulation speed change multiple; the simulation period is a period for simulation in a simulation scenario.
3. The vehicle dispatching simulation method according to claim 1 or 2, characterized in that: The executing of each of the vehicle scheduling simulation tasks in parallel based on the stored task data and the target vehicle scheduling algorithm specifically includes: Based on the task data of each vehicle scheduling simulation task, determining each simulated vehicle corresponding to each vehicle scheduling simulation task, and based on the task data of each vehicle scheduling simulation task and the target vehicle scheduling algorithm, generating a dispatch order corresponding to each simulated vehicle; Based on the dispatch order corresponding to each simulated vehicle, simulation dispatch is performed on each simulated vehicle.
4. The vehicle dispatching simulation method according to claim 3, characterized in that: After performing simulation scheduling on each simulated vehicle based on the dispatch order corresponding to each simulated vehicle, the method further includes: The simulation operation data of each simulated vehicle at the current moment is obtained, and the simulation operation data of each simulated vehicle at the current moment is cached in the simulation data model corresponding to each vehicle scheduling simulation task.
5. The vehicle dispatching simulation method according to claim 4, characterized in that: After obtaining the simulation operation data of each simulated vehicle at the current moment, the method further includes: The simulation operation data of each simulation vehicle at the current moment is sent to the terminal, so that the terminal updates the simulation operation data of each simulation vehicle at the previous moment displayed on the display interface to the simulation operation data of each simulation vehicle at the current moment.
6. A vehicle dispatching simulation device, characterized in that: include: A first data configuration module is used to obtain task data of multiple vehicle scheduling simulation tasks, and to store the task data of each of the vehicle scheduling simulation tasks in isolation; A simulation scheduling module, used to execute each of the vehicle scheduling simulation tasks in parallel based on the stored task data and the target vehicle scheduling algorithm, and obtain a simulation result of each of the vehicle scheduling simulation tasks; An algorithm simulation module, used for obtaining a target simulation result of the target vehicle scheduling algorithm based on the simulation results of each of the vehicle scheduling simulation tasks; The first data configuration module isolates and stores the task data of each vehicle scheduling simulation task, specifically including: Cache the task data of each of the vehicle scheduling simulation tasks in a tree structure, and obtain the simulation data model corresponding to each of the vehicle scheduling simulation tasks; The task data includes static configuration data and scheduling configuration data; the scheduling configuration data includes road network information, simulated vehicle information and pre-acquired scheduling calculation factors.
7. A vehicle dispatching simulation system, characterized in that: include: The vehicle dispatching simulation device and terminal as claimed in claim 6.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the vehicle scheduling simulation method according to any one of claims 1 to 5 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the vehicle scheduling simulation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Parallel simulation job scheduling method for distributed interactive simulation system
CN112395736A