get.shortest.paths in temporal graph

1

I'm using the "igraph" library and I'm working with dynamic graphs. I have the following graph:

VertexFrom VertexTo TimeStart TimeStop

a c 1 1

a 2 2

b d 2 2

c d 3 3

d b 3 3

That is, v1 is connected to v2 at time x to y.

Example. In the first interval [0,1] my graph will be like this

a --------- c

b (not edge) d

I just have an edge from 'a' to 'c'. And so on ...

I'm using the get.shortest.paths function to calculate the shortest temporal path.

Ex:

get.shortest.paths (g, 'a 3', 'b 3', mode="all", weights = E (g) $ HopCost)

It will calculate the path from a to b in the time interval [3,3]. In the interval [3,3] this path does not exist, but the function returns me:

3 to 2 d 2 b 2 b 3

That is, it goes back in time to find a way. From 'a 3' she returned to 'a 2' went to 'd 2', then 'b 2' and finally to 'b 3'. Does anyone know how to modify it so it will not come back? In this case, I want it to calculate, if it exists, only the smallest path in time 'x' to time 'y', without going back in time. In the above example the result would be zero, because there is no path.

    
asked by anonymous 18.11.2016 / 21:48

0 answers