Perform the initialization of the Flood algorithm.
[m,np] = NARVAL_R_FloodInit(g,ne,nr,TTL)
network graph.
source node.
destination node.
discovery radius (Packet Time-To-Live).
discovery packet storage matrix.
quantity of discovery packets on the network.
NARVAL_R_FloodInit initializes the Flood algorithm from the source node ne on the graph g in order to find multiple paths towards the destination node nr.
The research is limited by the maximal quantity of nodes TTL that a discovery packet can cross before its rejection by the network. The set of possible routes is stored into the matrix m ([route|arrival|TTL|route length]). The current quantity of discovery packets rates np.
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 v=[];//display the first step of the flood for i=1:np v=[v m(i,1:2)]; end pr=NARVAL_G_Nodes2Path(v,g); EC=ones(1,nl);//edge color EB=2*ones(1,nl);//edge width EC(pr)=5; EB(pr)=4; D=5*ones(1,nf);//node border D(ne)=10; 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 | ![]() | ![]() |
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