Search - 4-5 Optimization Path

Suppose we penalize left turns, why do this? The reason is that we are in actual traffic

Left turns are harder than right turns, and you usually have to wait for oncoming traffic. Suppose that a left turn is more expensive in our plan,

In fact, in package delivery services, when planning the optimal route, the route they plan during peak hours will

Try to avoid left turns. Because left turns can take a long time, they are more likely to turn right if they can.

In this example, moving forward costs 1 unit, turning left costs 10 units, and turning right costs 1 unit.

Which is the best path now? And what is the optimal path cost?

It can be seen that the red route costs 15 units and the blue route costs 16 units.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324884797&siteId=291194637