Traffic data: Difference between revisions Discussion View history

(→‎What happens to traffic data when you make changes to the roads: change the length of segment - speed is retained. cross times change)
Line 62: Line 62:
**If you delete a segment and replace it with a newly-drawn segment, waze has to start from scratch with default values for segment speeds and turns and collect new traffic data.
**If you delete a segment and replace it with a newly-drawn segment, waze has to start from scratch with default values for segment speeds and turns and collect new traffic data.
* When you shift the position of a junction without disconnecting anything, changing the lengths of several segments
* When you shift the position of a junction without disconnecting anything, changing the lengths of several segments
** {{red|The cross times are not changed  '''OR''' The cross times are changed in a proportional way to account for the fact that the junction has moved}}
** The speed on the segments can be used - cross times will change to account for the fact that the junction has moved.
** Over time, the stored traffic data will change to bring segment cross times back into line with reality.
** Over time, the stored traffic data will change to bring segment cross times back into line with reality.
* When you cut a segment (let's call it segment 100) into 2 shorter segments without changing anything else at the 2 original junctions (Examples, connecting a PLR to segment 100 or having a change in speed limit along segment 100.)
* When you cut a segment (let's call it segment 100) into 2 shorter segments without changing anything else at the 2 original junctions (Examples, connecting a PLR to segment 100 or having a change in speed limit along segment 100.)
Line 79: Line 79:
* When you move segments from one junction node to another junction node
* When you move segments from one junction node to another junction node
** All traffic data which passed through the first junction node are lost, because they were associated with the two connected segment IDs and the node connecting them.
** All traffic data which passed through the first junction node are lost, because they were associated with the two connected segment IDs and the node connecting them.
** Traffic speed on the segment is still usable.
** New traffic data connecting the same segments through the new junction node are created using default values because traffic data connecting two segments depends on the two segment IDs and the junction node ID.
** New traffic data connecting the same segments through the new junction node are created using default values because traffic data connecting two segments depends on the two segment IDs and the junction node ID.
** If you begin with two segments, 101 and 102, disconnect them, save, reconnect them through a new junction node, and save again, the original transition times between 101 and 102 will be lost. They will be replaced by new default values.
** If you begin with two segments, 101 and 102, disconnect them, save, reconnect them through a new junction node, and save again, the original transition times between 101 and 102 will be lost. They will be replaced by new default values.

Revision as of 11:19, 23 October 2018

This new page is currently undergoing modifications. The information presented should be considered a draft, not yet ready for use. This content is open to changes from anyone during construction. If you would like to make changes or have questions, please post a message in this forum.

Traffic data

Along with every routable segment, Waze stores seperate data about how long it takes to cross that segment in both directions and transition (straight, right, left, exit, keep) to every other segment that is junctioned to it. This information is used by the routing engine to figure out the fastest way to get to a destination. If a segment is deleted, then the information about the time it takes to cross it or enter it from another segment is also deleted, Some types of changes at nodes can also cause information about transition from one segment to another through this node to be lost.

This article explains what traffic data is stored and what happens to it when we change the map.

Summary: How to preserve traffic data while editing

  • Avoid deleting segments. If you delete a segment, Waze loses all traffic data for that segment.
  • Avoid disconnecting segments. If you disconnect a segment from the junction node where it joins another segment, and reconnect it in a different place, then Waze loses all traffic information about crossing to / turning onto the next segment.
  • Follow established procedure for creating a divided roadway in place of a 2-way street. Use pieces of the 2-way segment to create both new parallel one-way segments to preserve the speeds in both directions. Preserve the "most important" turn wait times.
  • Follow appropriate procedure for "undividing" a roadway. Use both one-way segments to create a single new 2-way segment so it can carry the speeds from both one-way segments. Preserve the "most important" turn wait times.

Why Waze stores traffic data

Waze uses a routing algorithm to search for the quickest route from the start point ot the end point. These types of algorithms all construct a route from [[1]] to node on the map, using traffic data along the way to figure out the quickest node-to-node travel times that will get you to your destination. The Waze routing server uses uses Waze's proprietary algorithms and the traffic data you transmit every time you use the waze app to figure out the fastest route on the waze map.

If a portion of the route goes from node 1 to node 2 to node 3, using segments 100 and 200 along the way, Waze uses its stored traffic data to figure out how long it takes to travel the length of segment 100, through node 2 to segment 200, and then the entire length of segment 200 all the way to node 3. If the route begins or ends somewhere in the middle of a segment, Waze uses the traffic data to estimate the just the portion of total travel time for that segment you will use along the part of the segment you will travel.

For drives in the US and Canada, the Waze routing server always uses default data for travel on parking lot segments. This means there is no accounting for different wait times for outbound turns in different directions, or at different intersections. Traffic data from actual wazers is used in routing over all other segment types.

Traffic data is stored for every way out of each segment.

What traffic data is stored

  • As you drive, the Waze app (client) on your mobile device collects data about your GPS location and when you were there. It sends that data to the Waze server.
  • The Waze server uses this data to figure out which nodes you travelled through, which segments you used to travel between them, your average speed, how long it took you to make it through the segment.
  • Waze averages together everyone's information from the last several months so it can figure out how long it took to get from one node to another, through it, and onto a new segment.
  • It keeps track of this information in the forward (A to B) and reverse (B to A) direction, and for every possible exit from the segment at the node it is joined to. So if segment 100 is junctioned to segments 201, 202, and 203 at its B junction node, It can figure 3 different cross times in the A->B direction - for 100->201, 100->202, and 100->203.
  • If the segment has a restricted lane (Bus, Express, HOV, etc) , the same type of information is stored for one "extra" lane. So if segment 100 also has a left HOV lane, then Waze will be able to figure out 3 more cross times in the same direction - for 100HOV -> 201, 100HOV->202, 100HOV->203.
  • Nodes are the primary way Waze routing server looks at routes. All data about transition between two segments is stored with the ID of the node involved, as well as the two segments connected to it.

Where does this information come from

  • When a new segment is created, initial traffic data are created based on a default average speed for the road type and a transition time to each segment it is junctioned to. These values will be updated as soon as waze records traffic using the segment and the junction nodes.
  • Waze frequently updates traffic data by analyzing the traffic that has travelled on each segment at each time slice of the week. Those real-life traffic data are averaged to come up with the stored values. There are a lot of details we do not know about how traffic data is analyzed, and how the traffic calculations take into account loss of cell service, wazers stopping on the side of the road or entering or leaving a segment in the middle, etc. LiveMap shows us 48 time slices per day (every hour and half hour), and we don't know whether that has anything to do with the number of time slices Waze uses in its calculations.

Glossary

Stored or Calculated Traffic Data

Time slice
A specific day of week and portion of a day. A time slice might cover an hour or half hour of the day, or it might cover a different length of time.
Segment cross time
The time it takes a wazer to enter the the segment, cross it, and exit the segment in one of the possible exit directions. This cross time includes the average time spent "waiting for the light to change", "waiting to make a turn", or "waiting at the 4-way stop". For a 2-way segment connected to a 4-way intersection at each end, there are 4 segment cross times in the A->B direction (straight, left, right, and u-turn) and 4 more in the B->A direction. For segments marked as having an additional reserved lane (HOV, Express, motorcycle, etc) in the right/middle/left lane, there is one more additional set(s) of cross times associated with the restriction (for more on this, please see Carpool, HOV, Transit lanes.
Segment cross speed
segment cross time divided by length.
Traversal Time
A calculated "base" time to cross a segment in the A->B or B->A direction, not including transition times to cross from one segment to one of the other segments it is junctioned to. Might be used to calculate new segment cross times when an existing segment is cut into two new segments.
Transition Time
A calculated "wait" time to transition from one segment to another, not counting the Traversal time. Might be used to calculate new segment cross times when an existing segment is cut into two new segments.

What information we can see

Scripts like route speeds can retrieve segment cross times for an hour or half hour, any day of the week, along any of the routes the routing server gave it. These scripts can calcuate speeds based on these cross times.

When is traffic data lost?

  • When a segment is deleted, all traffic data involving that segment is lost.
  • If a node is lost, then all the data about transitions between segments connected to that node is lost.
  • If a segment is disconnected from a node and saved, then data about transitions between that segment and the remaining segments still connected to that node will eventually be lost.
  • If no traffic is assigned to a segment or a direction on a segment then the old traffic data for that direction will be retained for a week or two. After that, it will be lost.

What happens to traffic data when you make changes to the roads

  • When you delete a segment (let's call it segment 100)
    • All traffic data for that segment is deleted
    • All traffic data for other segments coming INBOUND to that segment is lost
    • All traffic data OUTBOUND to other segments is lost.
    • If you delete a segment and replace it with a newly-drawn segment, waze has to start from scratch with default values for segment speeds and turns and collect new traffic data.
  • When you shift the position of a junction without disconnecting anything, changing the lengths of several segments
    • The speed on the segments can be used - cross times will change to account for the fact that the junction has moved.
    • Over time, the stored traffic data will change to bring segment cross times back into line with reality.
  • When you cut a segment (let's call it segment 100) into 2 shorter segments without changing anything else at the 2 original junctions (Examples, connecting a PLR to segment 100 or having a change in speed limit along segment 100.)
    • Two new segments are created with brand-new segment IDs (let's call them 201 and 202)
    • The segment and the segment ID (100) from the segment you cut is removed.
    • A junction node is created where the two new segments are joined.
    • The segment cross times of the original segment are used to calculate new cross times for the new segments, including cross times connecting the two new segments.
    • Over time, the stored traffic data will change to adjust the new transition times in line with reality.
  • Every segment is connected to a node at both ends.
  • If you move one end of a segment and connect it to another node, the node on the moved segment is deleted. The node that was not moved will be kept and used for the new junction.
  • When you disconnect a single segment from a junction:
    • the node remains connected to the unmoved segment and
    • a new node is created on the moved end of the moved segment.
    • Therefore, If you move a segment end away from a junction node and then move that same segment end back to the same junction node, you will preserve the original node ID and all associated traffic data
    • But if you move a segment end away from a junction node, and then move the other segment(s) away from the old junction to join the new node ID, you will lose the original node ID and all associated traffic data.
  • When you move segments from one junction node to another junction node
    • All traffic data which passed through the first junction node are lost, because they were associated with the two connected segment IDs and the node connecting them.
    • Traffic speed on the segment is still usable.
    • New traffic data connecting the same segments through the new junction node are created using default values because traffic data connecting two segments depends on the two segment IDs and the junction node ID.
    • If you begin with two segments, 101 and 102, disconnect them, save, reconnect them through a new junction node, and save again, the original transition times between 101 and 102 will be lost. They will be replaced by new default values.
    • Over time, transition times between the two segments will be adjusted to reflect the new traffic data.
  • Traffic data corresponding to a restricted (red) transition arrow between segment 200 and 201 will still be collected as long as traffic can be assigned to a route from segment 200 to 201 (see below)
  • Improperly divided roads
    • Traffic data corresponding to the "wrong direction" on a one-way segment will not be collected if the traffic data is assigned to other nearby segments. If no traffic is assigned to a segment direction, the old traffic data will be retained for a week or two.
    • If a 2-way segment is improperly divided by drawing a new one-way segment parallel to the old segment, and the old segment is made one-way, then the stored "wrong way" traffic data on the old segment will be retained for a period of a week or two. New traffic data in that direction will be collected on the new one-way segment.
    • If you find an improperly divided road w/in a few days (red road(s) for the new section(s)/not connected segments/improper turn restrictions) then turn the original sections back to two way and properly divide the road. This will retain the older data vice having to restart the data collection from scratch.
    • This is why it is best to use pieces of the existing 2-way road for constructing both new one-way roads when it is necesary to divide a roadway (create a dual carriageway)

Unanswered Questions

What happens when

  • Drag one junction node with two segments on top of another junction node with another 2 segments. Are the s1->s2 and s3->s4 transition times retained at the new junction node?
  • Create 1 segment from 2 by deleting the junction joining them.
    • Transition time between the 2 segments that have been joined to create the new segment?
  • disconnect a segment from a junction:
    • and save it disconnected, but reconnect it and save again before the next tile update
    • for a few days, weeks, or months -- as a way to close a road during construction.
      • and then reconnect it to the same junction (nothing else having changed at that junction in the meantime)
  • Connect a segment to a junction
    • a former "dead-end" node of an existing segment
  • convert a bow tie junction to a "H" junction by the following method
    1. disconnect segment 1 from the bow tie junction
    2. connect segment 1 to the cross segment to create a new junction
    3. disconnect segment 2 from the bow tie junction
    4. connect segment 2 to the new junction.
  • convert a bow tie junction to a "H" junction by the following method
    1. bridge segment 1 to segment 2
    2. move the joined segment to the new junction location on the cross segment
    3. reduce the elevation to ground and use the "junction" icon to create the new junction.