Bus resource allocation reasonability analysis and optimization algorithm based on linear programming
1. A bus resource allocation rationality analysis and optimization algorithm based on linear programming is characterized by comprising the following steps:
step one, counting public transportation characteristics: firstly, respectively counting the full load rates of vehicles of each type at early peak, flat peak and late peak; then, for a line, finding out vehicles of specific models running on the line, and calculating the transport capacity supply-demand ratio of the line according to the full load rates of the vehicles of the models; secondly, acquiring more accurate bus characteristics of line operation cost, departure interval and transportation capacity related conditions through real bus operation related data;
step two, optimizing and solving: on the basis of the step one, a linear programming correlation method is used, the operation cost is as low as possible on the premise that the transport capacity of a single line is guaranteed, reasonable vehicle configuration information and operation strategies related to the line are obtained, and a bus resource configuration optimization suggestion is given;
step three, obtaining a configuration result: and on the basis of the second step, calculating and obtaining the characteristics mentioned in the first step and the second step through a big data technology, and compiling an algorithm script by using a Python language to finally obtain the optimized departure interval, the optimized cost and the optimized operation capacity of the bus network at early peak, flat peak and late peak and a vehicle scheduling schedule which is more in line with the actual situation.
2. The bus resource allocation rationality analysis and optimization algorithm based on linear programming according to claim 1 is characterized in that the full load rate is also called a "full load coefficient", a relative value of the full load degree of passengers of vehicles running on a line is reflected within a certain time, and an index for measuring the utilization degree of the vehicles is an important index for reflecting the service quality and level of urban buses, and the full load rate formula is as follows:
3. the bus resource allocation rationality analysis and optimization algorithm based on linear programming according to claim 1, characterized in that the capacity supply-demand ratio is calculated by the following formula:
and calculating the line transport capacity supply-demand ratio in one day by using the formula, then calculating the average value of the line transport capacity supply-demand ratios in 30 days of the line, calculating the transport capacity supply-demand ratios of other lines of the whole wire net in the same way, and analyzing the transport capacity of the whole wire net by using a data analysis related method through the transport capacity supply-demand ratios of the whole wire net to obtain a whole wire net transport capacity portrait.
4. The bus resource allocation rationality analysis and optimization algorithm based on linear programming according to claim 1, characterized in that the data analysis correlation method comprises:
min(x1·COSTK1+x2·COSTK2+x3·COSTK3)
wherein the departure time interval is as follows:left _ rate and right _ rate are the ratio of the independent variable scaling, which are two hyper-parameters, K1, K2 and K3 are vehicle models, x is1、x2、x3COST for each type of vehicle runningK1、COSTK2、COSTK3For the running cost of each type of vehicle.
5. The bus resource allocation rationality analysis and optimization algorithm based on linear programming according to claim 1, characterized in that actual constraint conditions
min(x1·COSTK1+x2·COSTK2+x3·COSTK3)
。
6. A linear programming based bulletin as in claim 1A resource allocation rationality analysis and optimization algorithm is characterized in that,
the numerator and 30 on the denominator are simultaneously eliminated,
T=N×t_block
tupriver: certain time period (morning peak period) up single-trip travel time (min)
tdownriver: down single-trip travel time (min) at a certain time (morning peak period)
tup_stop: uplink station dwell time (min) at a certain time (early peak period)
tdown_stop: residence time (min) of downlink station at a certain time (early peak period)
trest: maximum rest time (min) of secondary station during a certain period (early peak period)
N: the time period we analyze is several times t _ block.
Background
The linear programming is the most important branch of operational research, is the most perfect theoretically and is the most widely applied practically. Mainly used for researching the optimal allocation problem of the limited resources, namely how to make the best mode allocation and the most beneficial use of the limited resources so as to make the best use of the efficiency of the resources to obtain the best economic benefit. At present, linear programming correlation methods are used in the market to optimize the resource allocation of the buses falling to the ground, and accurate optimization characteristics are obtained through real bus correlation data through a big data technology, so that an optimization algorithm is constructed, and a scientific resource allocation scheme is obtained.
Disclosure of Invention
The invention aims to provide a bus resource allocation reasonability analysis and optimization algorithm based on linear programming so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
a bus resource allocation rationality analysis and optimization algorithm based on linear programming comprises the following steps:
step one, counting public transportation characteristics: firstly, respectively counting the full load rates of vehicles of each type at early peak, flat peak and late peak; then, for a line, finding out vehicles of specific models running on the line, and calculating the transport capacity supply-demand ratio of the line according to the full load rates of the vehicles of the models; secondly, acquiring more accurate bus characteristics of line operation cost, departure interval and transportation capacity related conditions through real bus operation related data;
step two, optimizing and solving: on the basis of the step one, a linear programming correlation method is used, the operation cost is as low as possible on the premise that the transport capacity of a single line is guaranteed, reasonable vehicle configuration information and operation strategies related to the line are obtained, and a bus resource configuration optimization suggestion is given;
step three, obtaining a configuration result: and on the basis of the second step, calculating and obtaining the characteristics mentioned in the first step and the second step through a big data technology, and compiling an algorithm script by using a Python language to finally obtain the optimized departure interval, the optimized cost and the optimized operation capacity of the bus network at early peak, flat peak and late peak and a vehicle scheduling schedule which is more in line with the actual situation.
As a still further scheme of the invention: the full load rate is also called as a full load coefficient, reflects the relative value of the full load degree of passengers of vehicles running on a line within a certain time, measures the index of the utilization degree of the vehicles, is an important index for reflecting the quality and the level of urban public transportation service, and has the following formula:
as a still further scheme of the invention: and calculating the transport capacity supply-demand ratio according to the following formula:
and calculating the line transport capacity supply-demand ratio in one day by using the formula, then calculating the average value of the line transport capacity supply-demand ratios in 30 days of the line, calculating the transport capacity supply-demand ratios of other lines of the whole wire net in the same way, and analyzing the transport capacity of the whole wire net by using a data analysis related method through the transport capacity supply-demand ratios of the whole wire net to obtain a whole wire net transport capacity portrait.
As a still further scheme of the invention: data analysis related methods:
min(x1·COSTK1+x2·COSTK2+x3·COSTK3)
wherein the departure time interval is as follows:left _ rate and right _ rate are the ratio of the independent variable scaling, which are two hyper-parameters, K1, K2, K3 are vehicle models, x1、x2、x3COST for each type of vehicle runningK1、COSTK2、COSTK3For the running cost of each type of vehicle.
As a still further scheme of the invention: the actual constraints are:
min(x1·COSTK1+x2·COSTK2+x3·COSTK3)
as a still further scheme of the invention:
the numerator and 30 on the denominator are simultaneously eliminated,
T=N×t_block
tupriver: certain time period (morning peak period) up single-trip travel time (min)
tdownriver: down single-trip travel time (min) at a certain time (morning peak period)
tup_stop: uplink station dwell time (min) at a certain time (early peak period)
tdown_stop: residence time (min) of downlink station at a certain time (early peak period)
trest: maximum rest time (min) of secondary station during a certain period (early peak period)
N: the time period we analyze is several times t _ block.
Compared with the prior art, the invention has the beneficial effects that: by means of optimization solution, the optimized departure interval, the optimized cost and the optimized transport capacity of the bus network in early peak, average peak and late peak can be obtained, and the bus scheduling schedule is more in line with the actual schedule.
Drawings
Fig. 1 is an overall flow chart of a bus resource allocation rationality analysis and optimization algorithm based on linear programming.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, they are merely examples and are not intended to limit the present invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
The problem of the transportation capacity configuration of the public transportation system relates to the efficiency of urban traffic operation. Improper capacity allocation will cause a mismatch between the traffic supply capacity and the supply resources, resulting in wasted resources. The capacity is put in too much, which not only causes the waste of social resources, but also generates malignant competition and causes a series of social problems; the capacity is not enough, which not only can not satisfy the trip needs of the masses, but also is not beneficial to the business owner to improve the transportation service quality.
And (4) taking the capacity of transporting capacity supply and the demand of transporting capacity as cut-in ports, diagnosing whether the allocation of the net resources is reasonable or not, and solving the problem of unbalanced supply and demand of transporting capacity. According to the overall situation of the transport capacity supply-demand ratio of the whole line network circuit, the method of linear programming and the like is used to obtain reasonable vehicle configuration information and operation strategies related to the circuit, and optimization suggestions are given
Referring to fig. 1, in an embodiment of the present invention, a bus resource allocation rationality analysis and optimization algorithm based on linear programming includes the following steps:
step one, counting public transportation characteristics: firstly, respectively counting the full load rates of vehicles of each type at early peak, flat peak and late peak; then, for a line, finding out vehicles of specific models running on the line, and calculating the transport capacity supply-demand ratio of the line according to the full load rates of the vehicles of the models; secondly, acquiring more accurate bus characteristics of line operation cost, departure interval and transportation capacity related conditions through real bus operation related data;
step two, optimizing and solving: on the basis of the step one, a linear programming correlation method is used, the operation cost is as low as possible on the premise that the transport capacity of a single line is guaranteed, reasonable vehicle configuration information and operation strategies related to the line are obtained, and a bus resource configuration optimization suggestion is given;
step three, obtaining a configuration result: and on the basis of the second step, calculating and obtaining the characteristics mentioned in the first step and the second step through a big data technology, and compiling an algorithm script by using a Python language to finally obtain the optimized departure interval, the optimized cost and the optimized operation capacity of the bus network at early peak, flat peak and late peak and a vehicle scheduling schedule which is more in line with the actual situation.
The full load rate is also called as a full load coefficient, reflects the relative value of the full load degree of passengers of vehicles running on a line within a certain time, measures the index of the utilization degree of the vehicles, is an important index for reflecting the quality and the level of urban public transportation service, and has the following formula:
and calculating the transport capacity supply-demand ratio according to the following formula:
and calculating the line transport capacity supply-demand ratio in one day by using the formula, then calculating the average value of the line transport capacity supply-demand ratios in 30 days of the line, calculating the transport capacity supply-demand ratios of other lines of the whole wire net in the same way, and analyzing the transport capacity of the whole wire net by using a data analysis related method through the transport capacity supply-demand ratios of the whole wire net to obtain a whole wire net transport capacity portrait.
The data of the bus in the early peak period is used as an example to analyze whether the transportation capacity is balanced or not, and the statistical data is as follows.
Relevant data sheet for 3 runs during the early rush hour for a vehicle model K1
Note:
the "number of passengers" in the table refers to the number of passengers on the bus when the bus is started to leave the station after the bus enters the station, and the passengers get off and get on the bus.
Data sheet related to public transport in early peak period of a certain day
The calculated Line capacity ratio is the early peak Line capacity ratio in one day of Line1, and then the average value of the early peak Line capacity ratio in 30 days of Line1 is calculated. The other lines are calculated in the same manner. After the complete net was calculated, the data in the table below were obtained.
Line transport capacity supply-demand ratio in line network
By using the data in the table above and using the data analysis correlation method, the transport capacity of the whole wire net during the early peak period can be analyzed, and the whole wire net transport capacity portrait can be obtained.
Important explanation:
some cities provide data of the dimension of "full load rate" in the bus data, some cities do not necessarily provide the data, and if there is no index, the number of people getting off at a certain stop within a certain time period can be estimated through some existing algorithms (for example, an algorithm based on stop attraction), generally, buses have data of the number of people getting on the stop and card swiping times, and then the number of people getting off the stop is combined to calculate the "full load rate" of the stop, for details, refer to the paper: section 4.2.2 of the method for estimating passenger flow at bus stop based on IC card data.
It is worth pointing out that the number of passengers is estimated through an algorithm based on the attraction of the bus stop, characteristics related to bus service capacity and the like used in calculating demand indexes of bus stops can be added into the attraction strength of the passengers, the characteristics can well represent the attraction strength of the bus stop, and please refer to a document in detail: an algorithm of bus route travel demand index, a scheme, a draft, 20200408-V1.0.0.
Data analysis related methods:
min(x1·COSTK1+x2·COSTK2+x3·COSTK3)
wherein the departure time interval is as follows:through investigation, the expected departure interval of the related department of the public transport is not more than 8 minutes, the threshold value may be different at different places, and the adjustment can be carried out according to the actual running condition. The left _ rate and the right _ rate are the ratio of the independent variable scaling, and are two hyper-parameters, and by setting the scaling, more real optimization results can be obtained, wherein the two hyper-parameters are K1, K2 and K3 are vehicle models, and x is the ratio of the independent variable scaling1、x2、x3COST for each type of vehicle runningK1、COSTK2、COSTK3For the running cost of each type of vehicle.
As a still further scheme of the invention: the actual constraints are:
min(x1·COSTK1+x2·COSTK2+x3·COSTK3)
the numerator and 30 on the denominator are simultaneously eliminated,
T=N×t_block
tupriver: certain time period (morning peak period) up single-trip travel time (min)
tdownriver: down single-trip travel time (min) at a certain time (morning peak period)
tup_stop: uplink station dwell time (min) at a certain time (early peak period)
tdown_stop: residence time (min) of downlink station at a certain time (early peak period)
trest: maximum rest time (min) of secondary station during a certain period (early peak period)
N: the time period we analyze is several times t _ block.
In practice, it may be simple to have a total time given the time period to be analyzed, e.g. the total time during the early peak period, from 7 to 9 am, for a total time of 2 hours, i.e. T120 min.
And by using a linear programming correlation method, the operation cost is as low as possible on the premise of ensuring the transport capacity of a single line, reasonable vehicle configuration information and operation strategies related to the line are obtained, and a bus resource configuration optimization suggestion is given.
Assume that Line1 is configured with 3 models of vehicles denoted as K1, K2, K3; let x be the number of laps run by each model of vehicle during the early peak period1,x2,x3(ii) a The departure time interval is set as t; the cOST (the cOST can be calculated according to the hour or the day) of the early peak period of the 3 models of vehicles is cOST respectivelyK1,COSTK2,COSTK3。
It should be noted here that in order to make the final calculation result by linear programming more accurate and more scientific, the cost calculation for each type of vehicle must be consistent with the actual situation.
The following tables list features related to vehicle cost (if the cost data available in the department related to the public transportation is not needed to be calculated, otherwise, the cost of the vehicle is calculated according to the actual operation rules of the public transportation according to the features listed in the tables) and some important attributes related to the vehicle, such as the number of people loading the vehicle, etc.
Vehicle cost accounting dimension table
Cost meter for vehicles of different models
Passenger car model
Cost of
K1
COSTK1
K2
cOSTK2
K3
COSTK3
Exploratory data analysis dimension meter for bus data
One month early peak related data of Line1
Here we only consider the early peak capacity allocation problem, assuming that the early peak period is from 7 to 9 am for a total of two hours. Counting the related data of the public transport to obtain tblock=60(min),
All N-2, leftrate0.5 and rightrate=1.5。
min(x1·COSTK1+x2·COSTK2+x3·COSTK3)
The results of the final solution by linear programming are illustrated by line 28, as shown in the table below.
Optimized single line related feature table
Optimized single line related feature table
From the data in the table above, we can do many things. For example, an approximation of the total cost of bus operations may be given; a schedule or the like may be given. It is to be noted here that, for example, for the model: the vehicles of the ZK6125BEVG60E, such as vehicles with the vehicle number of 21 and vehicles with the vehicle number of 34 under the model, can be added with a column in the table in order to make the shift more in line with the actual operation strategy, the number of laps of the actual shift under the model is counted, and the like, so as to achieve the more in line with the actual vehicle shift schedule.
By means of optimization solution, the optimized departure interval, the optimized cost and the optimized transport capacity of the bus network in early peak, average peak and late peak can be obtained, and the bus scheduling schedule is more in line with the actual schedule.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.