Train Station Priority not factored in for pull-driven networks

Fixed
TheRhodanist [github] · 6 months ago

Issue description

When having a train-network with multiple stations and there are for a given good multiple providers and a consumer, when the consumer makes a "pull" request due to the "trains keep full if under X" slider, the request is fulfilled by a random provider station, regardless of any potential priority that is set at the provider stations.
Image
This only occurs if the providers do not have a proactive "empty me" mode active(the red slider). If the providers actively try to get rid of their inventory, the priority system is observed.

I would expect that even without having "push" settings active that deliveries take the priority into account.

Reproduction steps

Load the attached Save

alternatively (easiest in Sandbox)

  1. Have a train-network with 3 stations all dedicated to the same good and one train that is capable of transfering that good.(All stations should have enough inventory capacity to fulfill or recieve one train-load)
  2. Have one station be an unload station(requester) that has the "trains keep full if under X" slider set to max.
  3. Have two stations that provide the good/are set to load the good.
  4. Have one of the provider stations set to a higher priority than the other
  5. Observe that the train schedules a delivery randomly from one of the two providers without a discernible pattern and without taking the priority settings into account (you can repeatedly "recover the train" with unity to see the route without having to wait for actual loading/unloading)

Game version and build number

v0.8.3a b578

Operating system

Windows

Attachments

Test Priority Trainstations.save

1 attachment only for registered users
Balinth [github] · 6 months ago

The opposite case has the same issue as well.

  1. Have a loader station with active keep empty setup
  2. Have 2 unloader stations with passive setup (no keep full setting) with different priorities
  3. Trains won't always pick the higher prio unloader station, even if it could accept the load.

Wanted to use such setup so stone / slag is only unloaded at dumping station if industrial consumers are full.

Closed as ✅ Fixed

7 Showing 1–3 of 3