Hello, everyone!
I have a question about Delta-Stepping Single-Source Shortest Path
GDS(path finding)
The point is, that I have
- addresses of different types (some have no types)
- relationships with timestamp
And i wanna detect all routes, leading from address type1 to address type(not 1)
Like
(address1{type:1}) - [first relation] -(address2{type:None}) - [last relation] - (address2{type:2})
And i wanna take the last relation and delete it
I tried gds.alpha.allShortestPaths.stream, but seems to me too unstable
So now i trying to apply gds.shortestPath.dijkstra
I choose different addresses of different types - 1 address by 1 type, and search all possible routes, where source.type <> target.type
And 2 problems here:
- I still don't get, how i can get at once routes for differnt types of addresses
For example, i have a subquery like:
type | address
1 |address_1
2 |address_2
And i'd like to get output like
type | address. | target_type. | path
1 |address_1 | 2. | path from type1 to type2
2 |address_2| 3. | path from type2 to type3
But when i call the method it only takes one current source and computes routes only from it. Is there a way to do it?
- These methods search for a shortest path. But actually i need not the shortest path, but with the oldest relationship
So if there are 2 paths from type1 to type2 (route1 and route2), I would like to calculate the maximum timestamp for route1 (max_ts_1) and maximum timestamp for route2 (max_ts_2), take the route with the smallest max_ts, and delete its last relationship
I would be happy to hear your thoughts and ideas about this problem.
Thank you in advance and hope this discussion could be interesting for others!