Closed robfitzgerald closed 9 months ago
the first solution may be best, but i'm finding it still may make my life complicated with my sub-project of creating a MEP tool using compass.
my problem is transit, but i think this applies to any mode which only has access to a subset of links. for a transit MEP search, i want to be able to 1) walk on road network links, 2) ride transit on transit links. i also want one instance of CompassApp to serve search for 4 travel modes - walk, bike, transit, drive - and so i want them all to share the same Graph instance and just have different traversal models. for this, the search algorithm needs
so, my problems:
just thinking out loud here, trying to think about the options...
all of these solutions sound spooky to me right now. hopefully with some more iteration a better way forward will become more clear.
i like the edge rtree idea the best. working back from the implementation, the input plugin would have an rtree of edges, a Box<[T]>
of length $|E|$ with road class information, and a set of valid road classes HashSet<T>
. it would probably build a nearest neighbor iterator (or maybe this one so we can still have a distance tolerance) and take from the iterator until it finds an edge with a valid road class.
this means we would load the road class information twice - once in the input plugin, once in the road class frontier model - doubling the RAM for a large dataset. we would also depend on the user to make sure their input plugin and frontier configuration have matching road class parameters. both of which sound a bit sloppy.
i like the design we have, so maybe this sloppyness is worth it, but maybe there's something we could fix to make it possible to share these data dependencies.
oh, also, this assumes that the edge-oriented search code (untested) is correct.
wondering here, does the list of valid road classes come from
this issue imported from the internal repo
r-tree pre-processing maps coordinates to vertex ids on the map. if the user chooses a frontier model that restricts some links, the r-tree will not know of these restrictions. as a result, when the road class frontier model ignores TomTom's "restricted links" (road class 7), the denver beer run test case fails, as the origin or destination must have been pegged to vertices that are only connected via restricted links:
some possible solutions:
Edge