CN113269475B - Bus scheduling method and system based on genetic algorithm - Google Patents

Bus scheduling method and system based on genetic algorithm Download PDF

Info

Publication number
CN113269475B
CN113269475B CN202110720010.2A CN202110720010A CN113269475B CN 113269475 B CN113269475 B CN 113269475B CN 202110720010 A CN202110720010 A CN 202110720010A CN 113269475 B CN113269475 B CN 113269475B
Authority
CN
China
Prior art keywords
station
waiting time
shift
time
different
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110720010.2A
Other languages
Chinese (zh)
Other versions
CN113269475A (en
Inventor
宁煌
马驰
吴名朝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Whale Cloud Technology Co Ltd
Original Assignee
Whale Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Whale Cloud Technology Co Ltd filed Critical Whale Cloud Technology Co Ltd
Priority to CN202110720010.2A priority Critical patent/CN113269475B/en
Publication of CN113269475A publication Critical patent/CN113269475A/en
Application granted granted Critical
Publication of CN113269475B publication Critical patent/CN113269475B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Abstract

The invention discloses a bus scheduling method and system based on a genetic algorithm, wherein the method comprises the following steps: s1, introducing a preset number of traffic going volume pairs of the upper station and the lower station according to the number of the passenger flow from high to low, and calculating and analyzing to obtain initial shift-sending shifts of different lines in different time periods; s2, counting the card swiping quantity of each site, and giving different weight coefficients to different sites; and S3, continuously and iteratively calculating the minimum average waiting time of each station and the standard deviation of all waiting times through a genetic algorithm to adjust the number of times of shift sending of each line in different periods. Has the advantages that: compared with the possible results of traversing all routes by an exhaustion method, the method adopts the genetic algorithm to transfer parameters, can obtain the optimal shift-sending times of different routes in a faster time, and can calculate smaller waiting time and standard deviation of the waiting time more quickly.

Description

Bus scheduling method and system based on genetic algorithm
Technical Field
The invention relates to the technical field of intelligent transportation, in particular to a bus scheduling method and system based on a genetic algorithm.
Background
The reasonable bus scheduling can not only reduce the total number of shift-sending shifts in one day, but also reduce the waiting time of passengers and increase the riding willingness of the passengers. Most of the existing public transportation dispatching systems adjust the frequency of the bus in one day, or only consider the condition of a certain peak period, or only consider single waiting time as an optimization index, and do not consider the passenger flow change condition of a station in one day. In practical situations, the passenger flow volume of each station in a day has different discontinuous peak periods and discontinuous off-peak periods, so that under the condition that the departure shift is fixed, how to introduce the discontinuous peak periods or the non-peak periods as reference, how to allocate different station weights to the stations, and how to adjust the departure frequency of different lines in different periods, so as to meet the riding requirements of passengers, becomes a problem to be solved urgently.
Disclosure of Invention
Aiming at the problems in the related art, the invention provides a bus scheduling method and system based on a genetic algorithm, so as to overcome the technical problems in the prior related art.
Therefore, the invention adopts the following specific technical scheme:
according to one aspect of the invention, a bus scheduling method based on a genetic algorithm is provided, and the method comprises the following steps:
s1, introducing a preset number of traffic going volume pairs of the upper station and the lower station according to the number of the passenger flow from high to low to calculate and analyze, and obtaining the initialization shift of different lines at different time intervals;
s2, counting the card swiping quantity of each site, and giving different weight coefficients to different sites; for example, the card swiping numbers of the station a and the station b are respectively 1 ten thousand and 9 ten thousand, then the total waiting time is: the average waiting time of 0.1 stop a +0.9 stop b, that is, the average waiting time of the stop b is made as small as possible to minimize the waiting time, so that the passengers at the stop b are more willing to take the bus instead of taking other vehicles, thereby maximizing the economic benefit of the bus.
And S3, adjusting different shift sending times according to different periods of each line, and calculating the minimum average waiting time of each station and the standard deviation of all waiting times by a genetic algorithm.
Further, the step S1 of calculating and analyzing the traffic travel amount pairs of the upper station and the lower station, which are introduced into the preset number according to the number of the passenger flows from high to low, to obtain the initialization shift of different lines in different time periods includes the following steps:
s11, introducing a preset number of traffic going volume pairs of the upper station and the lower station according to the number of the passenger flow from high to low to calculate;
s12, acquiring all the lines between the traffic volume pairs, and dividing one day into 6 different time intervals for statistics according to the average card swiping number of each line station in the past 7 days of the history;
and S13, obtaining the initialization shift of different time periods of different lines according to the number of card swiping in each time period and the total shift of the current line.
For example: the total shift number of the line 10 is 50 times per day, the average total card swiping number of passengers per day in the last 7 days is 5 ten thousand, the average card swiping number of passengers per day from 6 to 9 in the morning is 2 ten thousand, the initial shift number of the line 10 from 6 to 9 in the morning is 50 × 2/5-10, and the initial shift numbers of other periods are calculated similarly in turn.
Further, the calculation formula for initializing the shift in S13 is as follows:
bi j=pi×btotal/ptotal
wherein p isiRepresenting the average number of card swipes per time period, btotalIndicating the total shift, p, of the current linetotalRepresenting the total card swiping amount of the current line in the current day.
Further, the calculation formula of the weight coefficient of the station in S2 is as follows:
WSi=pSi/ptotal
wherein p isSiNumber of card swipes, p, representing a sitetotalRepresents the total card swiping amount of the current line in the day, SiIs the meaning of the station on which the traffic volume pair is presented.
Further, in the step S3, the adjustment of the shift sending times according to different periods of each line, and the calculation of the minimum average waiting time of each station and the standard deviation of all waiting times by using a genetic algorithm include the following steps:
s31, determining the traffic volume pairs of the upper station and the lower station which influence the waiting time mutually and the corresponding line groups, and carrying out grouping processing on the mutually influenced lines;
s32, calculating the arrival time of each traffic travel amount pair according to the departure time;
s33, calculating the waiting time and the waiting time standard deviation of a single upper station traffic volume pair and a single lower station traffic volume pair;
s34, calculating the weighted waiting time and waiting time standard deviation of all the upper station traffic volume pairs and the lower station traffic volume pairs;
s35, regarding the shift of the initialized shift list of all lines of the traffic volume pairs which are affected by the adjustment of the genetic algorithm, adding a shift offset list under the condition of keeping the total shift unchanged to obtain a new shift list, obtaining a new standard deviation of waiting time with weight and waiting time with weight from the new shift list, and meanwhile, continuously performing iterative calculation through the genetic algorithm to minimize two parameters of the standard deviation of the waiting time with weight and the waiting time with weight;
and S36, constructing the best shift list of each route through the acquired shift offset list. Further, the calculation formula of the arrival time in S32 is as follows:
tarrival=tdepartment+r/v;
wherein, tdepartmentThe departure time is represented, r represents the line length from the station to the departure point, and v represents the average speed per hour of the bus.
Further, the step of calculating the waiting time and the standard deviation of the waiting time of the single upper station traffic travel amount pair and the single lower station traffic travel amount pair in S33 includes the following steps:
s331, setting the arrival time list of all routes of each traffic travel amount pair of the upper station and the lower station as TarrivalWherein the arrival time list TarrivalThe formula of (1) is as follows:
Figure GDA0003347485210000031
s332, calculating the waiting time of the traffic travel amount pair, wherein the waiting time TwaitThe calculation formula of (a) is as follows:
Figure GDA0003347485210000032
s333, calculating the average waiting time of the traffic travel amount pairs, wherein the average waiting timeTime tavg-waitThe calculation formula of (a) is as follows:
Figure GDA0003347485210000033
where n represents the number of times to arrive at the upper site minus 1,
Figure GDA0003347485210000034
arrival time expressed as ith shift;
s334, calculating the standard deviation of the waiting time of the traffic travel amount pair, wherein the standard deviation sigma of the waiting timeavg-waitThe calculation formula of (a) is as follows:
Figure GDA0003347485210000041
where N1 represents the number of times to arrive at the on-site,
Figure GDA0003347485210000042
expressed as the arrival time of the ith shift.
Further, the step of calculating weighted waiting time and standard deviation of waiting time of all pairs of the on-station and off-station traffic traveling volume in S34 includes the following steps:
s341, setting the weighted waiting time of all the upper station and lower station traffic going quantity pairs as tavg-wait-weightWherein the waiting time t is weightedavg-wait-weightThe calculation formula of (a) is as follows:
Figure GDA0003347485210000043
wherein the content of the first and second substances,
Figure GDA0003347485210000044
expressed as the corresponding weight coefficient of the ith upper and lower station traffic going quantity pair,
Figure GDA0003347485210000045
the corresponding average waiting time is expressed as the ith on-station and off-station traffic volume pair, and N1 represents the number of the time reaching the on-station;
s342, calculating the weighted waiting time standard deviation sigma of all the upper station traffic volume pairs and the lower station traffic volume pairsavg-wait-weightWherein the weighted waiting time standard deviation sigmaavg-wait-weightThe calculation formula of (a) is as follows:
Figure GDA0003347485210000046
further, the step of adding the shift offset list while keeping the total shift unchanged in S35 further includes: debugging different parameter values, and adjusting the sequential value-taking offset list of each grouped line by adopting a genetic algorithm, wherein the sequential value-taking offset list of each grouped line by adopting the genetic algorithm comprises the following steps:
firstly, binary coding is carried out on parameters of a value-taking result of the offset list;
performing roulette selection in a genetic algorithm;
and performing intersection and mutation operations, and acquiring a better shift list by taking two parameters of the standard deviation of the waiting time with the weight and the waiting time with the weight as evaluation functions.
According to another aspect of the invention, a bus scheduling system based on a genetic algorithm is provided, and the system comprises a time interval-based shift-sending initialization module, a station weight calculation module, and a station waiting time and standard deviation calculation module based on the genetic algorithm;
the time-interval-based class-sending initialization module is used for calculating and analyzing the traffic going volume pairs of the upper station and the lower station, which are introduced in preset quantities according to the number of passenger flows from high to low, so as to obtain the initialization classes of different lines in different time intervals;
the station weight calculation module is used for counting the card swiping quantity of each station and endowing different weight coefficients to different stations;
the station waiting time and standard deviation calculation module based on the genetic algorithm is used for adjusting different shift-sending times according to different periods of each line, and calculating the minimum average waiting time of each station and the standard deviation of all waiting times through the genetic algorithm.
The invention has the beneficial effects that:
1) the invention adopts the time-based shift-sending initialization module to divide a day into 6 time periods, and the division of the 6 time periods can better reflect the passenger flow conditions of a plurality of discontinuous peak periods and a plurality of discontinuous non-peak periods in the day, thereby reducing the probability of unnecessary shift-sending increase. In addition, the station weight calculation module is adopted, so that the average waiting time of stations with more passengers is shorter, the passengers are more willing to take the bus instead of taking other vehicles, and the economic benefit of the bus can be maximized.
2) According to the station waiting time and waiting time standard difference calculation module based on the genetic algorithm, the two indexes of the waiting time and the waiting time standard difference are optimized, and the riding willingness of passengers can be increased compared with the single optimization of the waiting time. The genetic algorithm is adopted for coding, selecting, crossing and varying to adjust the shift sending frequency in different periods, optimal parameters are obtained according to two evaluation indexes of the waiting time and the standard deviation of all the waiting times, and compared with a possible result of traversing all routes by an exhaustion method, the genetic algorithm is adopted for adjusting the parameters to obtain the optimal shift sending times of different routes in a faster time, so that the waiting time and the standard deviation of the waiting time are calculated to be smaller.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of a bus scheduling method based on a genetic algorithm according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a principle of grouping lines of an upper station OD pair and a lower station OD pair that mutually influence a waiting time in a bus scheduling method based on a genetic algorithm according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of an initialized shift list of all lines of OD pairs where tuning parameters of genetic algorithms affect each other in the bus scheduling method based on the genetic algorithms according to the embodiment of the present invention.
Detailed Description
For further explanation of the various embodiments, the drawings which form a part of the disclosure and which are incorporated in and constitute a part of this specification, illustrate embodiments and, together with the description, serve to explain the principles of operation of the embodiments, and to enable others of ordinary skill in the art to understand the various embodiments and advantages of the invention, and, by reference to these figures, reference is made to the accompanying drawings, which are not to scale and wherein like reference numerals generally refer to like elements.
According to the embodiment of the invention, a bus scheduling method and system based on a genetic algorithm are provided.
Referring to the drawings and the detailed description, the invention will be further explained, as shown in fig. 1 to 3, according to an embodiment of the invention, a bus shift scheduling method based on a genetic algorithm is provided, which includes the following steps:
s1, introducing the traffic travel (OD) pairs of the upper station and the lower station of the previous n (such as 200) from high to low according to the number of the passenger flow, and calculating and analyzing to obtain the initialization shift of different lines in different time periods;
in S1, the step of calculating and analyzing the traffic volume pairs of the upper station and the lower station, which are introduced into the preset number of the pairs according to the number of the passenger flows from high to low, to obtain the initial shift of different lines at different time intervals includes the following steps:
s11, introducing a preset number of traffic going amount pairs of the upper station and the lower station according to the passenger flow amount from high to low, and counting 6 different time intervals in one day; for example: 6 am to 9 am, 9 am to 12 am, 12 am to 3 pm, 3 pm to 6 pm, 6 pm to 9 pm, 9 pm to 12 pm.
S12, acquiring all the lines between the traffic volume pairs, and dividing one day into 6 different time intervals for statistics according to the average card swiping number of each line station in the past 7 days of the history;
and S13, obtaining the initialization shift of different time periods of different lines according to the number of card swiping in each time period and the total shift of the current line.
Specifically, the number p of card swiping of each time period of the initial shift passingiThe total card swiping amount p of the line in the daytotalThe ratio of the current time to the total shift number b of the current linetotalThe calculation formula is obtained as follows:
Figure GDA0003347485210000071
wherein p isiRepresenting the average number of card swipes per time period, btotalIndicating the total shift, p, of the current linetotalRepresenting the total card swiping amount of the current line in the current day.
For example: the total shift number of line 10 is 50 times per day, the average total card swiping number of passengers per day in the last 7 days is 5 ten thousand, the average card swiping number of passengers per day from 6 to 9 in the morning is 2 ten thousand, the initial shift number of line 10 from 6 to 9 in the morning is 50 × 2/5-10, the initial shift numbers of other periods are calculated similarly in turn, and the initial shift lists B of different periods of the line jjCan be represented by the following formula:
Figure GDA0003347485210000072
s2, counting the number of card swipes of each station
Figure GDA0003347485210000073
And different weight coefficients are given to different sites
Figure GDA0003347485210000074
The standard deviation calculation method is used for calculating the subsequent average waiting time and all waiting times, the average waiting time of each upper station is multiplied by the weight, and the calculation results of all stations are added to obtain the total waiting time;
wherein, the weighting coefficient of the station in S2
Figure GDA0003347485210000075
The calculation formula of (a) is as follows:
Figure GDA0003347485210000076
wherein the content of the first and second substances,
Figure GDA0003347485210000077
number of card swipes, p, representing a sitetotalRepresents the total card swiping amount of the current line in the day, SiIs the meaning of the station on which the traffic volume pair is presented.
And S3, a station waiting time and standard deviation calculation module based on the genetic algorithm. Firstly, all accessible routes which mutually form waiting time of each upper station traffic volume pair and each lower station traffic volume pair are determined, after all routes are adjusted, the arrival time of each upper station traffic volume pair and each lower station traffic volume pair is estimated according to the departure time, and therefore the standard difference between the minimum average waiting time and all waiting times of each upper station traffic volume pair and each lower station traffic volume pair is calculated, the willingness of a passenger on taking a bus can be accurately fed back, and the economic benefit of the bus can be maximized. The adopted genetic algorithm is used for coding, selecting, crossing and mutating, the shift-sending frequency of different periods is adjusted, and the optimal parameters are obtained according to the two evaluation indexes of the waiting time and the standard deviation of all waiting times.
Wherein the S3 includes the steps of:
s31, determining the time of mutual influence of waitingThe traffic volume of the upper station and the lower station between the stations is paired and the corresponding line group L ═ L1,l2,…,li]And the lines which are mutually influenced are grouped; as shown in FIG. 2, the OD pairs from station a to station b have line 11And line l No. 22OD pairs from site c to site d have line l 22And line l No. 33OD pairs from station e to station f have line 4 l4And line 55. Since the OD from site a to site b has a common line l 2 with the OD from site c to site d2So as to be divided into a group [ l ]1,l2,l3]However, the line from the station e to the station f OD does not intersect with the previous line, and the waiting time of the first group is not influenced, so that the first group is independently formed into a group [ l [/4,l5]Then the line groups [ l ] that influence the waiting time of each other overall1,l2,l3],[l4,l5]]Therefore, the total group of lines that mutually influence the waiting time can be represented by the following formula:
Lgroup=[[li1,…,lin],…,[lj1,…,ljn]];
wherein linAnd ljnThe groups have the advantages that each group can be independently calculated and does not influence each other, and the number of permutation and combination in subsequent calculation is reduced.
S32, calculating the arrival time of each traffic travel amount pair according to the departure time, if the No. 1 line is adopted, the shift is issued 18 times in the period from 6 to 9 points, namely, the shift list B is initializedjIn (1)
Figure GDA0003347485210000081
The departure time is 6 o' clock, so the departure time tdepartmentSequentially 6:00,6:10,6:20.. 8:50,9: 00;
specifically, the calculation formula of the arrival time in S32 is as follows:
tarrival=tdepartment+r/v;
wherein, tdepartmentRepresents departure time, and r represents the line length between the station and the departure pointAnd v represents the average speed per hour of the bus.
Other lines acquire other time periods and similarly calculate arrival time.
S33, calculating the waiting time and the waiting time standard deviation of a single upper station traffic volume pair and a single lower station traffic volume pair;
specifically, the step of calculating the waiting time and the standard deviation of the waiting time of the single upper station traffic travel amount pair and the single lower station traffic travel amount pair in S33 includes the following steps:
s331, setting the arrival time list of all routes of each traffic travel amount pair of the upper station and the lower station as TarrivalWherein the arrival time list TarrivalThe formula of (1) is as follows:
Figure GDA0003347485210000091
s332, calculating the waiting time of the traffic travel amount pair, wherein the waiting time TwaitThe calculation formula of (a) is as follows:
Figure GDA0003347485210000092
s333, calculating the average waiting time of the traffic travel amount pairs, wherein the average waiting time tavg-waitThe calculation formula of (a) is as follows:
Figure GDA0003347485210000093
where n represents the number of times to arrive at the upper site minus 1,
Figure GDA0003347485210000094
arrival time expressed as ith shift;
s334, calculating the standard deviation of the waiting time of the traffic travel amount pair, wherein the standard deviation sigma of the waiting timeavg-waitThe calculation formula of (a) is as follows:
Figure GDA0003347485210000095
where N1 represents the number of times to arrive at the on-site,
Figure GDA0003347485210000096
expressed as the arrival time of the ith shift.
S34, calculating the weighted waiting time and waiting time standard deviation of all the upper station traffic volume pairs and the lower station traffic volume pairs;
specifically, the step of calculating the weighted waiting time and the standard deviation of the waiting time of all the upper station and lower station traffic travel amount pairs in S34 includes the following steps:
s341, setting the weighted waiting time of all the upper station and lower station traffic going quantity pairs as tavg-wait-weightWherein the waiting time t is weightedavg-wait-weightThe calculation formula of (a) is as follows:
Figure GDA0003347485210000097
wherein the content of the first and second substances,
Figure GDA0003347485210000101
expressed as the corresponding weight coefficient of the ith upper and lower station traffic going quantity pair,
Figure GDA0003347485210000102
the corresponding average waiting time is expressed as the ith on-station and off-station traffic volume pair, and N1 represents the number of the time reaching the on-station;
s342, calculating the weighted waiting time standard deviation sigma of all the upper station traffic volume pairs and the lower station traffic volume pairsavg-wait-weightWherein the weighted waiting time standard deviation sigmaavg-wait-weightThe calculation formula of (a) is as follows:
Figure GDA0003347485210000103
s35 initialized shift list B of all lines of OD pairs with mutual influence by genetic algorithmjThe shift list n1, n2, n3, n4, n5, n6 can be added to the shift list n]From this, a new shift list B can be obtainedjFor example, the shift-giving number list of 6 time periods is [30,20,10,10,20,30 ]]After taking a shift list [ n1, n2, n3, n4, n5, n6]After adjustment, a new shift list is obtained [32,18,6,14,29,31 ]]Obtaining new standard deviation sigma of waiting time with weight from new shift listavg-wait-weightAnd waiting time t with weightavg-wait-weightContinuously iterative calculation is carried out through a genetic algorithm, and the waiting time standard deviation sigma with weight is minimizedavg-wait-weightAnd waiting time t with weightavg-wait-weightThese two parameters; these two minimization objective functions can be expressed as:
minσavg-wait-weight,mintavg-wait-weight
the constraint conditions are as follows:
n1,n2,n3,n4,n5,n6∈[-5,-4,-3,-2,-1,0,1,2,3,4,5,]
n1+n2+n3+n4+n5+n6=0。
a shift offset list that may be added for all shift-out shifts of the 6 slots involved in step S35. Different parameter values need to be debugged to obtain the optimal result, and the invention adopts a genetic algorithm to adjust the sequential value-taking offset list of each grouped line, as shown in figure 3:
firstly, binary coding is carried out on parameters of a value-taking result of the offset list;
performing roulette selection in a genetic algorithm;
performing crossover and mutation operations by minimizing weighted waiting time standard deviation sigmaavg-wait-weightAnd waiting time t with weightavg-wait-weightAs evaluation function, obtain more optimal shift list [ n1, n2, n3, n4, n5, n6]。
And S36, constructing the best shift list of each route through the acquired shift list.
According to another embodiment of the invention, a bus scheduling system based on a genetic algorithm is provided, and the system comprises a time period-based shift-sending initialization module, a station weight calculation module, and a station waiting time and standard deviation calculation module based on the genetic algorithm;
the time-interval-based class-sending initialization module is used for calculating and analyzing the traffic going volume pairs of the upper station and the lower station, which are introduced in preset quantities according to the number of passenger flows from high to low, so as to obtain the initialization classes of different lines in different time intervals;
the station weight calculation module is used for counting the card swiping quantity of each station and endowing different weight coefficients to different stations;
the station waiting time and standard deviation calculation module based on the genetic algorithm is used for adjusting different shift-sending times according to different periods of each line, and calculating the minimum average waiting time of each station and the standard deviation of all waiting times through the genetic algorithm.
In summary, according to the above technical solution of the present invention, the time-based shift-sending initialization module is adopted to divide a day into 6 time periods, and the division of the 6 time periods can better reflect the passenger flow conditions of multiple discontinuous peak periods and multiple discontinuous non-peak periods in a day, so as to reduce the probability of unnecessary shift-sending increase. In addition, the station weight calculation module is adopted, so that the average waiting time of stations with more passengers is shorter, the passengers are more willing to take the bus instead of taking other vehicles, and the economic benefit of the bus can be maximized.
In addition, the station waiting time and waiting time standard difference calculation module based on the genetic algorithm optimizes the two indexes of waiting time and waiting time standard difference, and can increase the riding willingness of passengers more than the single optimization of waiting time. The genetic algorithm is adopted for coding, selecting, crossing and varying to adjust the shift sending frequency in different periods, optimal parameters are obtained according to two evaluation indexes of the waiting time and the standard deviation of all the waiting times, and compared with a possible result of traversing all routes by an exhaustion method, the genetic algorithm is adopted for adjusting the parameters to obtain the optimal shift sending times of different routes in a faster time, so that the waiting time and the standard deviation of the waiting time are calculated to be smaller.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A bus scheduling method based on genetic algorithm is characterized by comprising the following steps:
s1, introducing a preset number of traffic going volume pairs of the upper station and the lower station according to the number of the passenger flow from high to low to calculate and analyze, and obtaining the initialization shift of different lines at different time intervals;
s2, counting the card swiping quantity of each site, and giving different weight coefficients to different sites;
s3, adjusting different shift sending times according to different periods of each line, and calculating the minimum average waiting time of each station and the standard deviation of all waiting times through a genetic algorithm;
in S1, the step of calculating and analyzing the traffic volume pairs of the upper station and the lower station, which are introduced into the preset number of the pairs according to the number of the passenger flows from high to low, to obtain the initial shift of different lines at different time intervals includes the following steps:
s11, introducing a preset number of traffic going volume pairs of the upper station and the lower station according to the number of the passenger flow from high to low to calculate;
s12, acquiring all the lines between the traffic volume pairs, and dividing one day into 6 different time intervals for statistics according to the average card swiping number of each line station in the past 7 days of the history;
s13, obtaining initialization shifts of different time periods of different lines according to the number of card swiping in each time period and by combining the total shift sending shifts of the current line;
the calculation formula for initializing the shift in S13 is as follows:
Figure DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 209850DEST_PATH_IMAGE002
representing the average number of card swipes per time period,
Figure DEST_PATH_IMAGE003
indicating the total shift of the current line,
Figure 313942DEST_PATH_IMAGE004
representing the total card swiping amount of the current line in the current day;
in the step S3, the adjustment of the shift sending times is performed according to different periods of time on each line, and the calculation of the minimum average waiting time of each station and the standard deviation of all waiting times by using a genetic algorithm includes the following steps:
s31, determining the traffic volume pairs of the upper station and the lower station which influence the waiting time mutually and the corresponding line groups, and carrying out grouping processing on the mutually influenced lines;
s32, calculating the arrival time of each traffic travel amount pair according to the departure time;
s33, calculating the waiting time and the waiting time standard deviation of a single upper station traffic volume pair and a single lower station traffic volume pair;
s34, calculating the weighted waiting time and waiting time standard deviation of all the upper station traffic volume pairs and the lower station traffic volume pairs;
s35, regarding the shift of the initialized shift list of all lines of the traffic volume pairs which are affected by the adjustment of the genetic algorithm, adding a shift offset list under the condition of keeping the total shift unchanged to obtain a new shift list, obtaining a new standard deviation of waiting time with weight and waiting time with weight from the new shift list, and meanwhile, continuously performing iterative calculation through the genetic algorithm to minimize two parameters of the standard deviation of the waiting time with weight and the waiting time with weight;
s36, constructing an optimal shift list of each line through the obtained shift lists;
in the step S34, calculating the weighted waiting time and the weighted waiting time standard deviation of all the pairs of the outbound and outbound traffic volume includes the following steps:
s341, setting the weighted waiting time of all the upper station and lower station traffic going quantity pairs as
Figure DEST_PATH_IMAGE005
Wherein the waiting time is weighted
Figure 31362DEST_PATH_IMAGE006
The calculation formula of (a) is as follows:
Figure DEST_PATH_IMAGE007
wherein the content of the first and second substances,
Figure 551205DEST_PATH_IMAGE008
expressed as the corresponding weight coefficient of the ith upper and lower station traffic going quantity pair,
Figure DEST_PATH_IMAGE009
the corresponding average waiting time is expressed as the ith on-station and off-station traffic volume pair, and N1 represents the number of the time reaching the on-station;
s342, calculating the weighted waiting time standard deviation of all the upper station and lower station traffic volume pairs
Figure 552528DEST_PATH_IMAGE010
Wherein the weighted waiting time standard deviation
Figure DEST_PATH_IMAGE011
The calculation formula of (a) is as follows:
Figure 140371DEST_PATH_IMAGE012
2. the bus scheduling method based on genetic algorithm as claimed in claim 1, wherein the calculation formula of the weight coefficient of the station in S2 is as follows:
Figure DEST_PATH_IMAGE013
wherein the content of the first and second substances,
Figure 345088DEST_PATH_IMAGE014
indicating the number of card swipes at the site,
Figure DEST_PATH_IMAGE015
represents the total card swiping amount of the current line in the day, SiIs the meaning of the station on which the traffic volume pair is presented.
3. The bus scheduling method based on genetic algorithm as claimed in claim 1, wherein the calculation formula of the arrival time in S32 is as follows:
Figure 668622DEST_PATH_IMAGE016
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE017
the departure time is represented, r represents the line length from the station to the departure point, and v represents the average speed per hour of the bus.
4. The bus scheduling method based on genetic algorithm as claimed in claim 1, wherein the step of calculating the standard deviation of the waiting time and the waiting time of the single on-stop and off-stop traffic volume pair in S33 comprises the following steps:
s331, setting all routes of traffic going quantity pairs of each upper stop and each lower stop as the arrival time list
Figure 337500DEST_PATH_IMAGE018
Wherein the arrival time list
Figure DEST_PATH_IMAGE019
The formula of (1) is as follows:
Figure 458428DEST_PATH_IMAGE020
s332, calculating the waiting time of the traffic travel amount pair, wherein the waiting time
Figure DEST_PATH_IMAGE021
The calculation formula of (a) is as follows:
Figure 402637DEST_PATH_IMAGE022
s333, calculating the average waiting time of the traffic travel amount pairs, wherein the average waiting time
Figure DEST_PATH_IMAGE023
The calculation formula of (a) is as follows:
Figure 691712DEST_PATH_IMAGE024
where n represents the number of times to arrive at the upper site minus 1,
Figure DEST_PATH_IMAGE025
arrival time expressed as ith shift;
s334, calculating the standard deviation of the waiting time of the traffic travel amount pair, wherein the standard deviation of the waiting time
Figure 402048DEST_PATH_IMAGE026
The calculation formula of (a) is as follows:
Figure DEST_PATH_IMAGE027
where N1 represents the number of arrival times at the station, and represents the arrival time of the ith shift.
5. The method as claimed in claim 1, wherein the step of adding the shift list in S35 while keeping the total shift constant further comprises: debugging different parameter values, and adjusting the sequential value-taking offset list of each grouped line by adopting a genetic algorithm, wherein the sequential value-taking offset list of each grouped line by adopting the genetic algorithm comprises the following steps:
firstly, binary coding is carried out on parameters of a value-taking result of the offset list;
performing roulette selection in a genetic algorithm;
and performing intersection and mutation operations, and acquiring a better shift list by taking two parameters of the standard deviation of the waiting time with the weight and the waiting time with the weight as evaluation functions.
6. A bus scheduling system based on genetic algorithm, used for realizing the steps of the bus scheduling method based on genetic algorithm described in any one of claims 1-5, characterized in that the system comprises a time-interval-based departure class initialization module, a station weight calculation module, and a station waiting time and standard deviation calculation module based on genetic algorithm;
the time-interval-based class-sending initialization module is used for calculating and analyzing the traffic going volume pairs of the upper station and the lower station, which are introduced in preset quantities according to the number of passenger flows from high to low, so as to obtain the initialization classes of different lines in different time intervals;
the station weight calculation module is used for counting the card swiping quantity of each station and endowing different weight coefficients to different stations;
the station waiting time and standard deviation calculation module based on the genetic algorithm is used for adjusting different shift-sending times according to different periods of each line, and calculating the minimum average waiting time of each station and the standard deviation of all waiting times through the genetic algorithm.
CN202110720010.2A 2021-06-28 2021-06-28 Bus scheduling method and system based on genetic algorithm Active CN113269475B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110720010.2A CN113269475B (en) 2021-06-28 2021-06-28 Bus scheduling method and system based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110720010.2A CN113269475B (en) 2021-06-28 2021-06-28 Bus scheduling method and system based on genetic algorithm

Publications (2)

Publication Number Publication Date
CN113269475A CN113269475A (en) 2021-08-17
CN113269475B true CN113269475B (en) 2022-01-18

Family

ID=77236074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110720010.2A Active CN113269475B (en) 2021-06-28 2021-06-28 Bus scheduling method and system based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN113269475B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115293519A (en) * 2022-07-14 2022-11-04 深圳云天励飞技术股份有限公司 Bus route scheduling processing method, device and equipment and readable storage medium
CN115392535A (en) * 2022-07-14 2022-11-25 深圳云天励飞技术股份有限公司 Scheduling list optimization method and device for multiple bus lines and related equipment
CN116597638B (en) * 2023-07-18 2023-09-29 山东华夏高科信息股份有限公司 Intelligent traffic monitoring and scheduling system based on big data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239484A (en) * 2014-09-05 2014-12-24 浙江工业大学 Multi-mode bus combinatorial dispatch-based schedule making method
CN111582750A (en) * 2020-05-18 2020-08-25 北京交通大学 Method and system for identifying reverse passengers and determining riding class of rail transit
CN111695225A (en) * 2020-06-23 2020-09-22 青岛大学 Bus composite complex network model and bus scheduling optimization method thereof
CN111785015A (en) * 2019-12-30 2020-10-16 石家庄铁道大学 Public transport real-time regulation and control information system and scheduling method based on genetic algorithm

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737356B (en) * 2012-06-13 2016-01-20 西安理工大学 Intelligent public transportation dispatching calculation method
US9183742B2 (en) * 2012-10-26 2015-11-10 Xerox Corporation Methods, systems and processor-readable media for optimizing intelligent transportation system strategies utilizing systematic genetic algorithms
US20150294430A1 (en) * 2014-04-15 2015-10-15 Tomorrow's Transportation Today Dynamic dispatching and schedule management methods for an intelligent transit system with electronic guided buses
CN105046379A (en) * 2015-09-09 2015-11-11 东南大学 City bus departure timetable optimization method
CN105760594A (en) * 2016-02-05 2016-07-13 北京交通大学 Passenger waiting time application model based on departure intervals and model establishing method
CN106448233B (en) * 2016-08-19 2017-12-05 大连理工大学 Public bus network timetable cooperative optimization method based on big data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239484A (en) * 2014-09-05 2014-12-24 浙江工业大学 Multi-mode bus combinatorial dispatch-based schedule making method
CN111785015A (en) * 2019-12-30 2020-10-16 石家庄铁道大学 Public transport real-time regulation and control information system and scheduling method based on genetic algorithm
CN111582750A (en) * 2020-05-18 2020-08-25 北京交通大学 Method and system for identifying reverse passengers and determining riding class of rail transit
CN111695225A (en) * 2020-06-23 2020-09-22 青岛大学 Bus composite complex network model and bus scheduling optimization method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Application of optimized genetic algorithm based on big data in bus dynamic scheduling;Wang, Xiaoqiang;《Cluster Computing》;20191231;第22卷(第6期);第1-8页 *

Also Published As

Publication number Publication date
CN113269475A (en) 2021-08-17

Similar Documents

Publication Publication Date Title
CN113269475B (en) Bus scheduling method and system based on genetic algorithm
Jian et al. Simulation optimization for a large-scale bike-sharing system
CN109961162B (en) Path planning method and path planning device
Tsubouchi et al. Innovative on-demand bus system in Japan
Hamdouch et al. Schedule-based transit assignment model with vehicle capacity and seat availability
CN110276474A (en) A kind of track traffic station passenger flow forecasting in short-term
CN109919365B (en) Electric vehicle path planning method and system based on double-strategy search
CN108876035B (en) Traffic distribution and traffic flow distribution combined model considering traveler destination preference
Wang et al. Car4Pac: Last mile parcel delivery through intelligent car trip sharing
Li et al. Optimizing flexible one-to-two matching in ride-hailing systems with boundedly rational users
KR20210052499A (en) e-hailing service
CN112183815B (en) Accurate short-time passenger flow prediction model based on rule recommendation algorithm
CN105260785A (en) Logistic distribution vehicle path optimizing method based on improved Cuckoo algorithm
Yan et al. An integrated framework for intercity bus scheduling under stochastic bus travel times
Zhou et al. A scalable vehicle assignment and routing strategy for real-time on-demand ridesharing considering endogenous congestion
Hu et al. DeeprETA: an ETA post-processing system at scale
CN113781787B (en) Bus departure schedule generation method and system
Karbassi Yazdi et al. A binary differential evolution algorithm for airline revenue management: A case study
CN115994726B (en) Dispatch path adjustment method, dispatch path adjustment device, electronic equipment and computer readable medium
Florian et al. Transportation systems analysis: illustrations and extensions of a conceptual framework
CN110276499A (en) A kind of refuse collection route optimization calculation method
CN113947894A (en) Traffic distribution method considering user heterogeneous time value and congestion fee budget
CN109583634A (en) A kind of take-away Distribution path selection method based on Modern Portfolio Theory
CN110119884B (en) High-speed railway passenger flow time interval division method based on neighbor propagation clustering
CN113128820A (en) Method, apparatus, device and computer readable medium for evaluating warehouse adjustment plans

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant