I am trying to solve this for a long time, but I don’t know why it is not solved yet, I believe its simple. I saw distances and paths examples many time, but unfortunately, I didn’t get the point yet. hope this try works.
Anyway, my question is: for the first graph: an OR exists which causes the solution of graph to be as follows:
start, 1,2,3,6,7,end
start,4,5,8,6,7, end

the second graph should gives:
start, 1,2,3,4,5,8,6,7,end

Or the second graph could produce the sequence: start, 4, 5, 8, 1, 2, 3, 6, 7, end?

Yes, the Distances and Paths example does not know about any particular semantics of the nodes or the links. You’ll need to modify the algorithm to take your “AND” nodes into account.