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
Adjust route 1 to have the same arrival time at C1 as route 2 at C in the ch.naviqore.service.gtfs.raptor.GtfsRaptorTestSchedule, then rerun the test cases in ch.naviqore.service.gtfs.raptor.routing.RoutingQueryFacadeIT:
// Route 1 goes from A, B1, C1builder.addRoute("R1", "agency", "R1", "R1", RouteType.parse(1));
builder.addTrip("T1", "R1", "always", "C1");
builder.addStopTime("T1", "A", newServiceDayTime(60), newServiceDayTime(120));
builder.addStopTime("T1", "B1", newServiceDayTime(180), newServiceDayTime(240));
builder.addStopTime("T1", "C1", newServiceDayTime(301), newServiceDayTime(360));
// TODO: Non-deterministic behavior; what happens when two solution are exactly the same?// Change arrival time above to 300 to observe this.// Route 2 goes from A, B2, Cbuilder.addRoute("R2", "agency", "R2", "R2", RouteType.parse(1));
builder.addTrip("T2", "R2", "always", "C");
builder.addStopTime("T2", "A", newServiceDayTime(60), newServiceDayTime(120));
builder.addStopTime("T2", "B2", newServiceDayTime(180), newServiceDayTime(240));
builder.addStopTime("T2", "C", newServiceDayTime(300), newServiceDayTime(360));
Expected behaviour:
If two solutions are arriving exactly at the same time, return them always in the same order. Achieve this either by sorting in the post-processing, or adjusting the algorithm in the RaptorRouter to always provide the same solution. I think the second option should be preferred, except if it introduces a large performance penalty.
TODOs:
Introduce a separate test case in the ch.naviqore.raptor.router.RaptorRouterTest covering this issue.
Implement fix.
Change the routes in the GtfsRaptorTestSchedule in the service package to be identical, the tests in RoutingQueryFacadeIT should still pass.
The text was updated successfully, but these errors were encountered:
How to reproduce this issue?
Adjust route 1 to have the same arrival time at C1 as route 2 at C in the
ch.naviqore.service.gtfs.raptor.GtfsRaptorTestSchedule
, then rerun the test cases inch.naviqore.service.gtfs.raptor.routing.RoutingQueryFacadeIT
:Expected behaviour:
If two solutions are arriving exactly at the same time, return them always in the same order. Achieve this either by sorting in the post-processing, or adjusting the algorithm in the
RaptorRouter
to always provide the same solution. I think the second option should be preferred, except if it introduces a large performance penalty.TODOs:
ch.naviqore.raptor.router.RaptorRouterTest
covering this issue.GtfsRaptorTestSchedule
in the service package to be identical, the tests inRoutingQueryFacadeIT
should still pass.The text was updated successfully, but these errors were encountered: