#Setting priority of smart train system

1 messages · Page 1 of 1 (latest)

obtuse portal
#

Ive got problems with setting the priorty of stations right bc im constantly having extremes, either i got too many trains stacking at copper or iron. Idk how to find the the balance so that they are supplied evenly.
Im using the 10-books-Full-of-Rails blueprint.

high acorn
#

Step 1. Don't use priorities
Step 2. Don't use someone elses blueprint book
Step 3. Don't ask other people to debug someone elses blueprint book

#

There could be a myriad of things wrong with the system and if you can't even answer why something is designed the way it is, not many people have the patience to help with that

#

The train system is pretty smart by itself so priorities are entirely unnecessary, just have some limits on how many trains can go to any specific station and have enough trains that all stations are covered. If you give each station a limit of 1 you can just use N-1 (N being the number of limits=stations) trains and it will just work.

obtuse portal
#

thx but i already got it figured out

unique loom
#

Use separate trains for iron and copper. If you want to use "generic" trains then you use a mod like LTN or Project Cybersyn. Even in 2.0 with all the rail features that were added it is extremely difficult to make a generic train system without third party mods, and even then it will still be prone to bugs or have inherit issues and limitations.

sturdy bronze
#

Even in 2.0 with all the rail features that were added it is extremely difficult to make a generic train system without third party mods
I disagree. Generic trains are as easy as making 4 interrupts. No mods needed.

#
  • If full cargo, go to unloading station (station name determined by wildcard)
  • If cargo empty and fuel low, go to refuelling station
  • If cargo empty and no path, to go Depot
  • If cargo empty, go to loading station
unique loom
#

Since the actual logic required...

  • If requesting station needs an item (limit > 0).
  • If providing station has item (limit > 0).
  • Go to providing station.
  • Reserve 1 slot at requesting station until loaded at providing station. <- This is the extremely difficult part.
#

Without that last part it will load up trains with useless items (no demand). At that point you might as well swap back to dedicated trains as it will at least not starve item types and you will have fewer trains on low demand items.

#

The usual way to work around the difficult part is a central dispatcher at a depot which is a huge mess of logic that takes into account reserving the slot at the requester and that every update cycles through in demand item types to dispatch trains. This is non trivial to make and get correct and almost always it has edge cases or other problems.