I already posted this on
stackoverflow but i feel like its not just a problem. There is also stuff for broader discussion.
I want to find shortest paths in neo4j. My nodes have
x and
y coordinates and my relations have a property with distance.
The A* procedure works fine to find the shortest path. But I also need to be able to block some nodes or to choose nodes that have to be in the resulting path (kind of the TSP).
The block nodes and must have nodes vary for every call of the A* procedure, therefore you cant just change the data to exclude them in the A*.
My colleagues and I feel like a Graphdatabase should be able to solve this kind of problems from scratch.
The amount of must have nodes wont be that high (probably 1-5). I'm already trying to solve this on my own but I think this is a quite popular thing and should be a part of neo4j.
Did I miss something while researching? How to solve this properly?
I already solved the block nodes with writing my own estimateEvaluator but Im not to happy with it because it's just a String of ID's I hand over at the call of my procedure.
For the TSP I got some ideas, todo list:
- A* for (start-,end-,must-have nodes)x(start-,end-,must-have nodes)
- Create own graph(?) with start-,end-,must-have nodes and all the distances equated with the A*
- find the hamiltonian path