Restricted random waypoint model

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. in order to model intercity examples and later defined in a more general setting by Le Boudec et al.

Definition
The restricted random waypoint models the trajectory of a mobile user in a connected domain $$A$$. Given a sequence of locations $$M_0, M_1, ...$$ in $$A$$, called waypoints, the trajectory of the mobile is defined by traveling from one waypoint $$M_n$$ to the next $$M_{n+1}$$ along the shortest path in $$A$$ between them. In the restricted setting, the waypoints are restricted to fall within one of a finite set of subdomains $$A_i \subset A$$.

On the trip between $$M_n$$ and $$M_{n+1}$$, the mobile moves at constant speed $$V_n$$ which is sampled from some distribution, usually a uniform distribution. The duration of the $$n$$-th trip is thus:

$$S_n = \frac{d(M_n, M_{n+1})}{V_n}$$

where $$d(x, y)$$ is the length of the shortest path in $$A$$ between $$x$$ and $$y$$.

The mobile may also pause at a waypoint, in which case the $$n$$-th trip is a pause at the location of the $$n$$-th waypoint, i.e. $$M_{n+1} = M_n$$. A duration $$S_n$$ is drawn from some distribution $$F_{\text{pause}}$$ to indicate the end of the pause.

The transition instants $$T_n$$ are the time at which the mobile reaches the $$n$$-th waypoint. They are defined as follow:

$$\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)$$ is chosen according to some initialization rule.


 * $$i$$ is the index of the current sub-domain $$A_i$$.
 * $$r$$ is the remaining number of waypoints to sample from this sub-domain $$A_i$$.
 * $$j$$ is the index of the next sub-domain.
 * And $$p \in \{\text{pause}, \text{move}\}$$ indicates whether the $$n$$-th trip is a pause.

Given phase $$I_n = (i, j, r, p)$$, the next phase $$I_{n+1}$$ is chosen as follows. If $$r > 0$$ then $$p'$$ is sampled from some distribution and $$I_{n+1} = (i, j, r-1, p')$$. Otherwise, a new sub-domain $$k$$ is sampled and a number $$r'$$ of trip to undergo in sub-domain $$j$$ is sampled. The new phase is: $$I_{n+1} = (j, k, r', \text{move})$$.

Given a phase $$I_n = (i, j, r, p)$$ the waypoint $$M_{n+1}$$ is set to $$M_n$$ if $$p=\text{pause}$$. Otherwise, it is sampled from sub-domain $$A_i$$ if $$r > 0$$ and from sub-domain $$A_j$$ if $$r = 0$$.

Transient and stationary period
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. 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) and a Python implementation is available on GitHub.