Perform the modified Dijkstra's algorithm on a network topology between two nodes in respect with given links weights.
[P1,P2,P3,P4,P5]=NARVAL_M_DijkstraMP(n,head,tail,weight,ni,nj,w)
network size.
links head vector.
links tail vector.
links weight vector.
source node.
destination node.
weight.
first path.
second path.
third path.
fourth path.
fifth path.
NARVAL_M_DijkstraMP performs the modified Dijkstra's Algorithm in order to find multiple paths between a source node ni and a destination node nj on a network topology. Weights of links are assumed to be stored in the vector weight. The generation of new paths is made according to iterative applications of the Dijkstra's algorithm on a changing topology where weights of links belonging to the current shortest path are changed to larger values.
n=80;//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. [ni,nj]=NARVAL_F_Random_i_j(length(g.node_x));//selection of connection nodes ind=1; f=NARVAL_G_ShowGraph(g,ind); c=5;//visualization parameters b=10; d=30; i2=2;//window index [gc,f2]=NARVAL_G_ShowNodes(g,[ni,nj],c,b,d,i2); [P1,P2,P3,P4,P5]=NARVAL_M_DijkstraMP(length(g.node_x),g.head,g.tail,g.edge_length,ni,nj,L);//Application of NARVAL_M_DijkstraMP P1 P2 P3 P4 P5 | ![]() | ![]() |