Exception with custom model

Hello, I want to avoid tolls. My code :

custom_model: {
        "speed": [
          {
            "if": "road_class == MOTORWAY || road_class == PRIMARY ||  road_class == SECONDARY  ||
                  road_class == TRUNK || road_class == TERTIARY || road_class == UNCLASSIFIED  || road_class == RESIDENTIAL",
            "multiply_by": 0.89
          }
        ],
        "priority": [
          {
            "if": "toll != NO",
            "multiply_by": 0.0
          }
        ],
        "distance_influence": 0
      }

And I have the the exception :
Error: Cannot compile expression: in ‘priority’ entry, invalid expression “toll == NO”: encoded value ‘toll’ not available

Anyone knows why ? I tested this with surface and the same result … I’m using GH3.

Did you add toll to the encoded_values in your config?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.