Automated Generation of Traffic Incident Response Plan Based on Case-Based Reasoning and Bayesian Theory

. Traffic incident response plan, specifying response agencies and their responsibilities, can guide responders to take actions effectively and timely after traffic incidents. With a reasonable and feasible traffic incident response plan, related agencies will save many losses, such as humans and wealth. In this paper, how to generate traffic incident response plan automatically and specially was solved. Firstly, a well-known and approved method, Case-Based Reasoning (CBR), was introduced. Based on CBR, a detailed case representation and 𝑅 5 -cycle of CBR were developed. To enhance the efficiency of case retrieval, which was an important procedure, Bayesian Theory was introduced. To measure the performance of the proposed method, 23 traffic incidents caused by traffic crashes were selected and three indicators, Precision P , Recall R , and Indicator F , were used. Results showed that 20 of 23 cases could be retrieved effectively and accurately. The method is practicable and accurate to generate traffic incident response plans. The method will promote the intelligent generation and management of traffic incident response plans and also make Traffic Incident Management more scientific and effective.


Introduction
Traffic incidents, randomly occurring spatially and temporally, usually are caused by traffic crashes, disabled vehicles, natural disasters, or leaked hazardous materials, and so on.Due to their unpredictability, complexity, urgency, and potential harmfulness, much negative effects on transportation system are caused, such as much traffic delay, traffic jam, traffic facilities losses, and even secondary traffic crash.And also, there may be many casualties, much economy losses, and ecological failure.In America, statistics from 75 cities in 2000 revealed that 52%-58% of traffic delays were caused by traffic incidents, which would lead to more than $75 billion economical loses and more than 8.4 billion gallons fuel consuming [1].In 2008, snow disaster and Wenchuan earthquake hit southern China and led to traffic paralysis in many regions, which greatly influences the rescue work and brings much more loses.
Traffic Incident Management (TIM), as an important component of intelligent transportation system (ITS), is defined as the coordinated and preplanned system.With the help of TIM, human resources and equipment can be managed and distributed timely to reduce the durations and consequences of traffic incidents and then achieve smoother traffic flow.Some successful practices of TIM in developed countries have shown that TIM is an effective and feasible solution to manage traffic incident [2][3][4].Traffic incident response plan, as critical module of TIM, is a preplanned scheme to implement emergency rescue and reduce incidentrelated losses.The plan, which identifies the suitable incident, necessary resources and staffs, emergency measures, and corresponding time limitation, will guide response agencies to make decision and take actions timely and also guarantee quick response to traffic incidents [5].If the response plans are unreasonable and unfeasible, they will lead to lose the mechanism of coordination and consistency among response agencies and even make poor accountability [6].Considering the real-time response and multiagency coordination, generating suitable response plan for target traffic incident quickly and accurately is a key procedure of TIM.
For response plan, there are main three types used in the past few decades (1) Text plan: the text plan, which is an initial type and a static text, provides schemes of responding to potential incidents with words, based on past cases and experiences.(2) Graphic plan: compared with text plan, it takes various types of information to state schemes, such as words, pictures, and videos.(3) Reasoning plan: based on graphic plan, some models are introduced to generate response plan automatically, simulate the implementation of response plan, and then measure performance of the response plan.At present, most agencies manage response plan with the first two types, which are inferior during incident response.Firstly, most response plans are conserved with books or saved in computer simply, which are very difficult to disseminate the accurate plan timely to response agencies.Furthermore, response plans will be revised periodically, which are also difficult with books.Finally, different levels of response plan, which may be applied to a nation, a province or a city, would also influence the incident response.To respond effectively, a much more digital, intelligent, and visual type of response plan should be used, such as reasoning plan.It can generate response plan automatically, query response plan, make decision intelligently, and also show incident response performance visually.
Response plan generation is an important part of reasoning plan, and many researchers have paid attentions on it.Willians classified incident response plan into four parts, which were prior prevention, prior preparation, incident response and recovery.Each part had defined necessary response agencies and their responsibilities [7].Zografos et al., Fabiano et al., and Chiu and Zheng introduced some independent models, like graphic theory and linear program, into traffic incident response based on advanced data collection and process technologies and showed that these methods were efficient and feasible [8][9][10].And also, some Chinese researchers like Dong, Luo et al., and Xiang and Zhang defined response agencies' responsibilities and used Case-Based Reasoning, Rule-Based Reasoning, or dynamic game model to develop traffic incident response plans [11][12][13].For these researches, their methods, which were strongly theoretical, enhanced the efficiency of generating response plan in theory.It should be validated further in practice.
The paper mainly focused on developing an algorithm, which could generate appropriate traffic incident response plans timely and automatically.Case-Based Reasoning (CBR), which could obtain an initial plan through retrieving similar incident and then gain the final plan after revision, was introduced to generate response plans.To implement case retrieval effectively, Bayesian Theory was also introduced to search for the similar traffic incident from past traffic incidents.With the designed algorithm, traffic incident response plan could be developed automatically and timely, according to past experiences.It would be helpful to save response time and guide response agencies much more efficiently.

Methodology
How to automatically generate traffic incident response plans based on prior cases or experiences is the most important problem of the paper.Compared with some other related algorithms, CBR is adopted, which is the process of solving new problems based on similar experiences within the same domain.CBR is a general paradigm for problem solving based on the recall and reuse of specific experiences.And also, it is an approach with incremental and sustained learning, since a new experience is retained each time after iteration [14].
To state the CBR model, the  5 -CBR cycle, proposed by Finnie and Sun [15], was introduced by adding case repartition into  4 -CBR cycle.Case repartition could reduce the complexity of case database and facilitate case retrieval.The new  5 -CBR cycle consisted of case retrieval, case reuse, case revision, case retain, and case repartition, as shown in Figure 1.Based on the cycle, there were the following six steps in a typical CBR: (i) traffic incident verification; (ii) retrieving the most similar case from case database; (iii) reuse of the retrieved case to attempt to solve the current problem; (iv) revising the proposed solutions; (v) retaining the final solution as a part of database; (vi) repartition case database to a satisfactory one.
In the paper, to be combined with Bayesian Theory, CBR was simplified to five steps: traffic incident verification, case representation, case retrieval based on Bayesian Theory, case reuse and revision, and case learning and maintenance.

Traffic Incident Verification.
After detecting traffic incidents, some raw information can be obtained from traffic incident detection system.With the help of traffic surveillance or highway patrols, verifying the raw information can be done.To start to generate response plans, the verified raw information should be transmitted to emergency management center standardly and then trigger response plan database.So, a standard table should be designed to report the raw information.
Different factors can cause different traffic incidents, such as disabled vehicles or traffic crashes.So, there are much information to be confirmed, including basic information and representation information.Name of incident-related highway, time, and weather belong to basic information.Traffic incident categories and their corresponding indicators belong to representation information.To record traffic incidents fully and accurately, a table is developed based on specifications in China [16], as shown in Figure 2. The figure is divided into three parts: basic information collection, first-level incident information conformation, and secondlevel incident information conformation.The incident firstlevel information are developed to classify traffic incidents into three categories, such as traffic crash, disabled vehicles, and abnormal highway conditions.The incident second-level information is designed to confirm traffic impact and some representation information.

Case Representation.
Case representation means to present the cases in the form that the computer can access, deal with, and store.Using ArcGIS Server, a visual web system was developed based on Browser/Server and Java language to manage traffic incident response plans.To develop database for cases, Oracle database was adopted for the real project development.In fact, once the data are stored with the data structure mentioned below, any database is suitable for storing cases.Various case representation methods have been developed, including frame representation and object-oriented representation.Here, frame representation was chosen considering data processing and mathematical algorithm.The main frame is the case of traffic incidents, as shown in Table 1 (taking traffic crashes as example).The response plan of traffic incidents was stored as the subframe, as shown in Table 2.
The main frame contains information obtained from Figure 2. The subframe consists of three slots: traffic incident introduction, countermeasures of traffic incident response, and evaluation of traffic incident response.Five facets, which were agency coordination, traffic management, field management, traffic recovery, and others, were designed for the second slot.

Case Retrieval Based on Bayesian
Theory.Case retrieval is the most important step of CBR, which influences greatly the performance of CBR.There are two problems which should be solved, which are case indexing and case retrieval.For case indexing, related cases in database can be obtained quickly given a target case.To develop the case indexing, two principles are proposed: (1) the case indexing should be abstract to some extent to retrieve various cases, but (2) the case indexing should be also a little special, or differences among cases may be vanished.In the paper, traffic incident first-level information, traffic crashes, disabled vehicles, and abnormal highway conditions were selected as case indexing.
Generally, for case retrieval, two goals should be gained: (1) the retrieved cases are as similar as possible with target case and (2) the number of retrieved cases is as few as possible.The prior goal is very important.To meet the two  identical distributed random samples, in case database .All cases in  can be represent by   ( = 1, 2, . . ., ) and obey an unknown probability distribution .There are  attributes   ( = 1, 2, . . ., ) in each case, whose values   are discrete data and shown in (1).Here, some assumptions are represented by Ψ, and then a model classed with parameters can be represented by  under Ψ, in which a model can be represented by Θ.Given sample , a model Θ() should be developed to make (  | Θ()) as similar to (  ) as possible: where   is the number of different values of the th attributes in case database.Using Bayesian Theory, to measure the similarity between target case and cases in database, a matching function should be developed, whose values can verify the similarity directly.The more the values of function are, the more similar the retrieved cases are.The expected retrieved case is the maximum value of function among cases database.The definition of function is a critical procedure of case retrieval.Based on Bayesian Theory, the function can be defined initially as conditional probability of each case in database given target case , as shown in (2).Unfortunately, the function may only gain nonzero values when cases in database are very identical with target case.Furthermore, the function is in favor of retrieving some cases with larger prior probability, which may not be expected cases.So, ( 2) is revised, as shown in (3): where Sim(  | ) is the similarity between cases in database and target case.With Bayesian Theory, ( 4) can be obtained.To use ( 3) and ( 4) in practice, proposed assumptions should be in favor of computation of these equations.So, the assumption of Naïve Bayes model was adopted, in which all variables were independent except for a special class variable.In the paper, attribute   is assumed as class variable, and then the probability of case could be computed by (5): Once determining the parameter of model Θ = (, Φ), shown in ( 6), the probability distribution could be also verified.To simplify the computation, the two parameters were assumed to obey Dirichlet distribution, as shown in (7).With ( 4)-( 8), equation ( 9) could be computed when the two parameters (, Φ) are independent, as shown in ( 9):  = ( 1 ,  2 , . . .,   ) ,   =  (  = ) , Φ = (Φ 11 , . . ., Φ 1(−1) , . . ., Φ 1 , . . ., Φ (−1) ) , Φ  = (Φ 1 , . . ., Φ   ) , ( = 1, 2, . . ., ) , where k is the number of different values of class variable   .Consider where  is the number of all cases in database; ℎ  is the number of cases whose attribute   are equal to ;   is the number of cases whose attributes   are equal to  and attributes   are equal to   ;   is the hyper-parameter  of Dirichlet distribution, valued by 1 if without a priori knowledge; and   is the hyper-parameter Φ of Dirichlet distribution, valued by 1 if without priori knowledge.Finally, a threshold  should be proposed.If Sim(  | ) is more than or equal to , then the corresponding case can be retrieved.Here,  is valued by 0.7.

Case Reuse and Revision.
In the two steps, two questions should be determined, which part of retrieved response plan can be reused directly in target case and which part of response plan must be revised to be used in target case.The differences between target case and retrieved case are helpful to solve the questions.If the managers are satisfied with the retrieved case, it can be reused directly.Otherwise, the retrieved case needs to be revised and improved to deal with its specific condition.Generally, there are four methods to revise case, including substitution, transformation, specialpurpose adaption and repair, and derivational replay.In this paper, substitution method was adopted, which could develop new case only through changing some different values in retrieved case.

Case Learning and Maintenance.
The CBR can learn new knowledge easily, which guarantees the efficiency and reliability of CBR for a long time.Case learning can be implemented by processing revised case and adding it into case database or replacing corresponding retrieved case.However, if the database for cases is too large, the efficiency and accuracy of case retrieval will be decreased.It is necessary to manage database, such as adding, revising, and deleting some cases.If no suitable cases are retrieved, case made by managers should be added into database after the event.
The managers can also revise the retrieved case if necessary.Finally, the managers should delete the useless cases regularly to ensure the efficiency and accuracy.

Validation
To measure the performance of the method, 23 traffic incidents caused by traffic crashes were selected randomly from traffic incident database from Traffic Management Bureau, the Ministry of Public Security of China.Due to the space limitations in the paper, the detailed information of 23 cases is not listed.However, the main frame and subframe of crash cases in database are illustrated in Tables 1 and 2. For these 23 cases (case 1∼case 23), one case was designed as target case, and the other 22 cases were developed as case retrieval database.Each of these 23 cases could be designed as target case for only once.Therefore, 23 case retrievals were available to measure performance, as shown in Table 3.Three indicators were introduced to measure performance, including Precision , Recall , and Indicator  [17].The values of these indicators could be calculated with (10).The testing results of case retrieval were shown in Table 3: where  is the number of retrieved cases;   is the number of the th retrieved case's attributes whose value is equal to that of current case;  0 is the number of attributes for each case;   is the number of all related cases in database;  is the significance coefficient between Precision and Recall, 0.5 used, which means Precision's significance is twice more than Recall's.

Conclusion
Incident response plan, as an important component of Traffic Incident Management, provides schemes to respond to traffic incidents and identifies response agencies.The paper mainly focused on the automated generation of traffic incident response plan, which was a function of reasoning plan.To cope with the problem, an effective model, known as Case-Based Reasoning, was introduced to design, retrieve, revise, and manage cases.To enhance the efficient and accuracy of case retrieval, Bayesian Theory was also introduced to develop a function to measure the similarity between cases in database and target case.
Based on the testing dataset containing 23 traffic incidents cases, the method was verified to be feasible and effective.The validation results showed that most of target cases could be retrieved effectively using the method, except for case 4, case 6, and case 7. The 23 cases in tested database were insufficient to retrieve all target cases effectively and accurately.A better performance could be achieved by increasing the amount of cases in the database to an appropriate number.With the proposed method, traffic response plan could be generated automatically and timely.And also, the method could collect prior successful experiences and manage them.These were all helpful for incident managers and authorities to make decisions and coordinate with other agencies.
As for future work, differences among attributes should be developed more completely.Using Bayesian Theory, all attributes were equally important.However, in fact, there were some differences among them.Much more attention might be paid on the attribute of causalities than that of damaged vehicles, when generating traffic incident response plans.So during case retrieval, weights for each attribute could be introduced to enhance the performance of case retrieval.

Figure 1 :
Figure 1: The  5 model of Case-Based Reasoning.

Table 1 :
Main frame of cases in database.

Table 2 :
Subframe of cases in database.Fine □ Cloud □ Rain □ Snow □ Fog □ Frozen goals, Bayesian Theory, which can predict unknown things with Bayesian Probability based on existing knowledge, is introduced to search for the similar case from case database.To retrieve similar cases with Bayesian Theory effectively, some problems and mathematical expressions should be identified.Here, there are  cases, which are independently □ None □ None □ Compact car □ Large car

Table 3 :
Performance of Case-Based Reasoning and Bayesian Theory.