<< LongueurArc Network Topology Generator MobilityDijkstraMP >>

Network Topology Generator >> Network Topology Generator > MobilityDijkstra

MobilityDijkstra

Perform the Dijkstra's algorithm on a network topology from a source node.

Calling Sequence

[dist,pred]=MobilityDijkstra(nodex,nodey,head,tail,ni)

Parameters

nodex :

nodes x-coordinates.

nodey :

nodes y-coordinates.

head :

links head vector.

tail :

links tail vector.

ni :

source node.

dist :

distance vector from the source node towards remaining network nodes.

pred :

predecessors vector to reach the source node from remaining network nodes.

Description

MobilityDijkstra performs the Dijkstra's Algorithm from the source node ni on a network topology represented by 4 vectors: nodex, nodey, head and tail. dist and pred permit to reconstruct the shortest path between any network nodes towards the source node ni.

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. 
i=Random(length(g.node_x));//selection of the source node
show_graph(g);
hilite_nodes(i);
[dist,pred]=MobilityDijkstra(g.node_x,g.node_y,g.head,g.tail,i);//Application of MobilityDijkstra
i
dist
pred

Dependency

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact


<< LongueurArc Network Topology Generator MobilityDijkstraMP >>