Class CustomModelParser
java.lang.Object
com.graphhopper.routing.weighting.custom.CustomModelParser
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomWeightingcreateFastestWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc, EncodingManager lookup) static CustomWeightingcreateWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc, DecimalEncodedValue priorityEnc, EncodedValueLookup lookup, TurnCostProvider turnCostProvider, CustomModel customModel) static CustomWeighting.ParameterscreateWeightingParameters(CustomModel customModel, EncodedValueLookup lookup, DecimalEncodedValue avgSpeedEnc, DecimalEncodedValue priorityEnc) This method compiles a new subclass of CustomWeightingHelper composed from the provided CustomModel caches this and returns an instance.findVariablesForEncodedValuesString(CustomModel model, NameValidator nameValidator, EncodedValueLookup lookup)
-
Method Details
-
createWeighting
public static CustomWeighting createWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc, DecimalEncodedValue priorityEnc, EncodedValueLookup lookup, TurnCostProvider turnCostProvider, CustomModel customModel) -
createFastestWeighting
public static CustomWeighting createFastestWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc, EncodingManager lookup) -
createWeightingParameters
public static CustomWeighting.Parameters createWeightingParameters(CustomModel customModel, EncodedValueLookup lookup, DecimalEncodedValue avgSpeedEnc, DecimalEncodedValue priorityEnc) This method compiles a new subclass of CustomWeightingHelper composed from the provided CustomModel caches this and returns an instance.- Parameters:
priorityEnc- can be null
-
findVariablesForEncodedValuesString
public static List<String> findVariablesForEncodedValuesString(CustomModel model, NameValidator nameValidator, EncodedValueLookup lookup)
-