A method for optimizing the number of long-distance passenger bus vehicles and related devices
By adjusting the optimization model to dynamically adjust the number of long-distance passenger buses, the problem of large gap between the prediction results in the existing technology and the actual number of passengers carried is solved, the accuracy and utilization rate of vehicle allocation are improved, and resource waste and traffic congestion are reduced.
Patent Information
- Application Number
- CN202210662676.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-13
AI Technical Summary
The existing technology cannot dynamically adjust the number of long-distance passenger buses, resulting in a large gap between the forecast results and the actual number of passengers being carried, which cannot meet the actual needs.
By obtaining the predicted value of bus vehicles allocated by each area and the actual number of passengers transported, the optimization model is adjusted to dynamically adjust the vehicle allocation volume, and the preset model is optimized to predict the vehicle allocation volume this week.
Dynamic adjustments are achieved based on actual conditions, improving the accuracy of vehicle allocation, improving the utilization rate of buses, and reducing resource waste and traffic congestion.
Smart Images

Figure CN115062838B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent transportation technology, and in particular to a method for optimizing the allocation of the number of long-distance passenger buses and related devices. Background Art
[0002] In recent years, with the rapid development of the economy, population mobility has become more frequent. Although the transportation industry is also developing rapidly, for many suburban long-distance passenger stations, their departure areas and the number of vehicles sent to the area are generally fixed. This has caused many buses to run empty, resulting in low utilization of buses, waste of resources, and traffic congestion.
[0003] In order to avoid the above problems, the existing technology uses a prediction model to predict the vehicle allocation in each area, and then allocates the number of vehicles in each area based on the prediction results. When the prediction results deviate greatly from the actual situation, the existing method cannot dynamically adjust the prediction results, resulting in a large deviation between the number of vehicles allocated according to the prediction results and the actual number of passengers carried, which cannot meet actual needs. Summary of the invention
[0004] The present application provides a method for optimizing the allocation of the number of long-distance passenger buses and related devices, which are used to improve the technical problems existing in the prior art that the number of vehicles allocated according to the prediction results deviates greatly from the actual number of passengers carried, cannot be dynamically adjusted, and cannot meet actual needs.
[0005] In view of this, the first aspect of the present application provides a method for optimizing the number of long-distance passenger buses, comprising:
[0006] Obtain the predicted value of the bus allocation to each area from the long-distance bus station on the last d of the week and the actual number of passengers transported by each area on the last d of the week, wherein the predicted value of the bus allocation to each area on the last d of the week is calculated based on a preset optimization model;
[0007] The preset optimization model is adjusted according to the deviation between the actual number of transported passengers in each area in the last week d and the transportable number of passengers determined based on the public transport vehicle allocation prediction value in each area in the last week d, to obtain an adjusted optimization model;
[0008] The adjusted optimization model is used to predict the allocation of public transport vehicles in each area in this week.
[0009] Optionally, the preset optimization model is adjusted according to the deviation between the actual number of transported passengers in each area last week d and the transportable number of passengers determined based on the public transport vehicle allocation prediction value of each area last week d to obtain the adjusted optimization model, specifically including:
[0010] Calculate the number of passengers that can be transported in each area on the last d day according to the predicted value of the bus allocation in each area on the last d day and the full load of the bus;
[0011] Calculate the absolute difference between the actual number of passengers transported and the transportable number of passengers in each region last week d to obtain the deviation of each region last week d;
[0012] Calculate the ratio of the deviation of each region in the previous week to the maximum tolerance error value of each region, and determine the adjustment parameter of each region according to the ratio of each region;
[0013] The preset optimization model is adjusted by using the adjustment parameters to obtain an adjusted optimization model.
[0014] Optionally, the objective function of the adjusted optimization model is:
[0015]
[0016] when When , the constraint condition of the adjusted optimization model is:
[0017]
[0018]
[0019] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0020] when When , the constraint condition of the adjusted optimization model is:
[0021]
[0022] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0023] In the formula, z is this week, z-1 is last week, and x idz is the number of buses allocated to the ith area in week d, m is the full load of the bus, K is the number of areas, and f id(z-1) is the number of passengers actually transported by the ith area in the last week, N is the total number of public transport vehicles, ψ id(z-1) is the maximum regional allocation coefficient of the ith region in the last week, i is the adjustment parameter of the ith region.
[0024] Optionally, the process of determining the adjustment parameter of each area is as follows:
[0025] When the ratio of each area is greater than or equal to the preset ratio threshold, the ratio of the difference between the actual number of passengers transported in each area last week d and the number of passengers that can be transported in each area last week d to the full load of the public transport vehicle is calculated to obtain the adjustment parameters of each area;
[0026] When the ratio of each area is less than a preset ratio threshold, the adjustment parameter of each area is set to a preset constant.
[0027] The second aspect of the present application provides a long-distance passenger bus vehicle quantity allocation optimization device, comprising:
[0028] An acquisition unit is used to acquire the predicted value of the allocation of public buses to each area from the long-distance bus station on the last d day of the previous week and the actual number of passengers transported by each area on the last d day of the previous week, wherein the predicted value of the allocation of public buses to each area on the last d day of the previous week is calculated based on a preset optimization model;
[0029] An adjustment unit, configured to adjust the preset optimization model according to the deviation between the actual number of transported passengers in each area in the last week d and the number of transportable passengers determined based on the public transport vehicle allocation prediction value in each area in the last week d, to obtain an adjusted optimization model;
[0030] The prediction unit is used to predict the public transport vehicle allocation quantity of each area in this week d through the adjusted optimization model.
[0031] Optionally, the adjustment unit is specifically used for:
[0032] Calculate the number of passengers that can be transported in each area on the last d day according to the predicted value of the bus allocation in each area on the last d day and the full load of the bus;
[0033] Calculate the absolute difference between the actual number of passengers transported and the transportable number of passengers in each region last week d to obtain the deviation of each region last week d;
[0034] Calculate the ratio of the deviation of each region in the previous week to the maximum tolerance error value of each region, and determine the adjustment parameter of each region according to the ratio of each region;
[0035] The preset optimization model is adjusted by using the adjustment parameters to obtain an adjusted optimization model.
[0036] Optionally, the objective function of the adjusted optimization model is:
[0037]
[0038] when When , the constraint condition of the adjusted optimization model is:
[0039]
[0040]
[0041] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0042] when When , the constraint condition of the adjusted optimization model is:
[0043]
[0044] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0045] In the formula, z is this week, z-1 is last week, and x idz is the number of buses allocated to the ith area in week d, m is the full load of the bus, K is the number of areas, and f id(z-1) is the number of passengers actually transported by the ith area in the last week, N is the total number of public transport vehicles, ψ id(z-1) is the maximum regional allocation coefficient of the ith region in the last week, i is the adjustment parameter of the ith region.
[0046] Optionally, the process of determining the adjustment parameter of each area is as follows:
[0047] When the ratio of each area is greater than or equal to the preset ratio threshold, the ratio of the difference between the actual number of passengers transported in each area last week d and the number of passengers that can be transported in each area last week d to the full load of the public transport vehicle is calculated to obtain the adjustment parameters of each area;
[0048] When the ratio of each area is less than a preset ratio threshold, the adjustment parameter of each area is set to a preset constant.
[0049] A third aspect of the present application provides a device for optimizing the allocation of the number of long-distance passenger buses, the device comprising a processor and a memory;
[0050] The memory is used to store program code and transmit the program code to the processor;
[0051] The processor is used to execute the long-distance passenger bus number allocation optimization method described in any one of the first aspects according to the instructions in the program code.
[0052] In a fourth aspect, the present application provides a computer-readable storage medium, which is used to store program code. When the program code is executed by a processor, it implements the long-distance passenger bus vehicle quantity allocation optimization method described in any one of the first aspects.
[0053] It can be seen from the above technical solutions that this application has the following advantages:
[0054] The present application provides a method for optimizing the number of long-distance passenger buses, comprising: obtaining a predicted value of bus allocation to each area on the d of last week from a long-distance passenger station and the actual number of passengers transported by each area on the d of last week, wherein the predicted value of bus allocation to each area on the d of last week is calculated based on a preset optimization model; adjusting the preset optimization model according to a deviation between the actual number of passengers transported by each area on the d of last week and the number of transportable passengers determined based on the predicted value of bus allocation to each area on the d of last week to obtain an adjusted optimization model; and predicting the number of bus allocations for each area on the d of this week using the adjusted optimization model.
[0055] In the present application, deviations are calculated based on predicted values of bus allocation for each region on d last week and the actual number of passengers transported for each region on d last week, and then a preset optimization model is adjusted based on the deviations calculated for each region to obtain an adjusted optimization model; the adjusted optimization model is used to predict the allocation of bus for each region on d this week, so that dynamic adjustments can be made based on actual conditions, thereby improving the technical problems in the prior art that the number of vehicles allocated based on the prediction results deviates greatly from the actual number of passengers carried, making it impossible to achieve dynamic adjustments and failing to meet actual needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0057] Figure 1 A schematic flow chart of a method for optimizing the number of long-distance passenger buses provided in an embodiment of the present application;
[0058] Figure 2 A structural schematic diagram of a long-distance passenger bus quantity optimization device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] For easier understanding, see Figure 1 The present application embodiment provides a method for optimizing the number of long-distance passenger buses, including:
[0061] Step 101, obtain the predicted value of the bus allocation to each area on the last d day of last week from the long-distance bus station and the actual number of passengers transported by each area on the last d day of last week, wherein the predicted value of the bus allocation to each area on the last d day of last week is calculated based on a preset optimization model.
[0062] The objective function of the preset optimization model in the embodiment of the present application is:
[0063]
[0064] when When , the constraints are:
[0065]
[0066]
[0067] Ψ id(z-1) *N≥x idz , i∈[1,K];
[0068] when When , the constraints are:
[0069]
[0070] x idz ≤Ψ id(z-1) *N,i∈[1,K];
[0071] In the formula, z is this week, i.e. the week to be predicted, z-1 is last week, i.e. the week before the week to be predicted, and x idz is the number of public transport vehicles allocated to the ith region in week d, that is, the predicted value of public transport vehicle allocation to the ith region in week d, m is the full load of the public transport vehicle, K is the number of regions, and f id(z-1) is the number of passengers actually transported by the ith area in the last week, N is the total number of public transport vehicles, ψ id(z-1)is the maximum regional allocation coefficient of the ith region in last week d. It can be understood that this week here is the week to be predicted, and the corresponding last week is the week before the week to be predicted. For example, when predicting the vehicle allocation in the 5th week, the prediction is made based on the actual number of passengers transported in the 4th week. At this time, this week is the 5th week and the last week is the 4th week. When predicting the vehicle allocation in the 6th week, the preset optimization model can be adjusted according to the prediction result of the 5th week and the actual situation. At this time, the 6th week is this week, the 5th week is the last week, and the 4th week is the week before last.
[0072] The construction process of the above preset optimization model is:
[0073] S1. Obtain the number of areas to which the long-distance bus station sends buses and the total number of buses at the long-distance bus station.
[0074] Once the long-distance bus station is determined, the total number of buses N of the long-distance bus station and the number of regions K (i.e. the number of destinations) to which the long-distance bus station is sent can also be determined. Due to the long distance, each long-distance bus only performs long-distance transportation once a day. The number of people going to each region is constantly changing with seasonal and other objective conditions, so it is necessary to reasonably arrange the number of long-distance buses in each region to avoid wasting resources.
[0075] S2. Construct an optimization model for obtaining the allocation of buses to each region on week d based on the number of regions and the total number of buses. The optimization model is used to minimize the sum of the squares of the difference between the number of passengers that can be transported in each region on week d and the number of passengers actually transported on last week d while satisfying constraints.
[0076] The number of buses allocated to the ith area in week d is denoted by x idz , d=1,2,...,7, d represents the number of days of the week, z represents this week, usually the number of buses in each long-distance bus terminal remains unchanged, so the first constraint can be established, the sum of the number of buses allocated to each area in this week d is less than or equal to the total number of buses in the long-distance bus terminal, that is:
[0077]
[0078] The number of buses allocated by the long-distance bus station to each area must satisfy the requirement that the number of buses allocated by the long-distance bus station to the area on week d multiplied by the full load of the bus m must be greater than or equal to the actual number of passengers transported by the area on week d, resulting in the second constraint condition, that is, the number of passengers that can be transported by each area this week must be greater than or equal to the actual number of passengers transported by the area on week d. Through research on long-distance passenger buses, it is found that the actual number of passengers fluctuates greatly during the seven days of the week, and it is difficult to use the previous day's ride situation to predict the next day's ride situation. Therefore, the actual number of passengers transported by each area on week d f is used in the embodiment of the present application. id(z-1) To predict the allocation of the area in this week d, that is, the number of passengers that can be transported in each area in this week d must be greater than or equal to the actual number of passengers transported in each area last week d, that is, the second constraint is:
[0079] x idz ×m≥f id(z-1) ,i∈[1,K].
[0080] In the formula, z-1 means that last week, the full load of a bus was generally between 25 and 35, that is, m was between 25 and 35, and m is a constant.
[0081] Considering that the total number of buses in urban and rural passenger stations remains unchanged, but due to some special factors, the number of passengers in a certain area in the previous week has increased dramatically, it is not in line with the actual situation to still use the actual number of passengers last week to predict the number of passengers this week. Therefore, the embodiment of the present application sets a maximum allocation for each area. If the maximum number of buses allocated to each area is allocated according to the total number of buses in the long-distance passenger station, the maximum number of buses that can be allocated to each area is β id(z-1) *N, β id(z-1) is the regional maximum allocation coefficient of the ith region in the last week d, and the regional maximum allocation coefficient β id(z-1) is a number greater than 0 and less than 1, and the sum of the regional maximum allocation coefficients of all regions in last week d is 1. Therefore, the number of buses at the long-distance bus station must satisfy the requirement that the number of buses allocated by the long-distance bus station to each region in this week d must be less than or equal to the regional maximum allocation of each region in last week d, that is:
[0082] β id(z-1) *N≥x idz ,i∈[1,K];
[0083] 0<β id(z-1) <1;
[0084]
[0085] How to maximize the rational use of bus resources at the long-distance bus station is an optimization problem. In order to better utilize the bus resources at the long-distance bus station, it is necessary to utilize all the buses at the long-distance bus station as much as possible under the constraints. Therefore, in the embodiment of the present application, the objective function is to minimize the sum of the squares of the difference between the number of passengers that can be transported in each area this week d and the number of passengers actually transported last week d, that is, the objective function is:
[0086]
[0087] The preliminary optimization model constructed through the above process is:
[0088]
[0089]
[0090] x idz ×m≥f id(z-1) ,i∈[1,K];
[0091] β id(z-1) *N≥x idz ,i∈[1,K];
[0092] 0<β id(z-1) <1;
[0093]
[0094] For the above preliminary optimization model, the number of public transport vehicles allocated to the ith area in week d is x idz and the regional maximum allocation coefficient β of the i-th region in the last week d id(z-1) is an unknown quantity, through the constraint condition and 0<β id(z-1) <1 can be introduced Therefore, the constraint It can be eliminated.
[0095] The embodiment of the present application also considers that, for long-distance buses, although the passenger transportation situation this week is similar to that of last week, some special cases may cause abnormal passenger transportation data of last week. It is not instructive to use abnormal data to predict the vehicle allocation situation this week, so the embodiment of the present application introduces the maximum allocation of the region. idz ×m≥f id(z-1) ,i∈[1,K] and β id(z-1) *N≥x idz ,i∈[1,K], we can get the following new constraints:
[0096]
[0097] The maximum regional allocation coefficient β in the new constraint condition id(z-1) is a variable, so the regional maximum allocation cannot normally suppress abnormal data. In order to better obtain a reasonable optimization model, the regional maximum allocation coefficient needs to be a fixed value that can truly reflect the actual capacity of each area, so it is necessary to solve the regional maximum allocation coefficient of each area. The embodiment of the present application calculates the regional maximum allocation coefficient of each area in the last week d based on the historical number of passengers transported by each area on each day in the most recent preset time period, and obtains the regional maximum allocation coefficient of each area by objectively analyzing the historical data.
[0098] Taking a certain urban and rural passenger transport bus terminal as an example, first, the historical number of passengers transported by the urban and rural passenger transport bus terminal in each week in the recent preset time period (such as the last 30 days, 60 days, etc.) is collected, and the collected historical data is statistically analyzed as follows:
[0099] Table 1
[0100]
[0101] The data from Monday to Sunday are counted separately. Some of the historical data may be abnormal data, but the proportion of the total historical data will be very small. The data obtained from the statistics in Table 1 can be regarded as a j×K data matrix represents the day of the week, and correspondingly d data matrices are generated, where b = 1, 2, ..., j and i = 1, 2, ..., K.
[0102] Calculate the ratio of each element in each data matrix to the sum of the corresponding row elements to obtain d new matrices Right now:
[0103]
[0104] Calculate the average value of each column element in each new matrix to obtain the maximum regional allocation coefficient of each region in the last week, that is:
[0105]
[0106] The above formula can be used to calculate [Ψ 1d ,Ψ 2d ,...,Ψ K-1d ,Ψ Kd ] (z-1) , that is, ψ id(z-1) =β id(z-1) It is understandable that the number of historical passengers collected changes with time, that is, the regional maximum allocation coefficient ψ of each region last week d id(z-1) It also changes over time.
[0107] The above preliminary optimization model can be expressed as:
[0108]
[0109]
[0110] x idz ×m≥f id(z-1) ,i∈[1,K];
[0111] Ψ id(z-1) *N≥x idz ,i∈[1,K].
[0112] For the constraint x idz ×m≥f id(z-1) , i∈[1,K] and the constraint Ψ id(z-1) *N≥x idz ,i∈[1,K], we can get:
[0113]
[0114] If the data of a certain area in last week d is abnormal, the constraint condition It is not true, resulting in the solution set of the constraint conditions of the entire optimization model being empty. Therefore, when establishing the entire optimization model, it is necessary to compare the actual number of passengers in each area with the maximum number of regional allocations in the area, as follows:
[0115] when When , the data in area i is normal;
[0116] when When , the data in region i is abnormal.
[0117] When the ratio of the actual number of passengers in a certain area last week to the full load of long-distance buses is greater than the maximum number of vehicles allocated in the area, the data in the area is considered abnormal. The abnormal data in the area can be directly deleted and the maximum number of vehicles allocated in the area Ψ is used. id(z-1) *N is used to replace the ratio of the actual number of passengers in the area last week to the vehicle load. id(z-1) / m, the final preset optimization model is:
[0118]
[0119] when When , the constraints are:
[0120]
[0121]
[0122] Ψ id(z-1) *N≥x idz , i∈[1,K];
[0123] when When , the constraints are:
[0124]
[0125] x idz ≤Ψ id(z-1) *N,i∈[1,K].
[0126] Step 102: Adjust the preset optimization model according to the deviation between the actual number of passengers transported in each area last week d and the number of passengers that can be transported determined based on the predicted value of the public transportation vehicle allocation in each area last week d to obtain an adjusted optimization model.
[0127] The optimal allocation scheme obtained by the above preset optimization model is reasonable for the vehicle resource allocation in most areas, but the vehicle resource allocation error in some areas is always large. In order to better and reasonably plan the vehicle resource allocation of urban and rural passenger bus stations, this application further proposes an optimization scheme based on dynamic fine-tuning. The overall scheme is to optimize this week's data based on the deviation between last week's predicted data and last week's actual data after obtaining last week's data based on the data of the previous week and the previous week.
[0128] Specifically, the number of passengers that can be transported in each area on the last d is calculated based on the predicted value of the bus allocation in each area on the last d and the full load of the bus;
[0129] Calculate the absolute difference between the actual number of passengers transported and the number of passengers that can be transported in each area last week d, and obtain the deviation of each area last week d;
[0130] Calculate the ratio of the deviation of each region in the previous week to the maximum tolerance error value of each region, and determine the adjustment parameters of each region based on the ratio of each region;
[0131] The preset optimization model is adjusted by adjusting parameters to obtain an adjusted optimization model.
[0132] Furthermore, the process of determining the adjustment parameters of each region is as follows:
[0133] When the ratio of each area is greater than or equal to the preset ratio threshold, the ratio of the difference between the actual number of passengers transported by each area last week d and the number of passengers that can be transported by each area last week d to the full load of the bus is calculated to obtain the adjustment parameter of each area; when the ratio of each area is less than the preset ratio threshold, the adjustment parameter of each area is set to a preset constant. The preset ratio threshold in the embodiment of the present application is preferably 1, and the preset constant is preferably 0.
[0134] That is, when |f idz -x idz ×m| / Γ i ≥1, then i =(f idz -x idz ×m) / m;
[0135] When |f idz -x idz ×m| / Γ i <1, then Ξ i =0;
[0136] Among them, Γ i is the maximum tolerance error value of the i-th region, i is the adjustment parameter of the ith region.
[0137] When |f idz -x idz ×m| / Γ i ≥1, the maximum area allocation of area i will change. This change can be divided into two cases. One is that the difference between the actual number of passengers transported and the number of passengers that can be transported in the area is greater than 0, and the constraint condition can be obtained:
[0138]
[0139] The Ξ in this constraint i is a positive value, it can be found that due to the constraint x idz ≤Ψ id(z-1) *N,i∈[1,K] is the region where the maximum amount of constraint suppression is allocated. The constraint condition The solution space has no effect on the optimization results.
[0140] The other is that the difference between the actual number of passengers transported and the number of passengers that can be transported in the area is less than 0. In this case, the constraint condition can be obtained:
[0141]
[0142] The Ξ in this constraint i is a negative value, it can be found that the constraint set of this constraint condition belongs to the constraint condition x idz ≤Ψ id(z-1) *N,i∈[1,K] is a subspace of the constraint set, so the constraint condition The number of vehicles in the area can be compressed, so the final adjusted optimization model can be obtained. The objective function of the adjusted optimization model is:
[0143]
[0144] when When , the constraints of the adjusted optimization model are:
[0145]
[0146]
[0147] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0148] if|f idz -x idz ×m| / Γ i ≥1, then Ξ i =(f idz -x idz ×m) / m;
[0149] if|f idz -x idz ×m| / Γ i <1, then Ξ i =0;
[0150] when When , the constraints of the adjusted optimization model are:
[0151]
[0152] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0153] if|f idz -x idz ×m| / Γ i ≥1, then Ξ i =(f idz -x idz ×m) / m;
[0154] if|f idz -x idz ×m| / T i <1, then Ξ i =0.
[0155] Step 103: Predict the number of public transport vehicles to be allocated to each area in this week d by using the adjusted optimization model.
[0156] By solving the adjusted optimization model, we can obtain the bus allocation quantity of each area in this week d, that is, the adjusted bus allocation situation.
[0157] In the embodiment of the present application, the deviation is calculated based on the predicted value of the bus allocation for each area on d last week and the actual number of passengers transported for each area on d last week, and then the preset optimization model is adjusted based on the deviation calculated for each area to obtain an adjusted optimization model; the bus allocation for each area on d this week is predicted by the adjusted optimization model, and dynamic adjustment can be achieved based on actual conditions, which improves the technical problem in the prior art that the deviation between the number of vehicles allocated according to the prediction results and the actual number of passengers carried is large, dynamic adjustment cannot be achieved, and actual needs cannot be met.
[0158] The above is an embodiment of a method for optimizing the allocation of the number of long-distance passenger buses provided by the present application, and the following is an embodiment of a device for optimizing the allocation of the number of long-distance passenger buses provided by the present application.
[0159] Please refer to Figure 2 The embodiment of the present application provides a long-distance passenger bus vehicle quantity allocation optimization device, comprising:
[0160] An acquisition unit is used to acquire the predicted value of the allocation of public buses to each area from the long-distance bus station on the last d day of the previous week and the actual number of passengers transported by each area on the last d day of the previous week, wherein the predicted value of the allocation of public buses to each area on the last d day of the previous week is calculated based on a preset optimization model;
[0161] An adjustment unit, used to adjust the preset optimization model according to the deviation between the actual number of passengers transported in each area last week d and the number of passengers that can be transported determined based on the predicted value of the public transport vehicle allocation in each area last week d, to obtain an adjusted optimization model;
[0162] The prediction unit is used to predict the allocation of public transport vehicles in each area in this week through the adjusted optimization model.
[0163] As a further improvement, the adjustment unit is specifically used for:
[0164] The number of passengers that can be transported in each area on the last d is calculated based on the predicted value of bus allocation in each area on the last d and the full load of the bus;
[0165] Calculate the absolute difference between the actual number of passengers transported and the number of passengers that can be transported in each area last week d, and obtain the deviation of each area last week d;
[0166] Calculate the ratio of the deviation of each region in the previous week to the maximum tolerance error value of each region, and determine the adjustment parameters of each region based on the ratio of each region;
[0167] The preset optimization model is adjusted by adjusting parameters to obtain an adjusted optimization model.
[0168] As a further improvement, the objective function of the adjusted optimization model is:
[0169]
[0170] when When , the constraints of the adjusted optimization model are:
[0171]
[0172]
[0173] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0174] when When , the constraints of the adjusted optimization model are:
[0175]
[0176] x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K];
[0177] In the formula, z is this week, z-1 is last week, and x idz is the number of buses allocated to the ith area in week d, m is the full load of the bus, K is the number of areas, and f id(z-1) is the number of passengers actually transported by the ith area in the last week, N is the total number of public transport vehicles, ψ id(z-1) is the maximum regional allocation coefficient of the ith region in the last week, i is the adjustment parameter of the ith region.
[0178] As a further improvement, the process of determining the adjustment parameters of each region is as follows:
[0179] When the ratio of each area is greater than or equal to the preset ratio threshold, the ratio of the difference between the actual number of passengers transported by each area last week d and the number of passengers that can be transported by each area last week d to the full load of the public transport vehicle is calculated to obtain the adjustment parameters of each area;
[0180] When the ratio of each area is less than a preset ratio threshold, the adjustment parameter of each area is set to a preset constant.
[0181] In the embodiment of the present application, the deviation is calculated based on the predicted value of the bus allocation for each area on d last week and the actual number of passengers transported for each area on d last week, and then the preset optimization model is adjusted based on the deviation calculated for each area to obtain an adjusted optimization model; the bus allocation for each area on d this week is predicted by the adjusted optimization model, and dynamic adjustment can be achieved based on actual conditions, which improves the technical problem in the prior art that the deviation between the number of vehicles allocated according to the prediction results and the actual number of passengers carried is large, dynamic adjustment cannot be achieved, and actual needs cannot be met.
[0182] The embodiment of the present application also provides a device for optimizing the allocation of the number of long-distance passenger buses, the device comprising a processor and a memory;
[0183] The memory is used to store the program code and transmit the program code to the processor;
[0184] The processor is used to execute the long-distance passenger bus vehicle quantity allocation optimization method in the aforementioned method embodiment according to the instructions in the program code.
[0185] The embodiment of the present application also provides a computer-readable storage medium, which is used to store program code. When the program code is executed by a processor, the method for optimizing the allocation of the number of long-distance passenger buses in the aforementioned method embodiment is implemented.
[0186] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0187] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0188] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0189] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0190] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0191] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0192] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for executing all or part of the steps of the method described in each embodiment of the present application through a computer device (which can be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.
[0193] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for optimizing the number of long-distance passenger buses, characterized in that: include: Obtain the predicted value of the bus allocation from the long-distance bus station to each area on the d day of the previous week and the actual number of passengers transported by each area on the d day of the previous week, where the predicted value of the bus allocation for each area on the d day of the previous week is calculated based on the preset optimization model, and d represents the number of the week; The preset optimization model is adjusted according to the deviation between the actual number of transported passengers in each area in the last week d and the transportable number of passengers determined based on the public transport vehicle allocation prediction value in each area in the last week d, to obtain an adjusted optimization model; Predict the number of public transport vehicles allocated to each area in this week d by using the adjusted optimization model; The preset optimization model is adjusted according to the deviation between the actual number of transported passengers in each area in the last week d and the transportable number of passengers determined based on the public transport vehicle allocation prediction value in each area in the last week d to obtain the adjusted optimization model, specifically including: Calculate the number of passengers that can be transported in each area on the last d day according to the predicted value of the bus allocation in each area on the last d day and the full load of the bus; Calculate the absolute difference between the actual number of passengers transported and the transportable number of passengers in each region last week d to obtain the deviation of each region last week d; Calculate the ratio of the deviation of each region in the previous week to the maximum tolerance error value of each region, and determine the adjustment parameter of each region according to the ratio of each region; The preset optimization model is adjusted by using the adjustment parameters to obtain an adjusted optimization model; The objective function of the adjusted optimization model is: when When , the constraint condition of the adjusted optimization model is: x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K]; when When , the constraint condition of the adjusted optimization model is: x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K]; In the formula, z is this week, z-1 is last week, and x idz is the number of buses allocated to the ith area in week d, m is the full load of the bus, K is the number of areas, and f id(z -1) is the actual number of passengers transported in the ith area in the last week, N is the total number of public transport vehicles, ψ id(z-1) is the maximum regional allocation coefficient of the ith region in the last week, i is the adjustment parameter of the ith region.
2. The method for optimizing the number of long-distance passenger buses according to claim 1, characterized in that: The process of determining the adjustment parameters of each region is as follows: When the ratio of each area is greater than or equal to the preset ratio threshold, the ratio of the difference between the actual number of passengers transported in each area last week d and the number of passengers that can be transported in each area last week d to the full load of the public transport vehicle is calculated to obtain the adjustment parameters of each area; When the ratio of each area is less than a preset ratio threshold, the adjustment parameter of each area is set to a preset constant.
3. A device for optimizing the number of long-distance passenger buses, characterized in that: include: An acquisition unit is used to acquire the predicted value of the allocation of public buses from the long-distance bus station to each area on the d day of the previous week and the actual number of passengers transported by each area on the d day of the previous week, wherein the predicted value of the allocation of public buses to each area on the d day of the previous week is calculated based on a preset optimization model, and d represents the number of the week; An adjustment unit, configured to adjust the preset optimization model according to the deviation between the actual number of transported passengers in each area in the last week d and the number of transportable passengers determined based on the public transport vehicle allocation prediction value in each area in the last week d, to obtain an adjusted optimization model; A prediction unit, used to predict the number of public transport vehicles allocated to each area in this week d by using the adjusted optimization model; The adjustment unit is specifically used for: Calculate the number of passengers that can be transported in each area on the last d day according to the predicted value of the bus allocation in each area on the last d day and the full load of the bus; Calculate the absolute difference between the actual number of passengers transported and the transportable number of passengers in each region last week d to obtain the deviation of each region last week d; Calculate the ratio of the deviation of each region in the previous week to the maximum tolerance error value of each region, and determine the adjustment parameter of each region according to the ratio of each region; The preset optimization model is adjusted by using the adjustment parameters to obtain an adjusted optimization model; The objective function of the adjusted optimization model is: when When , the constraint condition of the adjusted optimization model is: x idz ≤Ψ id(z=1) *N+Ξ i ,∈[1,K] when When , the constraint condition of the adjusted optimization model is: x idz ≤Ψ id(z-1) *N+Ξ i ,i∈[1,K]; In the formula, z is this week, z-1 is last week, and x idz is the number of buses allocated to the ith region in week d, m is the full load of the bus, K is the number of regions, fid(z-1) is the actual number of passengers transported by the ith region in week d, N is the total number of buses, ψ id(z-1) is the maximum regional allocation coefficient of the ith region in the last week, i is the adjustment parameter of the ith region.
4. The long-distance passenger bus number allocation optimization device according to claim 3 is characterized in that: The process of determining the adjustment parameters of each region is as follows: When the ratio of each area is greater than or equal to the preset ratio threshold, the ratio of the difference between the actual number of passengers transported in each area last week d and the number of passengers that can be transported in each area last week d to the full load of the public transport vehicle is calculated to obtain the adjustment parameters of each area; When the ratio of each area is less than a preset ratio threshold, the adjustment parameter of each area is set to a preset constant.
5. A device for optimizing the number of long-distance passenger buses, characterized in that: The device comprises a processor and a memory; The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the long-distance passenger bus number allocation optimization method described in any one of claims 1-2 according to the instructions in the program code.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and when the program codes are executed by a processor, the method for optimizing the allocation of the number of long-distance passenger buses as described in any one of claims 1-2 is implemented.
