Different default parameters

Hi!
I have a question. Can’t find any information about this.
Are there build in different weightings, vehicles and algorithms?
By default “fastest” weighting are using. Are there any else?
The same question for algorithms. If I understand well Dijkstra algorithm is using by default. Are any else?
And the same question about vehicles.

ghRequest.setVehicle("car").
                setWeighting("fastest").
                setAlgorithm("").

Thanks!

The weightings are the two usual ones: fastest and shortest.

The algorithm options can be seen in AlgorithmOptions public constants.

And the vehicles in EncodingManager public constants.

Emux

1 Like

When I’m trying to do something like that:

 ghRequest.setVehicle("car").
                setWeighting("shortest").
                setAlgorithm("")

java.lang.IllegalStateException: No weighting found for request

When I’m trying to change algorithm I get another error:

 ghRequest.setVehicle("car").
                setWeighting("fastest").
                setAlgorithm("astar")

gives:

java.lang.UnsupportedOperationException: Algorithm astar not supported for Contraction Hierarchies

Why?

You need to prepare the graph with the CH weightings first:
prepare.chWeightings=fastest,shortest

And in CH the supported algorithms are: dijkstrabi, astarbi

Emux