Hello! I’m trying to enable travelling by car on under-construction highways. Mainly the focus is on the E4 Stockholm bypass project, which includes a bypass to the west of Stockholm “Förbifart Stockholm”. Eventually I was able to get it working by using this custom_model:
{
“distance_influence”: 15,
“priority”: [
{ “if”: “road_class == CONSTRUCTION”, “multiply_by”: “10” },
{ “else_if”: “car_access”, “multiply_by”: “1” },
{ “else”: “”, “multiply_by”: “0” }
],
“speed”: [
{ “if”: “true”, “limit_to”: “car_average_speed” },
],
“areas”: { “type”: “FeatureCollection”, “features”: }
}
Without the high multiplier it won’t route on the under-construction highway. With it, the travel time still is way to high. It’s many times slower than the current detour. The entirety of förbifart stockholm is supposed to take a bit over 15 mins but here, it takes 2 hours 7 minutes, Kungens kurva to Häggvik. The current roads take 28 minutes.
I tried adding this to the speed, because I thought that maybe the average speed is glitched because the road doesn’t exist yet, but it didn’t help.
“speed”: [
{ “if”: “true”, “limit_to”: “car_average_speed” },
{ “if”: “road_class == CONSTRUCTION”, “limit_to”: “max_speed” }
],