Some time ago, Yandex.Taxi began to suggest calling a taxi not exactly where you are, but walking a few meters, but getting faster and cheaper.

At first glance, this is not the most significant event, but I want to tell why, in fact, this is a very significant step towards the future - in which we will have to live very soon. It is about the future of personal and public transport in the city. In the article I will explain why this is important and why the development is more difficult than it seems, and very few companies in the world are capable of it.
')
I'll start from afar
Taxi has only recently been perceived as a convenient transport if you have extra money and time. Even in the absence of traffic jams, it was much more efficient to use the subway or the same tram.
There were always plenty of taxis with good cars, but the driver rarely could have arrived earlier than half an hour. To catch the car at least at this time, taxis were distributed to different parts of the city. The dispatchers contacted all the employees at once, found out who was where, if the car was not busy, when they were free, and waited until the radio drivers agreed who would go to order. By the way, very often the passenger had to listen to the conversations of dispatchers and taxi drivers all the way.
If the car was required earlier than half an hour, people sometimes went on the road and "voted." The likelihood that there will be a car quickly increased. But at the same time, the pricing became completely opaque - you could not accurately predict how much the trip would cost. Coming out of the Moscow club in the middle of the night from the performance of your favorite band, you could go home for both a three-digit and four-digit sum. In addition, the “bombili” often did not have navigators and did not know the city well, which made travel time unpredictable.
In fact, when calling a taxi from a special service with an understandable price, and when catching a car, the passenger always paid for not only the travel time, but also the vehicle downtime. When at the airport you were offered to take for astronomical sums, they included not only the trip, but also the high cost of parking and the time the driver spent catching those who wanted at the exit. The opportunity to take a new order immediately after the completion of the current, and even close to it, appeared only with the development of special online services.
Efficiency. Technology is once again changing the world
For many, Yandex.Taxis is just an application, but behind it lies almost the entire history of Yandex technologies: from machine learning and graphing to creating your own maps. When Yandeks.Taksi just started, the submission time immediately decreased from half an hour after ordering by phone to 7 minutes after opening the application. A few years have passed, and the car comes to you in two minutes. Online services have begun to dramatically increase competition between drivers and reduce vehicle downtime, thereby reducing the cost of travel.
Thus, the entire taxi market is changing. A taxi from a rarely used service becomes a mass one, gradually becoming a basic service for moving around the city - almost like a subway. Moreover, a taxi is now able to replace not only the metro, but also personal transport. People call a taxi to get from the supermarket to the house with groceries, catch a work meeting or go to the doctor, without getting late to an unfamiliar place.
But, as I said above, all this is possible only in the case when the driver does not stand idle without orders. Because as a result, passengers are always paid for in idle time.
If you look at the classic taxi market in Russia, then the share of time when the driver carries a passenger is 10% or less. Even in Europe, where urban taxi ranks are common, the average activity of cars takes from 7% to 15%. In modern service applications, this figure reaches 50% or more. The gap is obvious.
And it is in such a system that it is more profitable to be free and be ready for a new order than to take a passenger for a long time to the right address and lose other customers - which are important for the overall reduction of “empty” time. At the same time, the goal of Yandex.Taxi is to make the service as inexpensive as public transport and as affordable as your own car. The latter means that the car must necessarily stand at the entrance at the right moment - just as a private car always stands there. It turns out that to achieve this goal, the main thing is efficiency. Any minute saved by the driver is valuable for us.
How did the idea
As often happens in Yandex, the product solution has grown out of the idea of ​​one of the employees. He doesn't even work in Taxi. A colleague needed to get from the metro nearest to MEPI to the institute itself. On the map, this distance does not exceed 1 km - this is exactly the situation when a taxi can replace a bus or a minibus. But in reality, I had to drive 11 km, since it was necessary to turn around on Kashirskoye Highway. But it was enough to cross the road and walk 100 meters, as the travel time would be reduced by eight times! And, accordingly, the cost of the trip would be lower. In fact, in the Taxi team, we also discussed a similar feature, but the post of a colleague helped to make sure that the right direction of thought was in place.
Why is it not so easy to do
It sounds simple, but just a few companies in the world can realize this task. The fact is that a combination of several factors is required. The company must:
- Route on highways.
- Have a count of pedestrian roads and understand how much time a person will spend to get from one point to another.
- To make such calculations very quickly: at the moment when a person wants to call a taxi, he needs to instantly show alternative points. In a minute they will not need anyone. Yes, and with a delay of 10 seconds the product would be spoiled.
- Take into account that there are dozens or even hundreds of points for processing. Before each of them you need to be able to build two routes - for the client and for the taxi.
- Understanding where it is convenient for a person to go, and for a car to drive, and where to get to, is uncomfortable. No one will sit at a difficult junction, go uncomfortable roads, etc. "Ordinary" pedestrian, and car routers are not always well suited for this task.
- To be able to calculate the price of the trip - and this is not only routing, but also taking into account traffic jams: current and future.
How many queries need to be able to process the router to build alternate landing pointsHow this thing works, and why so
Now alternative landing points appear if:
- the total benefit from the time of filing and travel of the passenger is four minutes
- order made for the near future
- the destination point is known (without it we can do harm, because we don’t know which way the driver will go)
- the car is not called to the airport (i.e., the client is most likely without luggage)
In order to show the final point, it is necessary to build several routes in one zone.Then Yandex.Taxi considers the time of arrival of the car not only to the point where the person is located, but also to all intersections with highways in a pedestrian radius of three minutes from the current position of the person. That is, there are a number of points: now they are pedestrian crossings, exits from the subway, stops, barriers, small roads that can be accessed anywhere, driveways in courtyards, points to which people often call cars themselves, etc.
What's next
Of course, we do not plan to stop there. It is already clear that there may be many similar solutions.
For example, very soon Taxi will learn to offer for landing by default exactly those points where customers often get in their cars. Such places are usually formed in a natural way - at the exits from shopping centers, in convenient places on the streets. They are suitable for passengers and drivers, because it is better not to make people re-find such places every time.
Further: it seems that in cities with a large number of traffic jams, situations arise when it is more convenient to take part of the route by public transport or even walk, and then transfer to a taxi again. Here, of course, you need to know the timetable for public transport, but Yandex has an application for this as well.
It also happens that at the end of the trip it is convenient not to reach the goal of 100 meters. What if by car they can not be overcome quickly, that if you walk much faster? It would be nice to offer to rearrange the end point by 100 meters, rather than forcing the passenger to think about it on their own (especially since the client may not know the city or the situation on the roads).
I have listed only a part of the development options. By the way, we will be happy to hear your ideas in the comments and implement them if they turn out to be good.

It is considered (and many on Habré probably know) that the idea of ​​modern public transport belongs to the mathematician - Blaise Pascal. It was he who, in the middle of the 17th century, proposed the creation of multi-seat horse-drawn carriages. They had to move along strictly defined routes - this helped not to go in vain (as happened, for example, with cab drivers) and increase the margins of the trip.
Such public crews were developed in the XIX century, when it became more and more large industries, to which it was necessary to get a lot of workers. For them, special omnibuses were organized. Overall, not much has changed since then. The main burden on public transport is still at the beginning and end of the standard working day.
The advantage of the route transport from the moment of its appearance was the constant workload. She allowed to reduce the cost of the trip and made transport massive. Taxi appeared as a comfortable, but expensive and less effective alternative. Technological advances made it possible to create ever more efficient public transport, and taxi drivers, just as cab drivers a few centuries ago, could drive for a long time in search of customers. And only thanks to the technologies that have appeared before our eyes, a taxi begins to develop as a personal public transport. Cars do not drive without passengers, navigator helps drivers, they receive regular orders as close as possible to the points where the previous ones are completed. You can even take a new order before disembarking a passenger at the point of destination: if the service knows where this point is, it will start looking for customers nearby. Given the cost of owning your own car, a taxi becomes a much cheaper and no less comfortable way to travel. And at the heart of this revolution - as with the appearance of the first public transport - is mathematical thinking and, literally, applied mathematics.