<div dir="ltr">Hello, I'm new to OSRM and I went through previous issues and couldn't find much related to this, hence posting it here.<br><br>I had used a python library OSMnx to extract Singapore's data and changed certain edge attributes for it. I calculated an edge attribute `"BPR"` (float) and stored it in the graph (This is travel time in case of real traffic data). I then converted this modified graph into a shapefile and then converted the shapefile into OSM XML using JOSM. I fed this to OSRM in order to use CH. I want to find the shortest route between two points wherein my weights (or cost) are the BPR value I had calculated. I understand I have to specify that in the car profile. This is how I specified it:<br><br>```<br>function setup()<br>  return {<br>    properties = {<br>      ...<br>      weight_name                    = 'congestion',<br>      ...<br>    },<br>  ...<br>}<br><br><br>function process_way(profile, way, result, relations)<br>  local data = {<br>    -- prefetch tags<br>    ...<br>    BPR = way:get_value_by_key('BPR')<br>  }<br>     <br>  result.weight = data.BPR<br>  ...<br>}<br>```<br><br>This is the JSON response I get for a certain query:<br>```<br>{'code': 'Ok',<br> 'routes': [{'geometry': 's}gG{ijyReEnNdm@|Wpl@~}@b\\lfAw\\twAbFjt@wM`ZwSpAGnNgN|Dvm@fWwHhb@bErz@qFxeAzVfkAfr@b{Ak_@rr@ocA~dAgCda@ji@dz@`j@di@`Sfi@PfQcRpc@ySyCgw@~XjEx]dHDkEl\\ju@lf@ii@n}@oVqEiKlR_Elw@bJd[lc@wFdKf[',<br>   'legs': [{'steps': [],<br>     'distance': 32298.2,<br>     'duration': 2308.4,<br>     'summary': '',<br>     'weight': 2179.6}],<br>   'distance': 32298.2,<br>   'duration': 2308.4,<br>   'weight_name': 'congestion',<br>   'weight': 2179.6}],<br> 'waypoints': [{'hint': 'YwYBgG8GAYALAAAAAQAAAAAAAAAAAAAAHN-XQWpx4j0AAAAAAAAAAA0AAAABAAAAAAAAAAAAAAAJAAAAyOIxBiSzFADI4jEGJLMUAAAAzwFqJcKJ',<br>   'distance': 0,<br>   'name': 'Tampines Avenue 8',<br>   'location': [103.932616, 1.35658]},<br>  {'hint': 'EAYBgBcGAYAUAAAAAAAAAAAAAAAAAAAAPzfZQQAAAAAAAAAAAAAAABkAAAAAAAAAAAAAAAAAAAAJAAAA6oIuBlR3FADqgi4GVHcUAAAALwpqJcKJ',<br>   'distance': 0,<br>   'name': 'Boon Lay Drive',<br>   'location': [103.711466, 1.341268]}]}<br>```<br><br>Looking at this part from the JSON:<br> ```<br> 'duration': 2308.4,<br>  'weight': 2179.6}],<br>```<br><div>As I understand, weight is the summation of BPR values for each edge.  Duration is estimated free flow time:` length/max_speed for each edge`. The `value of weight should be >= duration` which is true when I use Dijkstra for routing using edge weights as BPR value (`3155.27`). But over here, thats not the case. <br></div><div><br></div><div>BPR = duration*(some delay based on traffic) >= duration in case of no traffic<br></div><br>Can someone please point out if my Profile is wrongly written or if I've missed any steps?</div>