Background technology
Urban transportation is the lifeblood of urban economy life, is the sign of weighing a urban civilization progress, for the development of urban economy and the raising of living standards of the people, plays a very important role.In China, along with economic sustainable development, urbanization process is accelerated, and motor vehicle is possessed an increase fast, and traffic trip amount constantly increases, and urban transportation is supplied with wretched insufficiency, and disparities between supply and demand intensify.Take Beijing as example, and Beijing vehicle guaranteeding organic quantity has been broken through 2,000,000 at present, and urban road annual growth rate is 3%, and vehicle growth rate is 15%, and vehicle flowrate annual growth rate has reached 18%.
As the important component part of city traffic network, crossing is the bottleneck of road passage capability and the multiple ground of traffic jam and accident.The traffic congestion in city, major part is that this causes wagon flow to be interrupted, accident increases because the traffic capacity of crossing is not enough or do not make full use of and cause, incurs loss through delay seriously.Motor vehicle in big city in intown running time approximately 1/3rd for level-crossing; And U.S.'s traffic hazard approximately has the crossing that occurs in over half.As can be seen here, the management of crossing being carried out to science is the important subject of traffic control engineering with controlling, and is the important measures that ensure the traffic safety of crossing and give full play to the traffic capacity of crossing, is the effective way that solves urban transport problems.
At present, the signal controller of most domestic crossing derives from SCOOT (the Split Cycle and Offset Optimization Teclmiquel) system of Britain, SCAT (Sydney Coordinated Adaptive Traffic) system and Japanese capital three systems of Australia, all adopts timing controlled and adaptive control.These methods are being widely used after improving.
At present, the control system of China's signal be take single-point control as main, so the signal timing dial research to Single Intersection has a lot: the multiphase traffic signal real-time control method of dividing based on state that the people such as He Zhaocheng propose, the Webster split algorithm that the people such as Zhang Cuicui adopt is optimized control to model, and Mu Haibo etc. have proposed the control method based on Petir net etc.Non-linear, ambiguity and uncertainty due to traffic, the optimization problem of intersection signal timing generally can be summed up as non-protruding nonlinear problem, traditional optimization method often adopts algebraic method and graphical method etc., these methods can not find its globally optimal solution well, and genetic algorithm is a kind of search technique based on natural selection and evolution, be widely used in optimization problem, so genetic algorithm is also widely used in the signal timing dial optimization problem of traffic control.The human hairs such as Song Xuehua understand the Single Intersection signal timing dial optimization method based on genetic algorithm, the genetic algorithm adopting in this invention is standard genetic algorithm, wherein selection strategy has added optimum reserved strategy, but standard genetic algorithm local search ability is not strong, easily be absorbed in early Convergent Phenomenon, so standard is lost to algorithm in the present invention, improve, introduce Clustering, improve the search capability of genetic algorithm, can effectively avoid early Convergent Phenomenon.
Summary of the invention
The object of the invention is to propose a kind of genetic algorithm based on minimum spanning tree cluster for the control of city Single Intersection signal timing dial, the queuing vehicle number of take before crossing carries out signal timing dial optimization as optimization aim, realizes the optimal control of traffic signals.
Cluster genetic algorithm of the present invention (Clustering Genetic Algorithm, CGA) in, introduce population Clustering, wherein individual distance is from adopting conventional Euclidean distance to calculate, by minimum spanning tree clustering algorithm, population is divided and sorted out, in interlace operation, use the individuality belonging to a different category to carry out single-point intersection, because the individual distance in different classes of is from greatly, similarity is little, can make like this offspring population producing maintain diversity, thereby suppress the generation of prematurity Convergent Phenomenon.
A traffic signal optimization timing method based on minimum spanning tree cluster genetic algorithm, comprises the following steps:
Step 1, carries out individuality coding, initialization data also, setup parameter.
Initialization Population Size, sets individual lengths, crossover probability P
cand variation probability P
m.
Step 2, carries out initialization of population.
Step 3, calculates fitness value individual in population.
Using after Single Intersection every phase place in one-period finishes and queue up vehicle fleet as optimization aim on this phase place clearance track, the objective function in genetic algorithm, is also fitness function.
Step 4, carries out minimum spanning tree cluster to population.
(1) calculate the Euclidean distance between individuality, form the non-directed graph of having the right.
(2) with Prim algorithm, obtain the minimum spanning tree of non-directed graph.
(3) determine the disconnected limit threshold value of minimum spanning tree.
(4) limit of traversal minimum spanning tree, the limit that weight is greater than to threshold value is removed, and forms a forest.
(5) degree of depth traversal forest, preserves individual segregation.
Step 5, the individual genetic manipulation of participating in selected population.
The individual roulette that adopts in population is selected to two individualities, if two individualities do not belong to same class, two individualities are chosen, participate in and in genetic manipulation, produce offspring's individuality; If two individualities belong to same class, judge two individual fitness value sizes, the individuality that fitness value is large is eliminated, reselect, until the individuality of choosing belongs to inhomogeneity.
Step 6, the individuality that step 5 is selected carries out crossover and mutation operation.
Step 7, repeated execution of steps four~six, obtains the best timing in corresponding cycle.
Compared with prior art, the present invention has the following advantages:
1. by population is carried out to minimum spanning tree cluster, make the individuality in species there is very high similarity, and similarity between species is lower, utilizes the intersection between species can maintain population diversity, suppresses prematurity Convergent Phenomenon;
2. apply the present invention to the optimization of Single Intersection signal timing dial, can obtain the effective timing time, reduce the queuing vehicle number before crossing.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention will be further described.
The present invention adopts four phase places, three lane design methods, and as shown in Figure 1, as shown in Figure 2, the main flow chart of method involved in the present invention as shown in Figure 3, comprises the following steps the Signal Phase Design figure of Single Intersection the wagon flow distribution plan of Single Intersection:
Step 1, carries out individuality coding, initialization data, and setup parameter.
(1) individual coding
In Traffic Signal Timing optimization problem, by solve objective function (take let pass the queuing vehicle fleet of letting pass on track on track be performance index) after respective phase state, obtain the signal timing dial of current period, it is the green time under each phase place, so the individuality here represents the combination of green time.Use t
ithe green time that represents i phase place in order to keep the validity of offspring's individuality of generation, adopts 3 ageings simultaneously, and individual coding form is: < t
1t
2t
3>, encodes with scale-of-two.
(2) initialization data
Population Size is initialized as popszie, and each offspring produces the population of popsize size.
(3) setup parameter
Set crossover probability P
cbe 0.8, variation probability P
mbe 0.01,21 of individual lengths.
Step 2, carries out initialization of population.
The random popsize of generation 21 individual populations that form.
Step 3, calculates fitness value individual in population.
Using after Single Intersection every phase place in one-period finishes and queue up vehicle fleet as optimization aim on this phase place clearance track, the objective function in genetic algorithm, is also fitness function, and its expression formula is:
In formula, T is the Cycle Length of Single Intersection signal controlling; t
irepresent the timing of crossing four phase places, i=1,2,3,4; λ
ijkthe vehicle arrival rate that represents i phase place j direction k track, j=1,2,3,4, represent respectively four Way ins, westwards, southwards and northwards eastwards,, k=1,2,3, representative is turned left, is kept straight on and turns right three tracks respectively; u
ijkthe vehicle clearance rate that represents i phase place j direction k track;
be l week after date, vehicle queue's number in i phase place j direction k track, expression formula is:
In formula, p
ijkrepresent clearance state matrix, its expression formula is:
In formula, the corresponding track under " 0 " expression respective phase is in forbidding clearance state, and the corresponding track under " 1 " expression respective phase is in clearance state.
This is the constrained optimization problem of having ready conditions, so adopt 3 timing combination conducts body one by one in individuality coding, is convenient to like this Design and implementation of algorithm.
It should be noted that, in algorithm is realized, in the time of each calculating fitness value, because the arrival of vehicle all can exist all the time, so transfer except recording current phase place the queuing vehicle number of runway, also to record vehicle queue's number in other track, so just realistic, meanwhile, scale-of-two individuality is decoded into the decimal system just can calculate.
Step 4, carries out minimum spanning tree cluster to population, and process flow diagram as shown in Figure 4, comprises following content:
(1) Euclidean distance between popsize individuality of calculating, as the weight on two individual limits of setting up, forms the non-directed graph of having the right.
(2) utilize Prim algorithm to obtain the minimum spanning tree of this non-directed graph.
(3) determine the disconnected limit threshold value δ * M of minimum spanning tree, M is the average weight on popsize-1 bar limit in minimum spanning tree, and δ is one and is greater than 0 regulatory factor that is less than 1, gets 0.999 here.
(4) by the limit cutting off in spanning tree, classify: from minimum spanning tree starting point, start traversal, the limit that weight is greater than to threshold value is removed, and forms a forest, and the limit that belongs to same tree just belongs to same class.
(5) forest is carried out to degree of depth traversal, each class is recorded to preservation, the individuality in every class is sorted according to fitness value size simultaneously.
Step 5, the individual genetic manipulation of participating in selected population.
The individual roulette that adopts in population is selected to two individualities, if two individualities do not belong to same class, two individualities are chosen, participate in and in genetic manipulation, produce offspring's individuality; If two individualities belong to same class, judge two individual fitness value sizes, the individuality that fitness value is large is eliminated, reselect, until the individuality of choosing belongs to inhomogeneity.
Step 6, the individuality that step 5 is selected carries out crossover and mutation operation.
Crossover and mutation operation is the key in genetic algorithm, the cluster genetic algorithm designing due to the present invention is applied in Single Intersection signal timing dial optimization problem, only need to obtain the timing combination of vehicle number minimum of queuing up, so adopt the crossover and mutation operation in standard genetic algorithm here.
Interlace operation, adopts single-point to intersect, and the random intersection position that produces, organizes the gene position between parent individuality mutually, forms two new individualities.
Mutation operation, to intersecting two individualities of rear generation, makes a variation with certain probability, and 0 becomes 1, or 1 become 0, and after variation, producing individuality also needs to judge whether to meet t after decoding
icondition, if met, be classified to population of future generation, until produce size, be the offspring population of popsize, the parent population operating as the next generation; If do not met, directly eliminate the new individuality producing, unison counter does not add up, and guarantees finally to produce popsize offspring individual.
Step 7, repeated execution of steps four~six, obtains the best timing in corresponding cycle.
While reaching evolutionary generation gen=120, stop calculating, obtain best timing and be applied to traffic control, then carry out again the timing of next cycle length and calculate.
Provide experimental result of the present invention below.
In order to prove the validity of the method for the invention in Single Intersection signal timing dial is controlled, adopt respectively CGA of the present invention, SGA(Standard Genetic Algorithm, standard genetic algorithm) and classic method Single Intersection signal timing dial is optimized, each optimizing process calculates the timing in 10 cycles.Experimental result is as shown in table 1.
The result contrast of table 1CGA and classic method and SGA
As shown in Table 1, the queue length that adopts CGA method of the present invention to obtain is not only significantly less than the queue length that classic method obtains, and is also less than the queue length that adopts SGA method to obtain.Therefore, compared with prior art, the present invention can obtain the more effective timing time, reduces the queuing vehicle number before crossing, effectively improves the traffic capacity of Single Intersection.