NEURAL NETWORK OPTIMIZED BY GENETIC ALGORITHM OF MODELS FOR REAL-TIME FORECAST OF TRAFFIC FLOW NEURAL NETWORK OPTIMIZED BY GENETIC ALGORITHM OF MODELS FOR REAL-TIME FORECAST OF TRAFFIC FLOW

Short-term traffic flow forecast plays an important role in transit scheduling. A high-order generalized neural network model is constructed to actualize dynamic forecast on-line and a hybrid genetic algorithm and identical dimension recurrence idea are performed to optimize the structure and shape of neural network dynamically so as to enhance its forecast accuracy. With data collected from Dazhi Str., Harbin as the system input, the experimental result indicates that the average relative error of forecast is 5.53% and the maximum is less than 21%, which proves that the proposed neural network model can satisfy the precision request, accelerate the convergence speed, improve the global gener-alization ability and possess the practicality in short-term traffic flow forecast.


Introduction
Real-time dynamic traffic assignment is the main theory base in Intelligent Transportation System, while real-time traffic volume predicting is the precondition of dynamic traffic assignment. The result of traffic volume predicting is relative to traffic assignment, so how to predict traffic volume precisely [1][2][3] is the starting point.
By far, many statistical methods, i.e. multiple linear regression, stochastic time series, general exponential smoothing etc. have been used for traffic flow forecast. However, as a joint-effect result of weather and traffic environment, etc, its transfer regularity always reveals the representative complexities and nonlinear characters and fails to yield satisfied results [4]. For the past few years, artificial neural network attracts intensive attention and is proposed as a powerful computational tool to solve the complex problem, such as short-term traffic flow forecast.
Traditional forecasting techniques cannot generate accurate results under an environment with high complexity, randomness and non-determinacy, because they don't have self-adaptive and selflearning functions [5,6].
Recent wavelet neural network, as another fruitful technique combining the merits of neural networks with wavelet analysis, has been widely used in forecast [7]. Since wavelet behaves excellent performance in non stationary signal analysis and non linear function modeling, the wavelet-based neural network can provide much higher availability of convergence for approximation than ordinary multi-layer networks.

Model Choice
Traffic volume shows the complexity at intersections, because of traffic flow itself and the structure of road network [8]. Owing to high complex and variety with time, it is hard to get precise equations and label it. So we aim to get forecasting models using neural network technique and adaptive forecast traffic volume.
An artificial neural network, consisting of plenty of neurons whose broad links each other, is a nonlinear dynamic system. It is generated basing on the study of organize configurations and behavior characteristics in biologic neural system. It has been testified theoretically: a three layer neural network can achieve all kinds of complicated non-linear maps. So we found models and predicted them adopting a three layer neural network which has a certain hidden layer according to relativity of traffic flow in an intersection.

Structure of Neural Network
As the traffic flow has complex time varying and non-linear characteristics, we found a prediction model to satisfy the need for a real-time dynamic traffic assignment adopting the high-order neural network, as shown in Fig. 1.
The network training process is as follows 1) The forward calculation process calculates the output state of every layer neuron, at last we get the real output of the network.
Here, we have get the optimal network nodes, that is 8, we choose a as 0.7 [9].
are the weights from the input layer to the hidden layer and from the hidden layer to the output layer and the adaptable Sigmoid parameter of the hidden layer and output layer neurons; then the input of hidden layer neurons can be expressed as u j (h) ϭ and the output of hidden layer neurons is given as The input of output layer neurons is presented by u k (o) ϭ ϭ and the output of output layer neurons can be cal- 2) learning process according to the flowing equations, we adjust the network weight Here the node state error and node reverse transfer error of output layer neurons can be obtained as For hidden layer neurons, the node state error and node reverse transfer error are defined as In the same meaning, we resume η is learning ratio, P is stylebook gross and define Δw ij (h) and Δw jk (o) are separately the adjust quantity of weight from input layer to hidden layer and from concealed to output layer, which can be expressed as and .
The following equation is the adjusted quantity of adapted parameter in the learning process: where ε is node state error, β is adjusted ratio of parameter, Δa is adjusted quantity of parameter.
In the training process, one of the key works depends on how to obtain the network weigh quickly and effectively. Upon this requirement, we induce genetic algorithm (GA) to optimize the weigh value as the following section.

Weigh Optimization by GA
The next problem is to conform hidden layer nodes. If there is no sufficient hidden layer nodes, it won't converge in learning process; if the number of hidden layer nodes is excessive, the network performance declines. The traditional BP algorithm conforms the number of hidden layer neurons on the basis of experience or examination; here we adopt a GA model to optimize the number of hidden layer neurons [10].
The GA approach, which is based on analogy with a natural selection and population genetics, is a kind of search method that was developed by John Holland. One normal application of GA is for searching an approximate solution to difficult optimization problems. However, local minimum value if the optimization function has a complex structure. In this paper, one of the main works is to find the optimization solution with a hybrid method, a genetic algorithm combined with a local heuristic search to offset the deficiency of the conventional genetic algorithm, for the network weigh [11].
Network parameters β, w h and w o can be reached by minimizing an energy function, which is performed by the least-mean squares theory for data series representation.
where ỹ k ij and y k ij are the j-th desired and real obtained outputs with respect to the i-th input data.
The hybrid genetic algorithm involves initialization, mutation, competition and selection. An initial population is selected to initialize the parent generation according to a uniform distribution. In initialization, encoding takes on significant task and each population expressed by encoded chromosome stands for a certain solution to a required question.
A multi-valued encoding pattern is used to obtain a solution. A chromosome is divided into four segments: three of them are parameter segments, which are encoded in real values to deliver the information about the translation factor, telescopic factor and weight factor of the hidden unit. Simultaneously, the fourth segment is to encode the structure character in binary, where 1 represents a valid hidden unit, and 0 shows it is ineffective.
Each evolution generation is assigned a fitness value in accordance with the given fitness function since the most commonly used objective function aims to obtain the least error series between statistical data and forecast value.
Offspring is created from their parents by a composite mode. An encoding pattern of cross-gene is firstly judged and linear combination is used in a crossover operation for cross-gene encoded by real value. If x i g and x j g are defined as respective parent individual, the corresponding offspring through crossover is formulated by where λ is an evolution rate complying with β 0 ϭ 0.9 Here, g and p separately represent a generation number of evolution and position of crossover gene. However, a conventional single-point crossover is preferred to further evolution, if crossover gene is encoded by binary.
Mutation is also treated with a different encoding mode and the mutation position encoded by real value yields the following mutation model where δ is a stochastic value ranging over [Ϫ0.5, 0.5] and represents the cumulative value of a squared error derived from the chromosome with maximum fitness when evolving into the g-th generation and P m is a mutation factor to control the mutating operation.
If the binary encoding is applied, offspring is generated from their parents by a Gaussian perturbation where N(0,1) denotes a normally distributed one dimensional random variable with mean zero and standard deviation. To a total population pop, P si is the the i-th proportion factor (10) The following parts (contents/factors) should be noted above all. The gradient descending factor, which holds the same iterative step-size with the evolution process, optimizes the network parameters without remodeling the structure of WNN and characteristic gene of optimized chromosome has to answer the limited scope, such as dilation factor. The next evolution group, conserving diversity of population through reproduction and competition, consists only of filial generation derived from crossover and muta- tion, due to inheriting the unparalleled quality from paternal generation.
In the hybrid genetic algorithm, competition and selection lead to more adaptive generation through a given proportion, which inevitably causes premature or slow convergence. Here, the evolving principle is executed through optimum reservation strategy combined with proportion selection. All population is sequenced with ascending sort on the basis of fitness, among which chromosomes with large fitness will be assigned directly into the next generation. Otherwise, the above proposed evolving procedure has to be reduplicated via a selection factor (11) The selection factor assures the chromosome with low fitness to gain large probability in the next generation. However, evolving population is sometimes logging into a certain individual or such finite ones, which is usually named local convergence and reduces the probability of global optimum. Therefore, the distance between two individuals is significantly taken into account in selection operation and one individual has to be eliminated correspondingly due to a shorter distance.

Case Study
The following is an example of the optimized neural network framework using the real traffic volume data of the intersection of West Dazhi Str. in Harbin in Oct.12ϳ18, 2006. We used one-week traffic volume data to train, and Figs. 3, 4 are error variety curves with the increase of genetic step and variety process of hidden layer nodes with the increase of genetic step, respectively.
To determine a proper β, w h and w o , the following simple scheme depends on proposed GA approach mentioned in section 2.3. 1) Pre-processing the input data series through fuzzy reasoning theory. 2) Generating the original population within a logical interval. 3) Utilizing crossover and mutation operations. 4) Creating new offspring via optimum reservation and proportion selection. 5) Sequencing the individuals by fitness and computing the distances between chromosomes. 6) Finishing the search process, if it satisfies the stopping rule, or going back to step III. 7) Real-time and dynamic forecast with identical dimension recurrence.
We train the neural network also using above traffic volume data when the objective is close to extreme. If we increase the learning ratio, the training time will decrease. So we design a variable learning ratio based on a genetic step and grads value, accelerating convergence speed. The training process with a proposed highorder generalized neural network; the training time is 894.02s, that is about 15min, after that we get the network weight w ij and w jk by adaptable GA consideration, as from Fig. 2 to Fig. 5.
From the prediction result it can be seen that the average absolute error is 41, the maximum absolute error is 182; it is at the time interval 27. Figs. 4, 5 show the forecast error and average relative error is 5.53%, and thus we reach the maximum relative error 20.63%, at the time interval 19.

Conclusions
A considerable amount of experiences were gained through developing an improved neural network model to forecast the short term traffic volume in real-time traffic control. The experience leads to the following recommendations. 1) A multiple layer neural network model with learning function is discussed, for short term traffic flow prediction, and its struc- ture and working effectiveness depend on the optimization of three parameters, the weigh wh and wo, and the adjustment coefficient . 2) Hybrid genetic algorithm is introduced to optimize the parameters and structure of constructed neural network model. The experimental result indicates that the proposed neural network model optimized by the hybrid GA has fast convergence and high-accuracy ability. 3) Since traffic volume exists in the dynamic system of traffic and transportation, we can precisely forecast the traffic volume within several seconds, thus calculate travel time or obstruct function of a vehicle based on the traffic volume, ultimately plan the shortest route of every vehicle, in other words, guide the vehicle to move along an optimal route. This will significantly enhance efficiency of the whole traffic system, i.e. reduce traffic jams, save travel time, etc. 4) For future research it would be of interest to investigate factors affecting traffic flow and more optimization algorithms for real-time forecast to construct a practical operation system for dynamic traffic control and management.