ADVANCED TRAIN SYSTEMS; Deadlocks, Depots & Train Limits | Factorio Master Class

  Рет қаралды 126,460

Nilaus

Nilaus

Күн бұрын

Пікірлер: 159
@jbf81tb
@jbf81tb 3 жыл бұрын
Great design lesson at the end: "Solving anything that's not the bottleneck won't actually help. You always have to solve the bottleneck first."
@photinodecay
@photinodecay 3 жыл бұрын
There's also a more nuanced version called Amdahl's law if you want to see exactly how much time you'd be wasting by not focusing on the bottleneck. (Or if you have no choice but to fix things that aren't the bottleneck.)
@eveei
@eveei 2 жыл бұрын
U see this in simple cities skylines saves where traffic is disastrous because they build around the problem instead of actually fixing the problem
@Miglow
@Miglow Жыл бұрын
@@eveei sadly, that sounds like real life city planning
@eveei
@eveei Жыл бұрын
@@Miglow so true, and ive seen it traveling around u.s
@vappyreon1176
@vappyreon1176 6 ай бұрын
​@@eveeione more lane bro
@anthonygadd8188
@anthonygadd8188 3 жыл бұрын
Really elegant explanation! 1. If science dips below standard, check labs. 2. Pinpoint the empty lab science input/s, (probably Purple!). 3. Then check that sciences input (probably Steel!). 4. Then check Steel production input, (Iron Plates or raw Ore!). 5. Then increase Steel builds, increase Iron Plate builds, or increase Iron Mining builds! Your base is designed in such a way that its really easy to pinpoint a bottleneck, even without a dashboard! Great stuff as always!
@svendinsvinderlin4569
@svendinsvinderlin4569 4 ай бұрын
Let's be real checking if it's steel is just a formality. You may as well just skip all those steps and double your steel production again and again and again.
@guru42101
@guru42101 3 жыл бұрын
Another fix for your configuration looks to be to have N suppliers, M consumers, and max(M, N) - 1 trains. That way there is always at least one open space. However you are correct that either way you'd still need adequate resources. In my last megabase, I removed the in/out train buffer chests and instead directly loaded the trains. Each consumer had a demand of two trains with room for one waiting to unload. The number of trains I had was equal to the total consumers and waiting spaces. Outside of building my blocks to consume too much relative to the size of my trains, it worked mostly well. With your megabase design, and that you already have stackers. It seems like with your design this would work well, I think all of your consumers at most use half a belt per car, that should give plenty of time for the next train to move from the stacker to the stop and catch up.
@speedstyle.
@speedstyle. 5 ай бұрын
With N suppliers and N-1 trains, if 2 suppliers are closed, you can still deadlock. That isn't necessarily a lack of resources, your production may be backed up elsewhere, you just didn't fill up the nearest station in the 1 minute it takes to leave, unload and return. You should scale your trains to the number of trainloads per minute, not the number of stations. So for steel, where a station takes ~8 minutes to produce 1 trainload, you could easily use N/4 to N/3 trains. Up to N-2 will be fine in the long term as you overproduce into the buffers, but in the short term you have to 3-4x your demand to keep train slots open. Whereas with N/4 trains (depending on travel time between stations) you only need like 9/8ths overproduction ratio
@PoofyKittyPants
@PoofyKittyPants 3 жыл бұрын
Just so people don't get the wrong idea, the only reason "Only focus on the bottleneck" is a hard rule here is because it's literally a closed system. You don't have unknown externalities in a factorio train network, but real world logistic networks do.
@afterfallout1
@afterfallout1 3 жыл бұрын
There were actually 2 problems with your steel trains: 1. not enough supply (which you correctly identify) 2. dynamic limits changing meaning that trains can get stuck waiting for trains going somewhere else and thus not getting to stations that have available supply (4 trains at one steel block: 1 at station, 1 behind waiting, 2 behind that trying to get to the other station, effectively limiting your network to half the rate for steel trains; because this station is far away from everything and there are significantly closer steel stations, they get preferred first; eventually if the distance to stations is great enough, you can get trains at unload stations blinking destination full even though you have empty stations with supplies available) You can mitigate #2 somewhat by overbuilding supply, but you have to increase the ratio of supply to demand as the base continues to grow. You can also mitigate it by setting a limit on each loading station such that trains cannot block trains from access to other stations (with your steel design 1 train max at each loading station). However you also require enough additional supply within a given range such that there will be enough supply by the time the train gets to the station(in your steel condition the problem wouldn't happen with 1 train max; this will happen with your green chip stations if you make them far enough apart from each other and set the max number of trains to 3). You can get rid of the problem altogether by getting rid of dynamic limits and increasing the number of trains in the network such that there is only 1 empty slot in a given station pair limit sum. At this specific circumstance, if you ever have trains blinking "destination full" at an unload station, you do not have enough supply.
@dndbasement2370
@dndbasement2370 Жыл бұрын
his problem is not the dynamic limit... his problem is whern a train get stuck at the unload station.... but thats his point... if your train get stuck at an unload station, thats because you are missing ressources somewhere ! his point is.... with dynamic limit, trains shouldn't be stuck at unloading stations, they should always be stuck at loading station, which is fine.
@speedstyle.
@speedstyle. 5 ай бұрын
@@dndbasement2370 In this very video, he shows the trains deadlocked when there are multiple supply stations open and 1 request. You need to have more supply stations open than _trains_ as well as demand
@MirageGSM
@MirageGSM 3 жыл бұрын
I haven't commented on this before because I'm sure I don't understand trains nearly well enough to give helpful advice, but the option you mentioned towards the end - simply increasing the trains requested at the loading station - would have been my short term fix for the problem. Sure, it won't fix the underlying problem of "not enough steel in the system", but it will at least get the trains rolling again while you build more steel. I mean the stackers you have at every station basically *are* "waiting stations" just not centralized somewhere in the network but local and thus not causing any extra traffic.
@adfaklsdjf
@adfaklsdjf 3 жыл бұрын
The stations are requesting as many trains as they have resources for with his combinator logic.. so the way to get them to request more trains is for them to have more resources ready..
@MirageGSM
@MirageGSM 3 жыл бұрын
@@adfaklsdjf I understood that. But it takes 20-30 minutes to get more resources ready and only a few seconds to increase the limit, so that trains are not stalled at *all* the stations.
@Pystro
@Pystro 3 жыл бұрын
There is a way to modify your 3rd setup to get rid of the problem you have shown. This fix will make the system a bit more robust against the resulting deadlock, so it might be useful to some people. But as it doesn't solve the underlying issue, as you have explained at 16:03 in the video and summarized marvelously in the quote at 18:55. For the third example, you need to have the "actual station" (the one with the inserters lined up to the wagons) and the "pull-out station" entities immediately after another, such that a train in the pull-out station has its tail still inside the actual station area. (More specifically, either have such a short signal block for the pull-out station that a train of any length that could wait there will be GUARANTEED to stick out by at least 1 pixel into the actual station's signal block, or even have a single signal block for the actual station and the pull-out station. The latter has the advantage that it works with trains of any length.) Then the system will work as follows: As soon as the train has stepped forwards into the pull-out station, another train can RESERVE a path into the actual station (since it's not "being reserved" any more - and thus this setup is fixing the very cause of your problem). But that incoming train can not yet PULL INTO the actual station that it has reserved, since the signal block is still occupied. Only when the pull-out station is getting empty can the new train pull into the actual station, and that now GUARANTEES that it will be able to pathfind to the corresponding pull-out station - which eliminates the problem. The first downside is that a train in the pull-out station might not get called anywhere for a LOOONG time. This will be especially probable if you apply this setup to a loading station - and provide too much capacity for filling the trains according to your plan. But it can also happen if you apply this to unloading stations and run into a situation where you have more capacity for unloading trains than for loading them. In the latter case you'll be blocking a whole module of your factory from working until the underlying issue is fixed (or until the offending train is manually pulled out). This is why i'd suggest to only use this for loading stations. The second problem is that it can still deadlock, but it requires up to 50% more trains than the simple system, which actually makes this a slight advantage. Where the simple system deadlocks when there's a: trains in all open dropping stations and b: trains INSIDE all open loading stations (both meaning filled up to the current train limit with both a train trying to find a path and possibly trains in the stacker), this improved system will deadlock when there's a: trains in all open dropping stations and b: trains waiting in the stacker of all open loading stations (with their number equal to the current train limit) and c: trains inside the pull-out stations of ALL open loading stations. If I'm not making any mistake here, it WILL NOT deadlock until ALL loading stations with a train limit >0 have a train waiting in the pull-out station. Thus the "only" thing you gain is that you increase your capacity for waiting trains by the number of active loading stations. HOWEVER, this isn't the same type of increase as just adding 1 to the maximum train limit! The maximum train limit only takes effect when a station is basically overflowing with materials to load. Whereas even when the buffer boxes contain just over a single train load, a pull-out station can have a train inside of it. Or that train might have already left the pull-out station. But in a deadlock or near-deadlock situation, it'll be more probable to find the pull-out station full than empty. And it ALSO isn't the same as just adding 1 to the current train limit, which could call trains to near-depleted mines that won't have a full train load for hours (this system can only have a train in the pull-out station if it has "recently" filled up).
@haphazard1342
@haphazard1342 3 жыл бұрын
Your solution with the overlapping pull-out station design makes me wonder if there's some extremely clever way we could exploit this in combination with the train slot reservation system. Basically, to turn what Nilaus describes as a downside and a source of deadlocks (the fact that a train can occupy a station physically and one of its slot reservations, without actually being "at" that station) into a mechanism for pre-allocating trains more like the Logistic Train Network mod. I think this could be accomplished by chaining the pull-out station, or a simple block signal, to the state of the primary station. Or perhaps to the computed "occupancy" of the primary station, by using another rail signal to check whether the block containing the station is occupied, then subtracting that from the station's computed limit. I think that this could provide the missing third dimension to station signaling logic that is not possible with just the "loads available" and "loads wanted" counts that are sent to the circuit network on red and green. It would be a way for (demand/unload) stations to self-limit when supply is constrained, which they could determine by checking the pull-put station to see whether their just-unloaded train is able to be refilled.
@Pystro
@Pystro 3 жыл бұрын
@@haphazard1342 True, it would give you more data points about the system, notably the total number of trains ready to deliver their load and the number of trains ready to pick up a load. These will help differentiate the situations where stations are requesting 5 copper trains which are all already on the way and the situation where only some of those requests can be fulfilled by incoming train loads. I would NOT use this information only locally at the station, though. In Nilaus' block blueprint there are those 2 large power pole perimeters at 10 squares distance which could easily carry 2 separate sets of logic signals. Or would I use it locally... I'm thinking of that one farthest steel station. For that station it might be beneficial to limit the number of trains just idling there forever, but it also might be detrimental if the station's output is needed but there are ZERO trains available to be loaded. In general, if you want to avoid the deadlock in the "not enough supply" situation, you should open MORE train slots rather than closing them down.
@haphazard1342
@haphazard1342 3 жыл бұрын
@@Pystro The primary power network already carries train station capacity signals on both red and green, for monitoring at a central location. He put the number of loads available for a resource on the green line, and the number requested on the red line. The difference then drives a colored-light capacity display to indicate net loads for all resources. Individual request stations could use this data to self-limit when there is low availability. For example, if there is not enough of a resource, a request station could cap itself to 1 slot even though it might normally request 2. The problem is that the stations can't do this with only two signal wires, because their very act of reducing their reported demand would change the apparent "capacity" difference between the two signals for supply and demand. This would create a cyclic fluctuation. This could be solved for a single station or two with an SR latch to keep the requests constrained until more capacity comes online, but with more stations an SR latch would simply move the point at which the whole system spikes. Every station (of a given resource) would have to have a different reset point otherwise they would all surge at once. My idea is that this problem could be overcome by not using the difference between the supply/demand global signals, which are subject to cyclic fluctuations if they are used as input to modify station requests, but instead to detect supply capacity constraints by detecting trains in the pull-out station. Or by detecting trains that are stalled in demand stations. The fact that a train is stalled indicates that supply is limited since the train can't route to a supply station. So the demand station can use this information to set its request limit lower in an effort to "free up" trains that would be taking up secondary request slots in its pre-unload stacker, forcing them to route to other (further away) demand stations. This would undermine the use of the supply/demand global signals for showing capacity constraint, but the stations could also supply an additional signal (a unique symbol per resource) to indicate under-supply or "stuck trains". This approach would also need an SR latch to keep the constrained state once the stalled train pulls out of the station. It would also take at least one unloading cycle to clear the stuck train and free up any excess train reservations for that specific station. There are some limitations in the capabilities of the train system on the circuit network that make it impossible to implement full logistic trains in vanilla. We cannot read the reservations for a station, and we cannot set the train schedule from the circuit network. This means that balancing requests when there is not a surplus of supply requires some communication between the stations to coordinate which station gets the next available load.
@Pystro
@Pystro 3 жыл бұрын
@@haphazard1342 Okay, I just got the point that you can gather more diagnostic data. And on that topic I was making the point that the power network has the hardware to carry twice as many signals of each color (with 2 red wires and 2 green wires running parallel to each path). But I just realized that you'd need to re-organize ALL of that (the whole base plus all blueprints) so just using some unused other symbols might be easier. Now I think I got a clearer picture of what you want to achieve. You are right, there's a big problem here in that there's currently no good way to know for sure if the supply is actually keeping up with the demand. If you have 20 copper plate pickup slots of which only 5 are open and 6 copper plate drop slots of which 4 are open you have the same "1 surplus" sum that you get if you have 1 of 2 uranium ore pick up stations open and 0 of 1 Uranium ore drop stations. The first means it's not keeping up at all, while the second is perfectly fine. * The first way to reliably tell would be to have a large enough cumulative maximum train limit on the supply side. If your train limit on all copper plate pickup stations is 50 and your fluctuations are at most 10, then anything under 40 is a problem. (This is again very similar to Nilaus' strategy, except that his is about keeping excess throughput, while this is about excess stacker space.) * The second way to reliably detect a supply deficit would be to look for another diagnostic signal. On your strategy idea: "So the demand station can use this information to set its request limit lower in an effort to 'free up' trains that would be taking up secondary request slots [...]" That's just one problem. And limiting the demand (without going below requesting 1 train) would indeed solve this. BUT! The other problem is the deadlock. And that basically happens if there's too more trains available to go to stations than those can accept (with an added condition that it has to happen to both full and empty trains). Therefore you can only prevent that by opening up more slots (and it shouldn't actually matter if that's in stackers for full or empty trains). Which you probably have to do in any supply stackers because in the demand ones it cancels the fix for the train capacity problem. I.e. open up 1 more of the stacker slots even if the boxes only contain some fraction of a load so far (as they will fill up eventually). First thing to note: "[...] their very act of reducing their reported demand would change the apparent "capacity" difference between the two signals for supply and demand." You don't have to reduce what you report on the wires. Just place the subtracting arithmetic combinator right before the L signal goes into the station to sets its capacity - without affecting the L signal which gets translated into the copper plates or space science signal or whatever the station deals with.
@patdbus
@patdbus 2 жыл бұрын
i dont know if its posible, since im terible at circuits and advanced train stuff, but i feel like you should be able to add like an designated depot as in the second option. but then making it only accesible if and only if the system is in a deadlock case, so that when as in the first example they cant find the station they inmediatly route to the nearest depot, by opening a depot slot for that specific type of train. but then when the whole system is functioning properly again closing it. i suspect you can do this by effectifly making pullin stations (wich would then require you to close that pullin station when the loading isnt sufficient, instead of the loading station itself (or maybe both, this requires some testing)) and giving your depot stations the same name and alowing for only the amount of trains that wouldve gone to the by now closed stations. if this works like i think it does, then you shouldn have the problem of strange train routing and them taking extra long routes in normal operating conditions. you shouldnt be left with trains stuck in thier unloading stations, since when they cant get to thier loeding stations a depot spot should open up and also the trains currently at the closed loadingstations should be able to get toward thier depot slots after having unloaded, so as to not cause the same exact problem we came here to solve. only downsides this might cause is that it might break down if your trains have strange waiting conditions and it does double the amount of stations you need including a semi complicated circuit for every different resource youd like to aply this to
@asedeno
@asedeno 3 жыл бұрын
Love it. One thing I've started changing in my megabase is to make the on-site steel smelting sites have only one loading station, rather than two. It doesn't change how quickly steel is produced, but it makes loads appear one by one rather than two by two, so individual loads appear in half the time.
@Alaorath
@Alaorath 2 жыл бұрын
Move your "waiting station" to a "spur" (out of the loop, a dead-end)... wire a single pole to it, then enable "Read Train Count" and "Enable/Disable"... set the enable condition to C=0. This works because as a train paths to leave the unloading, it tries to go to the Waiting station, immediately disables it (by setting the C value if itself), and then paths to the loading station. The benefit of this is you only need ONE waiting station on the entire network.
@danielbuege1
@danielbuege1 2 жыл бұрын
Every time I think you've found a good solution you hit me with the "however." I'm not sure how much more I can take.
@asedeno
@asedeno 3 жыл бұрын
I'm still toying with train deadlock detection, but here's the start of an idea that may interest you: You've already pointed out that Read Stopped Train does not show the train that is trying to leave (T=0) but does show the loading train (T=1). That is half of the solution right there. All we need is a way to detect that there is still actually a train there. Place an additional rail signal behind the station such that it is red when there is a train at the station. This requires a small gap for whatever reason, so leave one space between the station and the new signal. Read that signal. (You could also use the signal at the rear end of the station, but that's a lot more wiring.) If RED (from signal) > T, then there is a train trying to leave (or actually leaving, but that's transient). Of course, more supply can't hurt.
@kernelstubbs
@kernelstubbs 3 жыл бұрын
Came to say this!
@_caracalla_
@_caracalla_ 3 жыл бұрын
this is so useful. thank you for this. i hope factorio developers add some sort of additions to the signal network where we can further influence the train pathfinding. train system becomes a headache when you have a large enough base.
@daggerball
@daggerball 3 жыл бұрын
The problem with this solution is that insufficient inbount is a situation that will occure from time to time unavoidably, and will produce a chain reaction. Being sure that throughput will not drop to zero as soon as it's not 100%, worth a bit of effort in my opinion. Also I genuinely don't understant why you need "smart" logic for your inbounds. Is there a difference whether train will wait for inbound is ready to provide full load, and than will load quickly, or just will stay on the inbound station to be steadily filled up. Without this circuitry such deadlock would never have happened in the first place.
@arielmoonsoo9219
@arielmoonsoo9219 3 жыл бұрын
I don't know how much this would help, but there are a couple minor tweaks that could be made to your 'standard' load and unload station to possibly make the train limit more accurate. On the unload side, simply read the current contents of the train and add that to the contents in storage when calculating the number of trainloads being requested. This will avoid situations where a train is allocated to an unload station, but the station no longer requires the load on the next train once the unloading of the current train is complete. In essence, you are instantaneously transferring the contents of the train to the storage chests, then letting reality catch up with the bookkeeping at the speed of the inserters. On the loading side, subtract 1 from the number of trains being requested if a train is currently being loaded (T>0) This should happen before the request count is capped. You may also wish to add the contents of the train to the contents in storage to help ensure a timely limit change. As with the unload station, this essentially performs an instantaneous transfer of inventory to the train, then lets reality catch up with the bookeeeping. Adding the contents of the train to the contents in storage when calculating the number of trains to request means that the request calculation is taking into account how much inventory will remain in the station once the train is full.
@dercooney
@dercooney 3 жыл бұрын
5:20 it's the 'no take off without a landing spot' rules from aviation. less efficient, but no risk of dangling boxcars
@MattersChris
@MattersChris 3 жыл бұрын
13:05 that's why you disable stacker together with loading station.....
@stefandemerov8423
@stefandemerov8423 3 жыл бұрын
I watch your videos (and play Factorio), because they teach so much about PROGRAMMING concepts. That point you made at 17:57 was mindblowingly out-of-the-box thinking, amazing!
@ScumdogMcGee
@ScumdogMcGee 3 жыл бұрын
Excellent explanation / lesson, as always. I've also found this to be the case when you optimize for simpler train routing (dispatch only empty/full trains), and the addition of train limits has been a boon for reducing thundering herd problems. However, I'm not sure this applies quite as well for other routing behaviors such as inactivity or clock time where you instead optimize around a more or less constant number of trains in transit. Your approach is definitely what I'd recommend to most players, since it's easier to grok and intentionally modular. Some folks like threads, others prefer coroutines; it would be nice to see someone with your knack for accessible explanation model the latter with trains.
@hannanashrafmughal9367
@hannanashrafmughal9367 3 жыл бұрын
Thanks for whole series so far.... Here's some projects list to consider 1....dedicated Sulphuric Acid Pump Block 2....Dedicated Sulphur block 3....Military Science 4....A complete Nuclear Processing facility[mining+processing+Kovarex+Nuclear Fuel] Again THANKS for the content...Really appreciate your work
@businessmonkey4726
@businessmonkey4726 Жыл бұрын
I was sitting here racking my brain about how to set things up to fix an oil train issue and the actual root cause it that I just don't have enough oil coming in.... Great video, I'll quit trying to put fancy bandaids on my broken leg now...
@rieos
@rieos 3 жыл бұрын
Your toy examples are really just looking at level 1 of the issue. The changing train limit numbers and a propagation delay from sloshing supply levels are what's getting you in the macro scale. Hope you see it when it happens
@Ramash440
@Ramash440 3 жыл бұрын
This video came in at the right time. I just started to expand my train network across multiple new stations with the same name and kind of wanted to copy whatever it is you did in your Megabase series.
@Pok-qq9lt
@Pok-qq9lt 3 жыл бұрын
i love the fact, that nilaus dont want adcise for a solved problem (in his mention) and just share his knowledge here for others. if u have study computer sience, these problems are not new. and sometimes u are just be able to solve a problem with more ressources (more input) rather than "build smarter" so i can fully understand the fact, that he is not willing to answer to such comments anymore - and its nice that he is taking time to explain these things even for not computer sientists who maybe not fully understand these aspects. ( i not claim fully understandment either... i only have a gasp of this =D ) Thank you nilaus.
@americankid7782
@americankid7782 3 жыл бұрын
Having some massive deposits and Waiting stations for overflow resources would be a cool idea for a base with large trains. It might not be efficient but if done right it would look really impressive.
@gariannobinger9933
@gariannobinger9933 3 жыл бұрын
I get the point of the video, always address the bottlenecks first. Great point and video. But also, in that first example's solution, keeping a perfect ratio of requesting stations, supply stations, and the optimal number of trains, its tedious and awkward to keep that 3-way relationship perfectly balanced to avoid the deadlocks. Especially in an ever-growing base where the supply and demand ratio isn't static. I prefer using better rail networks with more alternate pathways for getting places, with a few depots. Yes, its a little more congestion but not enough to make a difference if the depot placements are well planned and the rail network has enough alternate pathing.. I find it to be a much more hassle free experience than maintaining the perfect requester/provider/trains ratios.
@tricorius9653
@tricorius9653 3 жыл бұрын
4:05 - I really like this modification…and the logic feels sound. :)
@dndbasement2370
@dndbasement2370 Жыл бұрын
i was trying my time at amegabase with these designs... and i finally found out the problem you had with trains getting stuck. you only had part of the solution by saing to add more ressources by having more outposts... the reality is... your outpost reguardless of how big they are, cannot support your actual design plans. as an exemple... i took a 10 lane outpost with 140mil ressources... all of those drills, with speed modules will only get out 11k per minutes. you set the trains to be full at 16k, which is 8 wagons times 2k ressources... so basically your ore patches can get out an entire train only in about 1 minutes and about 20 seconds. trains takes no longer then about 20 seconds to reach destination and back. yet you keep on splitting your ressources onto two train systems... which means it takes two times more to fill in that 16k limit. in your current train system, there is no way your base can manage that fast... basically you expendaded your base too fast and ended up always missing ressources because none of the ressources were fast enough to fill out a train to begin with. thus trains gets the "destination full" which isn't a bug... you literally have no destination ready to deploy. thats why yougetthe destination full.... sure adding more ressources solve half that problem... but... you're adding to the problem by adding more trains as you still require only 1 train per outpost and even there the train can only be filled every 1 minute and a half or so... so whats the solution ?!! less wagons to fill, diminish the number of trains by diminishing how much they can fill up. i'd say in your megabase design... L-CCCC-L trains would be more efficient and the destination full problem would become much less visible. yes, my solution is to half your designs... things like circuits are fine... i mean as long as ressources gets in, those trains will fill up tight... but basic ressources... there is a limit at how much they can drill out of the ground and thus you cannot go beyond that limit. you have to follow it. so if you fill up 1 train of 16k ores in 1 minute and a half. by reducing train maximum load by half, then those trains should be filled up and ready to go in 45 seconds. 45 seconds is much better a time from ore to plates and back. by that time it should be ready. otherwise that train goes to plates then tell you destination full for like 45 seconds before it decided to go on again. so there you go, the deestination full problem is because your trains are going too fast for the drills to follow them.
@frankyanish4833
@frankyanish4833 2 жыл бұрын
Concerning the depot thing. Couldn’t you add an exit station with no conditions after every station stack? Since trains path to the closest open station doing that with no train limit set could prevent the freeze provided you aren’t critically over provisioning the network.
@viktort9490
@viktort9490 3 жыл бұрын
5:20 If the train would not be part of the station limit : Imagine this is a unloading station and you have a limit of 2 in each of such stations so you have a buffer train waiting just in back of the stations. Then if the train leaving but not able to go anywhere does not count, you would end up with 2 other trains in the back of the station. So a station could hold 3 trains despite you told it to hold 2 trains max, and I guess adapted your railway to have 1 buffer train bu the second one would block stuff. So At the end I think feature is a good one not a bad one.
@tricorius9653
@tricorius9653 3 жыл бұрын
This should t happen since it isn’t actually able to hold 3 trains. The train would only stop counting for the limit when it is fully unloaded (or otherwise told to “go”). In other words, the limit is still 2, and while the train is actively unloading, it’s counted in the limit. At the point it can move, it’s removed from the limit. This would now trigger another train to leave a loading station and head to this station. That action frees the loading station and the empty train is now allowed to go. The unload station is now at limit 2 again and will be so until the next train unloads and disappears from the train limit. The interesting part is that technically, a loaded train would also be “free” to move (just as an unloaded train would be) and would also disappear from the train limit. So, technically it would free up two “train limit” slots since there’s a train on each end ready to go to the next available station.
@viktort9490
@viktort9490 3 жыл бұрын
@@tricorius9653 In the specific example of Nilaus yes. I was in a more global point of view. If you change rules, you are not garanteed that for any train design, making the empty train which can't go anywhere not be part of the station would effectively free up a spot for that train to leave. So there should be some situation where an empty train would take a spot and cause bigger problems than the one Nilaus is facing.
@michaeldavis8549
@michaeldavis8549 3 жыл бұрын
It's funny that I was about to suggest the "solution" just as you showcased what the issue with it was. I completely agree that adding more stops is not a solution to the actual problem of supply shortage. Well done video.
@problemchild959
@problemchild959 Жыл бұрын
I know this is an older series, but I'm sure it still gets views, so gonna put this comment. I know a lot of people are going to think I'm wrong, and that's fine, but after 3,000 hours in factorio I have learned 1 thing. the issue with your deadlocks is NOT supply and demand. You should never ever put dynamic limits on your loading stations. if a loading station has a stacker that can hold 3 trains then that station should be hard limited to 3. it makes sure that all empty trains can sit at the loader even if there isn't enough supply to fill them and keeps them from getting stuck at the unload stations. had you designed your loading stations with hard limits instead of all that dynamic limit shenanigans, you would not have had this issue. I have never had this happen because I always set dynamic limits on the unloaders and hard limits on the loaders.
@heinz8233
@heinz8233 3 ай бұрын
So in your approach loading stations kinda double as depots, right? And how many trains would you build? As many as all the stacker capacity you have? Otherwise it could happen that a stacker "drains" all the trains from the network that are waiting for one station while others are full.
@problemchild959
@problemchild959 3 ай бұрын
@@heinz8233you seem to be missing my point. if you have 4 pickup stations and 8 trains and each pickup station has 1 side lanes (can safely handle 2 trains) then that station needs a HARD limit of 2. not a dynamic limit. if it gets a limit of 3 set, and cannot accommodate 3 trains, one train will be waiting on the main line causing a deadlock. that was the point.
@heinz8233
@heinz8233 3 ай бұрын
@@problemchild959 yes, I got that. My point is that if your pickup stations have a hard limit of 3, you *need* to build 3 trains for it, because if you build less trains than you have capacity, it could happen that the closest one "drains" all the trains from the system, and they all wait on it while other stations are actually full. It's not a big deal because trains are extremely cheap, but it's something to keep in mind that is not a problem for dynamic stations.
@problemchild959
@problemchild959 3 ай бұрын
@@heinz8233 if your building multiple pickup stations, one would typically also make enough trains to handle that load. the problem is when you have say 2 stations each able to handle 2 trains. if you have 4 and one is set to dynamic and sets a limit of 3 you get the same issue. 3 will be going to one instead of 2 each. thats why I said they should have hard limits and the exact amount of trains of such limits. if you have 2 mines and each can handle 2 trains, then you should have 4 trains with a hard limit of 2. otherwise you end up with a dead lock race condition if one allows more trains than it can physically handle
@problemchild959
@problemchild959 3 ай бұрын
@@heinz8233 your also seriously rehashing this after a year ? my entire point was 1: build the trains that there is enough to sit at the unloading stations. if you have 2 with stackers able to hold 2, then make the 4 and set each to a limit of 2. you will always have 2 at each whether it has the resources or not. having them idle at the loading station prevents deadlocks. I now have over 12,000 hours in this game and I stand by my original post. loading stations should ALWAYS have a hard limit on number of trains, and you build enough trains for that total limit. its better they sit idle at the loading station than end up waiting on a main line someplace blocking 100 other trains due to a dynamic limit situation. I have used this in Seablock, Pyanadons, and other packs. it works flawlessly. NEVER use dynamic limits on loading stations. unloading stations is fine
@erfarkrasnobay
@erfarkrasnobay Жыл бұрын
At 13:00-14:00 - you could make shortcut from waiting stations to other loaders. Your issue that waiters to loaders connected as 1 to 1 but use logic of many to many. You explain why you can't use logic 1 to 1, but not why you not use many-to-many connection of rails.
@КирилоХацько
@КирилоХацько 3 жыл бұрын
this is example why i think you are best factorio youtuber
@johnturner7790
@johnturner7790 3 жыл бұрын
Add the following filling station logic: If: trains called = 0 AND requested trains > full trains Then: set train limit = 1 This pulls empty trains away from unloading stations, leads to the low inputs condition operating more smoothly, and makes it faster (for me anyway) to diagnose what is wrong with my delivery system.
@ratchet1freak
@ratchet1freak 3 жыл бұрын
I feel like there is a way to get the stacker station method to work using enough circuits by only enabling the unloading station when there is a train in the stacker waiting to depart. Not sure that all edge cases can be handled easily though... But yeah when you design your train system to rely on always having more supply stations open than request stations you should first make more supply stations when issues occur instead of patching what happens in the bad state.
@PhaeOne
@PhaeOne 3 жыл бұрын
Good video, been building the megabase with you (kind of), and also ran into this problem. But I also still have the old steel making modules active, so also had a shortage of iron-plate. Which was, ofcourse, because of the shortage of steel :). I was thinking about making a depot/waiting station, but thanks to this video I know to just up my input. And replace the old iron-plate -> steel builds. On another note, very frustrating to see 1322 views and only 171 likes.. It's not that hard people, just click the thumbs up!
@jsbrads1
@jsbrads1 16 күн бұрын
Looks like if you put another signal on the single track, you could increase the speed of track clearance and overall throughput.
@random6434
@random6434 3 жыл бұрын
Re: waiting stations on producers While, yes, it does spoil a full N-M system so it's not right for your megabase, honstly this doesn't seem like a completely unacceptable solution to me. For a specific resource, there are usually more places that consume a resource that produce it so you only need to add specific trains once at the end of setting up an outpost that produces that resource. Since when you scale up resource production, you probably want to scale up trains anyway so it seems reasonable.
@slimpwarrior
@slimpwarrior 3 жыл бұрын
Sad that we didn't get an episode, but it's good to finally get the debate out of the way
@melivriel3323
@melivriel3323 3 жыл бұрын
Liked anyway, dont need to finish watching. Trains always +1
@DFPercush
@DFPercush 3 жыл бұрын
That's not really a fair illustration of the "waiting" station technique. The tracks need to merge and branch, or cross over, between loading and waiting, so it's just like a stacker. But it does require a lot of extra space at each build, so it's probably not the best choice for your base at this point. Thanks for taking the time to explain your concerns to us back seat gamers. XD
@haphazard1342
@haphazard1342 3 жыл бұрын
That doesn't address the issue Nilaus described. Each station has to have a waiting station. Just because the two stations are adjacent here does not mean they will be in reality. In reality they are often very far apart. So there's no way to cross connect the waiting stations without sending the train back out onto the main network for an additional trip. Simply slaving the waiting station's limit to the primary station would prevent it from being accessed as a path and causing the mis-routing behavior that he complains about, but it's not really a complete solution to the problem.
@DFPercush
@DFPercush 3 жыл бұрын
@@haphazard1342 No, you don't send them back onto the main network, that's the whole point. Nobody's understanding me, or I'm doing a bad job explaining. I guess I'll have to make a video myself to get the point across. Later.
@nielagi5029
@nielagi5029 2 ай бұрын
​@@DFPercush How much longer do I have to wait for that video?
@Ekevoo
@Ekevoo 3 жыл бұрын
Thanks, that clarified a lot! I still think you have too many steel trains though. Considering the reservation mechanics, it seems like the ideal number of trains is the same as the smallest number of stations of the many-to-many route.
@kwinzman
@kwinzman 6 ай бұрын
Has anybody found a solution for this deadlock in the last 2 years besides always having oversupply so it doesn't occur? Apparently the heart of the problem is that a train that is already leaving the station is still blocking the station. Can sombody explain to me as Factorio noob why I can't fix that with signals? Or with some sort of buffer after the train leaves the station? Maybe signal network?
@michealvincent731
@michealvincent731 4 ай бұрын
Is this still relevant in 2024? we can set conditions to trains to wait for say 120seconds and then depart, in my eyes that fixes the issues but I may be missing something
@Hazmatt4700
@Hazmatt4700 3 жыл бұрын
I couldn't get the trains to use the stackers in each module. So I added a second stop in the space right before the networked stop. I set it to the number of trains the stacker can hold as the limit. This seems to only be a problem with the smelters as the rest of them rarely have enough throughput that I want to stack the trains. But it solved the problem I had with either not enough ore trains or too many showing up at each smelter.
@nostradonus5332
@nostradonus5332 3 жыл бұрын
This was extremely useful, thank you Nilaus!
@Mcraisins851
@Mcraisins851 3 жыл бұрын
My solution that works great for modded content (pyanodon/seablock) is never shut off supply stations. If you have 5 steel suppliers each with a train limit of 2, have 10 steel supply trains. Number of requestors don't matter in this context. Congestion isn't increased since, at worst, the added supply trains are waiting around and, at best, its just the first example of this video
@Br0ngier
@Br0ngier 2 жыл бұрын
The solution I'm using for many-to-many is to 'assign' a fixed number of trains to each and every unloading station. Unloading station limits are thus also fixed and if I increase them I will also add trains respectively (the stations have stackers ofcourse). Now there's always space for the trains in the unloading stations. If supply is low they'll just wait there. As an added benefit, it's relatively easy to count unloading stations/waiting-spots and if enough trains are in the network for it. If throughput becomes a problem at an unloading station, the limit and amount of trains can be increased (unless the stacker is saturated). Even though, too little supply still leaves trains stuck in the unloading station, while full trains might be waiting in the stacker.
@MinNJW2111
@MinNJW2111 2 жыл бұрын
don't use stations, just use signals. so you can fit your largest train behind you unloading train. so the moment the train is on loaded it goes to your miners/smelters or what not. if there is anther in the loading station than its sitting behind it with multiple lanes to hold multiple waiting trains.
@MinNJW2111
@MinNJW2111 2 жыл бұрын
dont have trains waiting on the same track with a trainstop that just made all your problems
@pgjuzek
@pgjuzek 3 жыл бұрын
I like your clear presentation. also, for future cases please include tldr at the start, the actual solution was covered in like 5s on 20 min vid and for a moment I thought I missed something :)
@Mylok_
@Mylok_ 2 жыл бұрын
Ooooooh I understand my mistake. Ockham's razor in action, thanks !
@lexfuturorum1536
@lexfuturorum1536 Жыл бұрын
Trains skip disabled stations, by dynamicly enabling/disabling depots you can control the amount of trains serving you network, if you want more info on that i can provide a blueprint. but as you mentioned in that video already it would be only a bandaid for a broken arm keeping your base going while you fix the underlying problem
@MaKaNufilms
@MaKaNufilms 3 жыл бұрын
What about connecting the signal from the loading station to the waiting station? Would it not be disabled as well?
@Secre.SwallowtailYT
@Secre.SwallowtailYT 2 ай бұрын
theres a simple trick to the train issue with megabases, dont make one massive megabases with a billion trains, make serveral smaller mega bases with less trains (these bases dont share anything) thats let you go freely till you hit your ups wall.
@photinodecay
@photinodecay 3 жыл бұрын
The trains on the track go round and round, round and round, round and round...
@SoshiroGames
@SoshiroGames 2 жыл бұрын
So: have atleast a number train requests at the SUPPLY stations EQUAL to trains that can use that type of supply station. This means that if you have 12 trains and 10 supply stations, you always make sure that over those 10 supply stations, there is a possibility to be filled with those 12 trains. Did that make sense?
@danielmills7972
@danielmills7972 3 жыл бұрын
I get your distrust of depots. My flip is that I'm using them as a refuel yard (instead of implementing a robot refuel system)
@tangamantony7681
@tangamantony7681 3 жыл бұрын
First time i will try "intelligent" Trains, not Hardcoded ones, in my Base ^^ Many thanks for the explanation ^^ (1146h Gametime in and this Video is my new reference for Train Networks XD)
@joaolucasd
@joaolucasd 3 жыл бұрын
I’m trying to learn about trains, but it’s quite complicated. One thing that I thought (a total noob thought) is to not use circuits on the loadings stations. Like: if I have a steel station with one block loading and two stackers - why don’t I just leave the train limit always on 3 and set the condition to be full before leaving? In this example, if I have 4 steel loading stations I need 12 trains and they all wait on loading stations. That being said, only the unloading stations will have trains requesters in it. What would be the problem here?
@nakoda1610
@nakoda1610 3 жыл бұрын
id say to have a train limiter of 2 if there is the space for waiting, or have a stacker, the problem there is that you could have a troughtput problem, altought unlikely but i learned alot here
@thomasini
@thomasini 2 жыл бұрын
I think a tutorial on how fluids/pipes/pumps work would be really helpful. I am having a hard time getting enough water to my nuclear plants. Would love a masterclass for that.
@Galardomond
@Galardomond 3 жыл бұрын
If I were to build one or two waiting station for every unloading station (nearby), then the waiting stations would not have the disadvantage of extra long routes, right? The new disadvantage of course would be a lot of more space need. Any other disadvantages?
@patdbus
@patdbus 2 жыл бұрын
unless the trains decide to be assholes and go to some random wainting station instead, wich could probably be resolved by proper base layout, making so the waiting station is somewhere in the supposed route anyway.
@zairev3438
@zairev3438 3 жыл бұрын
I havent read coments up to this episode, so maybe somebody already said that, but the main problem with your trains that i see is that you control them via overly complicated train limits. I have never personally encountered any of your train problems in my megabases, but i do things very differently and keep it simple. Basicly all my train stations are named either LOAD (material) or UNLOAD (material) - no exceptions. Each station read amount of material directly from boxes asigned to it without any aritmetic crap nearby, and theres simple condition: If amount is bigger or lower then certain amount, DISABLE or ENABLE whole station. Every LOAD station have exactly 2 trains asigned to it. No more, no less. Advantage of this is that when station is disabled, it cant be set as target for any train, so its impossible for idle train to get asigned to "full" station, and when its disabled while other train wait for it, the train just gtfo and set different targed instead of waiting for station to be "empty". Or at least this is my understanding, because as i said, i dont use all that complicated train limit stuff, and all trains flow flawlesly without me having to debug them for hours. The only disadvantage that i can see is maybe that i cant use dashborad same way that you do, but tbh, i rather wont have dashboard then having to spend so much time on trains as you do :)
@speedstyle.
@speedstyle. 5 ай бұрын
Using enable/disable causes a 'thundering herd' problem where multiple trains will path to a station that opens up, even though only one can unload. Also, disabling a station can cause trains to repath or even revert to manual mode en route, blocking other trains in the network. This is why they added train limits to the game, and they're actually replacing enable/disable in factorio 2.0 with internally just setting the train limit to 0. You don't have to use this much circuitry but it's not the root cause of any issues, and some of it is actually helpful as you scale up.
@thatpaulschofield
@thatpaulschofield Жыл бұрын
At 2:20, how are you enabling/disabling the stations? I don't seem to have a UI for that.
@speedstyle.
@speedstyle. 5 ай бұрын
The train limit (and lights) are set by a constant combinator which he's turning on and off.
@lordjames307
@lordjames307 3 жыл бұрын
Interesting video, though I do have a question. For a many to many train network, would it be possible to remedy the "empty train blocking a full train" problem by having one or two stations requesting empty trains, even if they can't be imidiately filled up?
@masterphillips
@masterphillips 3 жыл бұрын
The part about a train depot (number 2 I think?) answers your question. He looks at both an empty train depot solution and unloading waiting depot solution. Conclusion: stuff gets more messed up either way.
@iReady1234
@iReady1234 Жыл бұрын
Do you have any designs that allow for a double headed train? So its just one track, where a train goes directly into its unloading/loading station, and then immediately can get offonto the track again? The station would be directly perpendicular to the track but I don't know how to setup to signals for it
@horiabodeanu7641
@horiabodeanu7641 3 жыл бұрын
Precise like German engineering! Great video Nilaus
@jgrif7891
@jgrif7891 2 жыл бұрын
I just setup my stations to always request at least 1 train and leave enough room for a train that is waiting for the station to clear.
@yngndrw.
@yngndrw. 2 ай бұрын
Has the read-stopped-train when the destination is full issue been fixed in Space Age?
@lukebell4191
@lukebell4191 3 жыл бұрын
Couldn't you just remove the full train waiting station train limit? That seems like it would completely fix the issue you pointed out with that approach.
@WeldonGaming
@WeldonGaming 3 жыл бұрын
Excellent presentation.
@blizzardstr
@blizzardstr 2 жыл бұрын
Long story short: You must have 4 stations in a loop: Unloading, Out, Loading, In. Imagine you have an UNLOADING depot that has 4 stations for Iron. Each station has a demand of for example 5 trains. So we have 20 trains in a loop. Build an OUT depot right after UNLOADING depot, with a few stations, so that they have enough place to collect all the 20 trains (Ex: 2 station with a pocket for 10-trains length) in case if you run out of ore and trains have nowhere to go. Then your UNLOADING stations will be free. UNLOADING depot must be connected to the OUT depot in such a way, that a train can get from any UNLOADING station to any OUT station. In the situation I am describing you can just connect 4 UNL railways into one path, and then split it to each OUT station. You should build an IN depot with the same logic as OUT, right before the UNL depot. The connection must again allow "any-to-any" path. This will allow you to store all the trains bug-safely in the situation when you have enough ore but the UNL depot does not need it. You can save some space by making it with the capacity of "20 minus number_of_UNL_stations" trains, i.e. 20-4. The problem here is that each similar loop must have unique name for its IN, UNL and OUT stations. IN1, UNL1, OUT1 etc. In this case you will never have a situation when one UNL has 60 trains, the other has 0. Of course you can build two huge OUT and IN depots for all your UNL depots, set a dynamic demand, but it will increase traffic. I came to the conclusion that It is better to create more trains for a system, but every train must have its constant IN, UNL and OUT stations. It is better when they spend most of the time between these three stations than go and wait somwhere in the system. So instead one UNL depot you create a chane of 3 depot. In fact it won't increase space significantly, but will decrease traffic a lot. Every train travels frome "home" to the nearest LOADING station, and "passes freely without any delay or hinderance". ;) Have a nice train guys! ;)
@paulminarik1666
@paulminarik1666 3 жыл бұрын
Love the series you make and finished the base in a book and lets automate, starting into the megabase in a book and love it so far. Im a noob but I was wondering if a game change to help "minimize" these issues would be if the train would check every 30 seconds or so to see if theres a station available instead of locking to one like it does now. Idk, just thinking since it happens to me alot when i make new stations and its empty until it goes thru a cycle and then clears out. Love the videos, keep em coming.
@Ruhrpottpatriot
@Ruhrpottpatriot 3 жыл бұрын
The train->motorway analogy is a bit off. For trains adding a third rail to an existing two rail system won't give you any meaningful increase in capacity, but adding two will increase capacity by more than double. This has something to do with how the whole system works.
@TheFinagle
@TheFinagle 2 жыл бұрын
In scenario 1 trains should not be stuck in that deadlock permanently. Your stations that are blocked should become unblocked eventually as they would at some point have enough resources to open. Unless you have too many dead mines in which case you are way behind on opening new mining opportunities. I have taken to putting speakers on mine to alert to needing to relocate miners
@shmallacy
@shmallacy 3 жыл бұрын
@Nilaus, regarding your third example, can't you send a signal from waiting station back to loading station and use that signal in a schedule circuit condition, so the train only departs from loading station when waiting station in front is empty?
@Wovi10
@Wovi10 3 жыл бұрын
I said it before and will say it again, you could just set the train limit of the output train station manually (the place where you fill the trains). That way, the trains at input will always have a place to go.
@SpacePopeIII
@SpacePopeIII 3 жыл бұрын
I think the issue with this is, if you have multiple producers, the trains may go to the "wrong" one. Like one might have a load ready and another may not. If they're both open, the trains can go to the one that isn't ready and end up waiting much longer than needed
@colleeondonttry8230
@colleeondonttry8230 4 ай бұрын
@@SpacePopeIII Have you found a solution for this problem because I've come to see the same problem in my design as well
@OctEddie
@OctEddie 2 жыл бұрын
Could the supply stations be hard limited? Like iron supply #1 and has only 2 trains assigned to iron #1 to go to any requester? The same for iron #2 with only 2 trains to any iron requested station.
@reneschmid2321
@reneschmid2321 2 жыл бұрын
At First sry for my bad english 😅 and Thank you for yout nice Content. For the example with the waiting station with full Trains. Will it work and make sense when you make multiple waiting station in the same city Block and you blocked the loading Station with Circuit if all of them are Full?
@jamesgor13579
@jamesgor13579 3 жыл бұрын
I wonder if you could fix the trains going to the wrong waiting station by putting a chain signal in there. Doesn’t the chain signal normally cause the trains to reevaluate where they’re going? Either way I don’t think the waiting stations make sense.
@Jalae
@Jalae 2 жыл бұрын
it's not a bug, it's an opportunity to make a smarter network more satisfying.
@nicholaskeogh1121
@nicholaskeogh1121 2 жыл бұрын
can someone link me the video where nilaus sets up the many to many stations? i've built a few of his blueprints but cannot figure out how to have stations call a train when they are ready to load one.
@sirgaz8699
@sirgaz8699 3 жыл бұрын
Ok, preface this with I'm a new player, I currently have 1 train and 1 track. Would waiting stations work better with a stacker before and after and some circuit logic? Let us say double stack before, station, triple stack after. You do the dynamic train limit based on resources available but cap the limit at 3 (1 in station + 2 in the stacker before or 3 after) but then reduce the max train limit for every train sat in the waiting stacker, would that work? The station would close if all that station's waiting stackers are full so you'd never get a train going to a distant stacker. I think? Someone with more experience, would that work?
@bobberry4905
@bobberry4905 3 жыл бұрын
Hi Nilaus, Awesome series. Great explanation. Thank you. That go-around issue is really strange. Why wouldn't this happen at the demand station though? I think I've seen it... The demand station requests (say) two trains, they both turn up. One train gets there first and starts unloading, the other train waits in the demand station stacker. When the first train finishes unloading and pulls away, the second train paths *through* the demand station without stopping to another demand station requesting the same resource.
@CurtisDyer
@CurtisDyer 3 жыл бұрын
That doesn't seem like it would be an issue. Presumably, the first train unloading sets station to L = 0, so the next finds another available station outside the city block. I suppose if it keeps happening, you just need to adjust the constant combinator to request fewer trains.
@bobberry4905
@bobberry4905 3 жыл бұрын
Thanks Curtis, but I don't think it's this. in my example L = 2 to begin with, so the first train leaving would set L to = 1. On reflection it might be me... I added a signal half way down my unload station to minimise the gap between one train departing and another arriving. When the departing train was half-way out, the waiting train could start to move. That means the second train passes a chain signal before the first train leaves the station. The chain signal means the second train can repath. It looks ahead sees the station immediately ahead of it isn't yet empty and goes somewhere else. As I write this I'm convinced this is it. It turns out I'm a numpty and I've broken something. Who'd have thought?
@arielmoonsoo9219
@arielmoonsoo9219 3 жыл бұрын
I've tossed out a solution to the go-around issue with the 'standard' load/unload design Nilaus uses. Read the contents of the train and add that to the contents of the chests when calculating the number of trains to demand. For loading stations, you'll also need to subtract 1 from the number of trains being requested if a train is currently being loaded.
@AlexScotton-Illizian
@AlexScotton-Illizian 2 жыл бұрын
If you pass the "train waiting" signal from the waiting station to the loading station and then make the wait condition full & signal then does that solve the pathing?
@tylermcnally8232
@tylermcnally8232 3 жыл бұрын
Good stuff, thanks!
@DavidLindes
@DavidLindes 3 жыл бұрын
13:08 - this may be, but you could disable waiting stackers whose loading stations don't have a train on them already, with a pretty easy circuit from signals to station (enable station if green=0, probably?) Perhaps other pathing could still happen, I'm not sure, but it would reduce the chances, at least. (I think.) 18:35 - I now expect this comment to be ignored, and I'm ok with that. ;) Yay, hacking at the root of the problem!
@justananonymousperson7011
@justananonymousperson7011 3 жыл бұрын
what about designing the waiting station so that only one train can fit in it at any one time, does that fix the problem?
@Timmzy27
@Timmzy27 3 жыл бұрын
I like trains
@Dawnseeker_Ch
@Dawnseeker_Ch 3 жыл бұрын
Comment 1, i had an idea for how the train stations could be debugged, tho i havent submitted it and am curious if the solution is the same or not, so posting before i see and hopefully will either see it done or a different solution. Personally, if the issue is just that the train is still counted, why not just conditionally increase the train limit by one for a period of time. A for instance would be "if and only if L=1, +1L" (*2 also works). I do think thats prone to problems like other trains queueing in the interim, but i hope im on the right track. Now to see what he did. Edit: ... i mean, adding more stations with supply would solve the problem, sure... i feel like i was kinda on the right track, but it sounds like we all were on the "how do we solve it as is" mindset instead of remembering "just expand".
@Dawnseeker_Ch
@Dawnseeker_Ch 3 жыл бұрын
Comment 2: Tried my own solution with the train idea I listed here, and yeah, i run the risk of having more trains go to the stop than i really want. The parts cost to impliment is not all that bad to be honest, just one decider combinator and a red and green wire. Hook up the output to the combinator and if L=1, output 1 L to the same pole/station, and boom, it gives a limit of 2 instead of 1. Thankfully not an issue of traffic congestion, but that could still cause another bottleneck and not really solve the problem. In other thoughts, still seriously grateful Nilaus breaks everything down from the ground up and has these models I can basically impliment to see how it works (if i didn't by just watching anyway). I've been horrendous even in school in learning how stuff works just aurally or by just reading it. The moment i have someone show an example (like Nilaus does), it just clicks and i run with it. I've said it before but I'll reiterate, I love this process precisely because it's helped me grow as an engineer (in game, not sure if i'll do it irl) and has spurred newer and more improved designs. I may doubt my ability to match Nilaus (and his supporters)' designs as a whole, but it's still incredibly enjoyable taking inspiration from others and growing as a result. Thank you everyone.
@CasualBoomtown
@CasualBoomtown Жыл бұрын
Hello. Hopefully someone will see this. Been playing factorio for years and I love this idea. Problem with LTN that later in game just starts to fail and haven't a clue why. perhaps to much. MY mega base does get overwhelming and i got trains going to stations that don't need supplies, and items mixing at stops, and fluids all over. Basically LTN fails later in game. But now there is another issue and that is my Mall. I like having a place to go to resupply on items and crafts. But I hate having a train for each resource. Anyone help me on how to send a train to a supply location when supplies are needed. And no, turn off and on stations will not help. If the station turns off then the rest of the network wont be able to go there for there supplies. I basically wont my mall to have little or just one train gettings supplies when my stop is low for the mall.
@gRocketOne
@gRocketOne 3 жыл бұрын
Why not solve it by dynamically bumping the train limit up by 1 when you detect a train waiting? You said you want that train to not count and that would fix it. If you have a circuit that detects the train that has left but is stuck and bumps up the train limit, then that train effectively doesn't count, so that seems like it fixes your issue...
@freaktim9468
@freaktim9468 2 жыл бұрын
Just an Idea to the 3rd Option: When your loading station cant provide a full load you set the train limit to 0 right? but the w8ting station is still open. Solution would be: you have to link the provider station with the included w8ting station. so if your providing 0 loads the w8ting station closes. Well but when the full train leaves he cant stop there - weeeelll yes, but no :) so no solution but i thougth i share my thoughts, maybe some1 finds a solution in it :)
@SunShine-xc6dh
@SunShine-xc6dh Жыл бұрын
Your making your own problem with the depot/waiting station. With the depot you have 4 trains running to 3 stations when it should only be 2 for the 3 stations with waiting you don't give trains a direct route to all waiting stations from any load station in the vicinity. Also you can make resource specific depot or waiting and they will never get full unless you have more trains than stations.
@songs2424
@songs2424 6 ай бұрын
Points out how he could of just put a 2 train limit on the load stations to solve all problems with his train network by allowing the trains that are at the unload station to allways have a surplus of destinations to go to and park since the ai for trains priorities stations with the lowest train count when it's deciding between Same named stations that have trains at them
@chunnin33
@chunnin33 Жыл бұрын
When the trains are fucked because I'm trying to get more resources in and layouts aren't working is my bloody problem @_@
@V3ntyl
@V3ntyl 3 жыл бұрын
c'mon it's factorio if you don't use 15 arithmetic combinators and 9 decider combinators you are doing it WRONG! :)
@TuxoHTuxoH
@TuxoHTuxoH 11 ай бұрын
Mean while me struggling to even go past red circuit and purple science even with cheats
@frankyanish4833
@frankyanish4833 2 жыл бұрын
Has anyone done a rail system with three tracks?
@newCoCoY6
@newCoCoY6 Жыл бұрын
why bother turning off the Loading stations in the first example? isnt it good that the train is always able to go back to its home and not cause and deadlock?
@speedstyle.
@speedstyle. 5 ай бұрын
It allows you to serve more stations with fewer trains, as they can go to wherever resources are available. In particular it will go to the _closest_ open station, which reduces traffic in the network.
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Step-by-Step Transition to Megabase - Factorio Engineering
39:15
Factorio Circuit Networks Explained in Under Three Minutes
3:00
DoshDoshington
Рет қаралды 445 М.
Engineering a solution to TRAINS in Mini Motorways!
21:07
Real Civil Engineer
Рет қаралды 194 М.
How hard is it to build a Factorio MEGABASE?
1:30:00
DoshDoshington
Рет қаралды 1,6 МЛН