Mathematical Problems in Engineering / 2015 / Article / Alg 1

Research Article

Traffic Management as a Service: The Traffic Flow Pattern Classification Problem

Algorithm 1

Cluster patterns.
input: 3D array of traffic density per street, per hour, per day
output: pattern-dependant cluster classification
BEGIN
for each street in All_streets do
 if (peak_traffic_intensity in < 690 veh/h) then
  remove street from All_streets
for each Week_day in WEEK_DAY do
 average_Week_day = get_average_pattern(Week_day)
 clusters = FindClusters(Week_day, average_Week_day)
 mean_clusters = get_average(clusters[Week_day])
 median_clusters = get_median(clusters[Week_day])
 if (clusters[average_Week_day] == round(mean_clusters)) then
  num_clusters[week_day] = clusters[average_Week_day]
 else
  num_clusters[week_day] = round(get_average(mean_clusters,
     median_clusters, clusters[average_Week_day]))
for all week_day pairs (, )
where num_clusters[] == num_clusters[] do
 if (Matching(cluster_elements(), cluster_elements()) > 90%)
  then pattern[] = pattern[]
for all week_day pairs () with different pattern do
 for all clusters in and in do
  if (correlation(average_street(), average_street()) > 0.9)
   then
    pattern[] = pattern[]
  
RETURN cluster pattern classification
END algorithm