Cannot route through certain segment

Hello,

I’ve been trying to route a certain request, but a problem is going on.

In our troubleshoot we realized the problem only happens in the GraphHopper instance we’ve been running in our own infra with truck profile. Through GH Web this problem doesn’t happen no matter the profile (car or truck). See two images below.

Here’s the route is being done with the truck profile.

In our troubleshoot we also realized the left segment has truck_subnetwork=true, but in right segment is truck_subnetwork=false, while in both segments the flag is car_subnetwork=false. We believe this may be issue origin.

Here’s my config and profile file. I’m also using the

truck.json

{
  "distance_influence": 1,
  "priority": [
    { "if": "road_access == PRIVATE",  "multiply_by": "0" },
    { "if": "car_access == false || hgv == NO || max_width < 3 || max_height < 4", "multiply_by": "0" }
  ],
  "speed": [
    { "if": "true", "limit_to": "car_average_speed * 0.9" },
    { "if": "true", "limit_to": "95" }
  ]
}

config.yml

graphhopper:
  datareader.file: ""

  custom_models.directory: /graphhopper/profiles

  profiles:
    - name: car
      vehicle: car
      custom_model:
        distance_influence: 70
    - name: truck
      vehicle: roads
      weighting: custom
      custom_model_files: [ truck.json ]
  profiles_ch:
    - profile: car
    - profile: truck
  profiles_lm: []

  prepare.min_network_size: 1000
  prepare.subnetworks.threads: 1

  routing.non_ch.max_waypoint_distance: 100000000 #100.000.000
  routing.max_visited_nodes: 10000000 #10.000.000

  import.osm.ignored_highways: footway,cycleway,path,pedestrian,steps # typically useful for motorized-only routing

  graph.location: graph-cache
  graph.dataaccess.default_type: RAM_STORE
  graph.encoded_values: hgv,max_weight,max_height,max_width,toll
  graph.vehicles: roads|hgv=true
  
server:
  application_connectors:
  - type: http
    port: 8989
    bind_host: localhost
    max_request_header_size: 50k
  request_log:
      appenders: []
  admin_connectors:
  - type: http
    port: 8990
    bind_host: localhost

logging:
  appenders:
    - type: file
      time_zone: UTC
      current_log_filename: logs/graphhopper.log
      log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
      archive: true
      archived_log_filename_pattern: ./logs/graphhopper-%d.log.gz
      archived_file_count: 30
      never_block: true
    - type: console
      time_zone: UTC
      log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  loggers:
    "com.graphhopper.osm_warnings":
      level: DEBUG
      additive: false
      appenders:
        - type: file
          currentLogFilename: logs/osm_warnings.log
          archive: false
          logFormat: '[%level] %msg%n'

I’m also using the pbf released in March, 15th. The lastest release until now.

Would you explain me why this difference in truck_subnetwork flag and why this error is happening only for my truck profile?

Hello @easbar / @karussell ! Any news!?

The route won’t be accessible if truck_subnetwork=true. However, this is rather the a consequence of something blocking the road than the root of the problem. There must be something that prevents access to this edge in the first place. Maybe there are some gates/barriers? I can try to reproduce the issue when I find the time. In the meantime you could try to debug something like weighting.calcEdgeWeight(graph.getEdgeIteratorStateForKey(edge_key)) for the adjacent edges to figure out why the weight is infinite/blocked.