I am trying to model a graph to all the routes including the routes with different origin. So for example I have the following graph
Route1(Train1) : ST_B--------->ST2----->ST3--->ST4 --> ST5--->ST_E
Route2(Train2) : ST_C-------->ST4---->ST5------>ST_E
I am trying to get the list of routes from ST_B-------->ST_E and it should return as follows but not able to get a solution for the second journey:
Journey1 : (Train1) : ST_B--------->ST2----->ST3---ST4 --ST5--->ST_E
Journey2 : (Train1) : ST_B--------->ST2----->ST3---ST4.
(Train2) : ST4---->ST5------>ST_E