Smart city-oriented large-scale ride-sharing scheduling method and system
By adopting improved genetic algorithms and dynamic insertion algorithms in smart cities, the problems of low service quality and low matching efficiency in the ride-sharing travel mode are solved, more efficient passenger demand matching and path planning are achieved, and travel service quality and system efficiency are improved.
Patent Information
- Application Number
- CN202510031476.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-06
AI Technical Summary
The existing ride-sharing travel model has problems such as low service quality, low matching efficiency, and inability to meet personalized travel needs. Especially in smart cities, traditional matching scheduling systems cannot effectively dispatch ride-sharing routes for driverless vehicles.
A large-scale ride-sharing scheduling method for smart cities is adopted. By obtaining users' ride-sharing needs, a ride-sharing path optimization model is designed, and a modified genetic algorithm is used for static scheduling and dynamic insertion algorithm are used for dynamic scheduling to ensure the matching of passenger needs and path planning.
It improves the satisfaction of passengers' personalized travel needs, reduces travel costs and system maintenance costs, improves the quality of ride-sharing travel services, and realizes real-time monitoring and optimization through digital twin platforms and communication systems.
Smart Images

Figure CN119940830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle networking technology, and particularly to a large-scale ridesharing scheduling method and system for smart cities. Background Art
[0002] With the rapid development of connected driverless vehicles and the Internet economy, the "ride-sharing" travel mode combined with the vehicle dispatch system has attracted widespread attention and research in the fields of smart transportation and green travel.
[0003] As an emerging technology, Internet of Vehicles technology realizes all-round connection between vehicles and surrounding vehicles, people, transportation infrastructure and the cloud, and provides efficient and accurate information communication, making the function of providing traditional transportation services to users transform into intelligent one that provides comprehensive transportation information to users, which can greatly reduce traffic accidents, improve traffic efficiency and road utilization, and is the future development trend. The rise of Internet of Vehicles technology promotes the development of ride-sharing mechanism. In the face of the growth of global motorization, the concept of sustainable development reminds people to use motor vehicles wisely. Improving the utilization rate of private cars through ride-sharing can greatly promote the improvement of urban transportation. Ride-sharing can improve the efficiency of urban transportation systems, reduce traffic congestion, fuel consumption and pollution, etc. Moreover, ride-sharing can reduce expenses for participants by sharing costs. With the development of wireless communication technology and smart phones in recent years, the ride-sharing model will be greatly developed under the promotion of governments and companies. However, there are many problems in ride-sharing at this stage, which leads to low service quality and cannot be popularized. For example, the ride-sharing business of travel apps can only respond in real time, and cannot guarantee the success rate of ride-sharing for booking travel; in the ride-sharing business, the route nodes and travel time of passengers need to be highly matched with the driver to achieve ride-sharing. However, cities currently mostly use the traditional shuttle bus transportation mechanism with a small number of station nodes, fixed routes, and fixed departure times, which cannot meet personalized travel needs.
[0004] At the same time, the application of driverless technology enables real-time communication and collaboration between vehicles, achieving more efficient traffic flow and greatly improving traffic efficiency. At Didi's Autonomous Driving Open Day this year, the first autonomous driving automatic operation and maintenance center and the first autonomous driving concept car were released. Didi's plan to mass-produce autonomous driving online car-hailing vehicles has surfaced, but due to the current carpooling matching mechanism, the quality of its driverless carpooling online car-hailing services faces huge challenges. Therefore, it is necessary to achieve the matching and scheduling of scheduled travel and real-time travel needs through carpooling matching and route planning in smart cities, improve vehicle utilization, save waiting time, accurately predict and optimize the scheduling and carpooling routes of driverless vehicles, and fully meet personalized travel needs while minimizing travel costs and improving the quality of carpooling travel services. Summary of the invention
[0005] Purpose of the invention: In view of the development status of the above-mentioned shared ride mode and the existing problems such as low efficiency of traditional matching dispatching and inability to ensure dispatching safety, the purpose of the present invention is to realize smart city networked shared ride dispatching, solve many problems existing in traditional dispatching, improve traffic efficiency, and further build a digital twin platform and communication system to verify the invention.
[0006] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:
[0007] In a first aspect, the present invention provides a large-scale ridesharing scheduling method for a smart city, comprising the following steps:
[0008] Obtain ridesharing requirements posted by users;
[0009] For the user's scheduled itinerary, a carpooling route optimization model is designed, and the passenger's scheduled itinerary is statically scheduled based on an improved genetic algorithm; the carpooling route optimization model aims to minimize the passenger waiting time cost and the system mileage operating cost, and the constraints include: ensuring that each passenger can be served and served by one vehicle; on the vehicle route, each passenger arrives at the boarding point first and then the alighting point; and at each node on the route of each vehicle, the number of passengers on the vehicle is less than the vehicle capacity; in the improved genetic algorithm, the chromosome is encoded as an integer string, and its length depends on the number of vehicles and passengers; each string is composed of multiple substrings, each substring is a gene sequence, representing the total route of one of the vehicles from the starting point to the end of the journey; in the crossover operation of the improved genetic algorithm, the offspring inherits a certain section of the path of a parent as the beginning, and the other parts inherit the node order of another parent, and the fitness is converged by multiple insertions and taking the minimum.
[0010] Furthermore, the optimization objectives and constraints of the ridesharing route optimization model are expressed as:
[0011] maxΓ
[0012] Γ=QoS total -VMT
[0013]
[0014] Among them, the overall service quality QoS of all travel needs of the system total =∑QoS n , passenger travel demand r n QoS n =cost n -timecost n , cost n For demand n Payment fee, time costn For demand n Time cost; system mileage operating cost η is the cost per unit operating mileage, vehicle v m Operational mileage in the planned route; a n To express the demand r n The parameter of whether it is served, if it is served, it is 1, otherwise it is 0; N m For vehicle v m The number of orders served, where N is the total number of orders; For vehicle v m Assigned travel needs At node N i The number of passengers on the variable parameter, Cap m Vehicle m The maximum passenger capacity of route m For vehicle v m The path is the order of the passenger nodes, q n For demand n Number of people reported traveling, N i is the vehicle path node, P m Gather at the boarding point for travel needs, D m Get off point for travel needs, e n For demand n The earliest departure time, δ is the demand r n The maximum tolerable waiting time, For demand n The actual time of the ride, For demand n The actual time of getting off the bus, n For demand n The latest arrival time for your appointment.
[0015] Furthermore, the improved genetic algorithm adopts a random insertion encoding method: first, the boarding points are randomly arranged; then, 0 is randomly inserted to represent the vehicle, where the first number is 0, and every two 0s cannot be adjacent; the corresponding passenger's alighting point is inserted into each vehicle path starting with 0, ensuring that the alighting point is arranged after the corresponding boarding point;
[0016] The crossover operation process in the improved genetic algorithm is as follows: select parent generation 1 and parent generation 2; randomly select a vehicle path from parent generation 1 as the beginning of the offspring; arrange the remaining boarding points in the order of parent generation 2 and randomly insert 0 to interrupt; randomly insert the remaining alighting points into each path in the order of parent generation 2 to ensure that the alighting point of the same passenger is after the boarding point; after randomly inserting a preset number of times, select the individual with the smallest fitness as the offspring;
[0017] Furthermore, the modified genetic algorithm adopts a mutation operation of random two-point mutation: in the parent chromosome, two boarding point genes and corresponding alighting point genes are randomly selected for exchange respectively to ensure order constraints; the remaining genes of the daughter chromosome are inherited from the parent chromosome.
[0018] Furthermore, the fitness function of the improved genetic algorithm is expressed as:
[0019] fitness=η·VMT+c 1 ·timePenalty+c 2 ·capPenalty
[0020] Among them, VMT is the system mileage operating cost, Time penalty, timecost n For demand n The time cost, is the capacity penalty, Q m,s represents the capacity penalty of vehicle m at the sth node on its driving path, which is equal to the difference between the sum of the number of passengers getting on and off at the first s nodes on its driving path and the maximum total number; η and c 1 、c 2 They are the coefficients of mileage, time penalty, and capacity penalty. Capacity overload is not allowed and its coefficient should be set to the maximum.
[0021] Furthermore, a large-scale ridesharing scheduling method for smart cities also includes:
[0022] In response to users' real-time order needs, a real-time optimal insertion algorithm for existing routes is used to perform dynamic ridesharing scheduling, including:
[0023] Traverse each vehicle path, which is an arrangement of the boarding and alighting points of each passenger: obtain the next passenger node that the vehicle is about to arrive at; insert the real-time passenger boarding point in all positions after the node; insert the real-time passenger alighting point in all positions after the inserted boarding point; calculate the fitness of the new vehicle path after inserting the real-time passenger boarding and alighting points;
[0024] The vehicle path with the minimum fitness is obtained as the new vehicle path after inserting the real-time order.
[0025] In a second aspect, the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the large-scale ridesharing scheduling method for smart cities.
[0026] In a third aspect, the present invention provides a large-scale ride-sharing dispatching system for smart cities, comprising:
[0027] User terminal, used for users to publish ride requirements;
[0028] A cloud dispatch center is used to implement the large-scale ride-sharing dispatch method for smart cities; real-time monitoring and analysis of road network information, passenger demand, vehicle location and passenger status within the city, and assigning orders and planning routes for city vehicles through ride-sharing;
[0029] The vehicle terminal is used to obtain the dispatch planning results from the cloud dispatch center, pick up and drop off passengers at the specified nodes, and upload the vehicle's coordinates and passenger status to the cloud dispatch center in real time.
[0030] Furthermore, a large-scale ridesharing dispatch system for smart cities also includes a digital twin platform, which is used to obtain real-time vehicle status information from a cloud dispatch center and to digitally present, display and monitor the real-time status of the city, vehicles and passengers.
[0031] Furthermore, the digital twin platform is also used to simulate different scheduling schemes, predict the results of different decisions, evaluate system performance, and make corresponding optimization adjustments.
[0032] Beneficial effects: Compared with the prior art, the large-scale ridesharing scheduling method for smart cities proposed by the present invention combines scheduled itineraries with real-time itineraries, which can better meet the personalized travel needs of passengers; and through ridesharing, the cost of user travel and the cost of system maintenance can be greatly reduced. Among them, for scheduled itineraries, the improved genetic algorithm proposed in the present invention can achieve faster convergence through innovative encoding, crossover and mutation methods, and avoid falling into local optimality, obtain a satisfactory solution, and provide passengers with higher service quality. The large-scale ridesharing scheduling system for smart cities proposed by the present invention has built a front-end and back-end scheduling and communication system of passenger nodes, vehicle nodes, cloud background and digital twin platform, which can achieve low-latency and high-reliability stable communication transmission, and use digital twins to assist in decision-making and monitoring to ensure the reliability of system operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a schematic diagram of urban area division adopted in an embodiment of the present invention.
[0034] Figure 2 It is a schematic diagram of the architecture of the ride-sharing dispatching system according to an embodiment of the present invention.
[0035] Figure 3 It is a schematic diagram of the communication transmission structure adopted by the ride-sharing dispatching system constructed according to an embodiment of the present invention.
[0036] Figure 4 It is a logic block diagram of the static ridesharing scheduling algorithm adopted in the embodiment of the present invention.
[0037] Figure 5 This is an example diagram of the cross-operation of the static ridesharing scheduling algorithm adopted in an embodiment of the present invention.
[0038] Figure 6 This is an example diagram of the variation operation of the static ridesharing scheduling algorithm adopted in the embodiment of the present invention.
[0039] Figure 7 It is a logic block diagram of the dynamic ridesharing scheduling algorithm adopted in the embodiment of the present invention.
[0040] Figure 8 It is a schematic diagram of the operation of the digital twin platform built in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0042] A large-scale ridesharing scheduling method for smart cities disclosed in an embodiment of the present invention first obtains ridesharing demands posted by users, where the ridesharing demands include information such as departure location, destination, and travel time. The ridesharing demands can be immediate or scheduled, and users can choose to publish corresponding demand types; then, for the user's scheduled itinerary, a ridesharing path optimization model is designed, and static scheduling of the passenger's scheduled itinerary is performed based on a modified genetic algorithm.
[0043] In this embodiment, the ride-sharing route optimization model aims to minimize the passenger waiting time cost and system mileage operating cost, and the constraints include: ensuring that each passenger can be served and served by one vehicle; on the vehicle route, each passenger arrives at the boarding point before arriving at the alighting point; and at each node on the route of each vehicle, the number of passengers on the vehicle is less than the vehicle capacity. In the improved genetic algorithm, the chromosome is encoded as an integer string, the length of which depends on the number of vehicles and passengers; each string is composed of multiple substrings, each substring is a gene sequence, representing the total route of one of the vehicles from the starting point to the end of the journey; in the crossover operation of the improved genetic algorithm, the offspring inherits a certain section of the path of one parent as the beginning, and the rest inherits the node order of another parent, and the fitness is converged by multiple insertions and taking the minimum.
[0044] In the specific implementation, the improved genetic algorithm adopts a random insertion encoding method: first randomly arrange the boarding points; then randomly insert 0 to represent the vehicle, where the beginning is 0, and every two 0s cannot be adjacent; insert the corresponding passenger's alighting point in each vehicle path starting with 0, ensuring that the alighting point is arranged after the corresponding boarding point. The crossover operation process in the improved genetic algorithm is: select parent 1 and parent 2; randomly select a vehicle path in parent 1 as the beginning of the child; the remaining boarding points are arranged in the order of parent 2, and randomly inserted with 0 to interrupt; the remaining alighting points are randomly inserted into each path according to the order in parent 2, ensuring that the same passenger's alighting point is after the boarding point; after randomly inserting a preset number of times, select the individual with the smallest fitness as the child. The improved genetic algorithm adopts a random two-point mutation mutation operation: in the parent chromosome, randomly select the genes of the two boarding points and the corresponding alighting point genes to exchange them respectively to ensure the order constraint; the remaining genes of the child chromosome are inherited from the parent chromosome. The fitness function of the improved genetic algorithm is set according to the optimization goal of the carpooling path optimization model.
[0045] Furthermore, in some embodiments, after static scheduling of the user's scheduled trip, dynamic ridesharing scheduling is also performed for the user's real-time order needs by using a real-time optimal insertion algorithm for existing paths. Specifically, dynamic ridesharing scheduling includes: traversing each vehicle path, which is an arrangement of the boarding and alighting points of each passenger: obtaining the next passenger node that the vehicle is about to arrive at; inserting the real-time passenger boarding point in all positions after the node in sequence; inserting the real-time passenger alighting point in all positions after the inserted boarding point in sequence; calculating the fitness of the new vehicle path after inserting the real-time passenger boarding and alighting points; obtaining the vehicle path with the minimum fitness as the new vehicle path after inserting the real-time order.
[0046] An embodiment of the present invention also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the large-scale ride-sharing scheduling method for smart cities.
[0047] The embodiment of the present invention also discloses a large-scale ride-sharing dispatching system for smart cities, including: a user terminal, for users to publish ride demands; a cloud dispatching center, for implementing the large-scale ride-sharing dispatching method for smart cities; real-time monitoring and analysis of road network information, passenger demands, vehicle locations and passenger status within the city, assigning orders and planning routes for urban vehicles in a ride-sharing manner; a vehicle terminal, for obtaining dispatching planning results from the cloud dispatching center, picking up and dropping off passengers at specified nodes, and uploading the vehicle's coordinates and passenger status to the cloud dispatching center in real time.
[0048] Furthermore, the system also includes a digital twin platform, which is used to obtain real-time vehicle status information from the cloud dispatch center, and to present, display and monitor the real-time status of the city, vehicles and passengers in a digital twin manner. The digital twin platform can also be used to simulate different dispatching schemes, predict the results of different decisions, evaluate system performance, and make corresponding optimization adjustments.
[0049] The following is an exemplary description of a large-scale ridesharing scheduling method for smart cities described in the present invention in combination with specific urban scenarios and verification environments. In this embodiment, the urban vehicle ridesharing scheduling algorithm based on the improved genetic algorithm and dynamic insertion algorithm and the Web-side digital twin platform perform ridesharing scheduling for the travel needs of the smart city through data interaction between the user-side applet, the prototype communication system and the background program, and present the real-time status of the city, vehicles and passengers in a digital twin. The detailed implementation steps are as follows:
[0050] Step S1. Based on the distribution pattern of the starting and ending points of the city orders, the city is divided into multiple areas. For example, there will be multiple centers in the city. Most of the city short-distance orders are initiated around these centers. Multiple city ride-sharing dispatching areas are delineated by these centers, and each area is independently operated by unmanned traffic dispatching. The division method of each city area is different, and the present invention is not limited. Orders with starting and ending points within the divided area are operated by several designated vehicles in the area to carry passengers, and the dispatching algorithm proposed by the present invention is run in each area; cross-regional orders are operated by other vehicles to carry passengers, and the dispatching algorithm proposed by the present invention is also used. The regional dispatching method can greatly reduce the complexity of matching and improve the efficiency of large-scale urban ride-sharing dispatching.
[0051] Step S2: Users publish ride requests by building a user node applet based on the uni-app front-end framework. When publishing a ride-sharing request, users need to fill in information such as the departure location, destination, and travel time. The ride-sharing request can be immediate or scheduled, and users can choose to publish the corresponding demand type. After successful publication, the user's ride-sharing request will be uploaded to the cloud service space; the applet can be published on multiple platforms such as Android, Web, various applet programs, and quick applications.
[0052] Step S3, the cloud dispatch center can monitor and analyze the road network information, passenger demand, vehicle location, passenger status and other data in the city in real time through the aforementioned self-developed vehicle dispatch algorithm and digital twin technology, assign orders to urban vehicles through carpooling, plan routes, statically dispatch passengers' scheduled itineraries through improved genetic algorithms, and dynamically insert algorithms to dynamically dispatch carpooling according to the real-time travel needs of urban passengers.
[0053] Step S4: The cloud dispatch center sends the dispatch planning results to the simulated vehicle nodes equipped with communication modules through the cloud IoT platform. The vehicle nodes execute the dispatch instructions, pick up and drop off passengers at the specified nodes, and upload the simulated coordinates and passenger status of the vehicle to the cloud IoT platform in real time and return them to the cloud dispatch center for continued dispatch.
[0054] Step S5: The cloud dispatch center transmits the real-time status information of the vehicle to the digital twin platform, and presents, displays and monitors the real-time status of the city, vehicles and passengers in a digital twin manner.
[0055] This embodiment divides the city into multiple areas according to the distribution rules of the starting and ending points of historical orders. Figure 1 The two regions are divided according to the distribution of the starting and ending points of the orders in the urban area center. The orders within each region and the orders across regions are served by three designated fleets respectively. The scheduling method and system design are described as follows.
[0056] This embodiment adopts Figure 2 The multi-layer structure of the overall control layer, transmission layer, perception layer and cloud is as follows: the overall control layer calls the intelligent carpooling vehicle scheduling algorithm; the transmission layer adopts Quectel combined with Huawei Cloud for communication, and establishes a communication connection within the overall control layer through the websocket protocol; the perception layer simulates the smart city, car nodes and user-side ride applets. Users first need to register in the system and provide the necessary personal information. After registration, users can log in to the system using the provided credentials. When publishing a carpooling demand, users need to fill in information such as the departure point, destination, and travel time. The carpooling demand can be immediate or scheduled, and users can choose to publish the corresponding demand type. After successful publication, the user's carpooling demand will be uploaded to the uniCloud cloud service space, and the computing platform will perform path planning through the intelligent carpooling scheduling algorithm designed by the present invention to ensure that the interests and needs of all parties in the carpooling process are fully considered. When the best path is generated, the command will be sent to the car through Fibocom and Huawei Cloud. At the same time, the digital twin platform will establish a communication connection with the computing platform through the websocket protocol, so as to render the digital twin model in real time according to the periodic real-time vehicle information transmitted from the cloud, render the real-time traffic conditions in the city on the web map page, and intuitively display the traffic status inside the smart city in the form of charts and timelines, so as to intuitively monitor and analyze the traffic conditions in the city. Therefore, the embodiment of the present invention realizes the intelligent scheduling of the smart city networked unmanned driving ride-sharing system.
[0057] like Figure 3As shown in the figure, users can submit their ridesharing needs through the mini program, including departure location, destination, travel time and other information, so that the system can make scheduling arrangements. The mini program uploads the scheduled demand or real-time demand data to the serverless service space in the cloud. This method provides an efficient and convenient data transmission channel for the smart city ridesharing system. The scheduled demand and real-time demand data uploaded to the cloud are processed and stored in the serverless service space, providing the dispatch center with real-time passenger demand information. The dispatch center can monitor and analyze this data in real time, and provide passengers with the best ridesharing solution in combination with the real-time status of the smart city, including vehicle location, road congestion and other real-time data.
[0058] The dispatch center uses the ride-sharing dispatch algorithm to conduct a comprehensive analysis and optimization calculation of user needs and the real-time status of the city. The ride-sharing dispatch algorithm takes into account the passengers' departure place, destination, time window and other constraints, and combines information such as the real-time location and driving speed of the vehicle to calculate the best ride-sharing task allocation plan through mathematical modeling and optimization algorithms. These plans include the driving route, departure time and expected arrival time of each vehicle. Through the optimization of the ride-sharing dispatch algorithm, the vehicle's mileage and overall travel time can be minimized, and the utilization rate of vehicles in the city and the travel efficiency of passengers can be improved.
[0059] The dispatch center uses the communication and data processing capabilities of Huawei Cloud to send optimized ridesharing tasks to the car devices in the city. After receiving the task, each vehicle will go to the passenger boarding point according to the assigned route and departure time at the specified speed and order. After the passengers get on the car, the vehicle will take the passengers to their respective destinations in turn according to the pre-planned route. At the same time, the car device transmits its real-time status to the dispatch center through Huawei Cloud. These real-time status include the current location of the car, the number of passengers, the mileage, the remaining battery life, and the passengers getting on and off the car. Through the communication interface and data transmission protocol provided by Huawei Cloud, the car can promptly feedback this key information to the dispatch center. After receiving the real-time status of the car, the dispatch center can monitor and analyze the operation of the vehicle in real time. The location information can help the dispatch center understand the current location and driving trajectory of the vehicle, so as to better assign tasks and plan routes. The feedback on the number of passengers and the passengers getting on and off the car can help the dispatch center understand the passenger situation of the vehicle and make timely dispatch adjustments and resource optimization. Data such as mileage traveled and remaining battery life help the dispatch center to manage power and plan charging, ensuring that the vehicle can operate normally and provide services.
[0060] With Huawei Cloud as the intermediate platform, a stable communication channel is established between the dispatch center and the car, realizing the transmission and feedback of real-time data. This two-way communication mechanism enables the dispatch center to obtain the status information of the vehicle in a timely manner and make corresponding dispatch decisions based on the real-time situation. At the same time, the car equipment can also receive the latest tasks issued by the dispatch center and perform corresponding operations according to the requirements. This mechanism ensures that the dispatch center can understand the operation of the vehicle in a timely manner so as to make corresponding dispatch arrangements and optimize decisions, and improve the efficiency and service quality of the ride-sharing system.
[0061] The cloud dispatch center establishes a connection with the front-end digital twin platform through the WebSocket protocol, realizing real-time data transmission and interaction. The WebSocket protocol is a full-duplex communication protocol that allows a persistent connection between the client and the server and supports two-way communication. Through the WebSocket protocol, the dispatch center can transmit real-time data such as the vehicle's location information, passenger load, driving speed, and power status to the digital twin platform. These data will be used by the digital twin platform to build a running status model of vehicles in the city and realize real-time monitoring and display of system operation. The digital twin platform is an interactive web application built on the vue.js front-end framework and the WebGL framework three-dimensional engine. By combining real-time data with preset models, the digital twin platform can display vehicle information and traffic conditions in the city in real time. This real-time digital twin display allows the dispatch center to intuitively understand the actual operation of the vehicle, so as to make more accurate dispatch decisions.
[0062] In addition, the digital twin platform can also monitor the operating status of vehicles in the city and optimize system operation. Through digital twin technology, the dispatch center can simulate different dispatch plans, predict the results of different decisions, evaluate system performance, and make corresponding optimization adjustments. This digital twin optimization capability enables the dispatch center to better manage the operation of vehicles in the city and improve the efficiency and service quality of the ride-sharing system. This combination of WebSocket and digital twins provides real-time data display and system optimization capabilities for the smart city ride-sharing system.
[0063] The prototype communication hardware simulation system consists of vehicle nodes. The car exchanges data with Huawei Cloud, and the dispatch center coordinates and calculates the overall demand and plans the best route. The present invention also builds a complete digital twin platform for viewing overall road condition information, processing vehicle data, and monitoring emergencies.
[0064] The STM32 used in the car node is mainly used to complete the realization of the car node communication function driver, by using Fibocom L610 to receive information from the cloud and send vehicle information to the cloud. This part is used to simulate the underlying hardware system of a truly unmanned vehicle.
[0065] The Fibocom L610 communication module is mainly used to communicate with Huawei Cloud, receiving path instructions and special situation handling instructions from the dispatch center from the cloud, and sending road condition information, location status, etc. to the cloud. This part is mainly used for the communication hardware system between smart city unmanned shuttle buses and cloud nodes.
[0066] For the reservation orders uploaded by passengers, Figure 4 The improved genetic algorithm shown in the figure is used for ride-sharing matching. The embodiment of the present invention marks 24 boarding and alighting nodes based on the map of Nanjing University Xianlin Campus, and develops a customized applet based on the uni-app front-end framework and uniCloud cloud service space for passengers to initiate reservation orders or real-time orders, and can upload itinerary information such as departure place, destination, departure time, arrival time, number of passengers, etc. Its mathematical model contains the following assumptions:
[0067] 1. All passengers get on and off the bus at the designated nodes on the map and arrive at the boarding point on time according to the scheduled time;
[0068] 2. All intersections allow U-turns, all roads are two-way lanes, there are no one-way streets, and there is no situation in the mathematical model where you have to go around in circles to reach your destination;
[0069] 3. The speed of the shared vehicles is kept constant, and the travel time between nodes is the node distance divided by the speed v. The time to pass the intersection is negligible;
[0070] 4. The time taken for passengers to get on and off the bus is the same and remains unchanged. If there is a boarding and alighting time at a route node, the time taken is only calculated once;
[0071] 5. Without considering traffic congestion, all path planning is based on the minimum Dijkstra distance, and the system's operating cost only considers the vehicle driving cost.
[0072] The first step is to store and initialize the map. The map contains the following information about nodes and edges:
[0073]
[0074] The number of nodes contained in it is total, so the node set is:
[0075]
[0076] From this we can get the undirected graph adjacency matrix:
[0077]
[0078] in
[0079] Inputting the undirected graph adjacency matrix into the Dijkstra algorithm can obtain the shortest distance matrix and the intermediate node matrix:
[0080]
[0081]
[0082] in
[0083] The shortest travel time matrix can be obtained by dividing the shortest distance matrix by the vehicle speed:
[0084]
[0085] Assume that the vehicle set is The requirement set is Where M is the total number of vehicles and N is the total demand; the demand can be described as follows:
[0086] r n :[O n ,D n ,e n ,e n +δ,l n ,q n ]
[0087] Among them [O n ,D n ]: The departure node and the destination node can be labeled with node number N i indicates; [e n ,e n +δ]: departure time window, e n is the scheduled / real-time departure time, δ is the maximum tolerable waiting time; l n The latest arrival time for the passenger to book travel needs; n : The number of passengers who initiate travel demands;
[0088] Vehicle m The set of boarding points for the assigned travel demand: P m ,Vehicle m The set of drop-off points for the assigned travel demand: D m For any vehicle ν m , and their assigned travel needs The present invention is defined as follows:
[0089]
[0090] Indicates vehicle v m Assigned travel needs At node N iThe number of passengers on the platform changes, and the demand r n The pick up time window for booking is [e n ,e n +δ], demand r n The latest drop off time for reservation is l n , demand r n The actual pick up time is Demand n The actual drop off time is Then initiate the demand r n The waiting time for passengers to board the bus is Initiate a demand n The default time for passengers to get off is
[0091]
[0092] For travel needs n :[O n ,D n ,e n ,e n +δ,l n ,q n ]: its origin and destination [O n ,D n ]The corresponding nodes are N i and N j , then the passenger payment should be calculated based on the shortest Dijkstra distance between two nodes, and ρ is used to represent the fee per km. Then the demand r n The payment should be expressed as cost n =ρ·D i,j .
[0093] If the passenger does not get on or off the bus at the scheduled time, the passenger will have to pay a certain amount of time cost due to breach of contract. represents the time cost per minute, then the demand r n The time cost should be expressed as
[0094]
[0095] In summary, passenger travel demand n The service level QoS can be described as follows
[0096] QoS n =cost n -timecost n
[0097] The overall service quality of all travel demands in the system is
[0098]
[0099] Using VMT m Indicates vehicle ν m In the route planning, the operating mileage is expressed as η, which represents the cost per unit operating mileage. Then the system operating cost can be described as
[0100]
[0101] The overall objective function is expressed as the sum of the two:
[0102] Γ=QoS total -VMT
[0103] Description of the constraints of the ride-sharing system:
[0104] ① Service constraint: Ensure that all travel needs are served and only one vehicle receives and serves them
[0105]
[0106] a n To express the demand r n The parameter of whether it is served, if it is served, it is 1, otherwise it is 0; N m For vehicle m The number of service order requirements, N is the total number of service order requirements;
[0107] ②Node order constraint: The vehicle must first reach the starting point and then the destination. For any travel demand r n ,
[0108]
[0109] ③Vehicle capacity constraint: The vehicle is at any node N in the route planning. s No overload is allowed at any location. For any vehicle v m and its assigned needs Should meet:
[0110]
[0111] Cap m Vehicle m The maximum passenger capacity of route m Vehicle m The path is the order of the passenger boarding and alighting nodes.
[0112] ④Soft time window constraint: The vehicle should arrive at the starting point within the departure time window as much as possible and arrive at the destination within the latest arrival time.
[0113]
[0114] The overall objective function and constraints can be described as follows:
[0115] maxΓ
[0116] Γ=QoS total -VMT
[0117]
[0118] The objective function aims to minimize the passenger waiting time cost and system mileage operating cost. The three hard constraints and one soft constraint are:
[0119] 1) Ensure that every passenger can be served and served by one vehicle;
[0120] 2) On the vehicle route, each passenger arrives at the boarding point first and then the alighting point;
[0121] 3) And at each node on the route of each vehicle, the number of passengers on the vehicle is less than the vehicle capacity.
[0122] The soft constraint is a time constraint, and the time exceeded has been calculated into the objective function as a penalty function.
[0123] Coding: The total vehicle route is encoded using integer coding. A chromosome is a feasible solution, and the chromosome is encoded as an integer string, whose length depends on the number of vehicles and passengers. Each string consists of several substrings, and each substring is a gene sequence, which represents the total route of one of the vehicles from the terminal to the end of the journey. Chromosomes are randomly generated. For example, there are 10 groups of passengers and 4 online-hailing cars. 1-10 are the boarding points of the 10 groups of passengers, and 11-20 correspond to the passenger alighting points, and they correspond one-to-one with the boarding points. Among them, the 0 gene represents a mark to distinguish vehicles, representing the route of a vehicle, and its number is equal to the number of vehicles. The order constraint problem must be considered in the encoding process, that is, the alighting point of each passenger must be after the boarding point, so an innovative random insertion encoding method is proposed here:
[0124] First, randomly arrange the boarding points, for example: 3-9-5-4-2-10-6-1-8-7;
[0125] Then randomly insert 0 to represent vehicles, with the first 0 and no two 0s adjacent to each other, for example: 0-3-9-5-0-4-2-10-0-6-1-0-8-7;
[0126] Insert the corresponding passenger's alighting point into each vehicle path starting with 0, but make sure that the alighting point is after the corresponding boarding point, for example, 13 must be after 3. This will give you an initial chromosome that satisfies the order constraint, for example: 0-3-9-13-19-5-15-0-4-14-2-10-12-20-0-6-16-1-11-0-8-18-7-17
[0127] The initial chromosome represents the driving routes of 4 vehicles:
[0128] Vehicle 1: 0→3→9→13→19→5→15, parking lot→passenger 3 boarding point→passenger 9 boarding point→passenger 3 alighting point→passenger 9 alighting point→passenger 5 boarding point→passenger 5 alighting point;
[0129] Vehicle 2: 0→4→14→2→10→12→20, parking lot→passenger 4 boarding point→passenger 4 alighting point→passenger 2 boarding point→passenger 10 boarding point→passenger 2 alighting point→passenger 10 alighting point;
[0130] Vehicle 3: 0→6→16→1→11, parking lot→passenger 6 boarding point→passenger 6 alighting point→passenger 1 boarding point→passenger 11 boarding point;
[0131] Vehicle 4: 0→8→18→7→17, parking lot→passenger 8 boarding point→passenger 8 alighting point→passenger 7 boarding point→passenger 7 alighting point;
[0132] In the genetic algorithm, the fitness function is used to represent the objective function and constraints in the mathematical model. In the embodiment of the present invention, the mileage cost, capacity penalty, and time window penalty are used to construct the fitness function. The fitness function should be minimized during the iteration process.
[0133] Mileage cost: Based on the pick-up / drop-off points and the map, the total trip is calculated, which is the VMT mentioned above.
[0134] Time penalty: Calculate the time to reach each boarding and alighting node, and subtract it from the passenger time window to calculate the time penalty;
[0135]
[0136] Capacity penalty: Based on the number of passengers uploaded, calculate whether the number of people on the bus arriving at each node is overloaded and calculate the capacity penalty;
[0137]
[0138] Where Q m,s It represents the capacity penalty of vehicle m at the sth node on its driving path, which is equal to the difference between the sum of the number of passengers getting on and off at the first s nodes on its driving path and the maximum total number. The calculation formula is as follows:
[0139]
[0140] The overall fitness function can be expressed as:
[0141] fitness=η·VMT+c 1 ·timePenalty+c 2 ·capPenalty
[0142] where η and c 1 、c 2 They are the coefficients of mileage, time penalty, and capacity penalty. Capacity overload is not allowed, so its coefficient should be set to the maximum.
[0143] Selection: The tournament method is used for selection. First, a certain number of chromosomes are randomly selected from the population, and then the chromosomes with the highest fitness are selected for genetic operation. This process is repeated until the size of the offspring population is the same as that of the parent population. Through this process, the diversity of the population can be greatly maintained.
[0144] Crossover: This invention proposes an innovative crossover operation to deal with the ridesharing problem, such as Figure 5 , the process is as follows:
[0145] 1) Select parent 1 and parent 2;
[0146] 2) A random vehicle path is selected from parent generation 1 as the beginning of the child generation;
[0147] 3) The remaining boarding points are arranged in the order of the parent generation 2, and randomly interrupted by 0;
[0148] 4) Randomly insert the remaining drop-off points into each path according to the order in parent generation 2, ensuring that the drop-off point of the same passenger is after the boarding point;
[0149] 5) After 5 random insertions, the individual with the smallest fitness is selected as the offspring;
[0150] Mutation: The mutation operation applies the idea of random two-point mutation, such as Figure 6 The process is as follows: In the parent chromosome, randomly select two genes for the boarding points (e.g., 8 and 2 as marked in the figure), and the corresponding genes for the alighting points (e.g., 18 and 12 as marked in the figure). The two boarding points and the two alighting points are exchanged in pairs, and the remaining genes of the daughter chromosome are inherited from the parent chromosome. In this way, the random two-point mutation is completed, and the order constraint that the boarding point is before the alighting point is guaranteed.
[0151] Based on the above improved genetic algorithm, the optimal convergence order allocation and pick-up sequence results based on the reserved itinerary uploaded by the passenger can be obtained, and then the vehicle path planning route can be obtained based on the map information and the Dijistra shortest path algorithm.
[0152] like Figure 7 As shown, for the real-time order demands initiated by passengers, a real-time optimal insertion algorithm for the existing paths is adopted.
[0153] The steps are:
[0154] 1) Input real-time order demand, including order initiation time, departure node and destination node, departure time window, latest arrival time and number of passengers required for travel;
[0155] 2) Search for vehicles currently within a certain distance, and the paths of each vehicle obtained after the static ride sharing of these vehicles through the above scheduled itinerary (the arrangement of the boarding and alighting points of each passenger)
[0156] 3) Traverse each vehicle path:
[0157] a) The vehicle uploads the next passenger node that is about to arrive;
[0158] b) insert the real-time passenger boarding points in sequence at all positions after this node;
[0159] i. Insert the real-time passenger alighting points in all positions after the inserted boarding point;
[0160] ii. Calculate the fitness of the new vehicle path after inserting the real-time passenger pick-up and drop-off points;
[0161] 4) The path with the minimum fitness is taken as the new vehicle path after inserting the real-time order.
[0162] By inputting the order into the ride-sharing dispatching system, the vehicle path with the minimum fitness can be obtained as the new vehicle path after inserting the real-time order. The system will send the new path to the car node, and the car node will upload the running status to the cloud and present it on the digital twin platform, such as Figure 8 .
[0163] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A large-scale ridesharing scheduling method for smart cities, characterized in that: The following steps are involved: Obtain ridesharing requirements posted by users; For the user's scheduled itinerary, a carpooling route optimization model is designed, and the passenger's scheduled itinerary is statically scheduled based on the improved genetic algorithm; The ride-sharing route optimization model aims to minimize the passenger waiting time cost and the system mileage operating cost, and the constraints include: ensuring that each passenger can be served and served by one vehicle; on the vehicle route, each passenger arrives at the boarding point before arriving at the alighting point; and at each node on the route of each vehicle, the number of passengers on the vehicle is less than the vehicle capacity; in the improved genetic algorithm, the chromosome is encoded as an integer string, and its length depends on the number of vehicles and passengers; each string is composed of multiple substrings, and each substring is a gene sequence, which represents the total route of one of the vehicles from the starting point to the end of the journey; in the crossover operation of the improved genetic algorithm, the offspring inherits a certain section of the path of one parent as the beginning, and the other parts inherit the node order of another parent, and the fitness is converged by multiple insertions and taking the minimum.
2. The large-scale ridesharing scheduling method for smart cities according to claim 1 is characterized in that: The optimization objectives and constraints of the ridesharing route optimization model are expressed as: Among them, the overall service quality of all travel needs of the system Passenger travel demand n QoS n =cost n -timecost n , cost n For demand n Payment fee, time cost n For demand n Time cost; system mileage operating cost η is the cost per unit operating mileage, vehicle v m Operational mileage in the planned route; a n To express the demand r n The parameter of whether it is served, if it is served, it is 1, otherwise it is 0; N m For vehicle v m The number of orders served, where N is the total number of orders; For vehicle v m Assigned travel needs At node N i The number of passengers on the variable parameter, Cap m Vehicle m The maximum passenger capacity of route m For vehicle v m The path is the order of the passenger nodes, q n For demand n Number of people reported traveling, N i is the vehicle path node, P m Gather at the boarding point for travel needs, D m Get off point for travel needs, e n For demand n The earliest departure time, δ is the demand r n The maximum tolerable waiting time, For demand n The actual time of driving, For demand n The actual time of getting off the bus, n For demand n The latest arrival time for your appointment.
3. The large-scale ride-sharing scheduling method for smart cities according to claim 1 is characterized in that: The improved genetic algorithm adopts a random insertion encoding method: first, the boarding points are randomly arranged; then, 0 is randomly inserted to represent the vehicle, where the first 0 is inserted, and every two 0s cannot be adjacent; the corresponding passenger's alighting point is inserted into each vehicle path starting with 0, ensuring that the alighting point is arranged after the corresponding boarding point; The crossover operation process in the improved genetic algorithm is as follows: select parent generation 1 and parent generation 2; randomly select a vehicle path from parent generation 1 as the beginning of the offspring; arrange the remaining boarding points according to the order in parent generation 2 and randomly insert 0 to interrupt them; randomly insert the remaining alighting points into each path according to the order in parent generation 2 to ensure that the alighting point of the same passenger is after the boarding point; after randomly inserting a preset number of times, select the individual with the smallest fitness as the offspring.
4. The large-scale ridesharing scheduling method for smart cities according to claim 1 is characterized in that: The modified genetic algorithm adopts a mutation operation of random two-point mutation: in the parent chromosome, two genes of the boarding point and the corresponding genes of the alighting point are randomly selected and exchanged to ensure the order constraint; the remaining genes of the daughter chromosome are inherited from the parent chromosome.
5. The large-scale ridesharing scheduling method for smart cities according to claim 1 is characterized in that: The fitness function of the improved genetic algorithm is expressed as: fitness=η·VMT+c1·timePenalty+c2·capPenalty Among them, VMT is the system mileage operating cost, Time penalty, timecost n For demand n The time cost, is the capacity penalty, Q m,s It represents the capacity penalty of vehicle m at the sth node on its driving path, which is equal to the difference between the sum of the number of passengers getting on and off at the first s nodes on its driving path and the maximum total number; η, c1, c2 are the coefficients of mileage, time penalty, and capacity penalty respectively. Capacity overload is not allowed and its coefficient should be set to the maximum.
6. The large-scale ridesharing scheduling method for smart cities according to claim 1 is characterized in that: Also includes: In response to users' real-time order needs, a real-time optimal insertion algorithm for existing routes is used to perform dynamic ridesharing scheduling, including: Traverse each vehicle path, which is an arrangement of the boarding and alighting points of each passenger: obtain the next passenger node that the vehicle is about to arrive at; insert the real-time passenger boarding point in all positions after the node; insert the real-time passenger alighting point in all positions after the inserted boarding point; calculate the fitness of the new vehicle path after inserting the real-time passenger boarding and alighting points; The vehicle path with the minimum fitness is obtained as the new vehicle path after inserting the real-time order.
7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
8. A large-scale ride-sharing dispatching system for smart cities, characterized in that: include: User terminal, used for users to publish ride requirements; A cloud dispatch center is used to implement the large-scale ride-sharing dispatch method for smart cities according to any one of claims 1 to 6; real-time monitoring and analysis of road network information, passenger demand, vehicle location and passenger status in the city, and assigning orders and planning routes for urban vehicles in a ride-sharing manner; The vehicle terminal is used to obtain the dispatch planning results from the cloud dispatch center, pick up and drop off passengers at the specified nodes, and upload the vehicle's coordinates and passenger status to the cloud dispatch center in real time.
9. The large-scale ride-sharing dispatching system for smart cities according to claim 8, characterized in that: It also includes a digital twin platform, which is used to obtain real-time vehicle status information from the cloud dispatch center and to present, display and monitor the real-time status of the city, vehicles and passengers in a digital twin manner.
10. The large-scale ride-sharing dispatching system for smart cities according to claim 9, characterized in that: The digital twin platform is also used to simulate different scheduling schemes and predict the results of different decisions to evaluate system performance and make corresponding optimization adjustments.
Citation Information
Cited By
Dynamic path planning method and device based on customized passenger transport, electronic equipment and storage medium
CN120101825A
Method for simulating and optimizing passenger area in online hailing car of transportation hub based on double-end queuing theory
CN120430213A