Factorio

Factorio

Ver estadísticas:
pat 5 OCT 2023 a las 3:54
Is there a smarter "inactivity" condition?
Once the game starts really getting busy and I need optimum train throughput, I often run into the same problem. A station that was once extremely busy (and may be again) is getting bogged down with lines of trains waiting to get through, because the need for a product has temporarily died down to a trickle.

I have the schedule at that station set to:
Empty cargo
OR
15 seconds passed
OR
2 seconds inactivity

But one of the chests that the train is emptying into is very slowly being emptied. This means that the "inactivity" condition is never met and the train is going to sit there for the entire 15 seconds while one item per second is offloaded.

I'd love to have some sort of condition where if activity falls below a certain threshold, the train moves on. Or possibly if the item count in my bank of chests reaches a certain level. Is there anything vaguely like this, or some other method that would work?

With all due respect, if your advice is simply "design your train network better", please assume that you've already offered that. I'm just looking for an answer to that specific question. Thanks.
< >
Mostrando 31-45 de 45 comentarios
PunCrathod 6 OCT 2023 a las 3:49 
Publicado originalmente por pat:
Publicado originalmente por knighttemplar1960:
I'm going a bit different direction with this one. If train traffic is a problem why set to anything other than empty cargo?

The problem is that demand fluctuates. I'll have a green circuit factory that wants copper wire. It can't get copper wire fast enough, so I have to build a copper wire factory WAY over there where there's a decent copper ore outcropping. It takes a while for the trains to bring the wire all that distance, so I assign a lot of trains. At some point, for whatever reason, the need for green circuits evaporates, and if the only condition is "empty cargo", all those trains are going to start backing up.

And I'm sure there are those that will have other solutions, but sometimes it's good to get a specific question answered.

I could ask for a really good enchilada sauce and someone replies that I should make nachos instead because they're better. Well that may very well be true, and I'll definitely make nachos at some point, but I still feel my life would be more complete if I knew how to make enchilada sauce.
I do not know how I missed this post before.... But anyway +1 for setting train limits. The train limit feature was made to solve exactly this problem. Set the leave condition to empty cargo and set train limit to whatever amount of trains can wait in the station without blocking other traffic. You do not need any circuits. Just left click the train station and there will be a box for train limit. Of course if you want it to be smarter then use combinators to calculate how many trains worth of stuff can fit into the boxes on the train station and set the train limit of the station based on that.
Publicado originalmente por PunCrathod:
I do not know how I missed this post before.... But anyway +1 for setting train limits. The train limit feature was made to solve exactly this problem. Set the leave condition to empty cargo and set train limit to whatever amount of trains can wait in the station without blocking other traffic. You do not need any circuits. Just left click the train station and there will be a box for train limit. Of course if you want it to be smarter then use combinators to calculate how many trains worth of stuff can fit into the boxes on the train station and set the train limit of the station based on that.
Train limit circuit control is necessary for when you have several stations that produce the same product, e. g. iron ore/plates. If you don't have as much trains as is the sum of all ore station limits, trains will just go to the closest non-occupied ore patch station and wait there to be filled, while your other stations would be full and idling. If that is not the case, then yeah, just set the limit.
Última edición por Нагризолич; 6 OCT 2023 a las 5:08
knighttemplar1960 6 OCT 2023 a las 5:52 
Publicado originalmente por Нагризолич:
Publicado originalmente por PunCrathod:
I do not know how I missed this post before.... But anyway +1 for setting train limits. The train limit feature was made to solve exactly this problem. Set the leave condition to empty cargo and set train limit to whatever amount of trains can wait in the station without blocking other traffic. You do not need any circuits. Just left click the train station and there will be a box for train limit. Of course if you want it to be smarter then use combinators to calculate how many trains worth of stuff can fit into the boxes on the train station and set the train limit of the station based on that.
Train limit circuit control is necessary for when you have several stations that produce the same product, e. g. iron ore/plates. If you don't have as much trains as is the sum of all ore station limits, trains will just go to the closest non-occupied ore patch station and wait there to be filled, while your other stations would be full and idling. If that is not the case, then yeah, just set the limit.
Not quite true. The game calculates all the penalties for all eligible trains and assigns the one with the lowest penalties. You could use the circuit network to temporarily increase penalties for the nearest station by turning some of the train signals near the closest loading station red if you want to make sure that one of the farther trains gets assigned. Not really useful but can be done if you want an unusual set up.
pat 6 OCT 2023 a las 8:14 
I just wanted to officially post a big THANKYOUTHANKYOUTHANKYOU to everyone that has contributed to all of the answers to my questions. It'll take a while for me to assimilate it all and update my methods, but I do appreciate all of your suggestions.
Última edición por pat; 6 OCT 2023 a las 8:14
SiEgE 6 OCT 2023 a las 8:49 
Publicado originalmente por pat:
Once the game starts really getting busy and I need optimum train throughput, I often run into the same problem. A station that was once extremely busy (and may be again) is getting bogged down with lines of trains waiting to get through, because the need for a product has temporarily died down to a trickle.

I have the schedule at that station set to:
Empty cargo
OR
15 seconds passed
OR
2 seconds inactivity

But one of the chests that the train is emptying into is very slowly being emptied. This means that the "inactivity" condition is never met and the train is going to sit there for the entire 15 seconds while one item per second is offloaded.

I'd love to have some sort of condition where if activity falls below a certain threshold, the train moves on. Or possibly if the item count in my bank of chests reaches a certain level. Is there anything vaguely like this, or some other method that would work?

With all due respect, if your advice is simply "design your train network better", please assume that you've already offered that. I'm just looking for an answer to that specific question. Thanks.
You can make it that the "slowly being emptied" process is prevented, unless big requirement is met(for example, by looking at belts/chests if they are full of the required resources).
Though, I'd just make several train inputs and merge their output through belts. I have 6+7 stations that serve iron trains. It can serve all 13 trains at the same time, letting all of them enter or leave at any point. It should be a prefered way, unless your trains are multi-resource.
Última edición por SiEgE; 6 OCT 2023 a las 8:57
knighttemplar1960 6 OCT 2023 a las 12:37 
Publicado originalmente por pat:
I just wanted to officially post a big THANKYOUTHANKYOUTHANKYOU to everyone that has contributed to all of the answers to my questions. It'll take a while for me to assimilate it all and update my methods, but I do appreciate all of your suggestions.

If you are considering updating your methods, can I offer one more bit of advice that has not yet been mentioned that can help reduce train traffic?

That would be direct insertion and/or local production of items that expand. Copper wire and low density structures expand. What I mean by that is any item that takes more space to store than the base materials required, should be produced on site from the base materials.

1 copper plate turns into 2 copper wires in an assembler. The stack size of copper plates is 100 and the stack size of copper wires is 200 BUT a single belt tile only holds 8 of either item. With this in mind feeding copper plate directly into an assembler that feeds the copper wire directly into another assembler instead of putting it on a belt saves space and increases potential through put. This is why an early green circuit set up looks like this:
https://steamcommunity.com/sharedfiles/filedetails/?id=2857616441
It takes 3 copper wires and 1 iron plate to produce 1 green circuit or 3 copper wire machines per 2 green circuit machines. Direct insertion reduces the number of belts and inserters required since 1 belt of copper plates turns into 2 belts of copper wire. Direct insertion can save potential lag late game when your factory gets huge.

Producing locally also has some advantages over moving products that expand. A cargo wagon holds 400 copper plates, it also holds 800 copper wires which uses the same amount of copper, BUT loading and unloading copper wire takes twice as long as unloading the copper plate and then producing the wire on site. Producing locally increases your throughput.

I make dedicated green circuit subfactories and transport green circuits to where they are needed by train. Copper plate, iron plate, and green circuits all have a stack size of 100 but a green circuit uses 1 iron plate and 1 1/2 copper plates. Compressing the iron and copper plate into circuits reduces the cargo spaces required and speeds up through put at the destination.

It becomes even more efficient when you use speed beacons and productivity modules. It expands both the amount of wire and then again the amount of green circuits. The energy cost per green circuit is actually less than the energy cost per green circuit without beacons and modules and the amount of copper and iron plate used gets closer to 1:1. This is what one of my green circuit subfactories looks like.
https://steamcommunity.com/sharedfiles/filedetails/?id=3046737817
https://steamcommunity.com/sharedfiles/filedetails/?id=3046737856
https://steamcommunity.com/sharedfiles/filedetails/?id=3046737912
Each bank of machines produces 44 green circuits per second which doesn't quite completely fill a blue belt but adding 2 extra assmeblers isn't worth it just to get 1 more green circuit per second.

Edit Green circuits have a stack size of 200. I was messing around with blue circuits before I posted and spaced the stack size on green circuits.
Última edición por knighttemplar1960; 6 OCT 2023 a las 16:03
pat 7 OCT 2023 a las 3:11 
Publicado originalmente por knighttemplar1960:
Copper wire and low density structures expand. What I mean by that is any item that takes more space to store than the base materials required, should be produced on site from the base materials.

It's a testament to my sloppy methods that I didn't even realize that. I thought I was being so clever having the miners, smelters and copper wire assemblers all remotely located.

Now I've got to completely redesign my green circuit factory.

Good. Something new to do.
knighttemplar1960 7 OCT 2023 a las 6:40 
Publicado originalmente por pat:
Publicado originalmente por knighttemplar1960:
Copper wire and low density structures expand. What I mean by that is any item that takes more space to store than the base materials required, should be produced on site from the base materials.

It's a testament to my sloppy methods that I didn't even realize that. I thought I was being so clever having the miners, smelters and copper wire assemblers all remotely located.

Now I've got to completely redesign my green circuit factory.

Good. Something new to do.
No worries its easy to miss something with all there is in game to optimize and keep track of. I still learn new things from time to time especially hanging out here on the forums. Have fun optimizing. I'm going to get back to tweaking my yellow science sub factory.
Khagan 7 OCT 2023 a las 20:16 
Publicado originalmente por knighttemplar1960:
Copper wire and low density structures expand.

Copper wire does, certainly. But it takes 2.7 stacks of ingredients to make 1 stack of low-density structures; even with maximum productivity that's 2.7 to make 1.4.
knighttemplar1960 8 OCT 2023 a las 0:58 
Publicado originalmente por Khagan:
Publicado originalmente por knighttemplar1960:
Copper wire and low density structures expand.

Copper wire does, certainly. But it takes 2.7 stacks of ingredients to make 1 stack of low-density structures; even with maximum productivity that's 2.7 to make 1.4.
True. I had a brain fart on that one. The problem I was having was starting and stopping with my LDS trains. It takes twice the time to pull into and out of the station than it does to unload so my buffer is empty more often than full. I was thinking that 3 unloading stations 1 each for copper, steel, and plastic would speed up my though put since I would be using .9 raw material trains on average for every 1 LDS train.

I just now had a, well duh, moment. I can triple the number of LDS sub factories I use and use the 3 unloading stations all for LDS instead of one each for raw materials. That should let me keep 1 blue belt full of LDS going in which will let me have 1 full blue belt of yellow science coming out. Thanks for helping me clear the cob webs out of my brain. :steamhappy:
Publicado originalmente por knighttemplar1960:
Not quite true. The game calculates all the penalties for all eligible trains and assigns the one with the lowest penalties. You could use the circuit network to temporarily increase penalties for the nearest station by turning some of the train signals near the closest loading station red if you want to make sure that one of the farther trains gets assigned. Not really useful but can be done if you want an unusual set up.
Wow, I though it just doubles the price for pathfinding if a segment is occupied, but it's more complicated than that. Good to know.
knighttemplar1960 8 OCT 2023 a las 11:45 
Publicado originalmente por Нагризолич:
Publicado originalmente por knighttemplar1960:
Not quite true. The game calculates all the penalties for all eligible trains and assigns the one with the lowest penalties. You could use the circuit network to temporarily increase penalties for the nearest station by turning some of the train signals near the closest loading station red if you want to make sure that one of the farther trains gets assigned. Not really useful but can be done if you want an unusual set up.
Wow, I though it just doubles the price for pathfinding if a segment is occupied, but it's more complicated than that. Good to know.
Yeah if you want to actually figure it out the wiki lists all the penalties and when trains can repath.
https://wiki.factorio.com/Railway/Train_path_finding
budisourdog 9 OCT 2023 a las 16:39 
I know I'm adding to an already extensive thread now but I simply use a minimum time passed AND cargo XYZ>Threshold: this avoids the problem of inactivity resetting if say 1 idk nuclear fuel cell is being pulled every 14 seconds
Zaflis 10 OCT 2023 a las 1:12 
So my train schedules are just for unloading "If empty" and for loading "If full". Set train limit to station + queue/stacker slots available. If it's a stacker that leads to several stations then train limit = 2.

Not really need for circuit control as long as you make enough train count to same as unloading stations and their waiting slots.

Basically the goal is that trains will spend most time waiting at the unloading stations. And because that happens, you can refuel them in enough time without worrying about them not getting full fuel capacity. It will take at least 15-30 seconds for full cargo to empty and that's on very busy stations. Pre-megabase you may be looking at at least a minute unloadings. If there are also couple trains in the loading stations with full cargo and throwing errors on "Destination full", that is also a good and ideal situation to be in, as long as there is also space to park behind that loaded train.

So when 1 train has finished unloading it will leave to get refilled. That opens up 1 spot and that train that had been waiting at loading will come to fill it.
Última edición por Zaflis; 10 OCT 2023 a las 1:18
RiO 10 OCT 2023 a las 10:36 
Publicado originalmente por malogoss:
That would solve your problem.
No, that would just mitigate the existing problem by adding something on top of it that ultimately creates more problems.

To actually solve this problem, you need to recognize three cardinal axioms of proper train system design:

  1. All loading and unloading needs equal draw from and equal push to each set of buffer chests in front of each wagon that composes your train.
  2. Trains go from fully emptied to fully loaded; and go from fully loaded to fully emptied. No exceptions.
  3. Stations only call as many trains as they can load or unload fully.


Última edición por RiO; 10 OCT 2023 a las 10:41
< >
Mostrando 31-45 de 45 comentarios
Por página: 1530 50

Publicado el: 5 OCT 2023 a las 3:54
Mensajes: 45