How to Mitigate Traffic Congestion Based on Improved Ant Colony Algorithm : A Case Study of a Congested Old Area of a Metropolis

Old areas of metropolises play a crucial role in their development. The main factors restricting further progress are primitive road transportation planning, limited space, and dense population, among others. Mass transit systems and public transportation policies are thus being adopted to make an old area livable, achieve sustainable development, and solve transportation problems. Identifying old areas of metropolises as a research object, this paper puts forth an improved ant colony algorithm and combines it with virtual reality. This paper predicts traffic flow in Yangpu area on the basis of data obtained through Python, a programming language. On comparing the simulation outputs with reality, the results show that the improved model has a better simulation effect, and can take advantage of the allocation of traffic resources, enabling the transport system to achieve comprehensive optimization of time, cost, and accident rates. Subsequently, this paper conducted a robustness test, the results of which show that virtual traffic simulation based on the improved ant colony algorithm can effectively simulate real traffic flow, use vehicle road and signal resources, and alleviate overall traffic congestion. This paper offers suggestions to alleviate traffic congestion in old parts of metropolises.


Research Background
With the development of economies and advancement of urbanization, the disadvantages faced by metropolises are becoming increasingly prominent; they include urban population expansion, traffic congestion, environmental pollution and other problems, known internationally as "urban diseases" [1].Among these issues, traffic congestion is a major focus of discussion.Due to the indispensable characteristics of traffic, solving traffic congestion has always been the main focus of metropolises' efforts [2].The rapid concentration of large populations and industries in central cities is accompanied by the increasing demand for adequate transportation.However, the dismal conditions of several cities result in drawbacks such as unreasonable road transportation planning, unbalanced supply and demand, and lagging management.Frequent traffic accidents, noise pollution, and other related problems hinder the implementation of efficient travel and logistic measures and cause great hassles to people living in metropolises [3].It should be made clear that an inefficient travel system is the cause of traffic congestion, which increases fossil energy consumption and thus exacerbates "urban diseases" in metropolises [4].
Modern road transportation planning systems find easing traffic congestion in old areas of metropolises to be a major problem.Economic development inevitably causes metropolises to expand outward, resulting in traffic congestion in old areas [4].Road transportation planning in new urban areas prevents congestion because it is regulated in advance.However, steps to ease traffic congestion in old areas have long been neglected.These parts of a city have historical significance and serve as venues for all kinds of urban functions, showcasing the metropolises' important commercial, cultural, medical and educational resources.This relationship with history is another reason developing and implementing transportation facilities is difficult.The high-intensity traffic demand brought about by the high concentration of urban functions impacts the weak traffic infrastructure.In addition, the existing land layout in an old area makes it particularly difficult to alleviate traffic congestion [5].
At present, old areas host most of a metropolis' population.For example, in Beijing, China, the population of an old area is 28,000 people per square kilometer.A large number of people results in more pressure on traffic in the area.In addition, this traffic is characterized by limited space for traffic development, low road network density, and poor systemicity of spur tracks (this directly leads to high repetition of the bus network and limited development of public transportation).Old areas also face parking difficulties and related chaos, further leading to traffic congestion [6].How to deal with challenges in traffic development in old parts of metropolises is an issue that needs to be considered.This paper, thus, explores and optimizes a road transportation planning algorithm, making use of the unique advantages offered by the improved ant colony algorithm to simulate traffic characteristics of old areas.Yangpu District of Shanghai, one of the largest metropolises in China, is herein studied as an example; actual data are used to test and provide countermeasures to alleviate traffic congestion in old parts of metropolises.

Review of Road Transportation Planning Theory
In the 1970s, Hobbs and other scholars mainly focused on planning regulations and focused on solving the problem of choice in road transportation planning [7].Kerner put forward a theory of traffic regulation in the form of syllogism, discussed the empirical basis of the three-phase traffic theory and its temporal and spatial characteristics, and proposed the probability theory of highway capacity [8].Taking the expressway as a sample, Flaherty [9] gave a detailed introduction on the organic unity of the accessibility, feasibility and low cost of transportation planning.Anonymous explored the new transportation plan and its restrictions in Texas, US, from a law perspective [10].Other scholars explored the impact of transportation on people's lives and travel, based on public perspectives.They believed that reassessing transportation methods will reduce the consistency of accidents [11].The emergence of a traffic flow model greatly increased the number of research works on road transportation planning.
With the advancement of technology, traffic flow models are becoming mainstream and some practical cases have been applied [12].For example, in the long-term transportation planning of Helsinki, the road transportation planning model can achieve its maximum value [13].In addition, some traffic models have appeared and become important aspects of traffic planning, such as unbalanced traffic model [14], traffic optimization model [15].

Review of Ant Colony Algorithm
Ant colony algorithm is a type of heuristic algorithm.To clarify the principle of ant colony algorithm, we first reviewed the related theory of heuristic algorithm.The heuristic algorithm is different from traditional computer science.Heuristic algorithm performs all operations and obtains all possible alternative answers.However, it still has drawbacks that is, it cannot be judged whether it can get an error solution and cannot judge its execution speed each time.In some special cases, heuristic algorithms may be trapped in local optimums, resulting in poor or inefficient answers [16].
Heuristic algorithms have many derivative algorithms, including simulated annealing algorithm, genetic algorithm, ant colony algorithm, artificial neural network and so on.
The ant colony algorithm is a random search algorithm based on population bionics.The so-called bionic algorithm was proposed in the 1950s.Many scholars not only found the inspiration for improving artificial systems from the perspective of biological behavior, but also found a simulation evolutionary algorithm that was suitable for complex problems in the real world.In the 1990s, a bionic algorithm, simulated the behavior of ant colonies, has attracted widespread attention.The optimal path planning can be achieved by simulating the process of ants searching for information left in the food [17].
Dorigo compared the advantages and disadvantages of ant colony algorithm with other heuristic algorithms.It showed the pros and efficiencies of ant colony algorithm in dealing with specific optimal paths through real data.The ant colony algorithm is self-organized.It can be continuously evolved and is optimized to improve the convergence of the algorithm under non-strict mathematical definition.It is often used to solve complex problems such as traveling salesman problem (TSP) and the assignment problem.Some scholars also applied the ant colony algorithm to network routing problem, robot path problem, power distribution and other fields.
The ant colony algorithm has also been improved in different types, such as Ant Colony System, Max-Min Ant System, etc. Hermes proposed the Rank-based Ant System, which reordered the pheromone after iteration and updated the pheromone according to the existing settings [18].Cordo put forward the Best-Worst Ant System, which used mathematical principles to volatilize the least pheromone part in each path update for more optimal path selection.Other scholars have refuted the Best-Worst Ant System proposed by Cordo.Montgomery believed that the Best-Worst Ant System had its drawbacks, such as insufficient convergence.Montgomery assumed that it was better to limit the pheromone of all roads to a certain range instead of volatilizing the least pheromone part, so that the model was more convergent, thus enhancing the stability of the model [19].CutJahr demonstrated the convergence of the ant colony algorithm in 1999.Stuezle proposed a simple and more versatile ant colony algorithm, which can be iterated and updated multiple times to obtain the optimal solution under the premise of minimization [20].
However, the purpose of the traditional ant colony algorithm or improved ant colony algorithm is to seek the shortest path among multiple paths, or to seek a convergence speed optimization method.Few scholars pay attention to the practical problems of traffic congestion, and use optimization algorithms to solve the large number of traffic congestion phenomena in reality.Therefore, how to plan an optimal path in a complex traffic network and the traffic congestion in the old area of metropolis can be solved are the most important problem at present.

Review of Existing Literature
Focusing on the issues related to road transportation planning in the old area of metropolis, this paper arranges the literatures on reports, laws and regulations of various countries in the world.It shows that the existing research has provided a certain theoretical basis for the innovative exploration of easing traffic congestion in the old area of metropolis, but it still needs to further deepen and expand.
First, most of the existing research are macro research although there are accumulations in the theoretical basis and technical application of road transportation planning research in various countries it has a leading role, but it can rarely be applied to practical.In this context, the comprehensive use of data science and algorithms has become an important way of road transportation planning.To make traffic planning concrete and visualized, this paper will start with a specific algorithm and try to combine data science and road simulation.
Second, ant colony algorithm and mathematical models are rarely used in metropolises, especially the application of simulation [21].In the process of simulation, data collection, sorting and processing is required, so that the interactive subject relationships involved in the complicated traffic are captured, and hence, the characteristics of metropolises traffic disintegration can be analyzed in detail.This paper focuses on empirical research and explores the solution process of using large-scale data and simulation modeling.
Third, the easing of traffic congestion in the old area of metropolis is a continuous and dynamic process from the perspective of mathematical models and computer simulations.The introduction of new image processing makes the computer simulation process more intelligent.These tasks require a certain amount of data accumulation, which is one of the future directions of this paper.

Basic Principles of Ant Colony Algorithm
In the process of searching for food, the ant colony will leave residual "pheromone" [22]."Pheromone" is a kind of tangible substance and is unique to ant colonies to guide others paths.Other ant colonies pass through the path and then determine the direction of the search by perceiving the "pheromone"."Pheromone" has a distinction of concentration, which is an amount that can be accumulated indefinitely.Each ant passes through this path and leaves its unique "pheromone".The path of more ants, the higher the concentration of "pheromone".This cycle is similar to guidance, and a large ant colony can find the shortest path with this kind of guidance.According to the classical literature [23], the search process is expressed by mathematical model: Suppose m as the number of ant colonies, and n equals the number of cities.We set pheromone (initialization) as τ ij (0).In the beginning, the pheromone on each path is equal to ) from city i to city j at t time: as all the possible cities that ants will visit.Suppose tabu k as a taboo table.It means that no longer allows the ants to pass the same path in the current cycle.When all the cities are added to the list of tabu k , the ants complete the trip.η ij is a heuristic factor indicating the degree of ants transferring from i city to j. Generally speaking, it is the derivative of the distance d ij between i city and j.α and β indicate the relative importance of the pheromone value and the heuristic factor in the path.The pheromone in each path is updated after all ants have traveled: Suppose ρ as the volatilization coefficient of the pheromone in the path.Suppose ∆τ ij k as the concentration of the pheromone remaining in the path of ants.

Improve Transition Rules
Local optimization is an inevitable problem of ant colony algorithm.To avoid ant colony algorithm from getting into trouble again, we must improve the algorithm and mathematical formula and introduce new parameters Q.A random number is generated in the closed interval 0 to 1, and the random number is recorded as the new parameter Q. Suppose q as the ant visibility.When q < Q, the ant selects the next step according to the value of q.
Due to the existence of Q, disturbances of different degrees may occur in the process of operation.
At that time, ants can judge only through the visibility when selecting the upcoming path.Although the selectable path and range were narrowed [24], the convergence speed and accuracy of the operation are speeding up.Besides, if we limit the error, the model and algorithm will not produce errors in the actual measurement process and avoid the algorithm falling into local optimum in a short time.

Improve Pheromone Rule
Another problem that cannot be ignored in the ant colony algorithm is that the time complexity is high and it has a very slow convergence speed, so it must be globally converged when the algorithm is improved [25].Similar to the hill-climbing algorithm, it cannot be confined to a certain area, in order that the difference between the pheromone content in the path of the optimal path and the poor path is as huge as possible.When the difference between groups is huge, the convergence speed of ant colony can be accelerated, resulting in the ant colony converges near the optimal solution.When the loop iteration is completed, the ant colony releases and reorganizes the pheromone according to the new algorithm.
Suppose C best as the best path and C worst as the poor path.The reason for listing the best path and the poor path is to make the ant colony converge near the optimal solution and to re-adjust the pheromone concentration α.At this point, assuming that α of each path is between [τ min , τ max ], a certain problem will occur if the content is high or low.For example, if the true value is much smaller than τ min , then it is necessary to force α beyond the range of [τ min , τ max ] to approach the vicinity.To make the algorithm both expedient and stable, it is necessary to introduce a small pheromone volatilization coefficient, so that the overall algorithm is relatively stable and there is no uncontrollable change.

Pheromone Update Operator
A large number of constraints arise in the ant colony algorithm, and constraints are generally used for paths.Therefore, if the ant colony is to be searched toward the road that satisfies the constraints, the update operator of the pheromone must be introduced.
Suppose F(s) as a function of the road, and u, v, w is the actual parameter, respectively, indicating the relative weight of cost, time, and security.Suppose F 1 as the cost function, F 2 as the time function, F 3 as the safety function.
The purpose of these formulas is to form a comprehensive evaluation mechanism to select the path with the smallest time, the lowest cost and the safest path from the starting point to the end point.This set of mechanisms consider cost, time and safety factors, while the traditional ant colony algorithm only considers the shortest path (time factor) [26].

Global Update Rule
The whole operation process of the ant colony algorithm is regarded as an ant colony system.The path selection of the ant colony system depends on the probability function, and the search type is random search.Unlike traditional ant colony algorithms, the improved ant colony algorithm is based on pseudo-random scale rules.The advantage of the pseudo-random ratio is that the ant can adjust the search strength of the path and its spatial neighborhood according to the random operator.At the same time, the improved algorithm is based on global update rules [27].In the traditional ant colony algorithm, each path and algorithm update involve the entire ant colony that is, each ant will be updated, resulting in the pheromone of all ant colonies being consistent after updating, while the differentiation effect is not achieved.After changing the global update rule, the pheromone on the search path is strengthened, which can accelerate the accumulation of pheromone and greatly improve the search efficiency [28].

Application of Ant Colony Algorithm
Applying the ant colony algorithm to solve the dynamic traffic assignment problem, individual ants in an ant colony can be regarded as a driving vehicle.Assigning individual ants to their respective paths in the network represents individual vehicles following their paths in the actual network.Dynamic traffic flow allocation means that vehicles are evenly distributed to the road just like the ant colony, and corresponding traffic control is carried out to make the entire lane loop properly, and then, achieving optimal system [29].
In general, dynamic traffic optimization systems have two different aims.One is to achieve the optimal balance of the user, and another is to achieve the optimal balance of the system.The optimal equilibrium of the system means that the entire traffic road system is most efficient, rather than the shortest time of each vehicle.The user's optimal equilibrium model means that the time function of each car is minimized [30].
In dynamic traffic optimization systems, ants must follow the following rules: First, the nodes must be connected to each other, and there should be no connection beyond the node.
Second, the node can only be operated once and cannot be repeated, otherwise it will not be able to find the optimal solution.
The following is a practical application of the improved ant colony algorithm.In the application process, we create 'DEMO' by python.The improved ant colony algorithm finds the shortest path as shown in the figure below.Figure 1 is improved ant colony algorithm for different iterations.
First, when the number of iterations is 5, it can be seen that at the beginning of the iteration, the path is initially disordered, but a good path is not formed.The total path of the traffic at this time is 5479.When the number of iterations is 17, a stable and orderly path can be formed.At this time, the total path of the traffic is 3938, which is greatly reduced compared with the previous 5479.When the number of iterations is 29, the total path is 3871 at this time, and the transit distance has been greatly reduced compared with the number of iterations of 17.It can be seen that one of the characteristics of the improved ant colony algorithm is that it is getting closer to the optimal solution as the number of iterations increases.
process, we create 'DEMO' by python.The improved ant colony algorithm finds the shortest path as shown in the figure below.
First, when the number of iterations is 5, it can be seen that at the beginning of the iteration, the path is initially disordered, but a good path is not formed.The total path of the traffic at this time is 5479.When the number of iterations is 17, a stable and orderly path can be formed.At this time, the total path of the traffic is 3938, which is greatly reduced compared with the previous 5479.When the number of iterations is 29, the total path is 3871 at this time, and the transit distance has been greatly reduced compared with the number of iterations of 17.It can be seen that one of the characteristics of the improved ant colony algorithm is that it is getting closer to the optimal solution as the number of iterations increases.

Algorithm Design Principle
Time complexity is one of the main factors considered in this algorithm.Time complexity refers to the time function required for the program to run to the end of the solution.When the number of vehicles and road nodes is large enough, the time complexity of the lower power can be ignored.The algorithm that computes the mainline part can greatly reduce the time complexity of the algorithm program and improve the efficiency.Generally speaking, the time complexity depends on the calculated network scale.If the network scale is not large, the efficiency of ant colony algorithm is significantly better than GA and neural network algorithm. 1Measuring the distance from the vehicle to the end point, and then we can judge whether the vehicle has reached the end point or not according to the measured distance.If it arrives, return the pheromone.If not, continue to execute the cycle. 2Determine whether the information of the next node is different from the original plan.If there is a difference, continue to proceed according to the original plan. 3According to the information concentration and the heuristic function, the next function is measured. 4Select the road that the vehicle will travel to determine whether it has reached the end point

Simulation Model
The program was written in Python and simulated in a laptop.In the simulation, global deployment and path planning are required according to the classical topology theorem.In the simulation, it is necessary to assume that each car can accept the information transmitted by the central control, and the vehicle adjusts the path according to the information at each signal.
At present, many research on optimal path search are based on graph theory, and the distance is used to measure whether the path is optimal or not.However, in actual traffic, many factors need to be considered, including "time", "accident rate" and "cost"."Time" refers to the time that a computer spends searching for the best path after countless iterations.
In the process of model calculation, some random variables will be set automatically, including traffic jams, traffic accidents, etc. "Accident rate" is the likelihood of traffic accidents which is automatically generated by the model according to road conditions.The purpose of the improved ant colony algorithm is not only the global optimization of the system, but also the interests of each car.The "cost" refers to the average fuel consumption cost of each car.On this basis, a ternary array of this paper is established to achieve multi-objective optimization.A ternary array equal to the attribute values of the model, where the ternary array refers to "cost", "time", and "accident rate" of the road [31].
Above all, we have improved the traditional ant colony algorithm (ACO) by mathematical methods.Now we are going to apply the improved ant colony algorithm (IACO) to the actual problem.We aim to solve the traffic congestion problem in the old area of metropolises.We choose one of the largest metropolises in China, Yangpu District, Shanghai as an example.The number of vehicles in Shanghai has reached 3.31 million, especially in Yangpu District, where cars are easily caught in congestion.The permanent population of Yangpu District is 1.31 million, and the huge population makes it easy for both public transport and private transport to fall into congestion.
As shown in Figure 2, we collect the characteristics of a block in Yangpu District, and use this block as a template for testing.To be more understandable, we number each intersection and use 2, we can know the developable space of the transportation, and the construction of the branch road is also lagging behind.We set the level of branch construction as ζ 1 , the density of road network as ζ 2 , and the space for transportation development as ζ 3 and these parameters are input to the improved ant colony algorithm.
As shown in Figure 3, after computer calculation, we get the results of the IACO model.As shown in Figure 3, there are many paths displayed with black lines after computer calculation.There are many ants automatically assigned by the computer on the path (each ant can be regarded as an individual car), and each path is marked with a ternary array, and the ants on each path (each ant can be regarded as an individual car) have the same "cost", "accident rate" and "time".Since the purpose of the model is to achieve global optimization, as long as each ant searches based on the specified path, the system will remain in a smooth state without congestion.This system is constantly updated.We have added a random variable υ to indicate unexpected conditions during traffic.For example, if a car a 1 has a traffic accident or out of oil, the model will be dynamically updated.Correspondingly, paths displayed with black lines in Figure 3 will also change on the basis of the new situation.
individual car), and each path is marked with a ternary array, and the ants on each path (each ant can be regarded as an individual car) have the same "cost", "accident rate" and "time".Since the purpose of the model is to achieve global optimization, as long as each ant searches based on the specified path, the system will remain in a smooth state without congestion.This system is constantly updated.We have added a random variable υ to indicate unexpected conditions during traffic.
For example, if a car 1 a has a traffic accident or out of oil, the model will be dynamically updated.
Correspondingly, paths displayed with black lines in Figure 3 will also change on the basis of the new situation.Next, the results of the model are reported.The traffic flow theory consists of traffic flow (Q), traffic speed (V) and traffic density (K).These three parameters affect and restrict each other.
can be regarded as an individual car) have the same "cost", "accident rate" and "time".Since the purpose of the model is to achieve global optimization, as long as each ant searches based on the specified path, the system will remain in a smooth state without congestion.This system is constantly updated.We have added a random variable υ to indicate unexpected conditions during traffic.
For example, if a car 1 a has a traffic accident or out of oil, the model will be dynamically updated.
Correspondingly, paths displayed with black lines in Figure 3 will also change on the basis of the new situation.Next, the results of the model are reported.The traffic flow theory consists of traffic flow (Q), traffic speed (V) and traffic density (K).These three parameters affect and restrict each other.
Q V K =  Next, the results of the model are reported.The traffic flow theory consists of traffic flow (Q), traffic speed (V) and traffic density (K).These three parameters affect and restrict each other.
Traffic flow refers to the average number of vehicles per hour, traffic speed refers to the average speed of space per hour, and traffic density refers to the number of vehicles per kilometer.It is generally believed that when the traffic density on the road is small, the vehicle speed is high and unimpeded, and when the traffic density increases, the vehicle speed decreases and the road become crowded.
We collected real traffic data for a certain block in Yangpu District, Shanghai on 1 April 2018, and calculated the data twice.First, the data used to display the real traffic flow in Yangpu District, and then the data is input to the improved ant colony algorithm model to output the traffic flow for each time period.According to the above model, the traffic flow was compared with different time periods.
As shown in Figure 4, V represents traffic speed and K represents traffic density.ACO-K represents the traffic density of the traditional ant colony algorithm, while IACO-K represents the traffic density of the improved ant colony algorithm.ACO-V represents the traffic speed of the traditional ant colony algorithm, and IACO-V represents the traffic density of the improved ant colony algorithm.It can be seen that in the early hours of the morning, the improved ant colony algorithm did not change significantly in density and speed due to the lack of vehicles on the road.At 8 o'clock in the morning, the number of vehicles is increasing rapidly.The improved ant colony algorithm can reduce traffic density and increase traffic speed.Traffic flow refers to the average number of vehicles per hour, traffic speed refers to the average speed of space per hour, and traffic density refers to the number of vehicles per kilometer.It is generally believed that when the traffic density on the road is small, the vehicle speed is high and unimpeded, and when the traffic density increases, the vehicle speed decreases and the road become crowded.
We collected real traffic data for a certain block in Yangpu District, Shanghai on 1 April 2018, and calculated the data twice.First, the data used to display the real traffic flow in Yangpu District, and then the data is input to the improved ant colony algorithm model to output the traffic flow for each time period.According to the above model, the traffic flow was compared with different time periods.As shown in Figure 4, V represents traffic speed and K represents traffic density.ACO-K represents the traffic density of the traditional ant colony algorithm, while IACO-K represents the traffic density of the improved ant colony algorithm.ACO-V represents the traffic speed of the traditional ant colony algorithm, and IACO-V represents the traffic density of the improved ant colony algorithm.It can be seen that in the early hours of the morning, the improved ant colony algorithm did not change significantly in density and speed due to the lack of vehicles on the road.At 8 o'clock in the morning, the number of vehicles is increasing rapidly.The improved ant colony algorithm can reduce traffic density and increase traffic speed.
As shown in Table 1, we compare the performance of the improved ant colony algorithm and the traditional ant colony algorithm in the calculation using the data of April 1, 2018 in Yangpu District, Shanghai.The results show that IACO has better performance than traditional ant colony algorithms in terms of cost reduction, computational complexity, and accident rate.It can be seen from the above table that the improved ant colony algorithm improves the weight value and reduces the time and cost of the search compared with the traditional ant colony algorithm.The improved ant colony algorithm also minimizes the accident rate.As shown in Table 1, we compare the performance of the improved ant colony algorithm and the traditional ant colony algorithm in the calculation using the data of April 1, 2018 in Yangpu District, Shanghai.The results show that IACO has better performance than traditional ant colony algorithms in terms of cost reduction, computational complexity, and accident rate.It can be seen from Table 1 and Figure 5 that the improved ant colony algorithm improves the weight value and reduces the time and cost of the search compared with the traditional ant colony algorithm.The improved ant colony algorithm also minimizes the accident rate.IACO can more fully mobilize transportation resources, so that the traffic flow operation can achieve the overall optimality.The direct effect is that Yangpu district is not easy to form a blockage, and the research purpose of this paper is realized.

Robustness Test
The above results are the predicted values of the model, and we also use the prediction results of the model to compare with the real results of Yangpu District, Shanghai.Use traffic flow as the only indicator to judge whether the prediction effect of the model is accurate.
In the above, we show the smoothness of traffic in Yangpu District, Shanghai after the use of IACO.Then we need to test the accuracy of the improved ant colony algorithm on the judgment of traffic flow.The object of the test is the residual value.The residual is the difference between the actual observed value and the fitted value in the mathematical statistics.The "residual" contains important information about the basic assumptions of the model.As shown in Figure 6, the vertical axis represents traffic flow, which is the product of traffic speed, traffic density and the horizontal axis represents time variation.IACO can more fully mobilize transportation resources, so that the traffic flow operation can achieve the overall optimality.The direct effect is that Yangpu district is not easy to form a blockage, and the research purpose of this paper is realized.

Robustness Test
The above results are the predicted values of the model, and we also use the prediction results of the model to compare with the real results of Yangpu District, Shanghai.Use traffic flow as the only indicator to judge whether the prediction effect of the model is accurate.
In the above, we show the smoothness of traffic in Yangpu District, Shanghai after the use of IACO.Then we need to test the accuracy of the improved ant colony algorithm on the judgment of traffic flow.The object of the test is the residual value.The residual is the difference between the actual observed value and the fitted value in the mathematical statistics.The "residual" contains important information about the basic assumptions of the model.As shown in Figure 6, the vertical axis represents traffic flow, which is the product of traffic speed, traffic density and the horizontal axis represents time variation.IACO can more fully mobilize transportation resources, so that the traffic flow operation can achieve the overall optimality.The direct effect is that Yangpu district is not easy to form a blockage, and the research purpose of this paper is realized.

Robustness Test
The above results are the predicted values of the model, and we also use the prediction results of the model to compare with the real results of Yangpu District, Shanghai.Use traffic flow as the only indicator to judge whether the prediction effect of the model is accurate.
In the above, we show the smoothness of traffic in Yangpu District, Shanghai after the use of IACO.Then we need to test the accuracy of the improved ant colony algorithm on the judgment of traffic flow.The object of the test is the residual value.The residual is the difference between the actual observed value and the fitted value in the mathematical statistics.The "residual" contains important information about the basic assumptions of the model.As shown in Figure 6, the vertical axis represents traffic flow, which is the product of traffic speed, traffic density and the horizontal axis represents time variation.As shown in Figure 7, the calculated value and the true value of the model are quite different in the later stage of calculation.Therefore, according to the feedback information on the graph, the convergence coefficient ε of the model is adjusted, and the fitted value of the model is optimized.
As shown in Figure 7, the calculated value and the true value of the model are quite different in the later stage of calculation.Therefore, according to the feedback information on the graph, the convergence coefficient ε of the model is adjusted, and the fitted value of the model is optimized.Through optimization, it can be found that the difference between the predicted value and the true value of the model is gradually reduced, especially in some stages, which reflects that the model based on the improved ant colony algorithm has higher stability and sensitivity.

Error Analysis and Improvement
In the above, in order to analyze the transportation characteristics of Yangpu district, Shanghai, we add some parameters, such as the level of branch construction 1 ζ , the density of road network 2 ζ , the space for transportation development 3 ζ and random variable υ .These variables are represented by approximate values or rank evaluation, so the error of this model mainly comes from these parameters.
( ) ( ) ( ) The calculated error is shown in the figure below.As shown in Figure 8, the horizontal axis represents time variation and the vertical axis represents the error rate.Due to the large number of parameters, a certain error is caused.By constantly adjusting the parameters, the error can be effectively controlled.Comparing the error rates optimization before and after, it can be found that the error is obviously controlled.Through optimization, it can be found that the difference between the predicted value and the true value of the model is gradually reduced, especially in some stages, which reflects that the model based on the improved ant colony algorithm has higher stability and sensitivity.

Error Analysis and Improvement
In the above, in order to analyze the transportation characteristics of Yangpu district, Shanghai, we add some parameters, such as the level of branch construction ζ 1 , the density of road network ζ 2 , the space for transportation development ζ 3 and random variable υ.These variables are represented by approximate values or rank evaluation, so the error of this model mainly comes from these parameters.
The calculated error is shown in the figure below.As shown in Figure 8, the horizontal axis represents time variation and the vertical axis represents the error rate.Due to the large number of parameters, a certain error is caused.By constantly adjusting the parameters, the error can be effectively controlled.Comparing the error rates optimization before and after, it can be found that the error is obviously controlled.

Main Findings of This Study
Presently, the metropolis plays an irreplaceable role in environmental protection and social

Main Findings of This Study
Presently, the metropolis plays an irreplaceable role in environmental protection and social development.The rapid development of metropolis inevitably requires supporting facilities, such as the constantly updated transportation planning.Though the urban traffic reform was carried out enthusiastically, the old area of the metropolis did not attract people's attention, and its traffic congestion has not improved.Easing traffic congestion in the old area of metropolis is the key to solving the bottleneck of metropolitan development.
However, scholars have little research on this issue.At this time, there is no effective mechanism to solve the problem of traffic congestion in the old area of the metropolis.This paper aims to solve the traffic congestion in the old area of the metropolis.Firstly, we introduced the traditional ant colony algorithm, and proposed an improved strategy to form a unique improved ant colony algorithm.We applied the improved ant colony algorithm and the traffic simulation software to make virtual reality traffic intelligent.We reversely tested the results based on the simulation.The results showed that the difference between real traffic flow and traffic flow predicted by the improved ant colony algorithm was small, reflecting our model and algorithm can predict and control the real traffic flow.Due to the optimization of the algorithm, we also maximized the allocation of traffic resources on the road, so that the vehicle system realized the comprehensive optimization of time, cost and accident rate.
Finally, we analyzed the sensitivity and stability of the algorithm, and it found that the model was stable and the results were reasonable.We solved the problem better of traffic congestion in the old area of metropolis, and gave the detailed algorithm and the calculation process through the above analysis.

Implications of This Study
The literature pays too much attention to the mathematical model on ant colony algorithm, while pays less attention to the practical problems of the development of the old area of metropolis, and has little value for solving the practical problems.
Based on the ant colony algorithm, this paper improved the ant colony algorithm in the light of the needs of actual road transportation simulation, and analyzed the influencing factors and solutions of traffic congestion in the old area of metropolis.According to the current situation of the old area of metropolis, this paper designed the simulation model, introduced the heuristic factor, and calculated the convergence speed of the algorithm.

Limitations of This Study
Some key data cannot be obtained owing to limitations in data and legal rules, which may result in unreasonable parameter settings in this paper.Due to computer limitations, some iterations set a forced termination.Although the result is infinitely close to the optimal value, it is still necessary to state that it is not the final resolved value.Therefore, if this paper gets more computational support, the model results will be more optimized and ideal.
Actually, this study is still a small-scale experiment, and further research is needed for larger-scale applications.With the improvement of algorithm and the increasing openness of data, the model to alleviate traffic congestion in old area of metropolis will become more practical.
At the same time, it should be noted that the research object of this paper is limited to one case, and research results have many shortcomings.The further research direction is to use large-scale observation data instead of a single variable.

Funding:
The research was funded by Shanghai Social Science Fund (NO. 2018BGL008).

Figure 1 .
Figure 1.Improved ant colony algorithm for different iterations.

Figure 1 .
Figure 1.Improved ant colony algorithm for different iterations.

Figure 5 .
Figure 5.Comparison of improved ant colony algorithm and traditional ant colony algorithm.

Figure 5 .
Figure 5.Comparison of improved ant colony algorithm and traditional ant colony algorithm.

Sustainability 2019 , 15 Figure 5 .
Figure 5.Comparison of improved ant colony algorithm and traditional ant colony algorithm.

Table 1 .
Comparison of improved ant colony algorithm and ant colony algorithm.

Table 1 .
Comparison of improved ant colony algorithm and ant colony algorithm.