I am debugging why my fastest car with LM always visit much more nodes than your online version. Then I cam across the following example: Same request but one had 675 visited nodes, another had 13858 visited nodes.
With CH you often visit less nodes compared to LM (ch.disable=true). If you disable landmarks too via lm.disable=true (not possible for our online service) youâll see much more visited nodes (>X00 000)
Ah, my bad. I was thinking too much about my use case (LM is enabled, CH is disabled). So I assumed that for both requests, LM was the default algorithm, hence the presence of âch.disable=trueâ didnât change anything. Thanks for the clarification Peter.
I also stumbled now over the initial problem with âmaximumWeight cannot be nullâ. The reason is that if you have two vehicle profiles and eg. one weighting then weightingsAsStrings.size is 1 and then 1*2=2 weightings will be created via GraphHopper.initLMAlgoFactoryDecorator. But LMAlgoFactoryDecorator.createPreparations cannot handle the second weighting as it had a different name than the first (e.g. fastest_car, fastest_truck).
This is ugly and a current possible workaround is:
class MyGraphHopper {
@Override
public void postProcessing() {
for (Weighting w : getLMFactoryDecorator().getWeightings()) {
if (!getLMFactoryDecorator().getWeightingsAsStrings().contains(w.toString()))
getLMFactoryDecorator().addWeighting(w.toString());
}
super.postProcessing();
}
}
Another solution should be to specify the weightings explicitly in the config with the maximumWeight but then fastest_truck is used for car which makes no sense. We have to improve this, likely related to: https://github.com/graphhopper/graphhopper/issues/493