Changes

From Wazeopedia

Routing server

2,471 bytes removed, 3 months ago
m
Routing requests: Ferry template
<!--if When using the section parameter is definedWaze application, do Waze servers use routing 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 place publicly disclosed; the visible bannerfollowing is based on observation, speculation, only as and some information revealed by Waze staff. The operation of the code block for the top of routing server is considered to be proprietary and a section-->{{GlobalMark/visible}}<!-- #####-----#####-----#####-----#####-----#####-----#####-----#####-----#####----- #### This page has been curated #### #### competitive advantage to be included in the new #### #### Wazeopedia - GLOBAL WikiWaze. #### #### Please do not make any #### #### edits The information on this page without #### #### PRIOR CONSENSUS in the Wiki #### #### Updates is subject to change, and Discussions #### #### forum thread for this page. #### #### If a specific forum thread #### #### for this page doesn't exist #### #### please start one. #### #### www.waze.com/forum/ #### #### viewforumany information that has been revealed may be incomplete or out of date.php?f=276 #### #####-----#####-----#####-----#####-----#####-----#####-----#####-----#####-->
When using the Waze application, Waze servers use == Client-based routing algorithms to determine the best path for ==Calculating an optimal route is a given route at that particular timedifficult task. The specific details of While the client device app has a routing algorithms algorithm included, this is not used by unless there is no connection to the Waze server are . 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. It is assumed that the operation of the routing server is considered to be proprietary and a competitive advantage to Wazenot accessible. It is also assumed that Therefore, it is subject to change, and that any information that has been revealed might be incomplete or out of datedoes not provide an ETA.
== Client based routing Routing requests ==Calculating an optimal When a user requests a route is calculation with a difficult task. While network connection, the client device app has a routing algorithm included, this request is not used unless there is no connection sent to the Waze server. That route is then transmitted back to the client device and displayed.
== Routing The requests ==for routing vary according to the settings chosen for the user's account on the client device. Under Navigation one can choose:When you request a route calculation* Whether to allow or avoid [[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 request is sent proper pass)* Whether to the Waze serveravoid {{Ferry|Ferries}}* Whether to avoid {{Freeway|Freeways}}* Whether to allow, never allow, or avoid long unpaved roads* Whether to avoid [[Difficult turn|difficult intersections]] (turns marked "difficult" through nodes or junction boxes).* Vehicle type** {{Passageway}} has a type-specific [[Routing penalty|penalty]]. That route is then transmitted back to your client device and displayed** [[Partial restrictions|Segment restrictions]] allow or prevent travel by certain vehicle types.
The requests for routing vary according to the settings you have chosen on your client device. Under Navigation you can choose:* Fastest or shortest == Different route* Whether to allow or avoid toll roads* Whether to allow dirt roads, never allow dirt roads, or to avoid long dirt roads* Whether to avoid major highwayslengths ==
The shortest === Pruning ===It is known that the Waze routing engine can't calculate every possible route refers to physical for long-distanceroutes, so it takes shortcuts by removing lower road types from consideration in the middle of longer routes. Most people usually prefer This effect is commonly called '''route pruning''' and can potentially result in the Fastest route option; 100km of freeway is better changing dramatically when lengthened slightly. At distances farther than 90km a certain threshold value from the origin or destination of country a route, roadslower than a certain type tend not to be considered. Pruning thresholds with confidential, variable, increasing values exist for {{Street}}, {{Primary Street}} and {{Minor Highway}}, respectively. It is evident that {{Major Highway}}, like {{Freeway}} and {{Ramp}}, is never pruned. 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 Minor Highway.
== Missing roads and incorrect junction connections = XL routes ===Generation of routes longer than 1000 miles in Waze tries used to find be impossible, but in 2018 a new mechanism for extra-long (XL) routes was put into place. This pieces together multiple long routes to generate one extra-long route. To save time and avoid routing timeouts, instructions and geometry details are omitted in the middle of the best route between you during initial calculation, but they are produced and your destination based on your navigation settingslisted 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 [[Waze Map Editor]]. Also if [[Segment length|segments are less than {{:Segment length/Minimum}}]] they can cause routing issuesmiddle of extra-long routes.
== Real-time current road speeds ==
The routing server uses real-time road speeds (from recent Waze app users if available) and combines the average, 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 only 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. This detailed speed information is proprietary & is part of the data Waze sells/plans to sell and won't be displayed through the editor. 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 trips of more than 30 minutes (and on average more than 15 minutes) 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 ==Waze knows the average speed of every confirmed road between you and your destination. The Waze server can calculate which list of roads to take to minimize displayed in the total travel time. While every request is processed in real-time, by observation it appears that Waze [[glossary|caches]] some requested routes or major points. This means if it already knows the best route from B to C, and you ask for a route from A to C, it might just calculate 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 might be less than optimal for up to a day as routes are cached and recalculated. While a complex calculation, calculating the optimal route is possible. The complexity arises over the "average speed" of the roads. == Changes in route due to different origin ==Consider calculating a route from A to Z. The suggested route might be A to B to C to D to Z. Then calculate the route from B to Z. You might get a suggested route of B to C to E to Z. At first glance, this suggests one route is not optimal because the [[Glossary|origin]] changed. We can guess at what might be happening. There might be a problem associated with the possible caching of routes. Or there might be a "timing window" effect. The different arrival time at C might change the best route to Z. Or there might be a fine tuning effect in the route, perhaps to avoid too many turns. So by dropping the segment A to B, the segments C to E to Z no longer exceed some thresholdMap Editor.
This effect can It is known that Waze prefers to use real-time reports of current road speeds 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 observed while drivingreceiving this information. If you recalculate -->The speeds of recent Wazers traveling on a road will be factored into the route given to a destination while driving along an already calculated route to that subsequent Wazers traveling on the same destination, the route can changeroad.
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 sometimes offers 's original goal to create optimal commutes. As Waze has grown to be used as a new route to bypass heavy traffic which raises more general-purpose GPS navigation device over roads less traveled, the question as to when and how Waze considers reroutinghistorical average road speeds becomes more important.
== Changes Since Waze uses the future expected time of arrival onto a road segment in routes due order to different calculate the expected speed on that segment, it cannot use real-time data too far in the future. So longer trips (on the order of 30 minutes or more) will include future time slots where current traffic data is not available when initially calculated. As the trip progresses, any real-time traffic data that is available causes the client to recalculate the route lengths ==and the ETA.
In addition, it == Average road speeds ==If the average or historical road speed is known that the Waze routing engine can't calculate every possible route for long distance routesnot correct, so it takes shortcuts for longer routes, potentially resulting in then the route changing dramatically when lengthened slightlymay not be optimal. According to Waze support ({{as of|July 2011|lc=y}})However, the section deletion of a route more than 10 km from each endpoint segments to reset average road speed is heavily weighted towards non-streets (i.e. "Primary Streets" or the various Highway types)not recommended. It is believed that Waze servers simply ignore streets outside of uses the 10 km radius data from Wazers traveling through the endpoints when doing its calculations segments to update the average speed up , and oftentimes an anomalous historical road speed is automatically corrected with further data collection. If Waze appears to disfavor the processuse of certain segments along a route, a number of other reasons can cause such a situation.
== Problems with average road speeds = Time-of-day variations ===If Consider a road that most Wazers drive at 5 PM when the average speed is 12 MPH. At 10 AM when the road is clear and the average speed is not correct, then the route will not be optimal. However60 MPH, it is never recommended to delete segments in order to reset the average best road speed for that segmentto take. If Waze uses the only has historical speed data from Wazers traveling through 5 PM, it will assume that the segments to update speed of the average speed. If you suspect Waze road is 12 MPH all day, and it may not using certain segments along recommend this road. As more people drive this road closer to the time of day when a given routeis requested, there are Waze will get a number of other reasons better guess for the average speed at that can cause such a situation. Don't assume deleting the segment is the place to starttime.
The following === Shrinking window ===If there are reasons why enough recorded speeds on a road, then Waze uses a shrinking window of speeds to better estimate the routing engine average speed at the current time. Waze uses the speed of each road segment (in both directions) in intervals as small as 30 minutes. So a two-way road might not use 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, a 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 the day of the week. There is no evidence that Waze records speeds for larger date ranges such as months or seasons; however, it will update its average road speedspeeds relatively quickly when seasonal traffic patterns change.
=== Time of day variations ===Consider a Waze uses the average road segment speed for the time slot that most Wazers drive applies at 5pm the time when the average speed a user is 12 mph. You choose your route expected to arrive at 10am when the that road is clear and the average speed is 60mphsegment. It is the best road to takeBecause of this time window, but Waze chooses a suggests different routes at different times of day. This is dependent on how many times are recorded on the roads along the route because it has no information . If they're all recorded at about the speed at 10am and assumes the speeds is 12mph all same time of day. You can, of course, drive then the road yourselftime window does not help. If 1, 000 times are recorded at about 5 PM and Waze eventually learns the speed for that time. We do not know how long Waze holds the older data in computing 2 times are recorded at 10 AM, then the 10 AM average speed. However, if Waze does discard old time information, you might not accumulate new time faster than it is discarded. It still is also possible that your based mostly on times are being ignored as being abnormal. More Waze users would help fix thisfrom around 5 PM.
=== Turn delays ===
On a segment of a road, your a user's average speed can be very different depending on what you do is done at the end of the segment. Traffic going straight through a traffic light might go very fast while traffic turning left might wait a very long time. A freeway exit lane might go fast while traffic continuing hits congestion.
[[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 segments to which it exits. There are then two average drive times for:
For this reason it is important to keep long segment lengths before junctions as traffic congestion at the junction might affect exits differently.
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 optimally, through another route. Hence , if there is a chance that traffic that goes can go in different directions at a junction experiences and that junction can experience different amounts of congestion, keep the segment before that the junction should be kept long, or a [[junction box]] may be used. === Outdated and abnormal road speeds ===Average speeds can change over time, and recorded times can be abnormal or wrong—and can stay wrong for a very long time. This may be due 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 longenough to record accurate transition times. There is some evidence that abnormal road speeds and old road speeds are discarded, or at least not used in calculating the average speeds of roads. == Recalculation ==When Waze receives notification of traffic conditions, it uses the actual speed of roads on your route, rather than the average speed. This is based on [[Real time closures|real-time closures]] and automatic traffic condition reports - light, moderate, heavy traffic or complete standstill. Manual reports of traffic jams and accidents are for display only and do not change routing.
Note this data ETA is not presented updated in response to a user's progress on the route and in response to users through these real-time traffic conditions. If real-time traffic conditions make the given route significantly worse than alternatives, Waze Map Editor, but is only visible to may provide an automatic recalculation. The benefits of this are balanced against the routing serverperceived hassle of changing one's route.
== 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.
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 behaviourbehavior''. 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.
 
== Outdated and abnormal road speeds ==
Road conditions change, construction work comes and goes, and average road speeds can change dramatically. One day you might be stuck behind a truck, and another day you might be crawling along the roads at 2 a.m. transporting your pet goldfish. Or your GPS might have a glitch and show you travelling at 1,000 mph.
 
In short, average speeds can change over time, and recorded times can be abnormal or just plain wrong—and can stay wrong for a very long time.
 
We can assume Waze is aware of this. There is some evidence that abnormal road speeds and old road speeds are discarded, or at least not used in calculating the average speeds of roads.
 
== Average road speed "shrinking window" ==
If there are enough recorded speeds on a road, then Waze uses a shrinking window of speeds to better estimate the average speed at the time you are travelling on it. Waze uses 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. We can assume that when there are insufficient records for an individual time slot, a wider time range is takes up a full day. As the road is driven more, the time slot shrinks down to 30 minutes.
 
We can speculate that there is additional information used that is based upon the day of the week. There is some observational evidence that a road that is busy on weekdays and not used for routing is chosen as the optimal route on weekends.
 
At some point, Waze also needs to consider the months of the year as seasonal variations can affect the speed of the roads.
 
Waze uses the average road segment speed for the time slot that applies at the time you are expected to arrive at that road segment.
 
Because of this "time window", Waze suggests different routes at different times of day. This is dependent on how many times are recorded on the roads along the route. If they're all recorded at about the same time of day, then the time window does not help. If 1,000 times are recorded at about 5 p.m. and 2 times are recorded at 10 a.m., then your 10 a.m. average speed still is based mostly on times from around 5 p.m.
 
== Routing algorithm refinements ==
=== Routing options ===
It's easy to see how routing options can be implemented. For example, to minimize turns we can add a time [[Routing_penalties|penalty]] for fastest routing or a distance penalty for shortest routing, when calculating the fastest or shortest route.
 
=== Junction penalties ===
For newly created roads, currently Waze applies a five-second time [[Routing_penalties|penalty]] for each junction through which a route passes. Once vehicles drive over that road and generate Waze traffic data, the penalty for these junctions is dropped.
== What to do if you think the generated route is wrong ==
Firstly, use # Use the option to generate alternative routes. This might give you some clues as to why Waze is offering that route. Secondly, if # If you think there is a better route, check in WME the [[Waze Map Editor]] that the all of its roads are connected, and all connected along legal turns are allowed.# Communicate the routeproblem.Possible means of communication include:#* Report a [[map issue]] in the app and respond to comments on it.Thirdly, post #* Post a message detailing the problem route - (origin, destination and a WME permalink ) to the [http://www.waze.com/forum/viewforum.php?f=6&sid=2872533f5796ac39dc6747511398e907 Navigation forum]. Other eyes will check it, and you might indeed find a flaw in the Waze routing algorithm. Fixing it might make it better for everyoneor your state's local forum== Change of routing ==When #* Join your local community's Waze receives notification of traffic conditions it uses the actual speed of roads on Discord server (accessible from your route, rather than the average speedstate wiki page). This is based only on will usually produce the automatic traffic condition reports - light, moderate, heavy traffic or complete standstill. Manual reports of traffic jams and accidents are for your information only and do not change routing. It might be that even with the traffic reports, there is no better route and Waze cannot offer you onefastest response from local editors.
== You are the driver ==
Waze can never see that the traffic light is green going straight, or know that today is a public holiday. It can offer you guidance as to what is the best route under average conditions. But you are the driver and you are in the best position to make the decision for today under today's conditions.
If everyone followed Waze directions and never drove on a new route, Waze might 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 benefit by the sharing in of your knowledge.
[[Category:Review redirects]]
[[Category:Waze operations]]
1,270
edits