<< NARVAL_M_NeighborhoodN NARVAL NARVAL_M_NodeRWP >>

NARVAL >> NARVAL > NARVAL_M_NextDestination

NARVAL_M_NextDestination

Select the next waypoint for each node of a VANET simulation.

Calling Sequence

[D] = NARVAL_M_NextDestination(I)

Parameters

I :

current corner index for each node.

D :

next corner index for each node.

Description

NARVAL_M_NextDestination selects the next waypoint for each node of a Vehicular Network (VANET).

The corners are numbered {1,2,3,4}. Depending on the road where a node is moving, the direction is fixed, e.g. {1,2,3,4,1...} for the external roads and {1,4,3,2,1...}.

Examples

n1=15;//quantity of nodes in the first road
n2=15;//quantity of nodes in the second road
n3=15;//quantity of nodes in the third road
n4=15;//quantity of nodes in the fourth road
//corners coordinates
P1x=[100 900 900 100];
P1y=[100 100 900 900];
P2x=[130 870 870 130];
P2y=[130 130 870 870];
P3x=[160 160 840 840];
P3y=[160 840 840 160];
P4x=[190 190 810 810];
P4y=[190 810 810 190];
N=[n1 n2 n3 n4];
n=n1+n2+n3+n4;
nf=4;
i1=int(4*rand(1,n1))+1;//starting corner of the first set of nodes
i2=int(4*rand(1,n2))+1;//starting corner of the second set of nodes
i3=int(4*rand(1,n3))+1;//starting corner of the third set of nodes
i4=int(4*rand(1,n4))+1;//starting corner of the fourth set of nodes
indc=[i1 i2 i3 i4];
//coordinates of nodes 4 fixed nodes followed by n nodes
nodex=[145 145 855 855 P1x(i1) P2x(i2) P3x(i3) P4x(i4)];
nodey=[145 855 855 145 P1y(i1) P2y(i2) P3y(i3) P4y(i4)];
Dind=[NARVAL_M_NextDestination(i1) NARVAL_M_NextDestination(i2) NARVAL_M_NextDestination(i3) NARVAL_M_NextDestination(i4)];//application of NARVAL_M_NextDestination
indc
Dind

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_M_NeighborhoodN NARVAL NARVAL_M_NodeRWP >>