My question is I have one graph with lot of nodes representing stops of buses. How should I include bus information like which buses available between nodes.
I am thinking of creating a buses relationship between nodes that will have info of all the buses between two nodes and a relationship property marking distance between two stops.
buses[500A,182A],distance:500m buses[121B,542W,222A,111Z],distance:400m
Like A------------------------------------------------------->B----------------------------------------------------------->C
So how I will find out the bus or busses( If no direct path is available) to reach M from A?
First I will find out the path (a neo4j query) , how to reach M from A .
Say my path is
buses[11A],distance:1000m buses[11A],distance:250m buses[13B,100A],distance:2000m
A----------------------------------------->L----------------------------------->N------------------------------------------->M
The problem is I how to programmatically check whether a direct bus to M is available or not , or I how to interchange the bus in between.
According to above scenario I can go A to N through 11A then from N to M by taking either 13B or 100A.
I have to do that programmatically.
I want to retrieve all possible paths between two stations and total distance of a path along with bus information.