When using the Waze application, Waze servers use routing algorithms to determine the best path for a given route at that particular time.
Most specific details of the routing algorithms used by Waze are kept confidential, as they are trade secrets. This page is based on testing, observation, speculation, and some information revealed by Waze staff to aid map editors in their tasks. The information here is subject to change ; any information that has been revealed may be incomplete or out of date.
-based routing ==Calculating an optimal route is a difficult task. While the client device app has a routing algorithm included, this is not used unless there is no connection to the Waze server . Without access to the Waze server, there is no access to historical or real-time traffic data or reports. Therefore, the client will calculate and display the best route based on road attributes in the map such as type and directionality, along with any traffic and closures that happened to be downloaded when the app last had a connection with the server. It will not provide an estimated arrival time. If the map tiles in a particular area were not downloaded before losing data connectivity, no client-based routing is possible in that area.
== Routing requests ==
When you request a route calculation
and have an Internet connection with the Waze server, the request is sent to the server. That route is then calculated and transmitted back to your client device and displayed. Waze used to allow users to choose between fastest and shortest routes, but now all users are given the "best" route, which tends to be the fastest but also is chosen based on other factors like reliability of historical speed data and [[Routing penalties|penalties]], while respecting the following choices made by the user. In the Waze client settings, under Navigation you can choose: * Your [[Partial restrictions|vehicle type]] * Your [[Carpool, HOV, Transit lanes|toll and HOV passes]] * To allow or avoid toll roads* To allow or avoid freeways * To allow unpaved roads, avoid any unpaved roads, or avoid only long unpaved roads* To allow or [[Partial restrictions#Difficult turn|avoid difficult intersections]]
== Missing roads and incorrect junction connections ==
== Real-time current road speeds ==
The routing server uses real-time road speeds (from recent Waze app users if available) and combines the historical speed of the segment broken down into 10-15 minute chunks. The time to pass through a segment is tracked separately for each route out of a segment. For example if a segment ends with a left and right turn (no straight let's say), then the routing engine isolates the time through the segment to turn left and the time through the segment to turn right.
It is known that Waze uses real-time reports of current road speeds by preference over historical average road speeds. Waze also uses traffic congestion reports to reroute around slow traffic. <!-- Early versions of the client would also report when traffic speeds were good - this was removed due to map clutter. But Waze will still be receiving this information. -->It is assumed that the speed of any Wazer ahead of you on a stretch of road will be the speed used when your route is calculated.
As the number and density of Wazers grows, this real-time data takes on a greater importance. This emphasis is partly a reflection of Waze's original goal to create optimal commutes. As Waze has grown to be used as a more general
-purpose GPS navigation device over roads less traveled, the historical average road speeds becomes more important.
Since Waze uses the time you expect to be at a road segment to calculate the expected speed on that segment, it cannot use real time data when your trip time moves into a future time slot. So
longer trips will include future time slots where current traffic data is not available when initially calculated. When you enter a new time slot, any real-time traffic data that is available causes your client to recalculate your ETA and reroute you at that point.
== Fastest routing ==
== Changes in routes due to different route lengths ==
In addition, it is known that the Waze routing engine can't calculate every possible route for long distance routes, so it takes shortcuts for longer routes,
by excluding lower road types. This potentially results in the route changing dramatically when lengthened slightly.
== Problems with average road speeds ==
The following are reasons why the routing engine might not use the average road speed.
-of -day variations ===
Consider a road that most Wazers drive at 5pm when the average speed is 12 mph. You choose your route at 10am when the road is clear and the average speed is 60mph. It is the best road to take, but Waze chooses a different route because it has no information about the speed at 10am and assumes the speed is 12mph all day.
You can, of course, drive the road yourself, and
allow Waze eventually to learn the speed for that time. We do not know how long Waze holds the older data in computing the average speed. However, if Waze does discard old time information, you might not accumulate new time faster than it is discarded. It is also possible that your times are being ignored as being abnormal.
More Waze users would help fix this.
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.
Waze 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, a longer route 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; if the traffic lights make the road slow then Waze avoids them.
Some drivers regularly take longer routes — even winding through side streets — to avoid any stops or traffic lights. Waze has been known to suggest this, and also known to revert to waiting at lights when better average speed information is collected from the side streets. But note that this can be less than optimal due to the turn delays discussed above.