<< RoutingRTPathPresence Network Topology Generator RoutingSearchEnd >>

Network Topology Generator >> Network Topology Generator > RoutingSearchDistance

RoutingSearchDistance

Update the vector of candidates where to propagate the topology discovery tree from a current node in respect with the minimal distance.

Calling Sequence

[v,c,pred]=RoutingSearchDistance(i,g,v,c,pred)

Parameters

i :

current node.

g :

network graph.

v :

vector that gathers the chronological order how network nodes are visited.

c :

vector of candidate nodes.

pred :

vector composed by the predecessor of each node in order to reach the source node.

Description

RoutingSearchDistance updates the vector of candidates c where to propagate the topology discovery tree from the current node i in respect with the minimal distance. The network nodes already visited by the algorithm are stored in v. A tree inside the graph g is constructed in respect with a source node defined as the root. This graph search algorithm begins at the root node and explores all the neighboring nodes. Then for each of those nearest nodes, unexplored neighbor nodes are explored, and so on. The search is done in respect with a discovery propagation towards the nearest nodes. New candidates are added at the end of c.

Examples

n=100;//network size
l=1000;//network squared area side
d=100;//Locality radius
[g]=NtgLocalityConnex(n,l,d);//generation of a topology
nr=length(g.node_x);//real network size
nl=length(g.head);
i=Random(length(g.node_x));//selection of the source node
pred=zeros(1,n);//initialization
v=[];//visited
c=[];//candidates
[v,c,pred]=RoutingSearchDistance(i,g,v,c,pred);//application of RoutingSearchDistance 
p=[];//display the candidates, the first ones are represented with the smallest edge width
for i=1:length(c)
p=[p nodes_2_path([v c(i)],g)]
end
EC=ones(1,nl);
EB=ones(1,nl);
EC(p)=5;
EB(p)=1:length(p);
D=ones(1,nr);
D([v c])=3;
g.node_border=D;
g.edge_color=EC;
g.edge_width=EB;
show_graph(g);
i
v
c
pred

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact


<< RoutingRTPathPresence Network Topology Generator RoutingSearchEnd >>