Hello, I trying to set up OpenrouteService but I’m having a error when using the feature “avoid zones”.
The error message is:
A time-dependent routing algorithm requires a time-dependent weighting
The error does only occur, if I use the URL params time
and timePreference
.
Without those params, the avoid zones features works as expected.
This is the ORS config I’m using
##### General server settings #####
server:
port: 8080
error:
whitelabel:
enabled: false
# Keep the context-path at / else the war file run with tomcat will have the context-path of /ors/v2 as well.
servlet:
context-path: /ors
spring:
profiles:
active: default
mvc:
servlet:
path: /
##### Settings related to springdoc #####
springdoc:
swagger-ui:
enabled: true
path: /swagger-ui
tryItOutEnabled: true
filter: false
syntaxHighlight:
activated: true
showExtensions: true
api-docs:
path: /v2/api-docs
version: OPENAPI_3_0
packages-to-scan: org.heigit.ors
pathsToMatch: /v2/**
##### Logging settings #####
logging:
file:
console: "%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n"
file: "%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n"
name: /home/ors/logs/ors-driving-car.log
level:
org.heigit: INFO
root: WARN
##### openrouteservice specific settings #####
ors:
endpoints:
routing:
enabled: true
gpx_author: openrouteservice
gpx_base_url: https://openrouteservice.org/
gpx_content_licence: LGPL 3.0
gpx_description: This is a routing file from openrouteservice
gpx_name: ORSRouting
maximum_alternative_routes: 3
maximum_avoid_polygon_area: 200000000
maximum_avoid_polygon_extent: 20000
matrix:
enabled: false
maximum_routes: 3500
maximum_routes_flexible: 25
maximum_visited_nodes: 1000000
isochrones:
allow_compute_area: true
enabled: true
maximum_intervals: 10
maximum_locations: 100
maximum_range_distance:
- profiles: any
value: 120000
maximum_range_time:
- profiles: driving-car
value: 36000
fastisochrones:
maximum_range_distance:
- profiles: any
value: 50000
- profiles: driving-car
value: 500000
maximum_range_time:
- profiles: any
value: 18000
- profiles: driving-car
value: 10800
# Snap:
# enabled: true
# ##### ORS engine settings #####
engine:
source_file: /home/ors/files/osm_file.pbf
init_threads: 1
preparation_mode: false
elevation:
preprocessed: false
cache_clear: false
cache_path: /home/ors/elevation_cache
provider: multi
profile_default:
encoder_flags_size: 8
execution:
methods:
lm:
active_landmarks: 8
instructions: true
maximum_distance: 6000000
maximum_distance_alternative_routes: 100000
maximum_distance_avoid_areas: 1000000
maximum_distance_dynamic_weights: 6000000
maximum_distance_round_trip_routes: 100000
maximum_snapping_radius: 350
maximum_waypoints: 50
preparation:
methods:
fastisochrones:
enabled: true
maxcellnodes: 5000
threads: 12
weightings: recommended
lm:
enabled: true
landmarks: 16
threads: 1
weightings: recommended,shortest
min_network_size: 200
profiles:
driving-car:
elevation: true
enabled: true
encoder_options:
block_fords: false
turn_costs: true
use_acceleration: true
execution:
methods:
core:
active_landmarks: 6
lm:
active_landmarks: 8
ext_storages:
Borders:
boundaries: /home/ors/files/borders/borders.geojson.tar.gz
ids: /home/ors/files/borders/ids.csv
openborders: /home/ors/files/borders/openborders.csv
RoadAccessRestrictions:
use_for_warnings: true
Tollways: {}
WayCategory: {}
WaySurfaceType: {}
force_turn_costs: true
preparation:
methods:
ch:
enabled: true
threads: 8
weightings: fastest
core:
enabled: true
landmarks: 32
lmsets: highways;allow_all
threads: 1
weightings: fastest,shortest
lm:
enabled: false
landmarks: 24
threads: 1
weightings: recommended
min_network_size: 200
profile: driving-car
messages: []