<< NL_M_NodeRW NL_M: Mobility NL_M_NodeRWPVanet >>

NARVAL >> NL_M: Mobility > NL_M_NodeRWP

NL_M_NodeRWP

Generate the displacement of a node towards a Point of Interest (Random Way Point).

Calling Sequence

[Nx,Ny,Dx,Dy,D,V,T] = NL_M_NodeRWP(Nx,Ny,Dx,Dy,D,V,T,TM,VM,L)

Arguments

:

Node x-coordinate (current position).

:

Node y-coordinate (current position).

:

Node PoI x-coordinate.

:

Node PoI y-coordinate.

D :

Distance metric (current position to PoI).

V :

Node velocity.

T :

Breaktime between two displacements (PoI-old to PoI-new).

:

Maximum value of the breaktime parameter.

:

Maximum value of the velocity parameter.

L :

Network square area side.

Description

NL_M_NodeRWP generates the displacement of the node currently located in towards the Point of Interest distant of D, at the speed equal to V.

When the node reaches the PoI, it stays there for the time duration T. Afterwards it selects a new PoI, a new velocity, and a new breaktime for the new PoI.

Examples

nx=0;//initial node x-coordinate
ny=0;//initial node y-coordinate
dx=100;//PoI x-coordinate
dy=200;//PoI y-coordinate
[d]=NL_F_DistanceSiDj(nx,ny,dx,dy);
tn=0;//a node is allowed to move when this counter rates 0
tnmax=100;//maximal value
v=20;//current speed
vm=50;//maximal speed
L=1000;//network square area side
[nx ny dx dy d v tn]//original values
[nx,ny,dx,dy,d,v,tn]=NL_M_NodeRWP(nx,ny,dx,dy,d,v,tn,tnmax,vm,L);// application of NL_M_NodeRWP
[nx ny dx dy d v tn]//new values

Report an issue
<< NL_M_NodeRW NL_M: Mobility NL_M_NodeRWPVanet >>