<< RoutingDijkstra0 Network Topology Generator RoutingFloodInit >>

Network Topology Generator >> Network Topology Generator > RoutingFlood

RoutingFlood

Perform the shortest path between two network nodes in respect with the Flood algorithm.

Calling Sequence

[path]=RoutingFlood(g,ne,nr,TTL)

Parameters

g :

network graph.

ne :

source node.

nr :

target node.

TTL :

Flood Time-To-Live.

path :

shortest path between ne and nr.

Description

RoutingFlood calculates the shortest path between a source node ne and a target node nr of the graph g.

The Flood is bounded by a propagation Time-To-Live TTL.

Examples

n=80;//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.
show_graph(g); 
N=length(g.node_x);//real network size
nl=length(g.head);//quantity of network links
[ne,nr]=Random_i_j(N);//selection of two distinct nodes
TTL=10;//Time-To-Live update
[path]=RoutingFlood(g,ne,nr,TTL);//application of RoutingFlood
p=nodes_2_path(path,g);
EC=ones(1,nl);//display the path between i and j
EB=ones(1,nl);
EC(p)=5;
EB(p)=2;
D=ones(1,N);
D(path)=3;
g.node_border=D;
g.edge_color=EC;
g.edge_width=EB;
show_graph(g);
ne
nr
path

Dependency

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact


<< RoutingDijkstra0 Network Topology Generator RoutingFloodInit >>