Skip to main content
. 2020 Feb 17;20(4):1084. doi: 10.3390/s20041084
Algorithm 2 TRP
Input:
allSynopses: All synopses
duration: Specified temporal type
eps: Parameter ‘eps‘ in DBSCAN
Output:
TRP: Collection of traffic patterns recognized
1:  Collection of daily traffic state sequences: collectionSequence=
2:  All days during the period of allSynopses: days
3:  for each day in days do
4:    if day within duration and day in type then
5:      Push states of synopses on day into sequence chronologically
6:    end if
7:  end for
8:  Push every sequence into collectionSequence
9:  clusters=DBSCAN(collectionSequence, eps)
10:  for each clusteri in clusters do
11:    sum=0
12:    Traffic pattern recognized of clusteri: TRPi=
13:    The number of sequences in clusteri: N= clusteri.length
14:    for k in N do
15:      for each sequence in clusteri do
16:        sum+= sequencek
17:      end for
18:    end for
19:    TRPi[k]= sum/N
20:    Push TRPi[k] into TRP
21: end for
22: return TRP