Search in sources :

Example 1 with PrepareJob

use of com.graphhopper.routing.subnetwork.PrepareRoutingSubnetworks.PrepareJob in project graphhopper by graphhopper.

the class GraphHopper method buildSubnetworkRemovalJobs.

private List<PrepareJob> buildSubnetworkRemovalJobs() {
    List<PrepareJob> jobs = new ArrayList<>();
    for (Profile profile : profilesByName.values()) {
        // if turn costs are enabled use u-turn costs of zero as we only want to make sure the graph is fully connected assuming finite u-turn costs
        Weighting weighting = createWeighting(profile, new PMap().putObject(Parameters.Routing.U_TURN_COSTS, 0));
        jobs.add(new PrepareJob(encodingManager.getBooleanEncodedValue(Subnetwork.key(profile.getName())), weighting));
    }
    return jobs;
}
Also used : Weighting(com.graphhopper.routing.weighting.Weighting) CustomWeighting(com.graphhopper.routing.weighting.custom.CustomWeighting) LMProfile(com.graphhopper.config.LMProfile) CustomProfile(com.graphhopper.routing.weighting.custom.CustomProfile) Profile(com.graphhopper.config.Profile) CHProfile(com.graphhopper.config.CHProfile) PrepareJob(com.graphhopper.routing.subnetwork.PrepareRoutingSubnetworks.PrepareJob)

Aggregations

CHProfile (com.graphhopper.config.CHProfile)1 LMProfile (com.graphhopper.config.LMProfile)1 Profile (com.graphhopper.config.Profile)1 PrepareJob (com.graphhopper.routing.subnetwork.PrepareRoutingSubnetworks.PrepareJob)1 Weighting (com.graphhopper.routing.weighting.Weighting)1 CustomProfile (com.graphhopper.routing.weighting.custom.CustomProfile)1 CustomWeighting (com.graphhopper.routing.weighting.custom.CustomWeighting)1