You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a map that I am currently working on, I find a curious state of affairs in The Real World which I struggle to accommodate in the Map::Tube map syntax. (This is for XML, but I think the same applies to JSON.)
Here is a stripped down version of the situation:
Line X (id x): A <-> B <-> C
Line Y (id y): A -> B -> C -> D -> A (unidirectional; no direct link (neighbour) from B to A)
But here the information is lost that, while there is a direct link from B to A using Line X, there is no (direct) link from B to A using Line Y. Consequently, get_shortest_route( 'B street', 'A street' )->preferred will yield B street (LineX, LineY), A street (LineX, LineY)
instead of B street (LineX), A street (LineX)
I do not think this is a bug in Map::Tube::get_shortest_path( ) or in preferred( ), since the result is compatible with what the map says. The issue is rather that the map does not say what I need it to say. And I have found no way of making it say what I want it to say.
This is certainly a rare edge case, and the consequences are very mild (the result being just slightly off). I am not sure whether such a case can be modelled given the current XML (or JSON) syntax. But changing the syntax would almost certainly break many existing applications, and that should certainly be avoided. Also, the effort may be too big for little gain. So this should not be regarded as a bug report, but as food for thought -- maybe there is an easy way to express this, after all.
The text was updated successfully, but these errors were encountered:
For a map that I am currently working on, I find a curious state of affairs in The Real World which I struggle to accommodate in the Map::Tube map syntax. (This is for XML, but I think the same applies to JSON.)
Here is a stripped down version of the situation:
Line X (id x):
A <-> B <-> C
Line Y (id y):
A -> B -> C -> D -> A
(unidirectional; no direct link (neighbour) from B to A)The best I can come up for the map data is then:
But here the information is lost that, while there is a direct link from B to A using Line X, there is no (direct) link from B to A using Line Y. Consequently,
get_shortest_route( 'B street', 'A street' )->preferred
will yieldB street (LineX, LineY), A street (LineX, LineY)
instead of
B street (LineX), A street (LineX)
I do not think this is a bug in
Map::Tube::get_shortest_path( )
or inpreferred( )
, since the result is compatible with what the map says. The issue is rather that the map does not say what I need it to say. And I have found no way of making it say what I want it to say.This is certainly a rare edge case, and the consequences are very mild (the result being just slightly off). I am not sure whether such a case can be modelled given the current XML (or JSON) syntax. But changing the syntax would almost certainly break many existing applications, and that should certainly be avoided. Also, the effort may be too big for little gain. So this should not be regarded as a bug report, but as food for thought -- maybe there is an easy way to express this, after all.
The text was updated successfully, but these errors were encountered: