Issue description
When having a mine with intermixed materials (either when starting, with overburden, or at edges of resource layers) excavators will routinely load multiple trucks with small amounts of waste material (dirt, rock) and will take the next scoop of the desired resource (ie ore) but because of the mixed nature, there will be another required scoop of waste <= bucket size.
This second waste scoop doesn't always end up being placed in the same truck that contains waste material already. Sometimes, there is another truck waiting that doesn't have anything yet. This can also occur in reverse where there are multiple trucks with <full loads of desired resource but the excavator is waiting to load waste material.
However, instead of prioritizing the partially loaded truck, a new truck will be loaded. This leads to having multiple trucks with waste material sitting and waiting until the excavator is stuck waiting to for yet another truck to load the desired resource.
During this wait, they time out of their waiting period and leaving to dump. Thus, in some instances, there will be 3 trucks each with 1-2 scoops of waste material that leave to dump at the same time while the excavator is waiting to load desired resource. I think this may happen especially when using the preferred resource option on the excavator as they search for the primary resource.
I think that this might also be an issue due to the excavator moving to get new spot to mine, but the truck doesn't follow, resetting any association with previously used trucks.
Expected behavior
Excavators should prioritize trucks already partially filled within (some distance) and those trucks should move to excavators to include switching between excavators to be loaded from if excavators are not constantly able to get to the desired resource.
Should be something like thus:
Excavator Code:
-Begin loading phase
-Gather list of associated trucks
-Sort by trucks already caring material
-Sort by distance (preferably travel distance)
-Check if already in use by other excavator
-If not, use closest
--When multiple with nominal waiting distance, use fullest first except when truck is closer to other excavator
-Else, request empty locate for load
-Possibly recheck for previously busy trucks are no longer busy
-If so, cancel empty request and request previously busy truck
Truck code:
-Awaiting loading
-If empty, anticipate next excavator requiring a truck by busy/already having a truck assigned
-If partially loaded:
--If waiting longer than 10sec,
---If path to dump < estimated wait time, then dump
---Else, wait (may be desirable to modify wait times based off of number of trucks vs excavators and relative travel time, IE wait more for longer travel times.
//could possibly have issues with stalemates, but proper bounded wait times (min and max) could see significantly reduced under utilized trucks for mining
End result should be that excavators significantly prioritize completely filling trucks (with waste and ore) so that trucks can begin travel phase as soon as practicable and the cases where there would otherwise be enough trucks to achieve efficient cycle times. Also, when using multiple excavators/trucks, they should be shareable such that tracks are loaded faster
Alternatively, it might actually make more sense to change to mining prerequisites to include an available truck. It doesn't really make much sense for an excavator to scoop before a truck is available to load (although I know that is what happens in highly efficient large scale mining). This combination could lead to more stable mining due to strongly prioritizing whatever material is already loaded in nearby trucks, preventing the costly wait times for mining operation with few trucks and mixed material (IE dirt and rock for more island modification vs resource mining).
This could also be worked around (and more realistically in some ways) where some excavators are assigned to clear overburden or focus on waste while other focus on resources. Very difficult/requires too much micro-management of both mining areas and towers to be useful although its what I would like to be able to do.
Reproduction steps
-If needed, watch where multiple small trucks are waiting for one small excavator and have long travel, may be replicateble.
Game version
v0.4.10
Attachments
Nevoil.save
Files not imported: Nevoil.save