Self hosted docker images returns time matrix different from official one

Hai,
We have setup openroute docker images but the time matrix returns different values which are much smaller than the official rest api (https://api.openrouteservice.org/v2/matrix/driving-hgv). Any advice will be much appreciated to put us in right direction.
Kind Regards

@Kazi_Ahsan ,
please provide more details. It’s hard to do anything without specific request and response examples.
If you host ors yourself, also your app.config (at least the matrix part) would be good to check for differences.

Best regards

Hai @amandus
Many thanks for your response. We have shared app.config.

app.config
{
  "ors": {
    "info": {
      "base_url": "https://openrouteservice.org/",
      "support_mail": "support@openrouteservice.org",
      "author_tag": "openrouteservice",
      "content_licence": "LGPL 3.0"
    },
    "services": {
      "matrix": {
        "enabled": true,
        "maximum_routes": 50000,
        "maximum_routes_flexible": 25,
        "maximum_search_radius": 5000,
        "maximum_visited_nodes": 100000,
        "allow_resolve_locations": true,
        "attribution": "openrouteservice.org, OpenStreetMap contributors"
      },
      "isochrones": {
        "enabled": true,
        "maximum_range_distance": [
          {
            "profiles": "any",
            "value": 50000
          },
          {
            "profiles": "driving-car, driving-hgv",
            "value": 100000
          }
        ],
        "maximum_range_time": [
          {
            "profiles": "any",
            "value": 18000
          },
          {
            "profiles": "driving-hgv",
            "value": 3600
          }
        ],
        "fastisochrones": {
          "maximum_range_distance": [
            {
              "profiles": "any",
              "value": 50000
            },
            {
              "profiles": "driving-car, driving-hgv",
              "value": 500000
            }
          ],
          "maximum_range_time": [
            {
              "profiles": "any",
              "value": 18000
            },
            {
              "profiles": "driving-car, driving-hgv",
              "value": 10800
            }
          ],
          "profiles": {
            "default_params": {
              "enabled": false,
              "threads": 12,
              "weightings": "recommended",
              "maxcellnodes": 5000
            },
            "profile-vehicles-hgv": {
              "enabled": true,
              "threads": 12,
              "weightings": "recommended",
              "maxcellnodes": 5000
            }
          }
        },
        "maximum_intervals": 10,
        "maximum_locations": 2,
        "allow_compute_area": true
      },
      "routing": {
        "enabled": true,
        "mode": "normal",
        "routing_description": "This is a routing file from openrouteservice",
        "routing_name": "openrouteservice routing",
        "sources": [
          "data/osm_file.pbf"
        ],
        "init_threads": 1,
        "attribution": "openrouteservice.org, OpenStreetMap contributors",
        "elevation_preprocessed": false,
        "profiles": {
          "active": [
            "hgv"
          ],
          "default_params": {
            "encoder_flags_size": 8,
            "graphs_root_path": "data/graphs",
            "elevation_provider": "multi",
            "elevation_cache_path": "data/elevation_cache",
            "elevation_cache_clear": false,
            "instructions": true,
            "maximum_distance": 100000,
            "maximum_distance_dynamic_weights": 100000,
            "maximum_distance_avoid_areas": 100000,
            "maximum_waypoints": 50,
            "maximum_snapping_radius": 400,
            "maximum_avoid_polygon_area": 200000000,
            "maximum_avoid_polygon_extent": 20000,
            "maximum_distance_alternative_routes": 100000,
            "maximum_alternative_routes": 3,
            "maximum_distance_round_trip_routes": 100000,
            "maximum_speed_lower_bound": 80,
            "preparation": {
              "min_network_size": 200,
              "min_one_way_network_size": 200,
              "methods": {
                "lm": {
                  "enabled": true,
                  "threads": 1,
                  "weightings": "recommended",
                  "landmarks": 16
                }
              }
            },
            "execution": {
              "methods": {
                "lm": {
                  "disabling_allowed": true,
                  "active_landmarks": 8
                }
              }
            }
          },
          "profile-car": {
            "profiles": "driving-car",
            "parameters": {
              "encoder_flags_size": 8,
              "encoder_options": "turn_costs=true|block_fords=false|use_acceleration=true",
              "maximum_distance": 100000,
              "elevation": true,
              "maximum_snapping_radius": 350,
              "preparation": {
                "min_network_size": 200,
                "min_one_way_network_size": 200,
                "methods": {
                  "ch": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "fastest"
                  },
                  "lm": {
                    "enabled": false,
                    "threads": 1,
                    "weightings": "fastest,shortest",
                    "landmarks": 16
                  },
                  "core": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "fastest,shortest",
                    "landmarks": 64,
                    "lmsets": "highways;allow_all"
                  }
                }
              },
              "execution": {
                "methods": {
                  "ch": {
                    "disabling_allowed": true
                  },
                  "lm": {
                    "disabling_allowed": true,
                    "active_landmarks": 6
                  },
                  "core": {
                    "disabling_allowed": true,
                    "active_landmarks": 6
                  }
                }
              },
              "ext_storages": {
                "WayCategory": {},
                "HeavyVehicle": {},
                "WaySurfaceType": {},
                "RoadAccessRestrictions": {
                  "use_for_warnings": true
                }
              }
            }
          },
          "profile-hgv": {
            "profiles": "driving-hgv",
            "parameters": {
              "encoder_flags_size": 8,
              "encoder_options": "turn_costs=true|block_fords=false|use_acceleration=false",
              "maximum_distance": 100000,
              "elevation": true,
              "preparation": {
                "min_network_size": 200,
                "min_one_way_network_size": 200,
                "methods": {
                  "ch": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "recommended"
                  },
                  "lm": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "recommended,shortest",
                    "landmarks": 16
                  },
                  "core": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "recommended,shortest",
                    "landmarks": 64,
                    "lmsets": "highways;allow_all"
                  }
                }
              },
              "execution": {
                "methods": {
                  "ch": {
                    "disabling_allowed": true
                  },
                  "lm": {
                    "disabling_allowed": true,
                    "active_landmarks": 6
                  },
                  "core": {
                    "disabling_allowed": true,
                    "active_landmarks": 6
                  }
                }
              },
              "ext_storages": {
                "WayCategory": {},
                "HeavyVehicle": {
                  "restrictions": true
                },
                "WaySurfaceType": {}
              }
            }
          },
          "profile-bike-regular": {
            "profiles": "cycling-regular",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-bike-mountain": {
            "profiles": "cycling-mountain",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-bike-road": {
            "profiles": "cycling-road",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-bike-electric": {
            "profiles": "cycling-electric",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-walking": {
            "profiles": "foot-walking",
            "parameters": {
              "encoder_options": "block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-hiking": {
            "profiles": "foot-hiking",
            "parameters": {
              "encoder_options": "block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-wheelchair": {
            "profiles": "wheelchair",
            "parameters": {
              "encoder_options": "block_fords=true",
              "elevation": true,
              "maximum_snapping_radius": 50,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "Wheelchair": {
                  "KerbsOnCrossings": "true"
                },
                "OsmId": {}
              }
            }
          }
        }
      }
    },
    "logging": {
      "enabled": true,
      "level_file": "DEBUG_LOGGING.json",
      "location": "/var/log/ors",
      "stdout": true
    },
    "system_message": [
      {
        "active": false,
        "text": "This message would be sent with every routing bike fastest request",
        "condition": {
          "request_service": "routing",
          "request_profile": "cycling-regular,cycling-mountain,cycling-road,cycling-electric",
          "request_preference": "fastest"
        }
      },
      {
        "active": false,
        "text": "This message would be sent with every request for geojson response",
        "condition": {
          "api_format": "geojson"
        }
      },
      {
        "active": false,
        "text": "This message would be sent with every request on API v1 from January 2020 until June 2050",
        "condition": {
          "api_version": 1,
          "time_after": "2020-01-01T00:00:00Z",
          "time_before": "2050-06-01T00:00:00Z"
        }
      },
      {
        "active": false,
        "text": "This message would be sent with every request"
      }
    ]
  }
}

Our self hosted URL:
http://3.92.227.236/ors/v2/directions/driving-hgv

with the following parameters

{
“profile”: “driving-hgv”,
“coordinates”:[[150.95648000, -33.85762150],[150.93220470, -33.93701180]],
“radiuses”:[-1,-1]
}

It generates following output:

our out

{
“routes”: [
{
“summary”: {
“distance”: 13470.9,
“duration”: 913.4
},
“segments”: [
{
“distance”: 13470.9,
“duration”: 913.4,
“steps”: [
{
“distance”: 254.8,
“duration”: 61.2,
“type”: 11,
“instruction”: “Head west on Crosby Crescent”,
“name”: “Crosby Crescent”,
“way_points”: [
0,
3
]
},
{
“distance”: 318.8,
“duration”: 76.5,
“type”: 1,
“instruction”: “Turn right onto Lawrence Street”,
“name”: “Lawrence Street”,
“way_points”: [
3,
12
]
},
{
“distance”: 24.1,
“duration”: 1.6,
“type”: 3,
“instruction”: “Turn sharp right onto The Horsley Drive”,
“name”: “The Horsley Drive”,
“way_points”: [
12,
14
]
},
{
“distance”: 1009,
“duration”: 65.8,
“type”: 7,
“instruction”: “Enter the roundabout and take the 2nd exit onto The Horsley Drive”,
“name”: “The Horsley Drive”,
“exit_number”: 2,
“way_points”: [
14,
39
]
},
{
“distance”: 7758.8,
“duration”: 429.7,
“type”: 0,
“instruction”: “Turn left onto Smithfield Road, A28”,
“name”: “Smithfield Road, A28”,
“way_points”: [
39,
164
]
},
{
“distance”: 1514.5,
“duration”: 99.1,
“type”: 1,
“instruction”: “Turn right onto Copeland Street, A28”,
“name”: “Copeland Street, A28”,
“way_points”: [
164,
201
]
},
{
“distance”: 202.8,
“duration”: 13.3,
“type”: 2,
“instruction”: “Turn sharp left onto Macquarie Street, A34”,
“name”: “Macquarie Street, A34”,
“way_points”: [
201,
209
]
},
{
“distance”: 479.1,
“duration”: 31.4,
“type”: 13,
“instruction”: “Keep right onto Terminus Street, A34”,
“name”: “Terminus Street, A34”,
“way_points”: [
209,
222
]
},
{
“distance”: 695.8,
“duration”: 45.5,
“type”: 13,
“instruction”: “Keep right onto Newbridge Road, A34”,
“name”: “Newbridge Road, A34”,
“way_points”: [
222,
241
]
},
{
“distance”: 109.3,
“duration”: 7.2,
“type”: 1,
“instruction”: “Turn right onto Moorebank Avenue”,
“name”: “Moorebank Avenue”,
“way_points”: [
241,
248
]
},
{
“distance”: 741.6,
“duration”: 48.9,
“type”: 0,
“instruction”: “Turn left onto Moorebank Avenue”,
“name”: “Moorebank Avenue”,
“way_points”: [
248,
264
]
},
{
“distance”: 254.6,
“duration”: 20.4,
“type”: 1,
“instruction”: “Turn right onto Church Road”,
“name”: “Church Road”,
“way_points”: [
264,
268
]
},
{
“distance”: 107.8,
“duration”: 12.9,
“type”: 0,
“instruction”: “Turn left onto Greenhills Avenue”,
“name”: “Greenhills Avenue”,
“way_points”: [
268,
269
]
},
{
“distance”: 0,
“duration”: 0,
“type”: 10,
“instruction”: “Arrive at Greenhills Avenue, on the right”,
“name”: “-”,
“way_points”: [
269,
269
]
}
]
}
],
“bbox”: [
150.917831,
-33.937029,
150.955484,
-33.853635
],
“way_points”: [
0,
269
]
}
],
“bbox”: [
150.917831,
-33.937029,
150.955484,
-33.853635
],
“metadata”: {
“attribution”: “openrouteservice.org, OpenStreetMap contributors”,
“service”: “routing”,
“timestamp”: 1621465634154,
“query”: {
“coordinates”: [
[
150.95648,
-33.8576215
],
[
150.9322047,
-33.9370118
]
],
“profile”: “driving-hgv”,
“format”: “json”,
“radiuses”: [
-1,
-1
]
},
“engine”: {
“version”: “6.4.1”,
“build_date”: “2021-05-19T04:47:09Z”,
“graph_date”: “2021-03-14T21:21:42Z”
}
}
}

But when try the official openroute rest api as below

https://api.openrouteservice.org/v2/directions/driving-hgv
with the same parameters

{“profile”: “driving-hgv”,“coordinates”:[[150.95648000, -33.85762150],[150.93220470, -33.93701180]],“radiuses”:[-1,-1]}

We have following output from the above link:

official out

{
“routes”: [
{
“summary”: {
“distance”: 13461.1,
“duration”: 1382.5
},
“segments”: [
{
“distance”: 13461.1,
“duration”: 1382.5,
“steps”: [
{
“distance”: 254.8,
“duration”: 61.2,
“type”: 11,
“instruction”: “Head west on Crosby Crescent”,
“name”: “Crosby Crescent”,
“way_points”: [
0,
3
]
},
{
“distance”: 318.8,
“duration”: 76.5,
“type”: 1,
“instruction”: “Turn right onto Lawrence Street”,
“name”: “Lawrence Street”,
“way_points”: [
3,
12
]
},
{
“distance”: 24.1,
“duration”: 1.7,
“type”: 3,
“instruction”: “Turn sharp right onto The Horsley Drive”,
“name”: “The Horsley Drive”,
“way_points”: [
12,
14
]
},
{
“distance”: 1009,
“duration”: 76.9,
“type”: 7,
“instruction”: “Enter the roundabout and take the 2nd exit onto The Horsley Drive”,
“name”: “The Horsley Drive”,
“exit_number”: 2,
“way_points”: [
14,
39
]
},
{
“distance”: 523.8,
“duration”: 34.3,
“type”: 0,
“instruction”: “Turn left onto Smithfield Road, A28”,
“name”: “Smithfield Road, A28”,
“way_points”: [
39,
45
]
},
{
“distance”: 37.2,
“duration”: 8.9,
“type”: 6,
“instruction”: “Continue straight onto Smithfield Road, A28”,
“name”: “Smithfield Road, A28”,
“way_points”: [
45,
46
]
},
{
“distance”: 436.3,
“duration”: 28.6,
“type”: 6,
“instruction”: “Continue straight onto Smithfield Road, A28”,
“name”: “Smithfield Road, A28”,
“way_points”: [
46,
50
]
},
{
“distance”: 4895.7,
“duration”: 393.3,
“type”: 13,
“instruction”: “Keep right onto Smithfield Road, A28”,
“name”: “Smithfield Road, A28”,
“way_points”: [
50,
128
]
},
{
“distance”: 1818.3,
“duration”: 164.9,
“type”: 13,
“instruction”: “Keep right onto Joseph Street, A28”,
“name”: “Joseph Street, A28”,
“way_points”: [
128,
160
]
},
{
“distance”: 47.4,
“duration”: 17.1,
“type”: 6,
“instruction”: “Continue straight onto Orange Grove Road, A28”,
“name”: “Orange Grove Road, A28”,
“way_points”: [
160,
164
]
},
{
“distance”: 1479.7,
“duration”: 181.5,
“type”: 1,
“instruction”: “Turn right onto Copeland Street, A28”,
“name”: “Copeland Street, A28”,
“way_points”: [
164,
198
]
},
{
“distance”: 34.7,
“duration”: 8.3,
“type”: 6,
“instruction”: “Continue straight onto Copeland Street, A28”,
“name”: “Copeland Street, A28”,
“way_points”: [
198,
201
]
},
{
“distance”: 202.8,
“duration”: 36,
“type”: 2,
“instruction”: “Turn sharp left onto Macquarie Street, A34”,
“name”: “Macquarie Street, A34”,
“way_points”: [
201,
209
]
},
{
“distance”: 479.1,
“duration”: 67.1,
“type”: 13,
“instruction”: “Keep right onto Terminus Street, A34”,
“name”: “Terminus Street, A34”,
“way_points”: [
209,
222
]
},
{
“distance”: 695.8,
“duration”: 102.1,
“type”: 13,
“instruction”: “Keep right onto Newbridge Road, A34”,
“name”: “Newbridge Road, A34”,
“way_points”: [
222,
241
]
},
{
“distance”: 71.3,
“duration”: 19.6,
“type”: 1,
“instruction”: “Turn right onto Moorebank Avenue”,
“name”: “Moorebank Avenue”,
“way_points”: [
241,
246
]
},
{
“distance”: 769.8,
“duration”: 71.2,
“type”: 12,
“instruction”: “Keep left onto Heathcote Road”,
“name”: “Heathcote Road”,
“way_points”: [
246,
261
]
},
{
“distance”: 254.6,
“duration”: 20.4,
“type”: 1,
“instruction”: “Turn right onto Church Road”,
“name”: “Church Road”,
“way_points”: [
261,
265
]
},
{
“distance”: 107.8,
“duration”: 12.9,
“type”: 0,
“instruction”: “Turn left onto Greenhills Avenue”,
“name”: “Greenhills Avenue”,
“way_points”: [
265,
266
]
},
{
“distance”: 0,
“duration”: 0,
“type”: 10,
“instruction”: “Arrive at Greenhills Avenue, on the right”,
“name”: “-”,
“way_points”: [
266,
266
]
}
]
}
],
“bbox”: [
150.917831,
-33.937029,
150.955484,
-33.853635
],

Please notice the duration value difference from our hosted one (913.4) to original one.
Is there any way our hosted rest api gives similar of duration 1382.5?
We look forward to your advice.

Regards

Hey,

I’ve noticed that you are still running openrouteservice version 6.4.1 instead of the current 6.5.0.

Especially this issue and the corresponding fix make it hard to debug what exactly is going on here.

Could you update your code and config to the current version and then try again? That’d be much appreciated :slight_smile:

Best regards

@jschnell - We have upgraded to 6.5.0 but apparently, it did not change anything.

1 Like

Hey,

you have use_acceleration=false set in your driving-hgv section in the app.config.

That should explain the differences in time. Setting that to true should then fix it.