Static rebalancing scheduling method for shared electric scooters allowing multiple visits to stations
By allowing multiple access to the same site to vehicle rebalancing scheduling heuristics, optimizing vehicle allocation of shared electric scooters, solving the problem of site demand overload in the prior art, achieving more efficient operations and lower costs.
Patent Information
- Application Number
- CN202410785645.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-06-18
AI Technical Summary
The existing rebalancing scheduling method of shared electric scooters usually only allows access to each site once, and cannot effectively solve the problem of site demand overload, resulting in waste of resources and increased operating costs.
Vehicle rebalancing scheduling heuristics that allow multiple access to the same site are adopted to optimize vehicle allocation by calculating the minimum fleet size and the vehicle requirements of virtual sites to achieve more reasonable rebalancing scheduling.
It effectively reduces the operating costs of shared electric scooters, improves operational efficiency and flexibility, solves the problem of site demand overload, and improves service quality.
Smart Images

Figure CN118735181B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of static rebalancing scheduling of shared electric scooters, and in particular to a static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites. Background Art
[0002] Shared electric scooters are a new type of urban transportation. They combine the convenience of traditional scooters with the power of electric vehicles. They typically consist of a rectangular platform, two small wheels, and one or two electric drive systems. They are equipped with handles or pedals for passengers to stand or step on. Users use a mobile app to find nearby electric scooters, unlock and use them, and then park them in designated areas at the end of their trip.
[0003] When studying the operational management of shared electric scooters, determining the actual fleet size (the total number of scooters in operation) is a core issue. On the other hand, operators also consider the minimum fleet size, that is, the minimum number of scooters required to meet user demand. Rebalancing scheduling of shared electric scooters refers to the process of redistributing or reallocating vehicle resources to meet user needs and improve service efficiency in response to the uneven temporal and spatial distribution of shared micro-transport vehicles during use. The main purpose of rebalancing scheduling is to ensure the reasonable distribution of shared vehicles to avoid problems such as supply and demand imbalance, resource waste, and reduced user experience.
[0004] Previous research has often overlooked optimizing rebalancing schedules based on a minimum fleet size. This approach can determine a minimum fleet size and optimize the rebalancing process based on this minimum fleet size. This approach not only reduces initial vehicle deployment and maintenance costs, but also reduces rebalancing costs. Typically, rebalancing for shared electric scooters only allows for a single visit to each station. However, in practice, if demand at certain stations exceeds the capacity of the rebalancing vehicle, simply requiring a single visit to each station is insufficient. Summary of the Invention
[0005] In response to the above-mentioned deficiencies in the prior art, the present invention provides a static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites, so as to effectively reduce the operating costs of shared electric scooters and solve the possible problem of site demand overload.
[0006] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0007] A static rebalancing scheduling method for shared electric scooters that allows multiple visits to a station includes the following steps:
[0008] Obtaining shared electric scooter order travel data and traffic area geographic information data;
[0009] Calculate the minimum fleet size of shared electric scooters based on the order travel data of all shared electric scooters;
[0010] Identify virtual station coordinates based on the order travel data of all shared electric scooters under the minimum fleet size, and calculate the vehicle demand at each virtual station and the Euclidean distance between the virtual stations;
[0011] Taking the vehicle demand at each virtual station and the shortest distance between virtual stations as input, and minimizing the time of the rebalancing process as the optimization goal, a vehicle rebalancing scheduling heuristic algorithm that allows multiple visits to the same station is adopted to solve the static rebalancing scheduling result of shared electric scooters.
[0012] Preferably, calculating the minimum fleet size of shared electric scooters based on the order travel data of all shared electric scooters includes the following steps:
[0013] Set time threshold and distance threshold;
[0014] Traverse each row of the shared electric scooter order trip data, extract the trip number, electric scooter number, starting latitude, starting longitude, trip start time, trip end time, ending latitude, ending longitude, and trip distance, and set the trip flag to false;
[0015] Traverse the set of trips performed by each shared electric scooter in the shared electric scooter fleet;
[0016] Calculate the time difference between the start time of the currently traversed order trip data and the latest end time of the current trip set;
[0017] Calculate the distance difference between the starting latitude and longitude of the currently traversed order trip data and the ending latitude and longitude of the current trip set;
[0018] When the time difference of the trips is greater than or equal to the time threshold and the distance difference of the trips is less than or equal to the distance threshold, update the current trip set and set the trip flag to true;
[0019] When the trip flag is not set to true, create a new trip set, add the trip number, electric scooter number, starting latitude, starting longitude, trip start time, trip end time, ending latitude, ending longitude, and trip distance of the currently traversed order trip data to the new trip set, and add the new trip set to the shared electric scooter fleet set;
[0020] The minimum fleet size of shared electric scooters is determined based on the length of the shared electric scooter fleet.
[0021] Preferably, updating the current itinerary set includes:
[0022] Update the end time of the current trip set to the larger value between the end time of the currently traversed order trip data and the original end time of the current trip set;
[0023] Update the end longitude of the trip to the end longitude of the currently traversed order trip data;
[0024] Update the end latitude of the trip to the end latitude of the currently traversed order trip data;
[0025] The sum of the travel distances of the current travel set plus the travel distances of the currently traversed order travel data is updated to the new sum of the travel distances;
[0026] Add the trip sequence number and the shared electric scooter sequence number to the trip collection.
[0027] Preferably, identifying virtual station coordinates based on the order travel data of all shared electric scooters under the minimum fleet size, and calculating the vehicle demand at each virtual station and the Euclidean distance between the virtual stations, includes the following steps:
[0028] Based on the order travel data of all shared electric scooters under the minimum fleet size, extract the coordinate positions of all shared electric scooters at the start and end;
[0029] Calculate the maximum silhouette coefficient based on the positions of all shared electric scooters at the beginning and end, and determine the number of clusters based on the maximum silhouette coefficient;
[0030] According to the coordinate positions of all shared electric scooters at the beginning, the K-means clustering algorithm is used to cluster and obtain the coordinates of virtual stations. The number of electric scooters at each virtual station is the number of electric scooters clustered to form the station.
[0031] Match the coordinate positions of all shared electric scooters at the end with the coordinates of the virtual stations. The number of electric scooters at each virtual station at the end is the number of electric scooters matched to the virtual station.
[0032] Calculate the vehicle demand at each virtual station based on the number of e-scooters at each virtual station at the beginning and end;
[0033] Calculate the Euclidean distance between virtual sites based on their coordinates.
[0034] Preferably, the vehicle demand at each virtual station and the shortest distance between the virtual stations are used as inputs, and minimizing the time of the rebalancing process is used as the optimization goal. A vehicle rebalancing scheduling heuristic algorithm that allows multiple visits to the same station is used to solve the static rebalancing scheduling result of the shared electric scooters, including the following steps:
[0035] Initialize the initial path and set the initial virtual site demand data to the original virtual site demand data. The vehicle starts from the parking lot.
[0036] When the values in the initial virtual site demand data are not all zero, the last visited virtual site is found from the initial path, and the distance matrix between the virtual site and other virtual sites is determined;
[0037] When the values in the initial virtual site demand data are all greater than or equal to zero, the distance to the virtual site with zero demand value in the distance matrix is marked as infinite; otherwise, the candidate sites are screened according to the vehicle load; when the vehicle load is greater than zero, the distance to the virtual site with positive demand in the distance matrix is marked as infinite; otherwise, the distance to the virtual site with negative demand in the distance matrix is marked as infinite;
[0038] Select the virtual site closest to the virtual site in the distance matrix as the next nearest virtual site to be visited;
[0039] updating the load of the vehicle after visiting the nearest virtual site and the vehicle demand of each virtual site according to the vehicle demand of the nearest virtual site and the load of the current vehicle;
[0040] Add the nearest virtual site to the current path and update the length of the current path;
[0041] When all the values in the initial virtual site demand data are zero, add the parking lot as the end site at the end of the current path to obtain the optimal path and determine the length of the optimal path;
[0042] The time of the optimal path is calculated based on the length of the optimal path and the average speed of the shared electric scooters.
[0043] Preferably, the load of the vehicle after updating the visit to the nearest virtual station is specifically:
[0044]
[0045] in, The nearest virtual site n nearest The vehicle demand, b is the vehicle demand for visiting the nearest virtual station n nearest The vehicle load before, c is the vehicle capacity limit, max is the maximum value function, min is the minimum value function, b tmp To access the nearest virtual site nnearest The vehicle load after.
[0046] Preferably, the vehicle demand at each virtual station after updating the visit to the nearest virtual station is specifically as follows:
[0047]
[0048] in, The nearest virtual site n nearest The vehicle demand, b is the vehicle demand for visiting the nearest virtual station n nearest Vehicle load before, b tmp To access the nearest virtual site n nearest After the vehicle load, To access the nearest virtual site n nearest The subsequent vehicle demand.
[0049] Preferably, updating the length of the current path is as follows:
[0050]
[0051] Among them, n last is the last virtual site on the current path, n nearest For the nearest virtual site, The last virtual site n on the current path last and the nearest virtual site n nearest The shortest distance between them, += represents accumulation, and L is the length of the current path.
[0052] Preferably, the length of the optimal path is determined as follows:
[0053]
[0054] Among them, n last is the last virtual site on the current path, n depot For the parking lot, The last virtual site n on the current path last and parking lot depot The shortest distance between them, L is the length of the current path, L best is the length of the optimal path.
[0055] Preferably, the time of the optimal path is calculated according to the length of the optimal path and the average speed of the shared electric scooters, specifically:
[0056] T best ←L best / v
[0057] Among them, T best is the time of the optimal path, L bestis the length of the optimal path, and v is the average speed of the shared electric scooters.
[0058] The present invention has the following beneficial effects:
[0059] This invention leverages actual scooter operational data and geographic information from transportation communities to first determine the minimum fleet size and, based on this, optimize the vehicle rebalancing and scheduling process. Compared to the traditional approach, where vehicles are only allowed to visit a station once, this invention takes into account the potential for overloaded station demand in real-world situations and uses a heuristic algorithm that allows multiple visits to the same station to adjust vehicle allocation, achieving more reasonable rebalancing and scheduling. Therefore, this invention aims to improve the operational efficiency and flexibility of shared electric scooters, thereby reducing costs and improving service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 Flowchart of a static rebalancing scheduling method for shared electric scooters that allows multiple visits to stations;
[0061] Figure 2 Schematic diagram of the set time threshold and distance threshold. DETAILED DESCRIPTION
[0062] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.
[0063] In the existing static rebalancing scheduling method for shared electric scooters, the vehicles in the rebalancing scheduling cannot visit the same site multiple times, and the problem of site demand exceeding vehicle load cannot be solved; in addition, the deployment of vehicles is too rough and the vehicle utilization rate is low, resulting in resource waste and increased operating costs. Therefore, the present invention proposes a static rebalancing scheduling method for shared electric scooters that reduces operating costs. The present invention first determines the minimum fleet size by utilizing the actual operation data of the scooters and the geographic information data of the traffic area, and optimizes the vehicle rebalancing scheduling process on this basis; compared with the traditional method in which vehicles are only allowed to visit the site once, the present invention takes into account the possible site demand overload problem in reality, and adopts a heuristic algorithm that allows multiple visits to the same site to adjust vehicle allocation to achieve more reasonable rebalancing scheduling; therefore, the present invention aims to improve the operational efficiency and flexibility of shared electric scooters, thereby reducing costs and improving service quality.
[0064] like Figure 1As shown, an embodiment of the present invention provides a static rebalancing scheduling method for shared electric scooters that allows multiple visits to a site, including the following steps S1 to S5:
[0065] S1. Obtaining order travel data and traffic area geographic information data of shared electric scooters;
[0066] In an optional embodiment of the present invention, the shared electric scooter order travel data obtained in this embodiment is specifically related information recorded and stored by the shared electric scooter operator on its platform regarding users riding shared electric scooters, including users' travel records, vehicle location status, payment information, etc.
[0067] The traffic area geographic information data obtained in this embodiment is specifically the boundary range of the traffic area within the study area, such as an administrative boundary or a census area.
[0068] S2. Calculate the minimum fleet size of shared electric scooters based on the order travel data of all shared electric scooters;
[0069] In an optional embodiment of the present invention, the minimum fleet size of shared electric scooters is calculated based on the order travel data of all shared electric scooters, including the following steps:
[0070] Set time threshold and distance threshold;
[0071] Traverse each row of the shared electric scooter order trip data, extract the trip number, electric scooter number, starting latitude, starting longitude, trip start time, trip end time, ending latitude, ending longitude, and trip distance, and set the trip flag to false;
[0072] Traverse the set of trips performed by each shared electric scooter in the shared electric scooter fleet;
[0073] Calculate the time difference between the start time of the currently traversed order trip data and the latest end time of the current trip set;
[0074] Calculate the distance difference between the starting latitude and longitude of the currently traversed order trip data and the ending latitude and longitude of the current trip set;
[0075] When the time difference of the trips is greater than or equal to the time threshold and the distance difference of the trips is less than or equal to the distance threshold, update the current trip set and set the trip flag to true;
[0076] When the trip flag is not set to true, create a new trip set, add the trip number, electric scooter number, starting latitude, starting longitude, trip start time, trip end time, ending latitude, ending longitude, and trip distance of the currently traversed order trip data to the new trip set, and add the new trip set to the shared electric scooter fleet set;
[0077] The minimum fleet size of shared electric scooters is determined based on the length of the shared electric scooter fleet.
[0078] The information for updating the current itinerary set includes:
[0079] Update the end time of the current trip set to the larger value between the end time of the currently traversed order trip data and the original end time of the current trip set;
[0080] Update the end longitude of the trip to the end longitude of the currently traversed order trip data;
[0081] Update the end latitude of the trip to the end latitude of the currently traversed order trip data;
[0082] The sum of the travel distances of the current travel set plus the travel distances of the currently traversed order travel data is updated to the new sum of the travel distances;
[0083] Add the trip sequence number and the shared electric scooter sequence number to the trip collection.
[0084] This embodiment determines whether different user trips can use the same electric scooter through set time thresholds and distance thresholds. Figure 2 The specific meanings of these two thresholds are shown. Figure 2 In the example, assume there are two trips T1 and T2. bc represents the distance difference between the end point b of trip T1 and the starting point c of trip T2, T bc Represents the time difference between the end point b of trip T1 and the starting point c of trip T2. d and θ t Represent the distance threshold and time threshold respectively. If D bc and T bc At the same time, the constraint D bc ≤θ d and T bc ≥θ t , it means that one electric scooter can complete two user trips T1 and T2 successively.
[0085] This embodiment uses the order data for all shared electric scooters to determine the minimum fleet size M and a list F containing detailed information about each fleet. Expanding the fleet information in list F yields the minimum fleet size at the beginning and end of each day for each traffic zone.
[0086] S3. Identify the coordinates of virtual stations based on the order travel data of all shared electric scooters under the minimum fleet size, and calculate the vehicle demand at each virtual station and the Euclidean distance between the virtual stations;
[0087] In an optional embodiment of the present invention, the embodiment identifies virtual station coordinates based on the travel order data of all shared electric scooters under the minimum fleet size, and calculates the vehicle demand at each virtual station and the Euclidean distance between the virtual stations, including the following steps:
[0088] Based on the order travel data of all shared electric scooters under the minimum fleet size, extract the coordinate positions of all shared electric scooters at the start and end;
[0089] Calculate the maximum silhouette coefficient based on the positions of all shared electric scooters at the beginning and end, and determine the number of clusters based on the maximum silhouette coefficient;
[0090] According to the coordinate positions of all shared electric scooters at the beginning, the K-means clustering algorithm is used to cluster and obtain the coordinates of virtual stations. The number of electric scooters at each virtual station is the number of electric scooters clustered to form the station.
[0091] Match the coordinate positions of all shared electric scooters at the end with the coordinates of the virtual stations. The number of electric scooters at each virtual station at the end is the number of electric scooters matched to the virtual station.
[0092] Calculate the vehicle demand at each virtual station based on the number of e-scooters at each virtual station at the beginning and end;
[0093] Calculate the Euclidean distance between virtual sites based on their coordinates.
[0094] Specifically, this embodiment first uses the K-means clustering algorithm to identify virtual sites. In order to determine the optimal number of clusters, it is first necessary to calculate the maximum silhouette coefficient. The silhouette coefficient of each object i is calculated as follows:
[0095]
[0096] Among them, a(i) is the average distance from the i-th object to other objects in the same cluster; b(i) is the minimum average distance from the i-th object to objects in different clusters, which is minimized in the cluster.
[0097] This example uses the geographic information data of the traffic area and the location data of the scooters at the beginning and end of the day from the travel order data of the minimum fleet as input. The identification and matching process of the virtual station is as follows:
[0098] (1) Obtain the coordinates of all electric scooters at the starting point of the study traffic area and try to calculate different silhouette coefficients.
[0099] (2) Select the value k with the largest silhouette coefficient as the optimal number of clusters.
[0100] (3) Cluster all the electric scooter coordinates at the beginning to obtain virtual stations, and count the number of electric scooters at each station.
[0101] (4) Match the coordinates of all electric scooters at the end with the virtual stations and count the number of electric scooters at each station.
[0102] After determining the number of electric scooters at each virtual station at the start and end of the journey, this embodiment can further calculate the demand at each station. By subtracting the number of electric scooters at the start from the number of electric scooters at the end, the rebalancing demand for each station is calculated. A negative demand at a station indicates a shortage of electric scooters; a positive demand indicates an excess of electric scooters. Furthermore, due to the presence of electric scooters traveling across zones, the number of electric scooters at the start and end of a traffic zone may differ. To address this issue, this embodiment provides a parking lot with sufficient electric scooters in each traffic zone.
[0103] S4. Taking the vehicle demand of each virtual station and the shortest distance between virtual stations as input, minimizing the time of the rebalancing process as the optimization goal, a vehicle rebalancing scheduling heuristic algorithm that allows multiple visits to the same station is used to solve the static rebalancing scheduling result of shared electric scooters.
[0104] In an optional embodiment of the present invention, this embodiment takes the vehicle demand at each virtual station and the shortest distance between virtual stations as input, takes minimizing the time of the rebalancing process as the optimization goal, and adopts a vehicle rebalancing scheduling heuristic algorithm that allows multiple visits to the same station to solve the static rebalancing scheduling result of shared electric scooters, including the following steps:
[0105] Initialize the initial path and set the initial virtual site demand data to the original virtual site demand data. The vehicle starts from the parking lot.
[0106] When the values in the initial virtual site demand data are not all zero, the last visited virtual site is found from the initial path, and the distance matrix between the virtual site and other virtual sites is determined;
[0107] When the values in the initial virtual site demand data are all greater than or equal to zero, the distance to the virtual site with zero demand value in the distance matrix, that is, the already balanced virtual site, is marked as infinite to avoid revisiting; otherwise, the site is determined to be a suitable candidate site based on the rebalancing vehicle load; if the rebalancing vehicle load is greater than zero, the distance to the virtual site with positive demand in the distance matrix is marked as infinite, giving priority to satisfying sites with negative demand while avoiding overloading of the rebalancing vehicle; otherwise, the distance to the virtual site with negative demand in the distance matrix is marked as infinite, giving priority to visiting sites with positive demand to increase the load of the rebalancing vehicle first;
[0108] Select the virtual site closest to the virtual site in the distance matrix as the next nearest virtual site to be visited;
[0109] updating the load of the vehicle after visiting the nearest virtual site and the vehicle demand of each virtual site according to the vehicle demand of the nearest virtual site and the load of the current vehicle;
[0110] Add the nearest virtual site to the current path and update the length of the current path;
[0111] When all the values in the initial virtual site demand data are zero, a depot is added to the end of the current path as the end site to indicate that the rebalancing vehicle returns to the depot to complete the rebalancing task, and the optimal path is obtained and the length of the optimal path is determined;
[0112] The time of the optimal path is calculated based on the length of the optimal path and the average speed of the shared electric scooters.
[0113] Specifically, this embodiment uses a vehicle rebalancing heuristic algorithm that allows multiple visits to the same depot to solve the optimal vehicle rebalancing strategy. The optimal rebalancing strategy is defined as the rebalancing vehicle redeploying the vehicles at the end of the day to the state at the beginning of the day in the shortest possible time, and all vehicles used for rebalancing have the same starting and ending points as the depot. The specific process is as follows:
[0114] A1. On the initial path R initial Add a parking lot to the initial route R initial Initialize and set the initial virtual site demand data Set to the original virtual site demand data D i ;
[0115] A2. Determine the initial virtual site demand data Are the values in not all zero? If so, proceed to A3; otherwise, proceed to A8;
[0116] A3. From the initial path R initial Find the last visited virtual site n last, according to the distance matrix Determine the virtual site n last The shortest distance to other virtual sites;
[0117] A4. Determine the initial virtual site demand data Are the values in greater than or equal to zero? If so, the distance matrix The distance of the virtual station with zero demand value, that is, the distance of the balanced virtual station, is marked as infinite; otherwise, the station is determined as the appropriate candidate station based on the rebalanced vehicle load; if the rebalanced vehicle load b is greater than zero, the distance matrix The distance to the virtual site with positive demand is marked as infinite; otherwise, the distance matrix The distance to the virtual site with negative demand is marked as infinite
[0118] A5. Select the distance matrix The distance between the virtual site n last The nearest virtual site is used as the next nearest virtual site to visit n nearest ;
[0119] A6. According to the nearest virtual site n nearest The vehicle demand and the current vehicle load are updated after visiting the nearest virtual station and the vehicle demand of each virtual station;
[0120] The load of the vehicle after updating to visit the nearest virtual station is as follows:
[0121]
[0122] in, The nearest virtual site n nearest The vehicle demand, b is the vehicle demand for visiting the nearest virtual station n nearest The vehicle load before, c is the vehicle capacity limit, max is the maximum value function, min is the minimum value function, b tmp To access the nearest virtual site n nearest The vehicle load after.
[0123] After updating the access to the nearest virtual station, the vehicle requirements for each virtual station are as follows:
[0124]
[0125] in, The nearest virtual site n nearest The vehicle demand, b is the vehicle demand for visiting the nearest virtual station n nearest Vehicle load before, b tmp To access the nearest virtual site n nearest After the vehicle load, To access the nearest virtual site n nearest The subsequent vehicle demand.
[0126] A7. Set the nearest virtual site n nearest Add to current path R initial and update the length L of the current path best ;
[0127] The specific update of the current path length is:
[0128]
[0129] Among them, n last is the last virtual site on the current path, n nearest For the nearest virtual site, The last virtual site n on the current path last and the nearest virtual site n nearest The shortest distance between them, += represents accumulation, and L is the length of the current path.
[0130] A8, in the current path R initial Add the warehouse as the end site at the end to get the optimal path R best , and determine the length L of the optimal path best ;
[0131] After the rebalanced vehicle returns to the parking lot, the length of the optimal path is determined as:
[0132]
[0133] Among them, n last is the last virtual site on the current path, n depot For the parking lot, The last virtual site n on the current path last and parking lot depot The shortest distance between them, L is the length of the current path, L best is the length of the optimal path.
[0134] A9. Calculate the optimal path time based on the length of the optimal path and the average speed of the shared electric scooters. Specifically:
[0135] T best ←L best / v
[0136] Among them, T best is the time of the optimal path, L best is the length of the optimal path, and v is the average speed of the shared electric scooters.
[0137] The static vehicle rebalancing scheduling optimization method proposed in this paper fully utilizes the travel data of shared electric scooters and, based on this, reduces operating costs by optimizing the minimum fleet size. This method fully considers the problem of overloaded station demand in reality and adopts a heuristic algorithm that visits the same station multiple times, making the problem solution closer to reality and providing stronger guidance. In addition, our method is widely applicable and can be implemented in various urban scenarios without specific adjustments. This provides important technical support for the operation of shared electric scooters, an emerging micro-transportation mode, and provides a powerful tool for urban traffic management.
[0138] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0141] Specific embodiments are used in the present invention to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
[0142] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.
Claims
1. A static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites, characterized in that: The following steps are involved: Obtaining order travel data and traffic area geographic information data of shared electric scooters; Calculate the minimum fleet size of shared electric scooters based on the order travel data of all shared electric scooters; Identify virtual station coordinates based on the order travel data of all shared electric scooters under the minimum fleet size, and calculate the vehicle demand of each virtual station and the Euclidean distance between the virtual stations; Taking the vehicle demand of each virtual station and the shortest distance between virtual stations as input, minimizing the time of the rebalancing process as the optimization goal, a vehicle rebalancing scheduling heuristic algorithm that allows multiple visits to the same station is used to solve the static rebalancing scheduling results of shared electric scooters, including the following steps: Initialize the initial path, and set the initial virtual site demand data to the original virtual site demand data, and the vehicle starts from the parking lot; When the values in the initial virtual site demand data are not all zero, the last visited virtual site is found from the initial path, and the distance matrix between the virtual site and other virtual sites is determined; When the values in the initial virtual station demand data are all greater than or equal to zero, the distance to the virtual station with a demand value of zero in the distance matrix is marked as infinite; otherwise, the candidate stations are screened according to the vehicle load; when the vehicle load is greater than zero, the distance to the virtual station with a positive demand in the distance matrix is marked as infinite; otherwise, the distance to the virtual station with a negative demand in the distance matrix is marked as infinite; Select the virtual site closest to the virtual site in the distance matrix as the next nearest virtual site to be visited; Update the vehicle load after visiting the nearest virtual station and the vehicle demand of each virtual station according to the vehicle demand of the nearest virtual station and the current vehicle load; Add the nearest virtual site to the current path and update the length of the current path; When the values in the initial virtual site demand data are all zero, add the parking lot as the end site at the end of the current path to obtain the optimal path, and determine the length of the optimal path; The time of the optimal path is calculated based on the length of the optimal path and the average speed of the shared electric scooters.
2. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 1 is characterized in that: The minimum fleet size of shared electric scooters is calculated based on the order travel data of all shared electric scooters, including the following steps: Set time threshold and distance threshold; Traverse each row of the order travel data of all shared electric scooters, extract the trip number, the electric scooter number, the starting latitude, the starting longitude, the trip start time, the trip end time, the ending latitude, the ending longitude, the trip distance, and set the trip flag to false; Traverse the set of trips performed by each shared electric scooter in the shared electric scooter fleet set; Calculate the time difference between the start time of the currently traversed order travel data and the latest end time of the current travel set; Calculate the distance difference between the starting longitude and starting latitude of the currently traversed order travel data and the ending latitude and ending longitude of the current trip set; When the time difference of the trips is greater than or equal to the time threshold and the distance difference of the trips is less than or equal to the distance threshold, the current trip set is updated and the trip flag is set to true; When the trip flag is not set to true, create a new trip set, add the trip number, electric scooter number, starting latitude, starting longitude, trip start time, trip end time, end latitude, end longitude, and trip distance of the currently traversed order travel data to the new trip set, and add the new trip set to the shared electric scooter fleet set; The minimum fleet size of shared electric scooters is determined based on the length of the shared electric scooter fleet collection.
3. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 2 is characterized in that: Updates to the current itinerary collection include: Update the end time of the current trip set to the larger value between the end time of the currently traversed order travel data and the original end time of the current trip set; Update the end longitude of the trip to the end longitude of the currently traversed order travel data; Update the end latitude of the trip to the end latitude of the currently traversed order travel data; The sum of the travel distances of the current travel set plus the travel distances of the currently traversed order travel data is updated to the new sum of the travel distances; Add the sequence number of the trip and the sequence number of the shared electric scooter to the trip collection.
4. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 1, characterized in that: The virtual station coordinates are identified based on the order travel data of all shared electric scooters under the minimum fleet size, and the vehicle demand of each virtual station and the Euclidean distance between the virtual stations are calculated, including the following steps: Based on the order travel data of all shared electric scooters under the minimum fleet size, extract the coordinate positions of all shared electric scooters at the beginning and end; The maximum silhouette coefficient is calculated according to the positions of all shared electric scooters at the beginning and the end, and the number of clusters is determined according to the maximum silhouette coefficient; According to the coordinate positions of all shared electric scooters at the beginning, the K-means clustering algorithm is used to cluster and obtain the coordinates of the virtual stations. The number of electric scooters at each virtual station is the number of electric scooters clustered to form the station. Match the coordinate positions of all shared electric scooters at the end with the coordinates of the virtual stations. The number of electric scooters at each virtual station at the end is the number of electric scooters matched to the virtual station. Calculate the vehicle demand at each virtual station based on the number of e-scooters at each virtual station at the beginning and end; The Euclidean distance between virtual sites is calculated based on the virtual site coordinates.
5. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 1, characterized in that: The vehicle load after updating the visit to the nearest virtual station is as follows: in, The nearest virtual site n nearest The vehicle demand is b, and b is the vehicle demand for visiting the nearest virtual station n nearest The vehicle load before, c is the vehicle capacity limit, max is the maximum value function, min is the minimum value function, b tmp To access the nearest virtual site n nearest The vehicle load after.
6. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 1, characterized in that: The vehicle requirements of each virtual station after updating the visit to the nearest virtual station are as follows: in, The nearest virtual site n nearest The vehicle demand is b, and b is the vehicle demand for visiting the nearest virtual station n nearest Vehicle load before, b tmp To access the nearest virtual site n nearest After the vehicle load, To access the nearest virtual site n nearest The subsequent vehicle demand.
7. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 1, characterized in that: Update the length of the current path as follows: Among them, n last is the last virtual site on the current path, n nearest For the nearest virtual site, The last virtual site n on the current path last and the nearest virtual site n nearest The shortest distance between them, += represents accumulation, and L is the length of the current path.
8. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 1, characterized in that: The length of the optimal path is determined as follows: Among them, n last is the last virtual site on the current path, n depot For the parking lot, The last virtual site n on the current path last and parking lot depot The shortest distance between them, L is the length of the current path, L best is the length of the optimal path.
9. The static rebalancing scheduling method for shared electric scooters that allows multiple visits to sites according to claim 1, characterized in that: The time of the optimal path is calculated based on the length of the optimal path and the average speed of the shared electric scooters, specifically: T best ←L best / v Among them, T best is the time of the optimal path, L best is the length of the optimal path, and v is the average speed of the shared electric scooter.