<< RoutingFlood Network Topology Generator RoutingFloodIteration >>

Network Topology Generator >> Network Topology Generator > RoutingFloodInit

RoutingFloodInit

Perform the initialization of the Flood algorithm.

Calling Sequence

[m,np]=RoutingFloodInit(g,ne,nr,TTL)

Parameters

g :

network graph.

ne :

source node.

nr :

destination node.

TTL :

discovery radius (Packet Time To Live).

m :

discovery packet storage matrix.

np :

quantity of discovery packets on the network.

Description

RoutingFloodInit 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.

Examples

n=100;//network size
L=1000;//network square area side
dmax=100;//locality radius
[g]=NtgLocalityConnex(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]=Random_i_j(nf)//selection of the source and destination nodes
[d,p] = graph_diameter(g);
TTL=length(p);//initialization of TTL
[m,np]=RoutingFloodInit(g,ne,nr,TTL);//application of RoutingFloodInit
v=[];//display the first step of the flood
for i=1:np
v=[v m(i,1:2)];
end
pr=nodes_2_path(v,g);
EC=ones(1,nl);
EB=ones(1,nl);
EC(pr)=5;
EB(pr)=2;
D=ones(1,nf);
D(ne)=3;
g.node_border=D;
g.edge_color=EC;
g.edge_width=EB;
show_graph(g);
m
np

Dependency

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact


<< RoutingFlood Network Topology Generator RoutingFloodIteration >>