Avoidance_type toll not working locally

Hello,

I’ve been running GH locally, and currently I’m trying to set toll avoidance in custom_model. I searched in docs, but found no mention to this kind of setup.

my payload has the following snippet:

"custom_model": {
        "priority": [
            {
                "multiply_by": "0.8",
                "if": "toll == ALL"
            },
            {
                "multiply_by": "0.8",
                "if": "road_environment == TUNNEL"
            },
            {
                "multiply_by": "0.8",
                "if": "road_environment == BRIDGE"
            }
        ],
        "distance_influence": 15.0
    }

And I have been receveing the following error.

{
    "message": "Cannot compile expression: priority entry invalid condition \"toll == ALL\": 'toll' not available",
    "hints": [
        {
            "message": "Cannot compile expression: priority entry invalid condition \"toll == ALL\": 'toll' not available",
            "details": "java.lang.IllegalArgumentException"
        }
    ]
}

Is toll feature already allowed in Graphhopper 8? And if so, how can I enable it?

You add toll to graph.encoded_values: https://github.com/graphhopper/graphhopper/blob/49c456ddbba41a7f7e1a6efd8bcc41d113fe6be5/config-example.yml#L85

I just added the needed config, and restarted GH, but the problem still happening.

Did you delete the graph folder?

@ratrun , I just did as you say, and it worked. Thank you!!!