In Denmark all the trucks have a max speed of 80 km/h on motorways, but it's like OSRM doesn't care and only pay attention to some of the turn-penalties and similar.
Can someone help me on how to set a max speed, so the routing-calculation never get over 50 km/h in cities, 80 on motorways and so on?
Below is my altered truck-soft profile:
-- Truck profile
Hello,
I'm currently working on supporting truck-profiles on my site, but I simple can't get a realistic output from my server when using for instance the truck-soft-profile from https://github.com/Project-OSRM/osrm-profiles-contrib/tree/master/5/21/truck-soft
In Denmark all the trucks have a max speed of 80 km/h on motorways, but it's like OSRM doesn't care and only pay attention to some of the turn-penalties and similar.
Can someone help me on how to set a max speed, so the routing-calculation never get over 50 km/h in cities, 80 on motorways and so on?
Below is my altered truck-soft profile: -- Truck profile
api_version = 4
Set = require('lib/set') Sequence = require('lib/sequence') Handlers = require("lib/way_handlers") Relations = require("lib/relations") find_access_tag = require("lib/access").find_access_tag limit = require("lib/maxspeed").limit Utils = require("lib/utils") Measure = require("lib/measure")
function setup() return { properties = { max_speed_for_map_matching = 80/3.6, -- 80kmph -> m/s -- For routing based on duration, but weighted for preferring certain roads weight_name = 'routability', -- For shortest duration without penalties for accessibility -- weight_name = 'duration', -- For shortest distance without penalties for accessibility -- weight_name = 'distance', process_call_tagless_node = false, u_turn_penalty = 30, continue_straight_at_waypoint = true, use_turn_restrictions = true, left_hand_driving = false, traffic_light_penalty = 2, },
} end