Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-21-2019 02:38 AM
I have a question about your database. You have implemented a Dijkstra-search of paths between nodes in your database. We have this problem – each edge have its restrictions for example “the edge is disabled during weekends” or “the edge is available between 08:00 – 22:00 UTC” or “the edge is available if you started at this point X or going to the point Y, otherwise it’s closed” some other conditions.
So that means that it finds a different path on week days and weekends, after 22:00 and before 08:00.
Is it possible to implement such restrictions for our GEO-data in Neo4j?
Ivan
01-25-2019 07:18 AM
The question you ask related to the 'Graph Algorithms' topic where the Dijkstra algorithm is discussed. I have changed the category to increase the chances of you finding people with the knowledge to help. You might also want to change the title of the question, because Dijkstra is only distantly related to geo-spatial. In particular, the constraint you described, with an edge disabled during certain time periods, sounds more like a temporal restriction, with no spatial component at all.
I have also just reviewed the documentation at https://neo4j.com/docs/graph-algorithms/current/algorithms/shortest-path/, and I see that there is a section 6.2.7 which describes a way to restrict the path using Cypher queries, in which case you could add a relationshipQuery which takes into account the valid times of the edge.
You could either add a boolean to the edge which you change each day, or you could add an active wday range and query that dynamically in the relationshipQuery.
01-25-2019 10:45 PM
Thank you very much, I will check it.
05-21-2019 01:28 AM
Looks like Cypher Projection may help. Load subset of graph based on your conditions and then try running algo.
https://neo4j.com/docs/graph-algorithms/current/algorithms/shortest-path/#algorithms-shortest-path-c...
All the sessions of the conference are now available online