Fuel station truck may depart before filling its cargo, wasting trips

Works as intended
SillySMS [github] · 4 years ago

Issue description

I had multiple vehicles either short of fuel or completely empty when I got my first fuel station operational; I'd accidentally locked my diesel tank behind pipes so excavators/tree harvesters couldn't reach it.

Fuel finally started to flow in, and the assigned pickup only took 10 fuel before departing to refuel another vehicle. That maybe wasn't so bad, as the fuel station's internal tank wasn't exactly full.

Then the pickup returned, and took 10 fuel before refueling another vehicle. It could easily have waited two more seconds, filled its cargo entirely, and then departed to refuel two vehicles, saving a lot of time. Instead it's wasting time and diesel refilling just enough to complete one job before departure.

Expected behavior

I would expect that if a fuel station has sufficient fuel to fully load up one of its assigned trucks prior to departure, said truck will fully load itself, so it can complete as many jobs as possible before returning to pick up more diesel. I am unsure on whether a truck should depart with a partial load if the fuel station is empty.

Reproduction steps

Reproduction steps are untested, but I would assume it would be triggered by the following:

  1. Have tree harvesters and/or excavators which have no fuel.
  2. Cut off access to any diesel tanks via pipes or other transports.
  3. Start with no fuel stations.
  4. Build a fuel station and pump diesel to it.
  5. Assign it at least one truck: in my case a pickup, but I suspect larger trucks would replicate the issue.

Game version

EA v0.4.8

Captain Filip Captain Filip · 4 years ago

I don't think there is much we can do. Trucks depart to refuel excavators only when they have enough fuel to refuel an excavator fully. So that does not seem inefficient. If they don't manage to get full (exceeding the fuel needed to refuel an excavator) I would recommend building more advanced fuel station, assign less trucks per station and make sure there is stable supply of fuel. From our side this is hard to solve. Should trucks wait 1 second to get more fuel? 10 seconds? It's tricky and convoluted to handle and possible could lead to bugs. The cases that fuel station lacks fuel should be just avoided in general.

FabianSchriever [github] · 4 years ago

For this I'd suggest the following logic flow:

  • Truck goes to fuel station and load however much it can get (either full, or fuel station is empty).
  • Truck checks which (assigned) target needs the most fuel (at least 50% empty). Goes there to refuel it.
  • Truck checks who needs fuel (at least 20% empty) in the immediate vicinity (pick closest by path, not closest by straight line, it does not work well with obstacles). Drive to that excavator/harvester. Fill it up. Repeat until either the truck is empty, or no valid targets are found.
  • Return to fuel station for refill.
  • Repeat from beginning.

The default waiting state of the truck should be at the fuel station and full!

Doing this would fill up the truck as much as possible, then go for a round of refueling as many targets and as close together as possible, then go back. This seems to me to be a lot more efficient than going back and forth for each individual target, especially if the fuel station is not close to the targets.

Captain Filip Captain Filip · 3 years ago

It would be really better to have a save file. If there is a case where trucks taks less fuel than there is in the station that is bug. However, if the station can't keep up and they leave only partially full, that just works as intended. Please file a new bug if you have some specific cases we should look into.

Closed as ☑️ Works as intended

5 Showing 1–4 of 4