Search in sources :

Example 1 with NeutralQualifier

use of im.tny.segvault.s2ls.routing.NeutralQualifier in project underlx by underlx.

the class RouteFragment method tryPlanRoute.

private void tryPlanRoute() {
    if (originPicker.getSelection() == null || destinationPicker.getSelection() == null) {
        // not enough information
        return;
    }
    Route realtimeRoute = Route.calculate(network, originPicker.getSelection(), destinationPicker.getSelection());
    Route neutralRoute = Route.calculate(network, originPicker.getSelection(), destinationPicker.getSelection(), new NeutralWeighter(), new NeutralQualifier());
    if (useRealtimeCheckbox.isChecked()) {
        route = realtimeRoute;
    } else {
        route = neutralRoute;
    }
    showRoute(realtimeRoute.getPath().getEdgeList().equals(neutralRoute.getPath().getEdgeList()));
}
Also used : NeutralWeighter(im.tny.segvault.s2ls.routing.NeutralWeighter) Route(im.tny.segvault.s2ls.routing.Route) NeutralQualifier(im.tny.segvault.s2ls.routing.NeutralQualifier)

Aggregations

NeutralQualifier (im.tny.segvault.s2ls.routing.NeutralQualifier)1 NeutralWeighter (im.tny.segvault.s2ls.routing.NeutralWeighter)1 Route (im.tny.segvault.s2ls.routing.Route)1