A method and device for simulating sharing of autonomous vehicles under V2G background
Through the time-event hybrid driving mechanism and the improved O2DES simulation framework, combined with parallel computing and two-way search, a shared simulation model of autonomous driving cars was built, solving the simulation accuracy and efficiency problems under the influence of vehicle-pile-road-net dynamic random interaction, and achieving efficient real-time path planning and human-vehicle matching.
Patent Information
- Application Number
- CN202510773564.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-11
AI Technical Summary
The existing shared simulation model of autonomous electric vehicles fails to fully consider the dynamic random interaction of the vehicle-pile-road-network, resulting in low simulation accuracy and efficiency, especially in the context of V2G charging and discharging.
The time-event hybrid drive mechanism and an improved O2DES simulation framework are adopted, combining parallel computing and two-way search to build a shared simulation model for autonomous driving cars, and through real-time path planning and online matching of human-vehicles, optimize the event management logic and object creation process.
It significantly improves the accuracy and efficiency of the simulation model, can simulate real-time path planning and human-vehicle matching in dynamic traffic environments, improves simulation accuracy and calculation speed, and is especially suitable for large-scale scenarios.
Smart Images

Figure CN120297001B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of human-vehicle matching technology, and in particular to a method and device for simulating the sharing of autonomous driving vehicles in a V2G context. Background Art
[0002] Currently, simulation modeling for autonomous electric vehicle sharing is still in the exploratory stage. Existing research has considered simulation models for both manually driven and autonomous electric vehicles sharing in unidirectional charging modes to varying degrees, but a simulation model for autonomous electric vehicle sharing in V2G bidirectional charging mode has not yet been established.
[0003] Existing simulation models for both manual and autonomous driving capture the dynamics or randomness of user demand, road traffic conditions, and the vehicle charging process. However, comprehensive consideration of the dynamics and randomness of these models remains to be improved, and randomness is primarily characterized using an exponential distribution, which has certain limitations. Furthermore, some studies have focused on the interactions between vehicle, charging pile, and road, or vehicle, charging pile, and network, but have not yet considered the interaction between vehicle, charging pile, road, and network. However, the dynamics and randomness of the supply and demand environment, as well as the interactions between vehicle, charging pile, road, and network, significantly impact vehicle utilization, charging queue congestion, road traffic congestion, and grid security and stability, necessitating their accurate consideration in modeling. As the autonomous electric vehicle sharing market expands, the scale of practical problems continues to increase, and computational efficiency is also a key consideration in modeling. Therefore, a simulation method and apparatus for autonomous vehicle sharing that considers the dynamic and random interactions between vehicle, charging pile, road, and network, as well as the V2G charging and discharging context, is urgently needed. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and device for simulating autonomous vehicle sharing in a V2G environment to improve the above-mentioned problems. To achieve the above-mentioned purpose, the technical solutions adopted by the present invention are as follows:
[0005] In a first aspect, the present application provides a method for simulating autonomous vehicle sharing in a V2G context, comprising:
[0006] Obtain urban road network data and travel data;
[0007] The model is constructed under the V2G background by using the urban road network data and the travel data, and the interaction and improved O 2 A DES simulation framework is used to obtain a self-driving car sharing simulation model, wherein the self-driving car sharing simulation model is obtained by coupling a road network simulation sub-model and a travel simulation sub-model;
[0008] Performing real-time path planning using a real-time path planning algorithm and the autonomous vehicle shared simulation model, and obtaining a path planning result based on parallel computing, bidirectional search, and path tracing;
[0009] Based on the path planning result, online matching between the person and the vehicle is performed to obtain a matching result between the autonomous driving vehicle and the customer.
[0010] In a second aspect, the present application also provides an autonomous driving car sharing simulation device in a V2G context, comprising:
[0011] An acquisition unit, used to acquire urban road network data and travel data;
[0012] A construction unit is used to construct a model in the context of V2G by using the urban road network data and the travel data, based on the interaction and improved O of demand-responsive travel services. 2 A DES simulation framework is used to obtain a self-driving car sharing simulation model, wherein the self-driving car sharing simulation model is obtained by coupling a road network simulation sub-model and a travel simulation sub-model;
[0013] A planning unit, configured to perform real-time path planning using a real-time path planning algorithm and the autonomous vehicle shared simulation model, and obtain a path planning result based on parallel computing, bidirectional search, and path tracing;
[0014] The matching unit is used to perform online matching between the person and the vehicle based on the path planning result to obtain a matching result between the autonomous driving vehicle and the customer.
[0015] The beneficial effects of the present invention are as follows: the autonomous driving car sharing simulation model constructed by the present invention uses a time-event hybrid drive mechanism. Taking into account the dynamic random interaction of vehicle, pile, road and network, the accuracy and efficiency of the autonomous driving car sharing simulation model are significantly improved. It can simulate the real-time conditions of each road section and even the behavioral dynamics of a single vehicle and customer, thereby improving the simulation accuracy. At the same time, a parallel real-time path planning algorithm and an improved human-vehicle online matching algorithm are adopted. By preprocessing the road network, the speed of path query is greatly improved, and the computational efficiency in large-scale scenarios is optimized by combining parallel computing. The human-vehicle online matching further improves the matching rate and matching efficiency by simulating the real-time interaction and allocation of customers and vehicles in a dynamic traffic environment.
[0016] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the embodiments of the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 Schematic diagram of the process of the autonomous driving car sharing simulation method under the V2G background described in an embodiment of the present invention;
[0019] Figure 2 A partial schematic diagram of a road network structure in an embodiment of the present invention;
[0020] Figure 3 Schematic diagram of different driving mechanisms in an embodiment of the present invention;
[0021] Figure 4 Schematic diagram of event triggering of the autonomous driving car sharing simulation model in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0023] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are used only to distinguish the description and should not be understood as indicating or implying relative importance.
[0024] Example 1:
[0025] This embodiment provides a method for simulating autonomous driving car sharing in a V2G context.
[0026] See also Figure 1 , the figure shows that the method includes step S100, step S200, step S300 and step S400.
[0027] Step S100: Acquire urban road network data and travel data;
[0028] Step S200: constructing a model in the context of V2G by using the urban road network data and the travel data, based on the interaction and improved O 2 A DES simulation framework is used to obtain a self-driving car sharing simulation model, wherein the self-driving car sharing simulation model is obtained by coupling a road network simulation sub-model and a travel simulation sub-model;
[0029] In this embodiment, the autonomous driving car sharing simulation model is integrated into one system for use.
[0030] The step S200 includes:
[0031] Step S201: acquiring node information, road section information, region information and road network information based on the urban road network data;
[0032] Step S202: constructing a node module using the node information, constructing a section module using the section information, constructing a region module using the region information, and constructing a road network model using the road network information;
[0033] In this embodiment, the node information includes the location of the node and the set of road segments connected to the node. The node module is only used to provide necessary geometric information and does not carry dynamic parameters such as speed and density.
[0034] The node module only contains node information of static properties, as follows:
[0035] ;
[0036] Where, Representation node A static property collection of Representation node The x-axis coordinate, Representation node The y-axis coordinate, Representation and Node A collection of connected road segments, Represents a set of nodes in a road network.
[0037] In this embodiment, the road section information includes static attributes and dynamic attributes, namely, road section static information and road section dynamic information. The road section static information includes the nodes, length, free flow speed, capacity and number of lanes of the road section. The road section dynamic information includes the number of background traffic vehicles, the number of system vehicles, the system vehicle set, traffic density, speed, time delay rate and minimum travel speed of the road section.
[0038] The static information of the road section is used to store the geometric information of the road network, and the dynamic information of the road section is used to record the number of vehicles in the road section in real time to update the speed and congestion level of the road section in real time, making the road traffic flow simulation more accurate. Among them, the static information of the road section is defined as:
[0039] ;
[0040] Where, Indicates road section Static information of road sections, Indicates road section The starting node, Indicates road section The terminal node of Indicates road section length, Indicates road section The free flow speed, Indicates road section capacity, Indicates road section The number of lanes, Represents a collection of road segments in a road network.
[0041] The definition of road segment dynamic information is:
[0042] ;
[0043] ;
[0044] ;
[0045] ;
[0046] ;
[0047] Where, Indicates road section Dynamic information of road sections, express Time section The number of background traffic vehicles, express Time section The number of vehicles in the system, express Time section The system vehicle collection, express Time section The traffic density, express Time section speed, express Time section The time delay rate, Indicates road section length, Indicates road section The number of lanes, Indicates road section The minimum travel speed, Indicates road section The blocking density, Indicates road section capacity, and Both represent adjustment parameters. Indicates road section The free flow speed, Represents a collection of road segments in a road network.
[0048] In the above formula, In fact, the improved road Greenshields speed-density relationship model is used to calculate the real-time speed of the road section with continuous flow traffic.
[0049] The events in the road segment module include both time-driven and event-driven events. Event-driven events are further divided into input events, internal events, and output events. Together, they describe the autonomous vehicle sharing simulation model. Time-driven events trigger themselves in a rolling manner at a fixed time step, while event-driven events are triggered immediately or scheduled. Table 1 shows a description of the road segment module's events.
[0050] Table 1 Event description table of road section module
[0051]
[0052] In this embodiment, regional information is also divided into static attributes and dynamic attributes, including regional static information and regional dynamic information. Regional static information includes the node set, road section set and charging and discharging station set in the area, and regional dynamic information includes the idle vehicle set in the area.
[0053] Regional static information is used to record the nodes, road sections, and charging and discharging station collections in the region, and regional dynamic information is used to record the real-time idle vehicle collections in the region, serving as the simulation basis for matching people and vehicles in demand-responsive travel services.
[0054] Specifically, regional static information and regional dynamic information are defined as:
[0055] ;
[0056] ;
[0057] Where, Indicates area Regional static information, Indicates area Regional dynamic information, Indicates area The node set in Indicates area The road segment collection in Indicates area The collection of charging and discharging stations in express Time zone The set of idle vehicles in Represents a collection of regions in a road network.
[0058] In this embodiment, the road network information includes a node set, a road segment set, and a region set in the road network. Figure 2 The figure shows a partial schematic diagram of the road network structure, where the road network module is the road network information containing only static attributes, which is used to record the collection of nodes, road sections and areas in the road network. Specifically, the road network information is defined as:
[0059] ;
[0060] Where, Indicates road network information. represents the set of nodes in the road network, represents the set of road segments in the road network, Represents a collection of regions in a road network.
[0061] Step S203: constructing a road network simulation sub-model through the node module, the road section module, the area module and the road network model;
[0062] Step S204: Acquire vehicle information, customer information, and charging and discharging station information based on the travel data;
[0063] Step S205: constructing a vehicle module using the vehicle information, constructing a customer module using the customer information, and constructing a charging and discharging station module using the charging and discharging station information;
[0064] In this embodiment, the vehicle information includes the vehicle's battery level, the region it is in, the node it is in, the cumulative amount spent, the cumulative amount earned, the driving route, the matched customers, and customer variables.
[0065] The vehicle module contains both static and dynamic attributes. The static attributes of the vehicle module are only used to record the vehicle index, while the dynamic attributes of the vehicle module are used to record various real-time parameters of the vehicle. The specific description of vehicle information is as follows:
[0066] ;
[0067] Where, Indicates vehicle Vehicle information, express Time Vehicle of electricity, express Time Vehicle The area where express Time Vehicle The node where express Time Vehicle The cumulative amount of spending, express Time Vehicle The cumulative amount of earnings, express Time Vehicle Whether it matches the customer's 0-1 variable, Indicates vehicle Unmatched customers, Indicates vehicle Matched customers, express Time Vehicle Matched customers ,like but is empty, express Time Vehicle The driving path, Represents a collection of vehicles.
[0068] At the same time, all events in the vehicle module are event-driven events, all of which are internal events, and all of which are triggered immediately or conditionally. The event description of the vehicle module is shown in Table 2.
[0069] Table 2 Event description table of vehicle module
[0070]
[0071] In this embodiment, customer information also includes static and dynamic attributes, namely customer static information and customer dynamic information. Static customer information includes the time the customer posted their request, the departure location, the destination location, the departure node, and the destination node. Dynamic customer information includes the customer's matching vehicle, the shortest travel route planned in real time, the time of arrival at the destination, the travel time, and the waiting time for the matching vehicle to arrive.
[0072] Customer static information is used to record customer indexes and travel demand data, while customer dynamic information is used to record customer matching vehicle data. Specifically, customer information is defined as:
[0073] ;
[0074] ;
[0075] Where, Indicates customer Customer static information, Indicates customer Customer dynamic information, Indicates customer When the demand is released, Indicates customer The area where the departure location is located, Indicates customer Destination area, Indicates customer Departure node, Indicates customer Destination node, Indicates customer The matched vehicle. If the matching vehicle fails, , Indicates customer Real-time planning of the shortest driving path, Indicates customer Arrival at destination time, Indicates customer Time required for the journey, Indicates customer The time required to wait for the matching vehicle to arrive, Represents a set of customers.
[0076] The customer module's events include both time-driven and event-driven events. Event-driven events are further divided into input events, internal events, and output events. Time-driven events trigger themselves in a rolling manner at a fixed time step, while event-driven events are triggered immediately or conditionally. Table 3 shows a description of the customer module's events.
[0077] Table 3 Event description table of customer module
[0078]
[0079] In this embodiment, the charging and discharging station information includes static attributes and dynamic attributes, namely, static information of the charging and discharging station and dynamic information of the charging and discharging station. The static information of the charging and discharging station includes the node where the station is located, the area where it is located, the number of charging and discharging piles, the charging threshold, the discharging threshold, the stop discharge threshold, and the charging or discharging speed. The dynamic information of the charging and discharging station includes the charging vehicle set, the discharging vehicle set, and the waiting charging vehicle set in the station.
[0080] The static information of the charging and discharging station is used to record the configuration of the charging and discharging station, and the dynamic information of the charging and discharging station is used to record the charging and discharging status of vehicles in the station in real time. Specifically, the definition of the charging and discharging station information is:
[0081] ;
[0082] ;
[0083] Where, Site Static information of charging and discharging stations, Site Dynamic information of charging and discharging stations, Indicates a site The node where Indicates a site The area where Indicates a site The number of charging and discharging piles, Indicates a site The charging threshold is Vehicles with less than this amount of power must go to the station Charge, Indicates a site The discharge threshold, Vehicles with a battery level higher than this can go to the station discharge, Indicates a site The stop discharge threshold at the site When the internal discharge of the vehicle falls below this level, discharge will stop immediately. Indicates a site The charging or discharging speed, express Time Station The collection of charging vehicles in express Time Station The set of discharged vehicles in express Time Station The collection of vehicles waiting to be charged in Represents a site collection.
[0084] All events in the charging and discharging station module are event-driven. These are further divided into input events, internal events, and output events. These events are described using immediate triggering, conditional triggering, and scheduled triggering to describe the autonomous vehicle sharing simulation model. Table 4 shows a description of the charging and discharging station module's events.
[0085] Table 4 Event description table of the charging and discharging station module
[0086]
[0087] Step S206: constructing a travel simulation sub-model through the vehicle module, the customer module and the charging and discharging station module;
[0088] In this embodiment, the travel simulation sub-model is a model based on demand-responsive travel services, which defines the interaction between the three modules and the interaction between the three modules and the road network, and is called by event triggering.
[0089] Step S207: The road network simulation sub-model and the travel simulation sub-model are coupled to obtain an autonomous driving car sharing simulation model based on a time-event hybrid driving mechanism. The autonomous driving car sharing simulation model adopts an improved O 2 The DES simulation framework optimizes the event management logic and object creation process.
[0090] In this embodiment, compared to continuous simulation, discrete simulation is event-based, so it can avoid the problem of too long time step required for iteration. However, in complex simulation, it is necessary to simulate the operation of thousands of vehicles and the number of events is large. This means that even in a small time slice, a large number of simulation events need to be run, which will reduce the simulation speed. Considering that different modules are called at different frequencies, such as Figure 3 As shown in the figure, if a module is called infrequently, using a time-driven mechanism (continuous simulation) will result in unnecessary empty event calls. If the module is called infrequently, using an event-driven mechanism (discrete simulation) will result in high computational costs.
[0091] To address this issue, this embodiment provides a hybrid simulation mechanism that combines continuous simulation and discrete simulation, namely, a time-event hybrid driven mechanism. Specifically, if the status of a module is frequently updated, a continuous simulation method is used to update the status. For modules with less frequent status updates, a discrete simulation method is used to reduce unnecessary computational complexity of the shared simulation model of autonomous driving vehicles.
[0092] At the same time, if Figure 4The figure shows the event triggering diagram of the autonomous vehicle sharing simulation model, which includes immediate triggering, scheduled triggering and event triggering, that is, it includes both time-driven events and event-driven events. Events and customer modules Events, real-time background traffic data and potential demand data are updated every minute on the simulation clock, making the simulation closer to the real environment.
[0093] In step S207, the autonomous driving car sharing simulation model adopts the improved O 2 The DES simulation framework optimizes event management logic and object creation processes, including:
[0094] Step A100: establishing an event object pool in an entity in the autonomous driving car sharing simulation model, wherein the event object pool is used for reusing and managing events;
[0095] In this embodiment, the original O 2 In the DES framework, the frequent operations of event creation, reservation, triggering and invalidation will continuously trigger automatic garbage collection, reducing the efficiency of simulation operation. 2 Based on the DES framework, an event object pool is established within the entity for reuse and management of event objects, which effectively reduces memory usage and the number of automatic garbage collection triggers, thereby improving the simulation operation efficiency. Among them, the autonomous driving car sharing simulation model and each module are regarded as entities, and the autonomous driving car sharing simulation model is the top-level entity.
[0096] Step A200: When booking an event through the autonomous driving car sharing simulation model, if a parent entity currently exists, the event booking logic corresponding to the parent entity is called to pass the event layer by layer until it is delivered to the top-level entity;
[0097] Step A300: When retrieving an event through the autonomous driving car sharing simulation model, if there is a parent entity currently, the event retrieval method of the parent entity is called, and the event is searched upward layer by layer until the event is retrieved from the top-level entity.
[0098] In this embodiment, considering that the scale of child entities in actual simulation scenarios may reach hundreds or thousands, the event management logic is optimized so that only the top-level entity actually stores events, and events of all child entities are passed to their parent entity.
[0099] After such optimization, the time complexity is reduced to ,in, Indicates the number of child entities, Represents the number of events. When the number of child entities is 4, at the same network scale, the time spent retrieving the most recent event during the simulation run is reduced to 14.64%, and the total time consumption is reduced to 21%. The greater the number of entities in the simulation, that is, the larger the size of the child entities, the more significant the efficiency improvement.
[0100] Step S300: performing real-time path planning using a real-time path planning algorithm and the autonomous driving vehicle shared simulation model, and obtaining a path planning result based on parallel computing, bidirectional search, and path tracing;
[0101] This embodiment first utilizes parallel computing to improve algorithm execution efficiency, enabling simultaneous processing of path planning tasks for multiple trip sets. Secondly, a bidirectional search strategy, alternating between forward and reverse expansion, reduces computational effort and accelerates the path search process. During the search, paths are traced from both the forward and reverse directions, and the path direction is determined by comparing time values, ensuring the selection of the shortest possible path. Combining these three strategies not only effectively reduces computational complexity but also enables real-time updates of path planning results, making it particularly suitable for real-time path planning in dynamic traffic.
[0102] The step S300 includes:
[0103] Step S301: Initializing the time, forward priority queue, and reverse priority queue of each node in each trip based on the autonomous driving car sharing simulation model;
[0104] In this embodiment, a set of trips is input into the autonomous vehicle sharing simulation model. Each trip includes a start node and an end node. This set of trips includes multiple trips for which the shortest path needs to be calculated. For each trip, the shortest path from the start node to the end node needs to be calculated.
[0105] Each trip must be initialized before calculation. The start and end times are set to zero, and the times of all other nodes are set to infinity, indicating that the path time to that node has not yet been calculated. Two queues are also initialized: a forward priority queue and a forward priority queue.
[0106] Step S302: Add the starting point to the forward priority queue and the end point to the reverse priority queue;
[0107] In this embodiment, the forward priority queue is used to search from the starting point to the end point, and the reverse priority queue is used to search from the end point to the starting point. The starting point is added to the forward priority queue, and the end point is added to the reverse priority queue. This operation ensures that bidirectional searches can be performed simultaneously, thereby accelerating path calculation.
[0108] Step S303: performing a bidirectional search on the forward priority queue and the reverse priority queue to obtain the shortest path time for each trip;
[0109] The step S303 includes:
[0110] Step B100: Initialize the first global path time to infinity;
[0111] Step B200: Taking out the first node for forward search and taking out the second node for reverse search. The forward search is to expand the adjacent nodes of the first node to obtain a first expanded node. The reverse search is to expand the adjacent nodes of the second node to obtain a second expanded node. The first node is the node with the shortest forward time in the forward priority queue, and the second node is the node with the shortest reverse time in the reverse priority queue.
[0112] In this embodiment, taking out the first node and the second node actually means deleting the nodes in the corresponding forward priority queue and reverse priority queue.
[0113] Step B300: Obtain the forward time of the first extended node and the reverse time of the second extended node;
[0114] Step B400: adding all the first extension nodes to the forward priority queue, and adding all the second extension nodes to the reverse priority queue;
[0115] Step B500: determining whether the same node is accessed during the forward search and the reverse search; if so, treating the same node as the encounter node and stopping the search; otherwise, continuing the forward search and the reverse search until all nodes are searched and stopping the search;
[0116] Step B600: Obtain the forward time and reverse time of the encounter node;
[0117] Step B700: Add the forward time and the reverse time of the encounter node to obtain the second global shortest path time;
[0118] Step B800: Determine whether the second global shortest path time is less than the first global shortest path time. If so, use the second global shortest path time as the first shortest path time. Otherwise, the first global shortest path time remains unchanged.
[0119] Step B900: If both the forward priority queue and the reverse priority queue are empty or meet the shortest path condition, the first shortest path time is used as the shortest path time. Otherwise, the next forward search and reverse search are performed, where the shortest path condition is that the first global shortest path time of two adjacent iterations is the same.
[0120] In this embodiment, a parallel computation approach is used to calculate the shortest path time for each trip in the trip set. Each trip begins with a bidirectional search in both the forward and reverse priority queues until both queues are empty or a path that meets the shortest path criteria is found.
[0121] In each search, the node with the shortest time in the current queue is selected for expansion, prioritizing the node most likely to form the shortest path. If the forward priority queue is not empty, the node with the shortest time is taken from the forward priority queue for expansion; otherwise, the node with the shortest time is taken from the reverse priority queue for expansion. The node with the shortest time is deleted and the global shortest path time is updated. For each node's adjacent node, if the time to reach the adjacent node from the current node is shorter, the time of the adjacent node is updated and added to the corresponding queue. This process is repeated until the shortest path is found, where time is the corresponding forward time or reverse time.
[0122] Step S304: performing path tracking based on the shortest path time to obtain a complete shortest path for each trip;
[0123] The step S304 includes:
[0124] Step C100: Initializing the first path and the second path for each trip;
[0125] Step C200: Obtain the shortest forward time and the shortest reverse time of each node through the shortest path time;
[0126] Step C300: Start forward path tracing from the starting point. For the current node, check its adjacent nodes to determine whether the shortest forward time of the current node is equal to the shortest forward time of the adjacent node minus the time from the current node to the adjacent node. If so, add the edge formed by the current node and the adjacent node to the first path. Otherwise, continue tracing.
[0127] Step C400: Start tracing the reverse path from the end point. For the current node, check its adjacent nodes to determine whether the shortest reverse time of the current node is equal to the shortest reverse time of the adjacent node minus the time from the current node to the adjacent node. If so, add the edge formed by the current node and the adjacent node to the second path. Otherwise, continue tracing.
[0128] Step C500: When the forward path tracing and the reverse path tracing reach the same node, the tracing is stopped;
[0129] Step C600: Reverse the second path and merge it with the first path, remove the same nodes, and obtain the complete shortest path for each trip.
[0130] In this embodiment, after the search is complete, path tracing is performed. Using the results of the forward and reverse searches, the path is traced from the starting point and the end point, respectively, until it returns to the starting point or the end point. The first and second paths are merged. Since the starting point of the second path is already the end point of the first path, the first node of the second path is removed. The merged path is the complete shortest path from the starting point to the end point.
[0131] Step S305: Calculating the complete shortest path distance of each trip based on the complete shortest path;
[0132] Step S306: The complete shortest path corresponding to each trip and the distance of the complete shortest path are used as the path planning result.
[0133] Step S400: Performing online matching between the person and the vehicle based on the path planning result to obtain a matching result between the autonomous driving vehicle and the customer.
[0134] The step S400 includes:
[0135] Step S401: Obtain all customers who need to be matched and all idle vehicles in the self-driving car fleet at the current moment;
[0136] Step S402: Calculating the estimated time it takes for the vehicle to pick up the customer, the amount of electricity consumed to complete the customer's journey, and the distance between the vehicle and the customer based on the route planning result;
[0137] Step S403: Calculating the total pick-up time based on the estimated time it takes for the vehicle to pick up the customer, and using the total pick-up time as the objective function;
[0138] In this embodiment, the total pick-up time is the sum of the estimated time spent by all customers in the set of customers waiting for pick-up at this moment, wherein the set of customers waiting for pick-up is the set of customers that need to be matched.
[0139] Step S404: setting a first constraint condition based on the amount of electricity consumed to complete the customer's trip, and setting the Euclidean distance between the vehicle and the customer to be less than a preset matching radius as a second constraint condition;
[0140] In this embodiment, a batch matching strategy is adopted, which can be described as solving a bipartite graph matching model for the set of customers to be matched and the set of all available vehicles at corresponding time intervals. That is, the bipartite graph matching model includes an objective function and multiple constraints for online matching of people and vehicles, as shown below:
[0141] ;
[0142] ;
[0143] ;
[0144] ;
[0145] ;
[0146] Where, Indicates finding the minimum value, Indicates vehicle Pick up customers Estimated time spent, Represents the decision vehicle With customers A 0-1 variable indicating whether a match is made. Representative vehicle Unmatched customers, Representative vehicle Matched customers, Indicates completion of customer The amount of electricity consumed during the trip, Indicates vehicle With customers The Euclidean distance between represents the matching radius, Represents the set of customers that need to be matched, represents the set of all idle vehicles, Indicates taking the absolute value, Indicates vehicle of electricity, Indicates a site charging threshold.
[0147] Specifically, when matching people and vehicles online, the goal is to minimize the total pick-up time and include the following four constraints. The first constraint is the power constraint, which requires that the vehicle's power is still greater than or equal to the charging threshold after the customer's trip ends, that is, the vehicle's remaining power is sufficient for it to drive to a nearby charging station for charging. The second constraint is the matching radius constraint, which requires that the Euclidean distance between the vehicle and the customer cannot exceed the preset matching radius. The third constraint represents that all idle vehicles have only one customer to match with them. The fourth constraint is a 0-1 constraint on whether the vehicle and the customer are matched.
[0148] Step S405: For each customer, query all idle vehicles within the customer's preset matching radius using the second constraint condition to obtain the customer's first idle vehicle set;
[0149] Step S406: obtaining an idle vehicle that meets the travel needs of each customer from the first idle vehicle set according to the second constraint condition, and obtaining a second idle vehicle set for the customer;
[0150] Step S407: sorting the idle vehicles in the second idle vehicle set according to the distances from the customers to obtain a sorted idle vehicle set;
[0151] In this embodiment, for each vehicle in the first set of available vehicles for each customer, a determination is made as to whether the vehicle's battery level meets the customer's travel needs. Specifically, the vehicle's battery level is checked to see if it is sufficient to meet the customer's travel needs. If the available vehicle does not meet the requirements, it is removed from the first set of available vehicles, resulting in a second set of available vehicles.
[0152] Step S408: Performing person-vehicle matching based on the sorted idle vehicle set, with the goal of satisfying the first constraint condition and the second constraint condition and minimizing the objective function to obtain the matching result between the autonomous driving vehicle and the customer at the current moment.
[0153] In this embodiment, the idle vehicles in the second idle vehicle set are sorted from near to far, which can ensure that the idle vehicles closest to the customer are considered first, providing a data basis for subsequent dominant zone determination.
[0154] In step S408, the steps of matching the person with the vehicle are as follows:
[0155] Calculate the customer closest to each idle vehicle in each of the sorted idle vehicle sets, and determine whether the idle vehicle satisfies the customer's dominant area. If so, the match is successful and the matching of the customer is stopped. Otherwise, continue to search for the next idle vehicle closest to the customer for matching until all vehicles in the sorted idle vehicle set corresponding to the customer are traversed and the matching is stopped. If the customer fails to match any vehicle, the matching result of the customer is unmatched.
[0156] In this embodiment, for each available vehicle sorted by distance, the nearest customer is calculated to determine whether the available vehicle is within the customer's dominant area. If the available vehicle meets the customer's dominant area requirement, the vehicle is marked as a successful match with the customer and the search stops immediately. If the requirement is not met, the search continues until the next available vehicle closest to the customer is found.
[0157] In summary, the autonomous vehicle sharing simulation model constructed by this invention utilizes a time-event hybrid drive mechanism to optimize event management logic and object creation. This model significantly improves the accuracy and efficiency of the autonomous vehicle sharing simulation by taking into account the dynamic random interactions between vehicles, charging piles, roads, and the network. Furthermore, the autonomous vehicle sharing simulation model is a microscopic simulation. Compared to macroscopic simulations, it can simulate the real-time conditions of various road sections, even the dynamic behavior of individual vehicles and customers, thus improving simulation accuracy.
[0158] To achieve efficient microscopic simulation of large-scale road networks, this invention employs a parallel real-time path planning algorithm and an improved online matching algorithm for people and vehicles. During real-time path planning, preprocessing of the road network significantly improves path query speed, and the integration of parallel computing further optimizes computational efficiency in large-scale scenarios. Online matching further enhances matching rates and efficiency by simulating the real-time interaction and allocation of customers and vehicles in a dynamic traffic environment.
[0159] Example 2:
[0160] In this example, a multi-agent traffic simulation based on travel activity in Berlin was used. This simulation simulates the entire city's traffic conditions during a typical workday. This simulation covers travel modes such as private cars, taxis, public transportation, walking, and bicycles, totaling approximately 1.1 million trips. This multi-agent traffic simulation was simulated using the autonomous vehicle sharing simulation model of the present invention, and the simulation results were compared with those of the Matsim traffic flow simulation.
[0161] The present invention completes a 24-hour traffic simulation in only about one hour. In comparison, the average simulation time for the same scenario using Matsim traffic flow simulation is approximately three hours. Therefore, the autonomous vehicle sharing simulation model designed by the present invention significantly improves computational efficiency compared to other microscopic simulation models, saving at least 66.7% of computational time.
[0162] At the same time, the autonomous driving car sharing simulation model of the present invention has a simulation accuracy of traffic flow at both the macro and micro levels that is closer to the actual data. The high similarity of the simulation results further verifies the high precision and reliability of the autonomous driving car sharing simulation model in microscopic traffic simulation.
[0163] Example 3:
[0164] This embodiment provides a device for simulating sharing of autonomous driving vehicles in a V2G environment, the device comprising:
[0165] An acquisition unit, used to acquire urban road network data and travel data;
[0166] A construction unit is used to construct a model in the context of V2G by using the urban road network data and the travel data, based on the interaction and improved O of demand-responsive travel services. 2 A DES simulation framework is used to obtain a self-driving car sharing simulation model, wherein the self-driving car sharing simulation model is obtained by coupling a road network simulation sub-model and a travel simulation sub-model;
[0167] A planning unit, configured to perform real-time path planning using a real-time path planning algorithm and the autonomous vehicle shared simulation model, and obtain a path planning result based on parallel computing, bidirectional search, and path tracing;
[0168] The matching unit is used to perform online matching between the driver and the vehicle based on the path planning result to obtain a matching result between the autonomous driving vehicle and the customer.
[0169] The planning unit includes:
[0170] an initialization subunit, configured to initialize the time, the forward priority queue, and the reverse priority queue of each node in each trip based on the autonomous vehicle sharing simulation model;
[0171] Add subunit, used to add the starting point to the forward priority queue and the end point to the reverse priority queue;
[0172] A search subunit, configured to perform a bidirectional search on the forward priority queue and the reverse priority queue to obtain the shortest path time for each trip;
[0173] a tracking subunit, configured to perform path tracking based on the shortest path time to obtain a complete shortest path for each trip;
[0174] a calculation subunit, configured to calculate a complete shortest path distance of each trip based on the complete shortest path;
[0175] The output subunit is used to output the complete shortest path corresponding to each trip and the distance of the complete shortest path as the path planning result.
[0176] It should be noted that, regarding the apparatus in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0177] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A simulation method for autonomous driving car sharing in a V2G context, characterized in that: include: Obtain urban road network data and travel data; The model is constructed under the V2G background by using the urban road network data and the travel data, and the interaction and improved O 2 A DES simulation framework is used to obtain a self-driving car sharing simulation model, wherein the self-driving car sharing simulation model is obtained by coupling a road network simulation sub-model and a travel simulation sub-model; Performing real-time path planning using a real-time path planning algorithm and the autonomous vehicle shared simulation model, and obtaining a path planning result based on parallel computing, bidirectional search, and path tracing; Performing online matching between the driver and the vehicle based on the path planning result to obtain a matching result between the autonomous driving vehicle and the customer; The model is constructed in the context of V2G by using the urban road network data and the travel data, and the interaction and improved O 2 The DES simulation framework obtains the autonomous driving car sharing simulation model, including: Acquiring node information, road section information, regional information and road network information based on the urban road network data; Constructing a node module through the node information, constructing a section module through the section information, constructing a region module through the region information, and constructing a road network model through the road network information; Constructing a road network simulation sub-model through the node module, the road section module, the area module and the road network model; acquiring vehicle information, customer information, and charging and discharging station information based on the travel data; Constructing a vehicle module using the vehicle information, constructing a customer module using the customer information, and constructing a charging and discharging station module using the charging and discharging station information; Constructing a travel simulation sub-model through the vehicle module, the customer module and the charging and discharging station module; The road network simulation sub-model and the travel simulation sub-model are coupled to obtain an autonomous driving car sharing simulation model based on a time-event hybrid driving mechanism. The autonomous driving car sharing simulation model adopts an improved O 2 The DES simulation framework optimizes event management logic and object creation process; The autonomous driving car sharing simulation model adopts the improved O 2 The DES simulation framework optimizes event management logic and object creation processes, including: Establishing an event object pool within an entity in the autonomous driving car sharing simulation model, wherein the event object pool is used for reusing and managing events; When booking an event through the autonomous driving car sharing simulation model, if a parent entity currently exists, the event booking logic corresponding to the parent entity is called to pass the event layer by layer until it is delivered to the top-level entity; When retrieving an event through the autonomous driving car sharing simulation model, if a parent entity currently exists, the event retrieval method of the parent entity is called, and the event is retrieved layer by layer until the event is retrieved from the top-level entity.
2. The autonomous driving car sharing simulation method under the V2G background according to claim 1 is characterized in that The real-time path planning algorithm and the autonomous driving car shared simulation model are used to perform real-time path planning, and the path planning results are obtained based on parallel computing, bidirectional search and path tracking, including: Initializing the time, forward priority queue, and reverse priority queue of each node in each trip based on the autonomous vehicle sharing simulation model; Add the starting point to the forward priority queue and the end point to the reverse priority queue; Perform a bidirectional search on the forward priority queue and the reverse priority queue to obtain the shortest path time for each trip; Perform path tracing based on the shortest path time to obtain a complete shortest path for each trip; Calculating the complete shortest path distance of each trip based on the complete shortest path; The complete shortest path corresponding to each trip and the distance of the complete shortest path are taken as the path planning results.
3. The autonomous driving car sharing simulation method under the V2G background according to claim 2 is characterized in that , the bidirectional search of the forward priority queue and the reverse priority queue to obtain the shortest path time for each trip includes: Initialize the first global path time to infinity; Taking out a first node for forward search and taking out a second node for reverse search, wherein the forward search is to expand the adjacent nodes of the first node to obtain a first expanded node, and the reverse search is to expand the adjacent nodes of the second node to obtain a second expanded node, the first node is the node with the shortest forward time in the forward priority queue, and the second node is the node with the shortest reverse time in the reverse priority queue; Obtaining the forward time of the first extended node and the reverse time of the second extended node; Add all the first extended nodes to the forward priority queue, and add all the second extended nodes to the reverse priority queue; Determine whether the same node is accessed during the forward search and the reverse search. If so, treat the same node as the encounter node and stop searching. Otherwise, continue the forward search and the reverse search until all nodes are searched and stop searching. Obtaining the forward time and reverse time of the encounter node; Adding the forward time and the reverse time of the encounter node to obtain the second global shortest path time; Determine whether the second global shortest path time is less than the first global shortest path time. If so, use the second global shortest path as the first shortest path time; otherwise, keep the first global shortest path time unchanged. If both the forward priority queue and the reverse priority queue are empty or meet the shortest path condition, the first shortest path time is used as the shortest path time. Otherwise, the next forward search and reverse search are performed, wherein the shortest path condition is that the first global shortest path time of two adjacent iterations is the same.
4. The autonomous driving car sharing simulation method under the V2G background according to claim 3 is characterized in that ,The path tracing based on the shortest path time to obtain the complete shortest path for each trip includes: Initialize a first path and a second path for each trip; Obtain the shortest forward time and the shortest reverse time of each node through the shortest path time; Start forward path tracing from the starting point. For the current node, check its adjacent nodes and determine whether the shortest forward time of the current node is equal to the shortest forward time of the adjacent node minus the time from the current node to the adjacent node. If so, add the edge formed by the current node and the adjacent node to the first path. Otherwise, continue tracing. Start tracing the reverse path from the end point. For the current node, check its adjacent nodes to determine whether the shortest reverse time of the current node is equal to the shortest reverse time of the adjacent node minus the time from the current node to the adjacent node. If so, add the edge formed by the current node and the adjacent node to the second path. Otherwise, continue tracing. When the forward path tracing and the reverse path tracing reach the same node, the tracing is stopped; The second path is reversed and then merged with the first path, and the same nodes are removed to obtain the complete shortest path for each trip.
5. The autonomous driving car sharing simulation method under the V2G background according to claim 1 is characterized in that The online matching of the person and the vehicle based on the path planning result to obtain the matching result between the autonomous driving vehicle and the customer includes: Get all customers who need to be matched and all idle vehicles in the self-driving car at the current moment; Calculating the estimated time it takes for the vehicle to pick up the customer, the amount of electricity consumed to complete the customer's trip, and the distance between the vehicle and the customer based on the route planning result; Calculating the total pick-up time by the estimated time it takes for the vehicle to pick up the customer, and using the total pick-up time as the objective function; A first constraint condition is set based on the amount of electricity consumed to complete the customer's trip, and a second constraint condition is set that the Euclidean distance between the vehicle and the customer is less than a preset matching radius; For each customer, query all idle vehicles within the customer's preset matching radius using the second constraint condition to obtain the customer's first idle vehicle set; Obtaining idle vehicles that meet the travel needs of each customer from the first idle vehicle set according to the second constraint condition to obtain a second idle vehicle set for the customer; sorting the idle vehicles in the second idle vehicle set according to the distances from the customers to obtain a sorted idle vehicle set; Based on the sorted idle vehicle set, a person-vehicle matching is performed, with the goal of satisfying the first constraint condition and the second constraint condition and minimizing the objective function to obtain a matching result between the autonomous driving vehicle and the customer at the current moment.
6. The autonomous driving car sharing simulation method under the V2G background according to claim 5 is characterized in that ,The steps of matching people and vehicles are as follows: Calculate the customer closest to each idle vehicle in each of the sorted idle vehicle sets, and determine whether the idle vehicle satisfies the customer's dominant area. If so, the match is successful and the matching of the customer is stopped. Otherwise, continue to search for the next idle vehicle closest to the customer for matching until all vehicles in the sorted idle vehicle set corresponding to the customer are traversed and the matching is stopped. If the customer fails to match any vehicle, the matching result of the customer is unmatched.
7. A self-driving car sharing simulation device under the V2G background, characterized in that: include: An acquisition unit, used to acquire urban road network data and travel data; A construction unit is used to construct a model in the context of V2G by using the urban road network data and the travel data, based on the interaction and improved O of demand-responsive travel services. 2 A DES simulation framework is used to obtain a self-driving car sharing simulation model, wherein the self-driving car sharing simulation model is obtained by coupling a road network simulation sub-model and a travel simulation sub-model; A planning unit, configured to perform real-time path planning using a real-time path planning algorithm and the autonomous vehicle shared simulation model, and obtain a path planning result based on parallel computing, bidirectional search, and path tracing; A matching unit, configured to perform online matching between a person and a vehicle based on the path planning result, and obtain a matching result between the autonomous driving vehicle and the customer; The model is constructed in the context of V2G by using the urban road network data and the travel data, and the interaction and improved O 2 The DES simulation framework obtains the autonomous driving car sharing simulation model, including: Acquiring node information, road section information, regional information and road network information based on the urban road network data; Constructing a node module through the node information, constructing a section module through the section information, constructing a region module through the region information, and constructing a road network model through the road network information; Constructing a road network simulation sub-model through the node module, the road section module, the area module and the road network model; acquiring vehicle information, customer information, and charging and discharging station information based on the travel data; Constructing a vehicle module using the vehicle information, constructing a customer module using the customer information, and constructing a charging and discharging station module using the charging and discharging station information; Constructing a travel simulation sub-model through the vehicle module, the customer module and the charging and discharging station module; The road network simulation sub-model and the travel simulation sub-model are coupled to obtain an autonomous driving car sharing simulation model based on a time-event hybrid driving mechanism. The autonomous driving car sharing simulation model adopts an improved O 2 The DES simulation framework optimizes event management logic and object creation process; The autonomous driving car sharing simulation model adopts the improved O 2 The DES simulation framework optimizes event management logic and object creation processes, including: Establishing an event object pool within an entity in the autonomous driving car sharing simulation model, wherein the event object pool is used for reusing and managing events; When booking an event through the autonomous driving car sharing simulation model, if a parent entity currently exists, the event booking logic corresponding to the parent entity is called to pass the event layer by layer until it is delivered to the top-level entity; When retrieving an event through the autonomous driving car sharing simulation model, if a parent entity currently exists, the event retrieval method of the parent entity is called, and the event is retrieved layer by layer until the event is retrieved from the top-level entity.
8. The V2G autonomous driving car sharing simulation device according to claim 7, characterized in that: The planning unit includes: an initialization subunit, configured to initialize the time, the forward priority queue, and the reverse priority queue of each node in each trip based on the autonomous vehicle sharing simulation model; Add subunit, used to add the starting point to the forward priority queue and the end point to the reverse priority queue; A search subunit, configured to perform a bidirectional search on the forward priority queue and the reverse priority queue to obtain the shortest path time for each trip; a tracking subunit, configured to perform path tracking based on the shortest path time to obtain a complete shortest path for each trip; a calculation subunit, configured to calculate a complete shortest path distance of each trip based on the complete shortest path; The output subunit is used to output the complete shortest path corresponding to each trip and the distance of the complete shortest path as the path planning result.
Citation Information
Patent Citations
Electric vehicle charging station planning method combined with real-time traffic road network
CN115292866A
Shared automatic electric vehicle system analysis method based on optimization and simulation
CN118037147A
