Trucks go to nearest fuel, even if the path would require a long distance

Vehicles & Roads
Duplicates of this topic
cabadam [github] · 4 months ago

Issue description

As shown in the attached screenshot, vehicles will select a station to refuel from based on straight line distance and not considering pathing. In reality, this vehicle will drive by multiple other fuel stations while going halfway around the map. leaving it out of commission for an extended period of time.

The red path drawn is the path the vehicle has to take to actually reach its destination. The red circles are other fuel stations.

Reproduction steps

  1. Have a vehicle needing fuel that is near a fuel station as the crow flies, but the actual path to that station is very long (ex: going around mountains).
  2. Vehicle selects that depot instead of other ones that are closer based on actual DRIVING DISTANCE/PATHING.

Game version and build number

v0.8.5 (b598)

Operating system

Windows

Attachments

Image

tom89194 [github] · 3 months ago

It would be nice if the code checked path length between the two or three closest fuel cans.

The comparison can be shortcut by checking the path length against the distance to one or two other fuel stops to force a reconsider if the path to get to the closest one is x amount longer than the actual distance to the next closest stop. This way the code can try to skip calculating several paths to compare them directly each time.

24 Showing 1–2 of 2