Perform the modified Dijkstra's algorithm on a network topology between two nodes in respect with given links weights.
[P1,P2,P3,P4,P5] = NL_R_DijkstraHTMultiPath(N,H,T,W,I,J,L)
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.
NL_R_DijkstraHTMultiPath performs the modified Dijkstra's algorithm in order to find multiple paths between the source node I and the destination node J on the network topology defined by N, H, T and W (WIKIPEDIA). The weight of links is assumed to be stored inside the vector W. 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 (w=w+L).
n=80;//network size L=1000;//network square area side dmax=100;//locality radius [g]=NL_T_LocalityConnex(n,L,dmax);//generation of a random topology in respect with the Locality method. [ni,nj]=NL_F_RandIntNiNj(length(g.node_x));//selection of connection nodes ind=1;//window index f=NL_G_ShowGraphN(g,ind);//graph visualization [P1,P2,P3,P4,P5]=NL_R_DijkstraHTMultiPath(length(g.node_x),g.head,g.tail,g.edge_length,ni,nj,L)//application of NL_R_DijkstraHTMultiPath | ![]() | ![]() |