I am trying to model a graph to solve some connection time problem. So for example I have the following graph
F1,F2 F3 F4
ST_B-
I have added labels for the nodes to distinguish flights and stations. All flights F1-F9 are labeled with :Flight, all stations ST_B, ST_E and ST_2-ST_5 are labeled with :Station.
Match path=stb:Station-[:Connect*]->ste:Station
Where stb.name='ST_B' and ste.name='ST_E'
With filter(x in nodes(path) where x:Flight ) as flts
Where all ( i in Range(0,length(flts)-2) Where flts[i].arrvTime < flts[i+1].dptrTime)
Return extract(flt in flts | flt.name)