Skip to main content
. 2024 Jan 31;10:e1851. doi: 10.7717/peerj-cs.1851

Algorithm 2. The CWC computing algorithm.

Input: a binary mobility intention sequence X, the true periodicity T0
Output: the CWC’s value of the binary mobility intention sequence X.  
1:  CWCout=T0, Cf=1
2: compute Si(T0) as Eq. (6)
3: Sort Si(T0) by descending
4: while Si(T0)>0 do
5:   compute icp as Eq. (16)
6:   compute niw as Eq. (18)
7:   compute cwc as Eq. (17)
8:   if cwc<CWCout then
9:      CWCout=cwc
10:  end if
11: end while
12: return CWCout