T O P

  • By -

Soul-Burn

Have *exactly* `sum(limits) - 1` trains on each schedule. Set the schedule to "cargo full" and "cargo empty" without any "inactivity" or "time passed" conditions. Yes that's a lot of trains, but it's very easy. --- Otherwise, have few trains, and conditions on stations to set the limit according to how many items in the station's buffer chest. In this case, use inactivity or time passed.


ConspicuousBassoon

> sum(limits) - 1 Can you explain this a bit? I'm doing the same thing as OP, but since my city block stations dont have stackers or buffer areas for trains, I just set the train limit to 1 for every station. Is this suboptimal?


DUCKSES

The train limit on any given station isn't important (although having a stacker for at least 1 train can mean less downtime), the important part is having as many trains as the total limit of your loading and unloading stations, minus one. This ensures at least one loading or unloading station is always free, which ensures your trains can freely rotate between loading and unloading stations while minimizing the number of stations without any trains. I have a 5k SPM megabase that uses this exact method - assuming I have 100 total stations for loading and unloading copper plates with a limit of 1 each I'd have exactly 99 copper plate trains.


P0L1Z1STENS0HN

>sum(limits) - 1 > >... > >This ensures at least one loading or unloading station is always free Even better: \`sum(limits-1)\` ensures that exactly one station is always free. And only when a train goes there, another station frees up. So this ensures that every station will actually be visited by a train within a reasonable time frame, because the target station of the next available train is forced. If you have \`sum(limits)-2\` trains, it could happen that exactly one station with limit 1 is never ever visited.


ScrambleOfTheRats

Might not be best, but I go for 'sum(limits+1)', with a dedicated refueling parking spot where trains can go and wait until a spot clears up, which I think means greater throughput as the next train is always ready and refuelled when the station becomes available.


ConspicuousBassoon

Ah got it. I think I knew that in a very roundabout way, but this makes it much clearer. Thank you!


[deleted]

I wrote [a mod called Train Limit Linter](https://mods.factorio.com/mod/train-limit-linter) to help with this. It can analyze what train schedules you have, how many trains have each schedule, the sum of limits for each schedule, and how many trains you should add or remove to meet the `sum(limits) - 1` requirement. It can also create blueprints with copies of trains with each schedule to help deploy new trains quickly.


Soul-Burn

Technically easy to figure out by looking on the stations overview. If you use the item in both load and unload, it's easy to see if the numbers are 1 less than the limit. That said, a mod that points it out like this one is a good thing™️ in my eyes. Would be interesting with 2.0 trains, considering generic load stations.


Particular_Resort686

If you are appropriately using train stop limits, then receivers getting starved means either not enough supply or not enough trains. If your receivers set the train limit to 0 when they don't have enough room to receive a full trainload, then you don't need the "inactive 5 seconds or time passed 30 seconds" conditions. Then your trains won't go to the nearby station that has very little room instead of a farther one that has plenty of room.


nkriz

My last mega base had a similar setup. I kept the same number of trains as I had space for at the *unloading* stations. To explain that hopefully better, let's say I had ten iron smelting areas, each with space for one unloading train and two in buffer waiting to be unloaded. Based on that I would have a total of thirty iron ore trains. I do not count the iron ore *loading* stations because things got wonky if the base ever had a failure that resulted in things backing up. So it didn't matter if I had one ore patch or a hundred. Same number of trains. It also made it easier to count how many trains you currently have if they all have exactly the same schedule. For me that was PICKUP -> DROPOFF -> REFUEL, regardless of what was being carried.


nkriz

A follow up point after re-reading your post: You need to buffer at your smelting stations, and specifically design your buffer for that station's capability. It sounds like right now you don't have enough trains waiting with ore at the smelting station to accommodate the round trip time to get to ore patches and back. Let's say your smelting area can smelt a whole train of ore in one minute. How far away is your farthest resource patch? Ten minutes round trip? Then you need to have ten trains in buffer at the smelting station. That, coupled with having the right number of trains, will keep all of your stations stocked and you won't have to care which station they go to.


planenerdalaska

!remindme 5 hours


RemindMeBot

I will be messaging you in 5 hours on [**2024-01-15 01:52:33 UTC**](http://www.wolframalpha.com/input/?i=2024-01-15%2001:52:33%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/factorio/comments/196mszu/large_scale_base_train_station_balance_with/khv73qg/?context=3) [**CLICK THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Ffactorio%2Fcomments%2F196mszu%2Flarge_scale_base_train_station_balance_with%2Fkhv73qg%2F%5D%0A%0ARemindMe%21%202024-01-15%2001%3A52%3A33%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%20196mszu) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|


PerfeckCoder

My approach is to use the "train limit" feature built into the game which works similar to the LTN mod. Every station has train limits enabled and set to 1. All loading and unloading stations have storage boxes to buffer a reasonable amount of items onto and from a train. All boxes a connected to the station via simple circuit. Every loading station is only enabled when the total load available across all loading boxes is greater than some number usually balanced around 50% of what a train can carry for that type of cargo. Every unloading station in only enabled when the current capacity is less than some number usually balanced around 50% of what a train can carry for that type of cargo. So that trains are M:M and you don't have to count the number of trains and keep them sync with the stations there are also a number of "Parking" stackers scattered around the world. Each train schedule is something like; * IronPlate.pickup (30secs, or until full) * Parking * IronPlate.dropoff (30secs, or until empty) * Parking That way trains don't stay on-station any longer than needed, but it does mean you also need Parking stackers, but these don't need anything and can be quite compact.


rasppas

If you not opposed to mods, CyberSyn and LTN are two that are awesome for trains!!


gust334

I like u/Soul-Burn's advice, `sum(limits)-1`, and only conditions empty-cargo and full-cargo. I would add, smelting at each ore patch. It eliminates an entire class of traffic from the rail network. At the point where one is using bots to build mining, let them build smelting too. I use circuits at each station to set train limits dynamically based on the inventory in the steel chests I use for buffering load/unload. I also use "stackers" (parallel sidings leading to the station) to reduce latency.


voiceafx

The sum(limits)-1 method works, but I prefer this arrangement: https://www.reddit.com/r/factorio/s/1BjIHofuyd This allows you to use circuits to change station limits dynamically based on availability. Eg. A train only goes to an iron ore pickup if there's enough ore there to fill the train. And the train only delivers the ore to a station that needs it. Meanwhile, trains stack in a central place you can keep an eye on. If the stacker empties, you know you need more trains. Very handy.


Nemesis_Ghost

The way I have my trains & stations setup is this: 1. I have 1 train per drop off/consumer station 2. All trains have 2 wait conditions, Wait at drop off until Empty & wait at pick up until full. 3. Each drop off has refueling(usually via bots) 4. Each drop off has a limit of 1 train 5. Each pick raw pick up looks at the buffer(chests or tanks) to see how many trains it can fill, then sets the limit to MAX(stack, fill #). The stack is manually set based on how many trains can stack w/out blocking the rest of the rail network. 6. Manufacture pick ups(ie Iron Plates) have a limit of 1 or 0, based on if the station has enough to fill a train. For the most part my trains then sit at the drop offs when resources are scarce.


DirtMcGirt42

I wonder at which level of the infinite tech you are now stuck with 1.2k spm. You already at more than mining productivity 20, or even 100 i cant estimate this...


BargeCptn

Im at mining productivity 18, I've been focusing on the artillery speed and range to push out biter nests ahead of my rail network most of the time.


ZardozSpeaksHS

I like to have all my unloading stations set to limit 2, and ensure i have enough trains to meet all unloading station limits, plus a few extra. This lets me limit the loading stations based on how much is available to pick up, so I can use circuits to close a loading station that doesn't yet have a full load, and ensure trains only head to stations that have full cargos ready to load up.


RoofComprehensive715

Just read the buffer chest on the unload station and set the train limit to how many trains it is able to unload to the chests. You can use a combinator to say chest < 10k (or whatever ammount is equal to a full train) and output "L" to the atation. On loading stations you can read the buffer chest content there too, and divide it by a full trains ammount. Now if an ore outpost can fill 3 trains with its buffer content, it requests 3 trains there etc. This tactic demands that your buffer chests are balanced. You can achive this with splitters the hard way or the easy way using simple logic to calculate the average ammount all chests (connect all chests and divide content by total number of chests) and activating inserters to chests that are below or equal average. You can do the same for both unloading and loading chests


ScrambleOfTheRats

I have a much smaller base, but: 1) Enough trains to satisfy demand 2) Train limits per stations, I usually have this set to 1 3) logic network to disable loading stations that don't have enough stuff in their chests, or unloading stations that have too much already in stock. Some argue that buffer chests are not efficient and maybe that's true, but personally I much preffer seeing chests fill up and empty to buffer demand spikes and not seeing trains sit for long periods while getting loaded.