<< NARVAL_R_FloodInit NARVAL NARVAL_R_FloydWarshall >>

NARVAL >> NARVAL > NARVAL_R_FloodIteration

NARVAL_R_FloodIteration

Perform the topology discovery propagation of the Flood algorithm.

Calling Sequence

[m,np] = NARVAL_R_FloodIteration(g,ne,nr,m,np)

Parameters

g :

network graph.

ne :

source node.

nr :

destination node.

m :

discovery packet storage matrix.

np :

quantity of discovery packets on the network.

Description

NARVAL_R_FloodIteration propagates discovery packets of the Flood algorithm on the graph g emitted from the source node ne towards the destination node nr.

The set of candidate routes is stored into the matrix m ([route|arrival|TTL|route length]). The current quantity of discovery packets rates np.

Examples

n=100;//network size
L=1000;//network square area side
dmax=100;//locality radius
[g]=NARVAL_T_LocalityConnex(n,L,dmax);//generation of a random topology in respect with the Locality method. 
nl=length(g.head);//quantity of network links
nf=length(g.node_x);//real network size
[ne nr]=NARVAL_F_Random_i_j(nf)//selection of the source and destination nodes
TTL=10;//initialization of TTL
[m,np]=NARVAL_R_FloodInit(g,ne,nr,TTL);//application of NARVAL_R_FloodInit
[m,np]=NARVAL_R_FloodIteration(g,ne,nr,m,np);//application of NARVAL_R_FloodIteration
EC=ones(1,nl);//edge color
EB=2*ones(1,nl);//edge width
D=5*ones(1,nf);//node border
D(ne)=10;
v=[];//display the first step of the flood
for i=1:np
v=[v NARVAL_G_Nodes2Path(m(i,1:2),g)];
end
[v]=NARVAL_F_Unity(v);//remove duplicated values
EC(v)=5;
EB(v)=3;
D(m(:,2)')=8
v=[];//display the second step of the flood
for i=1:np
v=[v NARVAL_G_Nodes2Path(m(i,2:3),g)];
end
[v]=NARVAL_F_Unity(v);//remove duplicated values
EC(v)=2;
EB(v)=4;
D(m(:,3)')=6;
g.node_border=D;
g.edge_color=EC;
g.edge_width=EB;
ind=1;//window index
f=NARVAL_G_ShowNodesIndex(g,ind);//graph visualization
m
np

Dependency

NARVAL_G_NodeNeighbors, NARVAL_F_Distance

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_R_FloodInit NARVAL NARVAL_R_FloydWarshall >>