Changes

From Wazeopedia

Routing server

1,572 bytes added, 2 months ago
m
Pruning: wordsmithery
==Client based When using the Waze application, Waze servers use routing==Calculating an optimal algorithms to determine the best path for a given route at that particular time. The specific details of the routing algorithms used by the Waze server are not publicly disclosed; the following is a difficult taskbased on observation, speculation, and some information revealed by Waze staff. While The operation of the [[client device]] app has routing server is considered to be proprietary and a routing algorithm included, competitive advantage to Waze. The information on this page is not used unless there is no connection subject to the Waze serverchange, and any information that has been revealed may be incomplete or out of date.
==SpeculationClient-based routing ==The Calculating an optimal route is a difficult task. While the client device app has a routing algorithm included, this is not used by unless there is no connection to the Waze server is . Client-based routing only uses cached map tiles. It does not publicly disclosed and the following is based on observationuse real-time traffic data, speculationreports or closures, and some because this information revealed by Waze staff. We can assume that the operating of the routing server is considered to be proprietary and a competitive advantage to Wazenot accessible. We can also assume that Therefore, it is subject to change, and that any information that has been revealed may be incomplete out out of datedoes not provide an ETA.
==Routing requests==When you request a user requests a route calculationwith a network connection, the request is sent to the Waze server. That route is then transmitted back to your [[the client device]] and displayed.
The requests for routing vary according to the settings you have chosen for the user's account on your [[the client device]]. Under Routing you Navigation one can choose:* Fastest Whether to allow or shortest routeavoid [[toll roads]]* Which, if any, [[Carpool, HOV, Transit lanes|toll and HOV]] passes to apply (some segments are permitted only to those who hold the proper pass)* Whether to avoid {{Ferry|Ferries}}* Whether to avoid {{Freeway|Freeways}}* Whether to allow dirt roads, never allow dirt roads , or to avoid long dirt unpaved roads* Whether to minimize avoid [[Difficult turn|difficult intersections]] (turnsmarked "difficult" through nodes or junction boxes).* Vehicle type* Whether to avoid highways* {{Passageway}} has a type-specific [[Routing penalty|penalty]].* Whether to prefer cookie munching* [[Partial restrictions|Segment restrictions]] allow or prevent travel by certain vehicle types.
The shortest == Different route refers to physical distance. It is always better to choose the Fastest route option. 100km of freeway is better than 90km of country roads.lengths ==
Cookie munching refers to [[glossary|pacman] or unconfirmed roads=== Pruning ===It is known that the Waze routing engine can't calculate every possible route for long-distance routes, so it takes shortcuts by removing lower road types from consideration in the middle of longer routes. When this option This effect is enabled, commonly called '''route pruning''' and can potentially result in the route will take changing dramatically when lengthened slightly. At distances farther than a certain threshold value from the origin or destination of a less direct route , roads lower than a certain type tend not to travel over unconfirmed roadsbe considered. Pruning thresholds with confidential, variable, increasing values exist for {{Street}}, {{Primary Street}} and {{Minor Highway}}, earning you pointsrespectively. This typically adds 10 minutes to your driving timeThere is evidence that {{Major Highway}} is never pruned. So a 3 hour drive becomes 3 hours {{Freeway}} and 10 minutes{{Ramp}} are never pruned. But The pruning mechanism uniquely accounts for [[Creating and editing road segments#Special properties|routing road type]], so a Primary Street with routing road type +1 would be pruned at the same threshold as a 20 minute drive becomes 30 minute driveMinor Highway.
==Missing roads and incorrect junction connections= XL routes ===Generation of routes longer than 1000 miles in Waze tries used to be impossible, but in 2018 a new mechanism for extra-long (XL) routes was put into place. This pieces together multiple long routes to find generate one extra-long route. To save time and avoid routing timeouts, instructions and geometry details are omitted in the middle of the fastest route between you during initial calculation, but they are produced and your destinationlisted later as the user drives along the route. Obviously it Dependent upon multiple factors such as server load and road types, transcontinental routes can only route based on roads be calculated in Waze with this mechanism. It is also evident that it knows about, since XL routes are combinations of shorter routes, the aforementioned pruning behaves differently for them, so your route will not be optimal if a better route does not have all the roads with correct connections that lower road types may appear in the [[Live Map]]middle of extra-long routes.
==Fastest RoutingReal-time current road speeds ==The routing server uses real-time road speeds (from recent Waze knows app users if available) and combines the average , historical speed of every confirmed road between you and your destinationthe segment broken down into 10-15 minute chunks. The Waze server can calculate which list time to pass through a segment is tracked separately for each route out of roads a segment. For example if a segment ends with only a left and right turn, then the routing engine isolates the time through the segment to take turn left and the time through the segment to minimize turn right. This detailed speed information is proprietary and is not displayed in the total travel timeWaze Map Editor.
While every request It is processed in known that Waze prefers to use real-time, by observation it appears that reports of current road speeds over historical average road speeds. Waze [[glossary|caches]] some requested routes or major pointsalso uses traffic congestion reports to reroute around slow traffic. This means if it already knows <!-- Early versions of the best route from B client would also report when traffic speeds were good - this was removed due to C, and you ask for map clutter. But Waze will still be receiving this information. -->The speeds of recent Wazers traveling on a road will be factored into the route from A given to C, it may just calculate subsequent Wazers traveling on the best route from A to B, once it checks that there isn't a better route bypassing B altogether. This does mean that when there is a [[Timeline of updating process|Live map update]] some routes may be less than optimal for up to a day as routes are cached and recalculatedsame road.
While As the number and density of Wazers grows, this real-time data takes on a greater importance. This emphasis is partly a complex calculation, calculating the reflection of Waze's original goal to create optimal route is possiblecommutes. The complexity arises As Waze has grown to be used as a more general-purpose GPS navigation device over roads less traveled, the "historical average speed" of the roadsroad speeds becomes more important.
==Problems with average Since Waze uses the future expected time of arrival onto a road speeds==If segment in order to calculate the average road expected speed is not correcton that segment, then it cannot use real-time data too far in the route will not be optimalfuture. The following are reasons why using the average road speed can be So longer trips (on the wrong value to use.===Time order of day variations===Consider a road that most wazers drive at 5pm 30 minutes or more) will include future time slots where current traffic data is not available when the average speed is 12 mphinitially calculated. You choose your route at 10am when As the road trip progresses, any real-time traffic data that is clear and available causes the average speed is 60mph. It is client to recalculate the best road to take, but Waze chooses a different route because it has no information about the speed at 10am and assumes the speeds is 12mph all dayETA.
You can, of course, drive == Average road speeds ==If the average or historical road yourselfspeed is not correct, and Waze will eventually learnthen the route may not be optimal. We do However, deletion of segments to reset average road speed is not know how many times recommended. Waze uses in its calculationthe data from Wazers traveling through the segments to update the average speed, and oftentimes an anomalous historical road speed is automatically corrected with further data collection. However if If Waze does discard old time informationappears to disfavor the use of certain segments along a route, you may not accumulate new time faster than it is discarded. It is also possible that your times are being ignored as being abnormala number of other reasons can cause such a situation.
More Waze users would help fix this. ===Turn delaysTime-of-day variations ===Consider a road of length 1 mile where you that most Wazers drive straight ahead at 5 PM when the average speed is 12 MPH. At 10 AM when the road is clear and go through the intersection all at 100mph taking 36 secondsaverage speed is 60 MPH, it is the best road to take. Or at If Waze only has historical speed data from 5 PM, it will assume that the end speed of the road you can sit is 12 MPH all day, and wait 5 minutes it may not recommend this road. As more people drive this road closer to make the time of day when a turn. In the first case your average speed given route is 100mph. In requested, Waze will get a better guess for the second case your average speed is just under 11mphat that time.
Now if 9/10 wazers go straight through=== Shrinking window ===If there are enough recorded speeds on a road, then Waze uses a shrinking window of speeds to better estimate the average road speed is 91 mphat the current time. Waze will recommend this routeuses the speed of each road segment (in both directions) in intervals as small as 30 minutes. So a two-way road might have up to 96 average road speeds in a day. It can be assumed that when there are insufficient records for an individual time slot, even if if involves a turn wider time range is used (up to a full day). As the road is driven more at different times, the time slot shrinks. Additional information is used based on your route, and the route day of the week. There is not optimalno evidence that Waze records speeds for larger date ranges such as months or seasons; however, it will update its average speeds relatively quickly when seasonal traffic patterns change.
Contrariwise, if 9/10 wazers make that 5 minute turn, Waze uses the average road segment speed for the time slot that applies at the time when a user is 20mphexpected to arrive at that road segment. Because of this time window, and even though your optimal Waze suggests different routes at different times of day. This is dependent on how many times are recorded on the roads along the route would take you straight through . If they're all recorded at 100mphabout the same time of day, Waze will then the time window does not suggest it because it sees help. If 1,000 times are recorded at about 5 PM and 2 times are recorded at 10 AM, then the 10 AM average speed as mphstill is based mostly on times from around 5 PM.
We === Turn delays ===On a segment of a road, a user's average speed can assume Waze be very different depending on what is aware done at the end of this issue. You can choose the Minimize Turns option in your Routing settingssegment. Or you can use your own discretion. The good news is that by collecting your route information Waze is collecting enough information to give correct routing advice when it implements it. It knows the average speed of people Traffic going straight through and it knows the average speed of people making the turn. And it can apply the correct average speed when calculating your best routea traffic light might go very fast while traffic turning left might wait a very long time. It make the calculation more complex, but it can be doneA freeway exit lane might go fast while traffic continuing hits congestion.
At [[Image:SegmentTraffic1.png|right|350px]]Waze has the ability to separately track the average speed of traffic that passes through a segment, but exits to different segments. The routing engine takes this into account. In the diagram, multiple times are tracked for traffic flowing through Seg4 based on the moment segments to which it is not being doneexits.There are then two average drive times for:
===[[Cartouche]] editing===The average speed of a road can be dramatically altered by editing in Cartouche. Consider a 50m length of road driven in 36 seconds. An editor extends this length of road the full 10km length. Cartouche now records this road as 10km long but also driven in 36 seconds for an average road speed of 1000km/hour. This has been a particular problem as people adjust the length of ramps.==Traffic lights and stop signs==Waze does not record the location of traffic lights. While some GPS navigation offers guidance like "turn right at the next traffic light" the information is frequently incomplete, incorrect or outdated. The consensus view is that Waze should not record the location of traffic lights.* Seg4 to Jnct2 to Seg5
Waze does take into account traffic lights, stop signs through the effect they have on traffic speed. Consider a traffic light with long waiting times. The road segment leading * Seg4 to that traffic light will have a low average speed. If the average speed (based on the average waiting time) becomes long enough, a longer route that avoids the light will become the preferred route. This has been observed in practice and is an example of ''emergent behaviour''. Waze isn't programmed Jnct2 to avoid traffic lights but it will avoid slow roads and if the traffic lights make the road slow then Waze will avoid them.Seg6
Some drivers will regularly take longer routes Traffic building up on Seg4 that turns right to avoid any strops or Seg6 does not affect the route timing for the traffic lightsalso using Seg4, winding through side streetsbut instead turning left to Seg5. Waze has been known to suggest For this, and also known reason it is important to revert back to waiting keep long segment lengths before junctions as traffic congestion at lights when better average speed information is collected from the side streetsjunction might affect exits differently.
But note that To understand this problem better, consider if we add a short Seg8 between Seg7 and Jnct4. Let's say the traffic exiting Seg10 backs up all the way to Seg7 (easy enough, since Seg8 is short). Because Seg7 only has a single exiting segment (Seg8), the routing server is only able to collect a single average speed &mdash; it can no longer distinguish traffic by where it is going ''after'' Seg8. Now the through traffic going to Seg9 appears to Waze to slow down through Seg7, even though it doesn't in reality. At a minimum this causes an incorrect ETA for routing, and it might actually cause traffic to be rerouted unnecessarily, and less than optimal due to optimally, through another route. Hence, if there is a chance that traffic can go in different directions at a junction and that junction can experience different amounts of congestion, the segment before the turn delays discussed abovejunction should be kept long, or a [[junction box]] may be used.
===Outdated and abnormal road speeds===Road conditions Average speeds can changeover time, construction work comes and goes, and average road speeds recorded times can be abnormal or wrong—and can change dramaticallystay wrong for a very long time. One day you This may be stuck behind a truckdue to users recording inaccurate speed data by doing things like walking, biking or sitting in their driveways with Waze open. Also, if [[Segment length|segments are less than {{:Segment length/Minimum}}]] they may not be long enough to record accurate transition times. There is some evidence that abnormal road speeds and another day you crawl along old road speeds are discarded, or at least not used in calculating the average speeds of roads at 2am transporting your pet goldfish. Or your GPS throws a glitch and has you travelling a 1000 mph.
In short == Recalculation ==When Waze receives notification of traffic conditions, it uses the actual speed of roads on your route, rather than the average speeds can change over speed. This is based on [[Real time closures|real-timeclosures]] and automatic traffic condition reports - light, moderate, heavy traffic or complete standstill. Manual reports of traffic jams and recorded times accidents are abnormal or just wrong. And can stay wrong for a very long timedisplay only and do not change routing.
We can assume ETA is updated in response to a user's progress on the route and in response to these real-time traffic conditions. If real-time traffic conditions make the given route significantly worse than alternatives, Waze is aware may provide an automatic recalculation. The benefits of this. There is some evidence that abnormal road speeds and old road speeds are discarded, or at least not used in calculating balanced against the average speeds perceived hassle of roadschanging one's route.
==Average road speed "shrinking window"Traffic lights and stop signs ==If there is enough recorded speeds on a road, then Waze uses a shrinking window of speeds to better estimate does not record the average speed at the time you are travelling on it. We can imagine the code may look something like this: select averagespeed on road sort by absolute(timeofdaynow-timeofdaytravelled) limit 100 So that would take the average speed of up to 100 trips closest to the time of day location of your triptraffic lights. If you are travelling at 3pm and there are 100 times recorded between 2.58pm and 3.02pm on that road, then you would be using average times from a 4 minute window. If there were only ever 12 times recorded for that stretch of road, you would use the average of all 12 and there would be no time window. As the road was driven more, the window would shrink automatically. A similar approach could be used to combine average speeds based on the day of the week. For long trips, we would While some GPS navigation offers guidance like to assume that Waze uses the time you are expected to arrive "turn right at the road, rather than next traffic light" the time at the start of your trip. Because of this "time window", Waze will suggest different routes at different times of day. But it information is dependent on how many times are recorded on the roads along the route. And if they're all recorded at about the same time of dayfrequently incomplete, then the time window will not help. If 1000 times are recorded at about 5pm and 2 times are recorded at 10am, then your 10am average speed will still mostly be based on times from around 5pm.==Routing algorithm refinements=====Routing options===It's easy to see how routing options can be implemented. For example, to minimise turns we can add a time penalty for fastest routing or a distance penalty for shortest routing, when calculating the fastest incorrect or shortest routeoutdated.  ===Junction penalties===Currently Waze applies a 5 second time penalty for passing through each junction. While not an unreasonable approach to dealing with intersections, it has generated some flawed routing and is being reviewed. One major issue arises in long highways which may be made up of hundreds of segments connected together. This may add a 5 minute penalty to a trip, even though the intersections are not real. This supports the arguments of those who aim to have a clean edit of maps where junctions are only used when necessary. In practice we need to deal with the map as it stands. An automated tool to remove the junctions The consensus view is needed as the manual work that is required is enormous. The routing problem can be fixed in a variety of ways. One could not apply the penalty when there are no other existing roads meeting. Not apply the penalty when you are travelling on to a road with the same name. Not apply the penalty when the road you are travelling on is a higher class (eg highway versus street, primary street versus street) where we can assume the higher class road has the right of way. Or just not apply the penalty when travelling on freeways and highways. Even if a road is correctly connected with no unnecessary segments, the junction penalty can still give incorrect results. For example a busy highway may be correctly connected to the ramps along its length. A quiet country road running in parallel may Waze should not have all record the minor connecting roads recorded - it looks like a straight section location of road with no junctions. Waze may choose it as the preferred route because of the lack of junctions. ==What to do if you think the generated route is wrong==Firstly, use the option to generate alternative routes. This may give you some clues as to why Waze is offering that routetraffic lights.
SecondlyWaze does take traffic lights and stop signs into account by noting the effect they have on traffic speed. Consider a traffic light with long waiting times. The road segment leading to that traffic light will have a low average speed. If the average speed (based on the average waiting time) becomes low enough, if you think there is a better longer route, check in Cartouche that avoids the light becomes the preferred route. This has been observed in practice and is an example of ''emergent behavior''. Waze isn't programmed to avoid traffic lights but it does avoid slow roads are all connected along ; if the traffic lights make the routeroad slow then Waze avoids them.
ThirdlySome drivers regularly take longer routes — even winding through side streets — to avoid any stops or traffic lights. Waze has been known to suggest this, post a message detailing the problem route - origin, destination and a Cartouche [[permalink]] also known to revert to waiting at lights when better average speed information is collected from the [http://wwwside streets.waze.com/forum/viewforum.php?f=6&sid=2872533f5796ac39dc6747511398e907 Navigation forum]. Other eyes will check it, and you may indeed find a flaw in But note that this can be less than optimal due to the Waze routing algorithm. Fixing it may make it better for everyoneturn delays discussed above.
==Change of RoutingWhat to do if you think the generated route is wrong ==When # Use the option to generate alternative routes. This might give you some clues as to why Waze receives notification of traffic conditions it uses is offering that route.# If you think there is a better route, check in the actual speed [[Waze Map Editor]] that all of its roads on your routeare connected, rather than and all legal turns are allowed.# Communicate the average speedproblem. This is based only Possible means of communication include:#* Report a [[map issue]] in the app and respond to comments on it.#* Post a message detailing the automatic traffic condition reports - lightproblem route (origin, moderate, heavy traffic destination and a WME permalink) to the [http://www.waze.com/forum/viewforum.php?f=6&sid=2872533f5796ac39dc6747511398e907 Navigation forum] or complete standstillyour state's local forum.#* Join your local community's Waze Discord server (accessible from your state wiki page). Manual reports of traffic jams and accidents are for you information only and do not change routingThis will usually produce the fastest response from local editors.
It may be == You are the driver ==Waze can never see that even with the traffic reports, there light is green going straight or know that today is a public holiday. It can offer you guidance as to what is no better the best route under average conditions. But you are the driver and Waze will not offer you oneare in the best position to make the decision for today under today's conditions.
==You are the driver==If everyone followed Waze directions and never drove on a new route, Waze can might never see learn that the traffic light route is better. When Waze is green going straightrecording your travels, or every trip helps make Waze better for everyone. That includes when you think you know that today is a public holidaybetter. Sometimes you will be right. It can offer And sometimes you guidance as to what is the best route under average conditionswill be wrong. But it is better to find out you are wrong so you can choose the driver and better route. And when you are in right, all Waze users benefit by the best position to make the decision for today under today's conditionssharing of your knowledge.
If everyone followed [[Category:Waze directions and never drove on a new route, Waze may never learn that route is better. When Waze is recording your travels, every trip helps make Waze better for everyone. That includes when you think you know better. Sometimes you will be right. And sometimes you will be wrong. But it is better to find out you are wrong so you can choose the better route. And when you are right, all Waze users benefits by sharing in your knowledge.operations]]
1,270
edits