After making my starter base, I was working on a train system using train limits, circuits, and bidirectional 3-8-3 trains. I realized the scale was too large for me, and I wanted something smaller and simpler. I had also messed up the fueling system, and wanted to redesign it.

I nuked the old system (literally and figuratively), and I want to switch to unidirectional 1-4 trains, but still using train limits and circuits to calculate the limits. I also want a single fueling (maybe adding multiple as the factory grows) station that is visited by all trains.

Any suggestions for planning or designing something like this? The only mega base I have ever made was a spaghetti mess and I’m trying to be a bit more organized in the creation of this one (the initial goal is 2.7k spm)

  • kimli@lemmy.mlM
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    This is the simplest I’d do:

    • Have a dedicated refueling line. This one is a bit special and probably with a 1-1 train it’ll be enough. This line should go from “fuel pickup -> fuel drop off”. Maybe, down the line, more than one refueling train will be needed. Your fuel drop off should refuel this line first. This way, as you progress you just need to change what’s in “fuel pickup” and all your trains will (eventually) use your new fuel.

    • Have a* refueling area where all your trains are refueled. Think of having 5-10 (as many as you need) stations in parallel, all canned exactly the same (i.e “Refuel”) *These stations might become a traffic bottleneck so you might want to have a few returning areas scattered around. For automatic schedule you can use a few seconds of inactivity as a condition.

    • Have a parking area. Think of 10 stations all named exactly the same (i.e. “Parking”). These might also become a traffic bottleneck so you might want to have a few of these areas scattered around. Use no condition in the schedule, so trains won’t stop unless they have nowhere to go. It’s important to consider these areas, as you don’t want a train which can’t pickup anything blocking a refueling station.

    • Name every pickup station type exactly the same (i.e. 1-4 Iron Ore Pickup) Use amount of material in the station as a condition to set train limit (and not enable/disable station). You can use circuits to set exactly the number of trains you can serve but I usually don’t bother. If you can request 3 trains, you need to make sure that there’s space to park 2 trains by the station where they won’t interrupt traffic. I did it simpler to just have multiple pickup stations in parallel and depending on waiting material request 1 or 0 trains. As multiple trains would be waiting anyway, I prefer them being loaded. This might not be the most efficient way but I think it’s simpler. For the scheduler you’d use full cargo OR Time passed. If a couple of minutes have gone by, have the train depart and not wait anymore.

    • Name every drop of station exactly the same (following the iron ore example, 1-4 Iron Ore Drop Off) As schedule conditions you’d use Empty Cargo OR Time passed. If a couple minutes go by, have the train depart and not wait anymore. You’d use circuits to keep requesting trains until the station has stopped as many material as you want. Keep in mind that if you request more than one train, you’ll need space for the remaining trains to wait without interrupting traffic.

    Your train schedule should look like (adjust times add needed):

    • Refuel: Inactivity > 5 sec
    • Parking: No conditions
    • 1-4 Resource Pickup: Full Cargo OR Time Passed > 60
    • 1-4 Resource Drop Off: Empty Cargo OR Time passed > 60

    You can repeat parking, pickup, drop off a few times to minimize refueling (be careful not to do this too many times so your trains spend all their fuel before refueling) If you do, remember that after drop off you should always go to parking.

    Once you have the schedule set up for a train, you can copy it with shift+right click and paste with shift+left click.

    Finally, it’s important to use train limit instead of enable / disable.

    Using the former, over a train has departed, if the station changes and requests 0 trains, the train will keep going.

    If you use disable, if a train departs and the station becomes disabled, the train will stop in the middle of nowhere, potentially causing a gridlock.

    PS: I usually name my stations with the type of train, so if later I decide to bring ore from an outpost far away, I can make a few exchanging hubs with 3-8, 4-16, … bringing materials and 1-4 distributing then around the base

    • Tangerine@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      This was very in-depth, thanks a lot!

      If I am reading this correctly, the parking area is only to serve as a buffer for trains that have nowhere to go, right? For example, if there are no stations that have enough resources for a train to pickup, the train will be forced to wait at parking. This is one of the problems that I had been running into with my old system, and this will definitely solve it.

      And yes, I had been using train limits instead of enable/disable. I especially like your idea of

      If you can request 3 trains, you need to make sure that there’s space to park 2 trains by the station where they won’t interrupt traffic. I did it simpler to just have multiple pickup stations in parallel and depending on waiting material request 1 or 0 trains.

      Also, I will be sure to include the train type in my stations, i can see this being very useful if I want to scale up in the future!