A shared bicycle rebalancing method based on balance area division and reward mechanism guidance
Through the method based on balanced area division and reward mechanism, the problem of difficulty in coping with the spatial and temporal changes in bicycle supply and demand in shared bicycle rebalancing has been solved, a low-cost and efficient rebalancing solution has been achieved, and the user experience and operational efficiency have been improved.
Patent Information
- Application Number
- CN202410775276.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-17
AI Technical Summary
Existing shared bicycle rebalancing methods are difficult to effectively respond to the dynamic changes in space and time of bicycle supply and demand, resulting in ineffective guidance or failure to meet user needs, and high algorithm running costs.
Using a method based on balanced area division and reward mechanism, through data preprocessing, greedy strategy area division, user scheduling reward mechanism and multi-agent simulation, an optimized shared bicycle rebalancing scheme is generated, taking into account the spatiotemporal changes in bicycle demand and reducing operating costs.
It is possible to effectively respond to changes in bicycle supply and demand while ensuring low operating costs, avoid ineffective dispatch, improve user experience, and ensure balanced distribution of shared bicycles and user satisfaction.
Smart Images

Figure CN118365501B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent scheduling technology, and in particular to a shared bicycle rebalancing method based on balancing area division and reward mechanism guidance. Background Art
[0002] With the acceleration of urbanization and the increase of urban population, the burden on urban transportation systems is increasing. As a new green travel mode, shared bicycles have greatly improved the flexibility and efficiency of urban travel. Compared with traditional travel modes, shared bicycles save more space and resources. At the same time, as a connecting tool for buses and subways, shared bicycles solve the "last mile" problem of public transportation. However, under the current operation mode in which operators regulate users' parking by dividing parking spaces, due to the uneven temporal and spatial distribution of bicycle use, there may be an imbalance between the supply and demand of bicycles in some parking spaces, which can easily lead to a large number of shared bicycles being gathered in certain areas, while other areas are short of shared bicycles, which in turn makes it difficult for users to conveniently obtain or park bicycles, affecting the overall user experience, and may even cause traffic congestion, environmental pollution and other problems. Therefore, generating intelligent shared bicycle rebalancing solutions in real time and efficiently is of great practical significance for the recycling of shared bicycles, the sustainable development of the industry, and the improvement of people's travel efficiency.
[0003] At present, the operation and management of shared bicycles mainly rely on the GPS positioning of each bicycle and the information expression of parking spaces. When a shared bicycle is in use, the coordinate information of the vehicle will be recorded at regular intervals. At the same time, the lock status information will also be recorded when the bicycle is locked. Finally, a series of time trajectory sequences with bicycle ID, timestamp, lock status and coordinate information are obtained. The shared bicycle trajectory sequence contains rich travel patterns of residents such as travel hotspots, peak hours, and bicycle interactions. At the same time, it also provides basic data support for real-time perception of the spatial distribution of shared bicycles and providing refined intelligent scheduling solutions.
[0004] The existing shared bicycle rebalancing methods mainly include three categories: static scheduling, dynamic scheduling and scheduling based on user incentives. All three methods regard the scheduling problem as an optimization problem, with the optimal dispatching path, the shortest dispatching time, the maximum user satisfaction and other optimization goals, and use dynamic programming algorithm, cutting plane method and other precise algorithms or genetic algorithm, ant colony optimization algorithm and other heuristic algorithms to solve the optimal solution. Both dynamic scheduling and static scheduling passively schedule the number of bicycles in the parking space according to the current spatial distribution of shared bicycles. The difference is that static scheduling has a longer cycle, and its scheduling behavior usually occurs at the beginning or end of the travel cycle, and the scheduling plan does not change within a cycle. Therefore, static scheduling ignores the sudden unbalanced bicycle demand in the travel cycle. Dynamic scheduling usually has a shorter cycle and adjusts the scheduling plan according to real-time bicycle trajectory data and immediate travel demand. Therefore, dynamic scheduling can flexibly respond to changes in bicycle supply and demand, but at the same time there are problems such as strong dependence on real-time data, large amount of calculation and high operating cost. User-guided scheduling usually adopts a certain reward or punishment mechanism to guide users to ride from bicycle congestion to bicycle high demand areas, but the solution given by this method may be contrary to the user's own travel intention, thus reducing user experience and satisfaction. At present, most scheduling solutions based on user guidance do not take into account the spatiotemporal dynamic changes in bicycle demand, which may result in invalid guidance or the guidance solution cannot meet the future user's demand for picking up and parking, and further optimization is needed. Summary of the invention
[0005] The purpose of the present invention is to provide a method for generating a shared bicycle rebalancing plan that can cope with large-scale bicycle quantities, take into account the spatiotemporal dynamic changes in bicycle demand, and has low algorithm operation costs in view of the shortcomings of the above-mentioned background technology.
[0006] In order to achieve the above object, the present invention provides a shared bicycle rebalancing method based on balancing area division and reward mechanism guidance, comprising the following steps:
[0007] S1, data preprocessing; including data cleaning and OD extraction; OD and parking space matching;
[0008] S2, shared bicycle balance area division; including time slice division and shared bicycle retention calculation; balanced area division based on greedy strategy;
[0009] S3, build a reward mechanism for users to dispatch shared bicycles; including pre-classification of parking space dispatch status; extraction of dispatch destination candidate sets; and calculation of dispatch reward values;
[0010] S4, user scheduling plan generation and effect evaluation based on multi-agent simulation, optimizing scheduling plan; including building user agents; generating user scheduling plans; and evaluating the effectiveness of the plans.
[0011] Furthermore, data cleaning and OD extraction in S1 include:
[0012] All trajectory points are sorted according to the shared bicycle ID and time. According to the change of the lock status, the OD point of the shared bicycle trip is determined. After obtaining the preliminary OD point, the abnormal OD data is processed, including deleting the points outside the research scope, taking only the last O point that appears repeatedly due to unlocking failure, and taking only the earliest D point that appears repeatedly due to returning failure.
[0013] The matching of OD and parking space includes: using the nearest neighbor algorithm, matching the OD point with the center point of the parking space, each OD point can only match one parking space; the distance between the matched OD point and the parking space cannot exceed the set threshold h match , otherwise it is considered as an invalid match and the OD point pair is deleted.
[0014] Furthermore, the time slice division and shared bicycle retention calculation in S2 include:
[0015] According to all the shared bicycle trajectory data, all shared bicycle IDs are obtained, and the earliest recorded position of each shared bicycle in the data is selected as its initial position. According to the matching results of the initial position of the shared bicycle and the parking space, the initial shared bicycle retention of each parking space is statistically obtained. ; According to the usage patterns of shared bicycles, a day is divided into several time periods; given the parking space m in the i-th time period, the net flow of shared bicycles is The calculation formula is as follows
[0016] ;
[0017] in, and They refer to the number of pick-ups and returns at parking space m in the i-th time period respectively; the calculation formula for the number of shared bicycles retained at parking space m in the i-th time period is as follows
[0018] ;
[0019] in, represents the number of shared bicycles parked in parking space m during the initial time period;
[0020] Calculate the net flow of shared bicycles and the number of shared bicycles retained in each parking space at each time period.
[0021] Furthermore, the balanced region partitioning based on the greedy strategy in S2 includes:
[0022] Infer the shared bicycle capacity based on the area of parking space m , according to the number of shared bicycles retained in the parking space and the capacity of shared bicycles, the congestion of the parking space is judged; two variables, redundancy and redundancy rate, are defined. For parking space m, the redundancy of shared bicycles in the i-th time period is given Redundancy rate with shared bicycles The calculation formula is as follows
[0023] ;
[0024] If the redundancy is greater than 0, it indicates that shared bicycles are backlogged and some shared bicycles need to be transferred out; if the redundancy is less than 0, it indicates that there is still space for parking in the parking space; the larger the absolute value of the redundancy rate, the greater the degree to which the parking space needs to be rebalanced;
[0025] Divide the city into several supply-demand balance areas, define the parking spaces in the supply-demand balance area to greatly meet the redundancy of shared bicycles and complement each other and be close to each other, and divide the balance area;
[0026] For a potential supply-demand balance area p, define the overall shared bike balance level of the supply-demand balance area p , the calculation formula is as follows
[0027] ;
[0028] The optimization goal of parking area division is to maximize the sum of the bicycle balance levels of all areas, as shown below
[0029] ;
[0030] The constraint is that the maximum distance between all parking spaces in each area cannot exceed the set distance threshold, as shown below
[0031] ;
[0032] A greedy strategy is adopted to treat parking spaces as points, and hierarchical clustering is used to generate the initial area division results and define the boundary points between areas. , change the area to which the boundary point belongs and compare the balance of the shared bicycle before and after the change: if the balance is higher after the change, keep the result after the change, as shown below
[0033] ;
[0034] The regions to which all boundary points belong are continuously adjusted until the regions to which all boundary points belong no longer change, and the partitioning result approaches the optimal solution. The boundary point Defined as the adjacent area Any point in the cluster whose distance is less than the average distance to the points in the cluster, as shown below
[0035] .
[0036] Furthermore, the parking space scheduling status pre-classification in S3 includes:
[0037] Define two types of parking spaces that need to guide users to dispatch shared bicycles: In the first type, the parking space is congested, the number of shared bicycles retained is greater than the shared bicycle capacity of the parking space, and the net flow of the parking space at the next moment is positive, as shown below
[0038] ;
[0039] In the second category, there are shared bikes in the parking space, but at the next moment there are other parking spaces in the same area where the outflow of shared bikes is greater than the retention of shared bikes, as shown below:
[0040] .
[0041] Furthermore, the extraction of the scheduling destination candidate set in S3 includes:
[0042] For the first type of parking spaces that need to be dispatched, other parking spaces that belong to the same area and whose shared bicycle reserve is less than the shared bicycle capacity are extracted as candidate destination parking spaces for transferring shared bicycles; for the second type of parking spaces that need to be dispatched, parking spaces that belong to the same area and whose shared bicycle demand at the next moment is greater than or equal to the shared bicycle reserve are extracted as candidate destination parking spaces for transferring shared bicycles; if there is no parking space that meets the conditions in the same area, the user walking distance threshold h is searched instead. walk Additional parking spaces are available within 1 km.
[0043] Furthermore, the factors considered in calculating the scheduling reward value in S3 include the distance of user transfer, the degree of complementarity of shared bicycles in the parking spaces before and after the transfer, and the demand for shared bicycles in the next time period of the parking space after the transfer; the longer the user's riding transfer distance, the higher the degree of complementarity of the shared bicycle redundant state of the parking space, and the higher the demand for shared bicycles at the destination after the transfer, the higher the reward value;
[0044] The reward R for the user to complete the scheduling by transferring his / her bicycle from the pre-parking space m to the candidate parking space n m→n It consists of two parts: the base reward calculated based on the distance and the rewards before and after the transfer; R m→n The calculation formula is as follows
[0045] ;
[0046] in, It represents the distance between parking space m and parking space n, k is the setting parameter, The calculation formula is as follows
[0047] ;
[0048] The needs of the next moment Use the opposite number of the net flow of shared bicycles at the next moment Instead, if the net flow is less than 0, it means that the demand for shared bicycles in parking spaces is greater than 0.
[0049] Furthermore, constructing the user agent in S4 includes:
[0050] According to the degree to which users care about the reward value and the urgency of travel time, the users' responses to the guidance scheme are divided into three categories: reward-driven people, distance-driven people, and dispatch-rejecting people. Different probability functions for accepting guidance are set for different types of users. The probability of reward-driven people accepting dispatch increases logarithmically with the increase of reward value, as shown below
[0051] ;
[0052] The probability of a distance-driven crowd accepting a dispatch is inversely proportional to the distance, as shown below
[0053] ;
[0054] in are all parameters of the probability function.
[0055] Furthermore, generating a user scheduling scheme in S4 includes:
[0056] Based on the parking spaces to be dispatched identified in S3 and the candidate sets of dispatch destination parking spaces extracted for each parking space to be dispatched, for each user who is riding and close to the parking space to be dispatched, the reward value corresponding to going to each parking space in the candidate set is calculated; based on the constructed user agent model, the candidate set of dispatch parking spaces and the corresponding reward values are input, and the probability of the user going to the candidate set of dispatch parking spaces is output; the candidate parking space with the highest probability is taken as the parking space that the user is most likely to go to, and the roulette method is used to determine whether the user will eventually transfer, and the user's final destination parking space and the corresponding reward value received are recorded.
[0057] Furthermore, the evaluation scheme effects in S4 include:
[0058] The data set is divided into four scenarios according to time: morning and evening peak hours on weekdays, morning and evening peak hours on holidays, off-peak hours on weekdays, and off-peak hours on holidays. The corresponding evaluation indicators are calculated in different scenarios to evaluate the optimization effect of the scheduling scheme.
[0059] The evaluation indicators include the transfer distance, the matching degree of demand after scheduling, the redundancy of shared bicycles, the total value, mean value and maximum value of the redundancy rate;
[0060] The calculation formula of the transfer distance is as follows:
[0061] ;
[0062] in, The larger the value, the higher the cost of user switching, and the corresponding user satisfaction may decrease; the smaller the value, the lower the cost of switching, and the user satisfaction will increase accordingly;
[0063] The post-dispatch demand matching degree is the matching degree between the spatial distribution of shared bicycles after scheduling optimization and the actual demand at the next moment. The calculation formula is as follows:
[0064] ;
[0065] in, The larger the value, the higher the match between the current shared bicycle inventory distribution and the shared bicycle demand at the next moment, and vice versa.
[0066] The above scheme of the present invention has the following beneficial effects:
[0067] The shared bicycle rebalancing method based on balance area division and reward mechanism guidance provided by the present invention fully considers the dynamic change of shared bicycle demand through the shared bicycle balance area division based on the greedy strategy, the user adaptive shared bicycle scheduling plan generation based on the reward mechanism, and the scheduling plan evaluation optimization based on multi-agent simulation. The shared bicycle demand in the future period is considered during scheduling, that is, the time lag of the change of shared bicycle demand is considered, and invalid scheduling is avoided to a certain extent. Before scheduling, the balance area is divided to provide a destination candidate set for the guidance of subsequent users, and the response speed of the scheduling plan is guaranteed under the condition of ensuring a low user transfer cost. The user is guided to park in the form of rewards, and the user's experience of using the car is guaranteed while the use of the car is standardized;
[0068] Other beneficial effects of the present invention will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 is a flow chart of the steps of the present invention;
[0070] Figure 2 It is a schematic diagram of the parking space reserve calculation result of the present invention;
[0071] Figure 3 A parking area division flow chart of the present invention;
[0072] Figure 4 A schematic diagram of the parking space area division result of the present invention;
[0073] Figure 5 It is the principle diagram of multi-agent simulation of the present invention;
[0074] Figure 6 This is a comparison diagram of the congestion of shared bicycles in parking spaces before and after the implementation of the guidance scheme of the present invention, where (a) is the congestion of shared bicycles before scheduling, and (b) is the congestion of shared bicycles after scheduling. DETAILED DESCRIPTION
[0075] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0076] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0077] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure, and the illustrations only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation. The type, quantity and proportion of each component in actual implementation may be changed at will, and the component layout type may also be more complicated. In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the aspects described can be practiced without these specific details.
[0078] like Figure 1 As shown, an embodiment of the present invention provides a shared bicycle rebalancing method based on balancing area division and reward mechanism guidance, comprising the following steps:
[0079] S1, data preprocessing, including data cleaning and OD extraction; OD and parking space matching.
[0080] When performing data cleaning and OD extraction, all trajectory points are sorted according to the shared bicycle ID and time, and the starting point (point O) and the end point (point D) of the shared bicycle trip are determined according to the change in the lock status, that is, the OD point (a common term in traffic planning and transportation management). After obtaining the preliminary OD points, the abnormal OD data needs to be processed, mainly including deleting points outside the research scope, taking only the last O point that appears repeatedly due to unlocking failure, and taking only the earliest D point that appears repeatedly due to returning failure.
[0081] When matching OD with parking spaces, the nearest neighbor algorithm is used to match the OD point with the center point of the parking space. Each OD point can only match one parking space. At the same time, the distance between the matched OD point and the parking space cannot exceed the set threshold h. match , otherwise it is considered as an invalid match and the OD point pair is deleted.
[0082] S2, shared bicycle balance area division, including time slice division and shared bicycle retention calculation; balanced area division based on greedy strategy.
[0083] When performing time slicing and shared bicycle retention calculation, first, all shared bicycle IDs can be obtained based on all shared bicycle trajectory data, and then the earliest recorded position of each shared bicycle in the data is selected as its initial position. According to the matching result of the shared bicycle initial position and the parking space, the initial shared bicycle retention of each parking space is statistically obtained. . Then, according to the usage patterns of shared bicycles, a day is divided into several time periods. Given the parking spaces m in the i-th time period, the net flow of shared bicycles is The calculation of is shown in formula (1):
[0084] (1)
[0085] in, and They refer to the number of bikes picked up and returned at parking space m in the i-th time period. Based on this, the method for calculating the number of shared bikes retained at parking space m in the i-th time period is shown in formula (2):
[0086] (2)
[0087] in, represents the number of shared bicycles parked in parking space m during the initial time period. Based on the above steps, the net flow of shared bicycles and the number of shared bicycles retained in each parking space in each time period can be calculated.
[0088] Assuming that each shared bicycle occupies a certain area, the shared bicycle capacity can be inferred based on the area of parking space m. , and then the parking space congestion can be determined based on the number of shared bicycles retained and the shared bicycle capacity. In this embodiment, two variables, redundancy and redundancy rate, are defined to reflect the degree of congestion of shared bicycles. For parking space m, the number of shared bicycles redundancy in a given time period i is Redundancy rate with shared bicycles The calculation method is shown in formula (3) and formula (4)
[0089] (3)
[0090] (4)
[0091] It should be noted that if the redundancy is greater than 0, it means that shared bicycles are backlogged and some shared bicycles need to be transferred out; if the redundancy is less than 0, it means that there is still space for parking. The larger the absolute value of the redundancy rate, the greater the degree to which the parking space needs to be rebalanced.
[0092] In order to realize fast and low-cost dispatch of shared bicycles, the city needs to be divided into several supply-demand balance areas. In this embodiment, the parking spaces defined in the supply-demand balance area should largely meet the redundancy of shared bicycles and be complementary and close in distance, so as to divide the balance area.
[0093] For a potential supply-demand balance area p, first define the overall shared bicycle balance degree of the supply-demand balance area p , the calculation formula is as follows
[0094] (5)
[0095] The optimization goal of parking area division is to maximize the sum of the bicycle balance levels of all areas, as shown in formula (6). The constraint is that the maximum distance between all parking spaces in each area cannot exceed the set distance threshold, as shown in formula (7).
[0096] (6)
[0097] (7)
[0098] In this embodiment, a greedy strategy is adopted, and parking spaces are regarded as points. First, hierarchical clustering is used to generate the initial area division results, and then the boundary points between areas are defined. , by changing the area to which the boundary points belong, compare the balance of the shared bicycles before and after the change: if the balance is higher after the change, as shown in formula (8), then keep the result after the change. Keep adjusting the areas to which all boundary points belong until the areas to which all boundary points belong no longer change, at which point the division result approaches the optimal solution. Among them, area The boundary point Defined as the adjacent area Any point in the cluster whose distance is less than the average distance to the points in the cluster is as shown in formula (9).
[0099] (8)
[0100] (9)
[0101] S3, build a user-dispatching shared bicycle reward mechanism, including parking space dispatch status pre-classification; dispatch destination candidate set extraction; dispatch reward value calculation.
[0102] When pre-classifying the parking space scheduling status, the following two types of parking spaces that need to guide users to schedule shared bicycles are defined: parking spaces are congested, that is, the number of shared bicycles retained is greater than the shared bicycle capacity of the parking space, and the net flow of the parking space at the next moment is positive, as shown in formula (10); there are shared bicycles retained in the parking space, but at the next moment there are other parking spaces in the same area where the outflow of shared bicycles is greater than the retained number of shared bicycles, as shown in formula (11).
[0103] and (10)
[0104] and (11)
[0105] When extracting the destination candidate set, for the first type of parking spaces that need to be dispatched, other parking spaces that belong to the same area and whose shared bicycle reserve is less than the shared bicycle capacity are extracted as candidate destination parking spaces for transferring shared bicycles. For the second type of parking spaces that need to be dispatched, parking spaces that belong to the same area and whose shared bicycle demand at the next moment is greater than or equal to the shared bicycle reserve are extracted as candidate destination parking spaces for transferring shared bicycles. If there is no parking space that meets this condition in the same area, the user walking distance threshold h is searched instead. walk Additional parking spaces are available within 1 km.
[0106] When calculating the dispatch reward value, the reward value for the user completing the shared bicycle transfer dispatch by riding is calculated based on the following factors: the distance of the user's transfer, the degree of complementarity of shared bicycles in the parking spaces before and after the transfer, and the demand for shared bicycles in the next time period after the transfer. It can be understood that the longer the user's riding transfer distance, the higher the degree of complementarity of the shared bicycle redundant state of the parking space, and the higher the demand for shared bicycles at the destination after the transfer, the higher the reward value should be. In this embodiment, the reward R for the user to complete the dispatch by riding from the pre-parking space m to the candidate parking space n is m→n It consists of two parts: the base reward calculated based on the distance and the rewards before and after the transfer. m→n The calculation method is shown in formula (12):
[0107] (12)
[0108] in, It represents the distance between parking space m and parking space n, k is the setting parameter, It represents the difference between the demand for parking space n at the next moment and the current reserve, divided by the capacity of the parking space. The calculation method is shown in formula (13):
[0109] (13)
[0110] In this embodiment, the demand at the next moment Use the opposite number of the net flow of shared bicycles at the next moment Instead, if the net flow is less than 0, it means that the demand for shared bicycles in parking spaces is greater than 0.
[0111] S4, user scheduling plan generation and effect evaluation based on multi-agent simulation, specifically including building user agents; generating user scheduling plans; and evaluating the effectiveness of the plans.
[0112] When constructing user agents, users' responses to guidance schemes are divided into three categories according to their concern for reward values and travel time urgency: reward-driven people (time is not urgent but they care about reward values), distance-driven people (time is not urgent and they don't care about reward values), and scheduling rejection people (time is urgent). In this embodiment, different probability functions for accepting guidance are set for different types of users, as shown in formulas (14) and (15). The probability of reward-driven people accepting scheduling increases logarithmically with the increase of reward values, and the probability of distance-driven people accepting scheduling is inversely proportional to the distance.
[0113] (14)
[0114] (15)
[0115] in , are all parameters of the probability function.
[0116] When generating a user scheduling plan, based on the parking spaces to be scheduled identified in S3 and the candidate sets of scheduling destination parking spaces for each parking space to be scheduled, the reward value corresponding to going to each parking space in the candidate set is quickly calculated for each user who is riding and close to the parking space to be scheduled; based on the constructed user agent model, the candidate set of scheduling parking spaces and the corresponding reward values are input, and the probability of the user going to the candidate set of scheduling parking spaces is output. Then, the candidate parking space with the highest probability is taken as the parking space that the user is most likely to go to, and the roulette method is used to determine whether the user will eventually transfer, and the user's final destination parking space and the corresponding reward value received are recorded.
[0117] When evaluating the effect of the scheme, the data set is first divided into four scenarios according to time: morning and evening peak hours on weekdays, morning and evening peak hours on holidays, off-peak hours on weekdays, and off-peak hours on holidays. Then, the corresponding evaluation indicators are calculated in different scenarios to evaluate the optimization effect of the scheduling scheme. Among them, the evaluation indicators include transfer distance, demand matching degree after scheduling, shared bicycle redundancy, total value, mean and maximum value of redundancy rate.
[0118] The calculation formula of the transfer distance is as follows:
[0119] (16)
[0120] in, The larger the value, the higher the cost of user switching, and the corresponding user satisfaction may decrease; the smaller the value, the lower the cost of switching, and the user satisfaction will increase accordingly.
[0121] The post-dispatch demand matching degree is the matching degree between the spatial distribution of shared bicycles after scheduling optimization and the actual demand at the next moment, which is defined as follows:
[0122] (17)
[0123] in, The larger it is, the more closely the current distribution of shared bicycle stock matches the demand for shared bicycles at the next moment, and vice versa.
[0124] As described above, the solution provided by this embodiment fully considers the dynamic changes in the demand for shared bicycles. The demand for shared bicycles in future time periods is taken into account during scheduling, that is, the time lag of changes in the demand for shared bicycles is taken into account, thereby avoiding invalid scheduling to a certain extent. Before scheduling, a destination candidate set is provided for the guidance of subsequent users by dividing the balance area, thereby ensuring the response speed of the scheduling solution while ensuring a low user transfer cost. Users are guided to park in the form of rewards, thereby standardizing the use of vehicles and ensuring the user experience of using vehicles.
[0125] The following specific cases further illustrate the effectiveness of this plan, using the trajectory data of shared bicycles in XX city from October 12 to 17, 2022.
[0126] First, data preprocessing is performed. According to the shared bicycle ID and unlocking status changes in the shared bicycle trajectory data, the OD points of shared bicycle travel are extracted. According to the five-day shared bicycle OD point data, the IDs of all shared bicycles are obtained. According to the longitude and latitude coordinates in the OD point data and the center point coordinates in the parking space data, the nearest neighbor algorithm is used to match each OD point with the nearest parking space. The matching distance threshold h match Set to 50m, shared bikes that are 50m away from a parking space are considered not parked in the parking space. Based on the location of each shared bike at 12:00 a.m. on the 12th, the number of shared bikes matching each parking space is counted and regarded as the initial retention of shared bikes. . After that, the difference between the number of shared bicycles at point D and point O is calculated in each period, that is, the net flow , and the retention in the previous period The sum of the two is the retention amount at that moment According to the difference between the retention amount and the shared bicycle capacity, the bicycle redundancy of the parking space is obtained Taking October 12, 2022 as an example, the calculation results of the redundant number of shared bicycles in some parking spaces at 8 am are as follows: Figure 2 shown.
[0127] Then, the balanced area is divided, and the timestamp is divided into one hour. The redundant amount of shared bicycles in the parking spaces at the end is calculated. Then, the parking area is divided based on the spatial location of all parking spaces. The goal is to minimize the average redundant amount of parking spaces in the area. The area is divided based on the maximum distance between parking spaces in the area as a constraint, and the distance threshold is set to 200m. The division steps are as follows: Figure 3 As shown. Taking October 12, 2022 as an example, first, according to the spatial location of the parking space, the hierarchical clustering method is used to obtain the division result, and the silhouette coefficient is used to evaluate the clustering effect. The optimal clustering result is used as the initial solution for the division. According to the result of the initial solution, the boundary points between clusters are obtained, and the clusters connected to each boundary point are recorded. Then all boundary points are traversed, and for each boundary point, the boundary point is exchanged to the other clusters it is connected to, and the balance of the shared bicycle before and after the exchange is calculated. If the balance is improved, the change is retained, otherwise the boundary point still belongs to the initial cluster, and this cycle is repeated until all boundary points no longer change. The result of the shared bicycle balance area division is shown in Figure 4 shown.
[0128] A scheduling plan is then generated. Every time a user arrives at the destination and parks, it is first determined whether a transfer is necessary based on the redundancy of shared bicycles in the parking space. The criteria for judgment include whether the parking space is currently congested and the net flow of shared bicycles at the next moment. If a transfer is required, the candidate set of scheduled parking spaces and the corresponding reward values are selected as described above. In this case, k in the reward value function is set to 0.0012. Afterwards, for each user who arrives at the destination parking space, multi-agent simulation is used to simulate the user's behavior on the reward value and distance corresponding to the transferred parking space, that is, whether to transfer, and if so, where the final destination parking space is. First, different types of users are defined. Different users may take different actions in response to the guidance of the system. In this case, Set to 0.004, Set to 200, and execute the scheduling plan under the assumption that the proportion of all types of users is the same. Every time a user completes parking, the number of shared bicycles retained in the corresponding parking space is updated. The interaction logic between the user agent and the parking space agent is as follows: Figure 5 shown.
[0129] When the riders in each time period have completed parking, calculate the total distance transferred by all users and the longest transfer distance of the users. Calculate the degree of match between the distribution of shared bicycles retained after the scheduling is executed and the demand distribution at the next moment, and calculate the total difference of all parking spaces and the maximum difference. Calculate the congestion of shared bicycles in parking spaces after the scheduling is executed, mainly including the total and maximum value of shared bicycle congestion, and compare it with the comparison before the scheduling plan is implemented. Figure 6 The heat map of the redundant shared bicycles in each parking space at 8 a.m. on the 12th before and after the implementation of the plan can intuitively reflect the effect of this plan and prove its effectiveness.
[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A shared bicycle rebalancing method based on balancing area division and reward mechanism guidance, characterized in that: The steps include: S1, data preprocessing; including data cleaning and OD extraction; OD and parking space matching; S2, shared bicycle balance area division; including time slice division and shared bicycle retention calculation; balanced area division based on greedy strategy; S3, build a reward mechanism for users to dispatch shared bicycles; Including the pre-classification of parking space scheduling status, defining two types of parking spaces that need to guide users to schedule shared bicycles: the first type of parking spaces that need to guide users to schedule shared bicycles are congested, the number of shared bicycles retained is greater than the shared bicycle capacity of the parking spaces, and the net flow of the parking spaces at the next moment is positive; the second type of parking spaces that need to guide users to schedule shared bicycles are those that have shared bicycles retained, but at the next moment there are other parking spaces in the same area where the outflow of shared bicycles is greater than the retained number of shared bicycles; Extraction of candidate sets of dispatch destinations: For the first type of parking spaces that need to guide users to dispatch shared bicycles, other parking spaces that belong to the same area and have a smaller number of shared bicycles than the shared bicycle capacity are extracted as candidate destination parking spaces for transferring shared bicycles; For the second type of parking spaces that need to guide users to dispatch shared bicycles, the parking spaces that belong to the same area and whose demand for shared bicycles at the next moment is greater than or equal to the number of shared bicycles in reserve are extracted as candidate destination parking spaces for transferring shared bicycles; if there are no parking spaces that meet the conditions in the same area, other parking spaces within the user's walking distance threshold are searched instead; Calculation of dispatch reward value: Calculate the reward value for users who complete the transfer dispatch of shared bicycles by riding: the distance of user transfer, the degree of complementarity of shared bicycles in parking spaces before and after the transfer, and the demand for shared bicycles in the next time period of the parking space after the transfer. The longer the user's riding transfer distance, the higher the degree of complementarity of shared bicycles in the parking space, and the higher the demand for shared bicycles at the destination after the transfer, the higher the reward value; S4, user scheduling scheme generation and effect evaluation based on multi-agent simulation, and optimization of scheduling scheme; Including building user agents; Generate user scheduling plan; Evaluate the effectiveness of the program; Data cleaning and OD extraction in S1 include: All trajectory points are sorted according to the shared bicycle ID and time. According to the change of the lock status, the OD point of the shared bicycle trip is determined. After obtaining the preliminary OD point, the abnormal OD data is processed, including deleting the points outside the research scope, taking only the last O point that appears repeatedly due to unlocking failure, and taking only the earliest D point that appears repeatedly due to returning failure. The matching of OD and parking space includes: using the nearest neighbor algorithm, matching the OD point with the center point of the parking space, each OD point can only match one parking space; the distance between the matched OD point and the parking space cannot exceed the set threshold h match , otherwise it is considered as an invalid match and the OD point pair is deleted; The time slice division and shared bicycle retention calculation in S2 include: According to all the shared bicycle trajectory data, all shared bicycle IDs are obtained, and the earliest recorded position of each shared bicycle in the data is selected as its initial position. According to the matching results of the initial position of the shared bicycle and the parking space, the initial shared bicycle retention of each parking space is statistically obtained. ; According to the usage patterns of shared bicycles, a day is divided into several time periods; given the parking space m in the i-th time period, the net flow of shared bicycles is The calculation formula is as follows ; in, and They refer to the number of pick-ups and returns at parking space m in the i-th time period respectively; the calculation formula for the number of shared bicycles retained at parking space m in the i-th time period is as follows ; in, represents the number of shared bicycles parked in parking space m during the initial time period; Calculate the net flow of shared bicycles and the number of shared bicycles retained in each parking space at each time period; The balanced region partitioning based on the greedy strategy in S2 includes: Infer the shared bicycle capacity based on the area of parking space m , according to the number of shared bicycles retained in the parking space and the capacity of shared bicycles, the congestion of the parking space is judged; two variables, redundancy and redundancy rate, are defined. For parking space m, the redundancy of shared bicycles in the i-th time period is given Redundancy rate with shared bikes The calculation formula is as follows ; If the redundancy is greater than 0, it indicates that shared bicycles are backlogged and some shared bicycles need to be transferred out; if the redundancy is less than 0, it indicates that there is still space for parking in the parking space; the larger the absolute value of the redundancy rate, the greater the degree to which the parking space needs to be rebalanced; Divide the city into several supply-demand balance areas, define the parking spaces in the supply-demand balance area to greatly meet the redundancy of shared bicycles and complement each other and be close to each other, and divide the balance area; For a potential supply-demand balance area p, define the overall shared bike balance level of the supply-demand balance area p , the calculation formula is as follows ; The optimization goal of parking area division is to maximize the sum of the bicycle balance levels of all areas, as shown below ; The constraint is that the maximum distance between all parking spaces in each area cannot exceed the set distance threshold, as shown below ; A greedy strategy is adopted to treat parking spaces as points, and hierarchical clustering is used to generate the initial area division results and define the boundary points between areas. , change the area to which the boundary point belongs and compare the balance of the shared bicycle before and after the change: if the balance is higher after the change, keep the result after the change, as shown below ; The regions to which all boundary points belong are continuously adjusted until the regions to which all boundary points belong no longer change, and the partitioning result approaches the optimal solution. The boundary point Defined as the adjacent area Any point in the cluster whose distance is less than the average distance to the points in the cluster, as shown below ; The construction of user agents in S4 includes: according to the degree of concern of users for reward value and the urgency of travel time, the user's response to the guidance scheme is divided into three categories: reward-driven group, distance-driven group, and dispatch-rejecting group. Different probability functions of accepting guidance are set for different types of users. The probability of reward-driven group accepting dispatch increases logarithmically with the increase of reward value. Generating a user dispatch plan includes: extracting a dispatch destination parking space candidate set based on the parking spaces to be dispatched identified in S3 and for each parking space to be dispatched, and calculating the reward value corresponding to going to each parking space in the candidate set for each user who is riding and close to the parking space to be dispatched; inputting the dispatch parking space candidate set and the corresponding reward value based on the constructed user agent model, and outputting the probability of the user going to the dispatch parking space candidate set; taking the candidate parking space with the highest probability as the parking space that the user is most likely to go to, using the roulette method to determine whether the user will eventually transfer, and recording the user's final destination parking space and the corresponding reward value received; The effectiveness of the evaluation scheme includes: dividing the data set into four scenarios according to time: morning and evening peak hours on weekdays, morning and evening peak hours on holidays, off-peak hours on weekdays, and off-peak hours on holidays; calculating the corresponding evaluation indicators in different scenarios to evaluate the optimization effect of the scheduling scheme.
2. The shared bicycle rebalancing method based on balancing area division and reward mechanism guidance according to claim 1 is characterized in that: The first type of parking space in S3 is congested, the number of shared bicycles retained is greater than the shared bicycle capacity of the parking space, and the net flow of the parking space at the next moment is positive, as shown below ; The second type of parking space has shared bicycles, but at the next moment there are other parking spaces in the same area where the outflow of shared bicycles is greater than the retention of shared bicycles, as shown below 。 3. The shared bicycle rebalancing method based on balancing area division and reward mechanism guidance according to claim 2 is characterized in that: When calculating the dispatch reward value in S3, the user rides from the pre-parking space Transfer to candidate parking The reward for completing the scheduling It consists of two parts: the base reward calculated based on the distance and the pre- and post-transfer rewards; The calculation formula is as follows ; in, It represents the distance between parking space m and parking space n, k is the setting parameter, The calculation formula is as follows ; The needs of the next moment Use the opposite number of the net flow of shared bicycles at the next moment Instead, if the net flow is less than 0, it means that the demand for shared bicycles in parking spaces is greater than 0.
4. The shared bicycle rebalancing method based on balancing area division and reward mechanism guidance according to claim 3 is characterized in that: When constructing a user agent in S4, the probability function is as follows ; The probability of a distance-driven crowd accepting a dispatch is inversely proportional to the distance, as shown below ; in are all parameters of the probability function.
5. The shared bicycle rebalancing method based on balancing area division and reward mechanism guidance according to claim 4 is characterized in that: When evaluating the effect of the solution in S4: The calculation formula of the transfer distance is as follows: ; in, The larger the value, the higher the cost of user switching, and the corresponding user satisfaction may decrease; the smaller the value, the lower the cost of switching, and the user satisfaction will increase accordingly; The post-dispatch demand matching degree is the matching degree between the spatial distribution of shared bicycles after scheduling optimization and the actual demand at the next moment. The calculation formula is as follows: ; in, The larger the value, the higher the match between the current shared bicycle inventory distribution and the shared bicycle demand at the next moment, and vice versa.
