In mobility management, the restricted random waypoint model is a random model for the movement of mobile users, similar to the random waypoint model, but where the waypoints are restricted to fall within one of a finite set of sub-domains. It was originally introduced by Blaževic et al.[1] in order to model intercity examples and later defined in a more general setting by Le Boudec et al.[2]
The restricted random waypoint models the trajectory of a mobile user in a connected domain A {\displaystyle A} . Given a sequence of locations M 0 , M 1 , . . . {\displaystyle M_{0},M_{1},...} in A {\displaystyle A} , called waypoints, the trajectory of the mobile is defined by traveling from one waypoint M n {\displaystyle M_{n}} to the next M n + 1 {\displaystyle M_{n+1}} along the shortest path in A {\displaystyle A} between them. In the restricted setting, the waypoints are restricted to fall within one of a finite set of subdomains A i ⊂ A {\displaystyle A_{i}\subset A} .
On the trip between M n {\displaystyle M_{n}} and M n + 1 {\displaystyle M_{n+1}} , the mobile moves at constant speed V n {\displaystyle V_{n}} which is sampled from some distribution, usually a uniform distribution. The duration of the n {\displaystyle n} -th trip is thus:
S n = d ( M n , M n + 1 ) V n {\displaystyle S_{n}={\frac {d(M_{n},M_{n+1})}{V_{n}}}}
where d ( x , y ) {\displaystyle d(x,y)} is the length of the shortest path in A {\displaystyle A} between x {\displaystyle x} and y {\displaystyle y} .
The mobile may also pause at a waypoint, in which case the n {\displaystyle n} -th trip is a pause at the location of the n {\displaystyle n} -th waypoint, i.e. M n + 1 = M n {\displaystyle M_{n+1}=M_{n}} . A duration S n {\displaystyle S_{n}} is drawn from some distribution F pause {\displaystyle F_{\text{pause}}} to indicate the end of the pause.
The transition instants T n {\displaystyle T_{n}} are the time at which the mobile reaches the n {\displaystyle n} -th waypoint. They are defined as follow:
{ T 0 is chosen by some initialization rule T n + 1 = T n + S n {\displaystyle {\begin{cases}T_{0}{\text{ is chosen by some initialization rule }}\\T_{n+1}=T_{n}+S_{n}\end{cases}}}
The sampling algorithm for the waypoints depends on the phase of the simulation.
An initial phase I 0 = ( i , j , r , p ) {\displaystyle I_{0}=(i,j,r,p)} is chosen according to some initialization rule.
Given phase I n = ( i , j , r , p ) {\displaystyle I_{n}=(i,j,r,p)} , the next phase I n + 1 {\displaystyle I_{n+1}} is chosen as follows. If r > 0 {\displaystyle r>0} then p ′ {\displaystyle p'} is sampled from some distribution and I n + 1 = ( i , j , r − 1 , p ′ ) {\displaystyle I_{n+1}=(i,j,r-1,p')} . Otherwise, a new sub-domain k {\displaystyle k} is sampled and a number r ′ {\displaystyle r'} of trip to undergo in sub-domain j {\displaystyle j} is sampled. The new phase is: I n + 1 = ( j , k , r ′ , move ) {\displaystyle I_{n+1}=(j,k,r',{\text{move}})} .
Given a phase I n = ( i , j , r , p ) {\displaystyle I_{n}=(i,j,r,p)} the waypoint M n + 1 {\displaystyle M_{n+1}} is set to M n {\displaystyle M_{n}} if p = pause {\displaystyle p={\text{pause}}} . Otherwise, it is sampled from sub-domain A i {\displaystyle A_{i}} if r > 0 {\displaystyle r>0} and from sub-domain A j {\displaystyle A_{j}} if r = 0 {\displaystyle r=0} .
In a typical simulation models, when the condition for stability is satisfied, simulation runs go through a transient period and converge to the stationary regime. It is important to remove the transients for performing meaningful comparisons of, for example, different mobility regimes. A standard method for avoiding such a bias is to (i) make sure the used model has a stationary regime and (ii) remove the beginning of all simulation runs in the hope that long runs converge to stationary regime. However the length of transients may be prohibitively long for even simple mobility models and a major difficulty is to know when the transient ends.[2] An alternative, called "perfect simulation", is to sample the initial simulation state from the stationary regime.
There exists algorithms for perfect simulation of the general restricted random waypoint. They are described in Perfect simulation and stationarity of a class of mobility models (2005)[2] and a Python implementation is available on GitHub.[3]