<< NL_R_DijkstraHT NL_R: Routing NL_R_DijkstraHTWeight >>

NARVAL >> NL_R: Routing > NL_R_DijkstraHTMultiPath

NL_R_DijkstraHTMultiPath

Perform the modified Dijkstra's algorithm on a network topology between two nodes in respect with given links weights.

Calling Sequence

[P1,P2,P3,P4,P5] = NL_R_DijkstraHTMultiPath(N,H,T,W,I,J,L)

Arguments

N :

Network size.

H :

Links head vector.

T :

Links tail vector.

W :

Links weight vector.

I :

Source node.

J :

Destination node.

L :

Weight.

:

First path.

:

Second path.

:

Third path.

:

Fourth path.

:

Fifth path.

Description

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).

Examples

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

Dependency

NL_R_DijkstraHTWeight, NL_R_PredecessorRoute

Report an issue
<< NL_R_DijkstraHT NL_R: Routing NL_R_DijkstraHTWeight >>