Routing server: Difference between revisions View history

Line 37: Line 37:
==Rutas mas rápidas==
==Rutas mas rápidas==
Waze conoce la velocidad media de todas las carreteras "confirmadas" a tu destino. El servidor de Waze puede calcular la lista de rutas a tomar para minimizar el tiempo total de viaje.
Waze conoce la velocidad media de todas las carreteras "confirmadas" a tu destino. El servidor de Waze puede calcular la lista de rutas a tomar para minimizar el tiempo total de viaje.
Mientras que cada solicitud se procesa en tiempo real, por observación, parece que Waze almacena algunas rutas solicitadas o puntos importantes. Esto significa que si ya conoce la mejor ruta de B a C, y se solicita una ruta de A a C, sólo se puede calcular la mejor ruta de A a B, una vez que se comprueba que no hay una ruta mejor  sin pasar por B. Esto quiere decir que hay un periodo de tiempo hasta la actualización del [[Mapa en Vivo]]en el que  algunas rutas serán "menos óptima" hasta el día que estén almacenadas y realculadas.
Mientras que cada solicitud se procesa en tiempo real, por observación, parece que Waze almacena algunas rutas solicitadas o puntos importantes. Esto significa que si ya conoce la mejor ruta de B a C, y se solicita una ruta de A a C, sólo se puede calcular la mejor ruta de A a B, una vez que se comprueba que no hay una ruta mejor  sin pasar por B. Esto quiere decir que hay un periodo de tiempo hasta la actualización del [[Mapa en Vivo]] en el que  algunas rutas serán "menos óptima" hasta el día que estén almacenadas y realculadas.


Mientras , mediante un cálculo complejo, es posible el cálculo de la ruta óptima . La complejidad surge en torno a la "velocidad media" de las carreteras.
Mientras , mediante un cálculo complejo, es posible el cálculo de la ruta óptima . La complejidad surge en torno a la "velocidad media" de las carreteras.

Revision as of 21:37, 9 February 2012

Cálculo de una ruta

Cálcular una ruta óptima es una tarea difícil. Si bien la aplicación en el dispositivo (cliente) incluye un algoritmo de enrutamiento que sólo se activa si hay una conexión con el servidor de Waze.

Especulaciones

El algoritmo de enrutamiento que utiliza el servidor de Waze no es de conocimiento para el público por lo que lo descrito a continuación, se basa en a en la observación, la especulación, y alguna información revelada por el personal de Waze. Podemos suponer que el funcionamiento del servidor de enrutamiento es la estrategia de Waze para competir frente otros navegadores. También podemos suponer que está sujeto a cambios, y que cualquier información que revelada puede ser incompleta o fuera de fecha

Solicitud de ruta de navegación

Cuando se solicita un cálculo de la ruta, ésta se envía al servidor de Waze. Esa ruta se transmite de nuevo a su dispositivo cliente y se muestra.

Las rutas mostradas van a variar en función de las opciones de configuración seleccionadas en el dispositivo [cliente]. En virtud de enrutamiento puede elegir:

  • La ruta más rápida o más corta
  • Permitir o no, el acceso a través de caminos de tierra,
  • Utilizar el menor número de giros
  • Evitar las autopistas (peajes ?)
  • O seleccionar rutas para ir comiendo galletas (da mas puntos)

La ruta más corta se refiere a la distancia física. La mejor opción es seleccionar la ruta más rápida. (100 km de autopista es mejor que 90 km de caminos rurales).

Las galletas (Cookie munchin)aparecen en caminos que no han sido recorridos. Cuando se activa esta opción, la ruta tserá menos directa para viajar por caminos sin confirmar, (y vas sumando puntos). Normalmente, esto incrementa en 10 minutos el recorrido, lo xual s poco importante en recorridos largos, pero si en los cortos . (un viaje de 3 horas se convierte en 3 horas y 10 minutos. Pero 20 minutos en coche se convierte en 30 minutos en coche).


Carreteras "perdidas" y uniones incorrectas

Waze trata de encontrar la ruta más rápida a tu destino. Obviamente, pero escogerá una ruta alternativa , si la ruta óptima no tiene las carreteras con todas las conexiones correctas en elMapa en Vivo

Velocidad de tráfico en tiempo real

Waze utiliza informes las velocidades en carretera en tiempo real en vez de las velocidades medias históricas de carretera. También utiliza los informes de congestión de tráfico para desviar la ruta evitando los tramos de tráfico lento. Las primeras versiones del cliente también informaban cuando la velocidad del tráfico era adecuada - pero se eliminó porque saturaban el mapa. Waze continúa recibiendo esta información. Podemos suponer que la velocidad de cualquier Wazer delante de ti en un tramo de la carretera es la velocidad que se utiliza para calcular tu la ruta.

A medida que el número y densidad de wazers aumenta, los datos en tiempo real adquieren una mayor importancia y son el objetivo de Waze para optimizar los traslados. Como el uso de Waze se está generalizando y se está utilizando como dispositivo de navegación GPS por carreteras poco transitadas, las velocidades medias históricas en estas carretera se consideran más importante. Desde Waze utiliza el tiempo de permanencia en un segmento de la carretera para calcular la velocidad en ese segmento, por lo que no puede utilizar los datos en tiempo real para calcular la duración de un viaje en un intervalo de tiempo futuro. Así que los viajes de más de 30 minutos (y, en promedio, más de 15 minutos) pueden incluir errores de cálculo, dado que no se disponen en el momento de iniciar la ruta de las velocidades medias que habrá en los distintos tramos de la ruta cuando se vaya a circular por ellos. Por eso, a medida que se va avanzado sobre la ruta calculada, se irán recalculando los tiempos , en función de los datos de velocidades que se vayan presentando en cada momento.

Rutas mas rápidas

Waze conoce la velocidad media de todas las carreteras "confirmadas" a tu destino. El servidor de Waze puede calcular la lista de rutas a tomar para minimizar el tiempo total de viaje. Mientras que cada solicitud se procesa en tiempo real, por observación, parece que Waze almacena algunas rutas solicitadas o puntos importantes. Esto significa que si ya conoce la mejor ruta de B a C, y se solicita una ruta de A a C, sólo se puede calcular la mejor ruta de A a B, una vez que se comprueba que no hay una ruta mejor sin pasar por B. Esto quiere decir que hay un periodo de tiempo hasta la actualización del Mapa en Vivo en el que algunas rutas serán "menos óptima" hasta el día que estén almacenadas y realculadas.

Mientras , mediante un cálculo complejo, es posible el cálculo de la ruta óptima . La complejidad surge en torno a la "velocidad media" de las carreteras.

Changes in route due to different origin

Consider calculating a route from A to Z. The suggested route may be A to B to C to D to Z. Then calculate the route from B to Z. You may get a suggested route of B to C to E to Z. At first glance, this suggests one route is not optimal.

We can guess at what might be happening. There may be a problem associated with the possible caching of routes. Or there may be a "timing window" effect. The different arrival time at C may change the best route to Z. Or there may 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 threshold.

This effect can be observing while driving. If you recalculate a route to a destination while driving along an already calculated route to that same destination, the route may change.

This are old reports where wazers have not offered a route to bypass heavy traffic but do receive a new route when manually asking for it. It may be they would have been offered that alternative route at that point anyway, whether or not there was bad traffic ahead. It does raise question as to when and how Waze considers rerouting but these may have been addressed in the current version. Certainly Waze does offer new routes sometimes.

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 takes shortcuts for longer routes, potentially resulting in the route changing dramatically when lengthened slightly. According to Waze support (as of July 2011), the section of a route more than 10 km from each endpoint is heavily weighted towards non-streets (i.e. "Primary Streets" or the various Highway types). My personal guess is that it simply ignores streets outside of the 10 km radius from the endpoints when doing its calculations to speed up the calculation. The specific quote from support was: "Above some distance (currently 10KM) from both end points (start and destination) the server prefers to go through non streets. Now as it happens here - this small distance was the difference between being less than or over 10KM. Now the penalty of going through a street in this case is high - so the server prefers the highway." In this particular case, the observed behavior was that extending the route by a short distance caused Waze to suggest a very different (and much longer, both in distance and estimated time) route.

Problems with average road speeds

If the average road speed is not correct, then the route will not be optimal. The following are reasons why using the average road speed can be the wrong value to use.

Time 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 speeds is 12mph all day.

You can, of course, drive the road yourself, and Waze will eventually learn. We do not know how many times Waze uses in its calculation. However if Waze does discard old time information, you may 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.

Turn delays

Consider a road of length 1 mile where you drive straight ahead and go through the intersection all at 100mph taking 36 seconds. Or at the end of the road you can sit and wait 5 minutes to make a turn. In the first case your average speed is 100mph. In the second case your average speed is just under 11mph.

Now if 9/10 wazers go straight through, the average road speed is 91 mph. Waze will recommend this route, even if if involves a turn on your route, and the route is not optimal.

Contrariwise, if 9/10 wazers make that 5 minute turn, the average road speed is 20mph, and even though your optimal route would take you straight through at 100mph, Waze will not suggest it because it sees the average speed as 20 mph.

We can assume Waze is aware of this issue. You can choose the Minimize Turns option in your Routing settings. 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 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 route. It make the calculation more complex, but it can be done.

At the moment it is not being done.

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.

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 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 to avoid traffic lights but it will avoid slow roads; if the traffic lights make the road slow then Waze will avoid them.

Some drivers will 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 back 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 may be stuck behind a truck, and another day you may 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 may have up to 48 average road speeds. We can assume that when there are insufficient records for an individual time slot, a wider time range is taken—up to a full day. As the road is driven more, the time slot would shrink down to 30 minutes.

We can speculate that there may be 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 will be chosen as the optimal route on weekends.

At some point, Waze would also need 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 will suggest 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 will 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 will still mostly be based 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 minimise turns we can add a time penalty for fastest routing or a distance penalty for shortest routing, when calculating the fastest or shortest route.

Junction penalties

Currently Waze applies a five-second time penalty when calculating a route that passes through a 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, as this may add a penalty of as much as five minutes 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 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 at the junction;
  • Not apply the penalty when you cross a junction onto a road with the same name;
  • Not apply the penalty when the road you are travelling on is a higher class (e.g. highway versus street, primary street versus street), where we can assume the higher class road has the right of way; or
  • Not apply the penalty at all when travelling on freeways, motorways 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 not have all the minor connecting roads recorded; it looks like a straight section of road with no junctions. Waze may choose the country road 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 route.

Secondly, if you think there is a better route, check in Cartouche that the roads are all connected along the route.

Thirdly, post a message detailing the problem route - origin, destination and a Cartouche permalink to the Navigation forum. Other eyes will check it, and you may indeed find a flaw in the Waze routing algorithm. Fixing it may make it better for everyone.

Change of Routing

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 only on 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 may be that even with the traffic reports, there is no better route and Waze will not offer you one.

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 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.