| Algorithm 3 Physical Attraction Model | |
| Input: | Trajectory P1 → P2 → Pn; OSM-WayID-List; |
| Output: | New Trajectory → … → ; |
| 1: | fort = 1 to n do |
| 2: | T = 0; K = ∞; |
| 3: | = meandistance (d1, d2 … dn); |
| 4: | K = di − ; |
| 5: | While T ≤ 20 && K > 0.5 do |
| 6: | F1(Pi) = F2(Pi); |
| 7: | = meandistance (); |
| 8: | K = − ; |
| 9: | T = T + 1; |
| 10: | end while |
| 11: | end for |