i'm working with OSRM(Open Source Routing Machine) and ran into some problems. I want configure blocking hours for a specific road(like Grab) Ex: The street called Cau Giay block taxis from 4.00pm to 7.00pm
code detail:
function restrict(way, result)
-- Check if the way is named contain Cau Giay
local name = way:get_value_by_key('name')
if name and string.find(name, 'Cau Giay') then
-- Add a restriction to the way
result.restriction = '* @ (Mo-Fr 16:00-19:00)'
end
end
function way_function(way)
local result = {
-- Other routing rules and restrictions go here
}
restrict(way, result)
return result
end
but nothing changed.
please tell me where the above code is wrong and suggest some ways you have done it!
Thanks and best regards!
https://github.com/Project-OSRM/osrm-backend/issues/33 and https://github.com/Project-OSRM/osrm-backend/issues/735