[TRAINS] How to properly make a big train stacker?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Graiver
Inserter
Inserter
Posts: 27
Joined: Sun May 03, 2015 9:42 am
Contact:

[TRAINS] How to properly make a big train stacker?

Post by Graiver »

Hi everyone,

I was recently trying to design an efficient train stacker/waiting bay and I ran into some issues...

In my first naive attempt I thought I'd keep it simple. For 2 trains going from A to B I'd have one waiting bay (W) which is standard deactivated, but activates when B is full (W enables when T>0). B deactivates when a train is present. : [EDIT: Station Names don't match my explanation, B should be W and A should be B SORRY..]
Image

This didn't work because for some arbitrary reason the train stationed at B re-checks if the station is available when its already stopped there, leaving it instantly. This shouldn't be the case since normally a train that's already stopped doesn't care for a station to be active or not. If there is a fix for this, it'd make my day.

Next I tried to design a system following some online advice about train stackers involving chain signals. The principle being that a train checks its path ahead, and only leaves when its station is free. :
Image

Although simple enough to work and without circuitry necessary, this doesn't work for me because these are just tests to implement into a larger system.
I'm trying to design a waiting bay for my circuit factory so that, if I want to have 16 Iron trains running back and forth, I don't need 16 dedicated Iron stations.:
Image
In this system (which works btw) trains are forced to go via the tracks circled in red. Because they have to be able to read their stations occupation, the entire length of both of the tracks has to be equipped with chain signals, making the passage of more than two trains at a time impossible.


Now I've tried a lot of thingies including (but not limited to): Rail signal reading/manipulation, Train content reading, enabling/disabling the loading stations/waiting bays,... but none of them seem to work. I'm particularly buggerd by my first idea not working because it seemed so logical. I tried implementing it with just the unloading stations deactivating when a train is present, but then the trains left at random intervals, all simultaneously.

If you know an explanation for this first problem or an ingenious and elegant solution to the problem posted, plz halp. I'd be forever gr8ful.

Cheers,
Graiver

EDIT2: I've included a picture of the factory in question. assume that all belts are moving at full capacity, as would ideally be the case. In this light, I can't reduce the nΒ° of unloading stations.
Image
Last edited by Graiver on Tue Jun 18, 2019 11:46 am, edited 3 times in total.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2673
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by mmmPI »

Graiver wrote: ↑
Sun Jun 16, 2019 8:58 pm
I'm trying to design a waiting bay for my circuit factory so that, if I want to have 16 Iron trains running back and forth, I don't need 16 dedicated Iron stations.:
Hi, in your ideal setup do you have a number of belt you need to unload ? because when i see the scale of the circuit factory i'm wondering how many station you need if not 16.

From what I undestand :

You have atm 16 station vertical station 8 for copper 8 for iron.
As many train as station, or twice as many train at the cost of reducing flow of train in the red box between unload and the waiting bay.
You want to reduce the number of station and speed up trains in the red box.

For now all you train are scheduled to go to 'Circuits Bay' before choosing 'Circuits Copper Unload' or 'Circuits Iron Unload' .

you could reorganise to avoid some trouble. i have made ugly paint hopefully it make sense
sorry inelegant.png
sorry inelegant.png (8.01 KiB) Viewed 22690 times
All iron train would be scheduled to 'Iron entrance' without condition and 'Iron unload' after, they would wait at the chain signal and choose the right station as soon a train leaves it.

then if you want more train you can make more waiting area to hold more train when ressources are further and further away.

Or more station per entrance if you need more belts of material at the same time

Or have additionnals set of entrance + waiting bay + unload stacked.


As for the behavior of the train i think when a station disable they immediatly try to go to the next one on schedule, which if you happen to close all iron unload at the same time , all train would leave each station even if the condition was set to 'empty cargo'.

But quote me on that if i'm wrong :)

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by astroshak »

TC, if what you have works, then what you are faced with is not a redesign of the parking system, it is a relocation of the parking system.

You said that all your trains are forced through that section of track you circled in Red. Shorten that considerably. You, ideally, want a minimum distance between your parking lot and your bays. That way, when track is reserved for only a train or two, that reservation lasts the shortest amount of time possible.

mrvn
Smart Inserter
Smart Inserter
Posts: 5681
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by mrvn »

To the original problem. You can't have a waiting bay that you enable as needed. Trains leaving A will check if W is enable. If not they skip it. So all your trains are then targeting B. When the first train arrives W is enabled but all trains still go to B, none of them will go to W.

Your condition for B "T > 0" also seems odd. You enable B when a train is at another station. But as soon as it leaves that other station for B you disable B again? That would simply make the trains loop from A to A to A to A.


As for your circuit factory. The big problem I see there is the large red box itself. It's big and it has tracks crossing multiple times.

What you should do is merge the 4 copper/iron unload stations each into one track with a chain signal at the start. (not sure what the last 2 copper unload stations are. They don't fit a pattern). That gives you 4 tracks. Replace your red box with 4 parallel tracks with full signals and then connect them to the stacker with a chain signal. There is no need for trains to switch tracks once they picked one when they leave the waiting bay. Especially not multiple times. Since all the stations connected to one track are for the same item it can't happen that e.g. a copper train blocks iron trains stuck behind it.

The trains will then drive into the waiting bay and depending of which stop they picked try to use one of the 4 parallel tracks. The parallel tracks act as a waiting bay for the 4 stops connected to each track giving you an extra buffer. The waiting bay itself therefore doesn't have to hold all trains. Only the excess that doesn't fit into the parallel tracks. If the chosen parallel track is full the chain signal at the entry will make the train pick another station and different parallel track given some time in the waiting bay. Meanwhile other trains can enter their own parallel track.

This is a bit like what mmmPI suggested except with the waiting bay for the unload station being serial instead of parallel. And the original waiting bay as second stage.

Graiver
Inserter
Inserter
Posts: 27
Joined: Sun May 03, 2015 9:42 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by Graiver »

mmmPI wrote: ↑
Mon Jun 17, 2019 1:04 am
Graiver wrote: ↑
Sun Jun 16, 2019 8:58 pm
I'm trying to design a waiting bay for my circuit factory so that, if I want to have 16 Iron trains running back and forth, I don't need 16 dedicated Iron stations.:
Hi, in your ideal setup do you have a number of belt you need to unload ? because when i see the scale of the circuit factory i'm wondering how many station you need if not 16.

From what I undestand :

You have atm 16 station vertical station 8 for copper 8 for iron.
As many train as station, or twice as many train at the cost of reducing flow of train in the red box between unload and the waiting bay.
You want to reduce the number of station and speed up trains in the red box.

For now all you train are scheduled to go to 'Circuits Bay' before choosing 'Circuits Copper Unload' or 'Circuits Iron Unload' .

you could reorganise to avoid some trouble. i have made ugly paint hopefully it make sense
sorry inelegant.png
Thanks for the reply, I see you're a black belt paint master as well.
The entire system is designed to be expandable (just build more of the same down south). Each station now has one dedicated train to it and two belts feeding from it but as the round trip takes too long nowadays, they run out of Iron/Copper plates before they get back (except the bottom ones as these are preferred of course) leaving the northern ones permanently empty.

The trick Id'd like to pull is to have a system of say 24 trains for 16 stations. When the system backs up however (like when circuits aren't needed anymore idk) I don't want the whole area blocked by trains waiting at an unload station. So in fact, trains only need to go to the waiting area when every station is occupied but that's not easy apparently... Therefore I tried to have em all pass the waiting bay etc etc.
mmmPI wrote: ↑
Mon Jun 17, 2019 1:04 am
As for the behavior of the train i think when a station disable they immediatly try to go to the next one on schedule, which if you happen to close all iron unload at the same time , all train would leave each station even if the condition was set to 'empty cargo'.

But quote me on that if i'm wrong :)
This doesn't always happen immediately though, so I'd like to know when a train re-checks its station and when it can just stay there...

Again thanks for the reply, I love the feedback-rate on this forum
Graiver

Graiver
Inserter
Inserter
Posts: 27
Joined: Sun May 03, 2015 9:42 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by Graiver »

astroshak wrote: ↑
Mon Jun 17, 2019 9:56 am
TC, if what you have works, then what you are faced with is not a redesign of the parking system, it is a relocation of the parking system.

You said that all your trains are forced through that section of track you circled in Red. Shorten that considerably. You, ideally, want a minimum distance between your parking lot and your bays. That way, when track is reserved for only a train or two, that reservation lasts the shortest amount of time possible.
Not an option as I keep all my systems maximally expandable, so there should be a possibility for the system to be copied further down south. "Works" is also not the proper word for it (functions is better) as now all trains have to pass the waiting bay and there are times when there are 5-6 of them waiting while there are plenty of vacancies. They are forced to wait before the lanes open up.

JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by JimBarracus »

mmmPI wrote: ↑
Mon Jun 17, 2019 1:04 am
As for the behavior of the train i think when a station disable they immediatly try to go to the next one on schedule, which if you happen to close all iron unload at the same time , all train would leave each station even if the condition was set to 'empty cargo'.

But quote me on that if i'm wrong :)
When a train is at a station and it gets deactivated it does not affect the train.
The train still waits untill some waiting condition is met.
It only affects trains, which are on the way to the station or have this station on scedule at all.

Graiver
Inserter
Inserter
Posts: 27
Joined: Sun May 03, 2015 9:42 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by Graiver »

mrvn wrote: ↑
Mon Jun 17, 2019 11:22 am
To the original problem. You can't have a waiting bay that you enable as needed. Trains leaving A will check if W is enable. If not they skip it. So all your trains are then targeting B. When the first train arrives W is enabled but all trains still go to B, none of them will go to W.
Yes but then again ideally this wouldn't be a problem; I'd have enough trains waiting in the waiting bay until a station opens up. Then ONE train would leave to re-occupy the station in question. If in the beginning trains are looping once or twice between that and their resp. loading stations, I don't really care.
mrvn wrote: ↑
Mon Jun 17, 2019 11:22 am
Your condition for B "T > 0" also seems odd. You enable B when a train is at another station. But as soon as it leaves that other station for B you disable B again? That would simply make the trains loop from A to A to A to A.
I Named the stations wrong in my first picture of the stations' menu's, I do very much apologize. I hope it makes more sense now.
mrvn wrote: ↑
Mon Jun 17, 2019 11:22 am
What you should do is merge the 4 copper/iron unload stations each into one track with a chain signal at the start. (not sure what the last 2 copper unload stations are. They don't fit a pattern). That gives you 4 tracks. Replace your red box with 4 parallel tracks with full signals and then connect them to the stacker with a chain signal. There is no need for trains to switch tracks once they picked one when they leave the waiting bay. Especially not multiple times. Since all the stations connected to one track are for the same item it can't happen that e.g. a copper train blocks iron trains stuck behind it.

The trains will then drive into the waiting bay and depending of which stop they picked try to use one of the 4 parallel tracks. The parallel tracks act as a waiting bay for the 4 stops connected to each track giving you an extra buffer. The waiting bay itself therefore doesn't have to hold all trains. Only the excess that doesn't fit into the parallel tracks. If the chosen parallel track is full the chain signal at the entry will make the train pick another station and different parallel track given some time in the waiting bay. Meanwhile other trains can enter their own parallel track.

This is a bit like what mmmPI suggested except with the waiting bay for the unload station being serial instead of parallel. And the original waiting bay as second stage.
So as I understand it you're saying that each station should have its own personal waiting bay? That could very well work, although I foresee trains waiting at full stations at some point. No I see now you don't say "that each station should have its own personal waiting bay" rather that a bundle of unloading stations of arbitrary size have a waiting bay of arbitrary size. That could also very well work but is a little more difficult to implement and less general than the original idea. Again I like to keep things maximally expandable and maximally modular. Maybe I'll try this if all else fails.

I find it difficult to believe that my first idea isn't implementable, especially in Factorio...

Thanks for the effort!
Graiver

Graiver
Inserter
Inserter
Posts: 27
Joined: Sun May 03, 2015 9:42 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by Graiver »

JimBarracus wrote: ↑
Tue Jun 18, 2019 11:20 am
mmmPI wrote: ↑
Mon Jun 17, 2019 1:04 am
As for the behavior of the train i think when a station disable they immediatly try to go to the next one on schedule, which if you happen to close all iron unload at the same time , all train would leave each station even if the condition was set to 'empty cargo'.

But quote me on that if i'm wrong :)
When a train is at a station and it gets deactivated it does not affect the train.
The train still waits untill some waiting condition is met.
It only affects trains, which are on the way to the station or have this station on scedule at all.
If what you said was true 100% of the time, I wouldn't be typing right now. ;)

mmmPI
Smart Inserter
Smart Inserter
Posts: 2673
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by mmmPI »

Graiver wrote: ↑
Tue Jun 18, 2019 11:40 am
JimBarracus wrote: ↑
Tue Jun 18, 2019 11:20 am
mmmPI wrote: ↑
Mon Jun 17, 2019 1:04 am
As for the behavior of the train i think when a station disable they immediatly try to go to the next one on schedule, which if you happen to close all iron unload at the same time , all train would leave each station even if the condition was set to 'empty cargo'.

But quote me on that if i'm wrong :)
When a train is at a station and it gets deactivated it does not affect the train.
The train still waits untill some waiting condition is met.
It only affects trains, which are on the way to the station or have this station on scedule at all.
If what you said was true 100% of the time, I wouldn't be typing right now. ;)
I was wrong, I took time to test and JimBarracus seems right as i couldn't reproduce the behavior i thought correct, i wonder what you did to get the impression that the trains leaves when the station disabled, because i had the same impression, though when i test on a simple loop 100% of the time the train wait for me to get in before leaving, even when i disable the station and the trains has another station scheduled next it stays at the disabled station waiting for me to get in if that was the condition.

Graiver wrote: ↑
Tue Jun 18, 2019 11:39 am
I foresee trains waiting at full stations at some point
Isn't that supposed to be the optimal situation when everything buffered ? No station should be "full" more than a couple tick if you produce constantly, as soon as an inserter drops a material on a belt it will call a train, then the train will stay at the station, unloading at the rythm of the belt consumption. right ?
Graiver wrote: ↑
Tue Jun 18, 2019 11:39 am
I'd have enough trains waiting in the waiting bay until a station opens up
In my mind trains wait at the stations that are open ( or even closed it seems but that may seems a problem in this case) untill they are empty. when they leave a station, a train from the waiting bay replace them.

In this idea the waiting bay needs to be as close as possible as the station. Or you can have just as mrvn explain a portion of tracks, 4 parralel tracks, that host 1 train per station , and another waiting bay bigger, elsewhere. So you don't try and fit all your train waiting near the station, you have a stacker that is common for all station and a particular waiting spot for each.

Graiver wrote: ↑
Tue Jun 18, 2019 11:19 am
as now all trains have to pass the waiting bay
This seems fine
Graiver wrote: ↑
Tue Jun 18, 2019 11:19 am
and there are times when there are 5-6 of them waiting while there are plenty of vacancies. They are forced to wait before the lanes open up.
this is not


Maybe your original idea was that the train would not make the detour to go to a waiting bay if stations are available, this is probably possible but way more complicated than to have the waiting bay inline with the station, so that all train goes through them no matter what, and is not a detour since you build them knowing that all train will have to go to one everytime before the station.
Graiver wrote: ↑
Tue Jun 18, 2019 11:15 am
So in fact, trains only need to go to the waiting area when every station is occupied but that's not easy apparently... Therefore I tried to have em all pass the waiting bay etc etc.
yep !
Graiver wrote: ↑
Tue Jun 18, 2019 11:15 am
The trick Id'd like to pull is to have a system of say 24 trains for 16 stations. When the system backs up however (like when circuits aren't needed anymore idk) I don't want the whole area blocked by trains waiting at an unload station.
Where should the train be at this point ?

1 in every station being unloaded very slowly, and that leaves 8, which in this case you don't want them waiting directly behind a station, because they would have to 'choose' their station which might not be the one that need them the first.

If you add enough train to have 2 train per station you could have them waiting behind the 1rst one, but this means you have 2 trains per station not more or less, since if you prepare room for 3 or 4 train per station but don't have the trains running already, they might all pile up in the closest . and waiting while being needed elsewhere.

You could use combinator setup to force them to park correctly by blocking the 'parralel' track that already have a train waiting in them so that it's scalale, even if you start with sub-maximum number of train, they would not wait at wrong places. Using one signal to 'read' the position, and one signal to close the whole lane when there is at least 1, 2 ,3 ect trains. but it starts to getting (unnecessarily )complicated.

You can probably use the same technique to create a system where all of your signals are controlled via circuit network, and achieve anything like your original idea, or even a rerouting system or whatever, given infinite amount of time x), some of the advices here are just to make a station with same functionnality than your ideal design.

You can't have infinite scalabilty with a system that has only 1 junction with the main grid, you need to have the whole system of "junction+waiting bay+ unload station" in one design (or you don't need to but that's like wayyy easier) this way it's more many stations than 1 everexpanding.

16 stations is already a big number if you do the math like( with shematic numbers ): train unloaded in 16 second , 16 station, 1 entrance that should support 1 train per second.
if you try to scale you will reach a limit on the entrance junction so might has well include it in the design and copy paste it with the next block of 16 station for example, and at this point , why not build it elsewhere to spread train traffic on the main network ect ect x)

Graiver
Inserter
Inserter
Posts: 27
Joined: Sun May 03, 2015 9:42 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by Graiver »

mmmPI wrote: ↑
Wed Jun 19, 2019 6:31 am
Graiver wrote: ↑
Tue Jun 18, 2019 11:40 am
JimBarracus wrote: ↑
Tue Jun 18, 2019 11:20 am
When a train is at a station and it gets deactivated it does not affect the train.
The train still waits untill some waiting condition is met.
It only affects trains, which are on the way to the station or have this station on scedule at all.
If what you said was true 100% of the time, I wouldn't be typing right now. ;)
I was wrong, I took time to test and JimBarracus seems right as i couldn't reproduce the behavior i thought correct, i wonder what you did to get the impression that the trains leaves when the station disabled, because i had the same impression, though when i test on a simple loop 100% of the time the train wait for me to get in before leaving, even when i disable the station and the trains has another station scheduled next it stays at the disabled station waiting for me to get in if that was the condition.
In smaller systems, yes. My 'experiment' I showed in the beginning also showed the correct behavior, but as I tried implementing it in my main bus area (*), it didn't work. Once the station got deactivated , the train left instantly. Nevertheless I implemented it in my circuit factory and here all trains stationed at a stop waited for a while (at their deactivated stations) and then all left simultaneously. This was the weirdest thing and because I can't explain it, I blame it on the game's mechanics...
mmmPI wrote: ↑
Wed Jun 19, 2019 6:31 am
Graiver wrote: ↑
Tue Jun 18, 2019 11:15 am
The trick Id'd like to pull is to have a system of say 24 trains for 16 stations. When the system backs up however (like when circuits aren't needed anymore idk) I don't want the whole area blocked by trains waiting at an unload station.
Where should the train be at this point ?
At the waiting bay as spares. If I have say the 16 stations and 24 trains, ideally, 16 stations would be occupied ~100% of the time while 8 (alternating) trains are fetching materials needed. My waiting bay would be 8 stations in size, but not occupied unless there is a hold-up in production/gridlock/... or there is an flux in trains stationed.
mmmPI wrote: ↑
Wed Jun 19, 2019 6:31 am
You could use combinator setup to force them to park correctly by blocking the 'parralel' track that already have a train waiting in them so that it's scalale, even if you start with sub-maximum number of train, they would not wait at wrong places. Using one signal to 'read' the position, and one signal to close the whole lane when there is at least 1, 2 ,3 ect trains. but it starts to getting (unnecessarily )complicated.

You can probably use the same technique to create a system where all of your signals are controlled via circuit network, and achieve anything like your original idea, or even a rerouting system or whatever, given infinite amount of time x), some of the advices here are just to make a station with same functionnality than your ideal design.
I was really hoping for a clear cut solution, implementing my first idea. It seems such a basic principle that I can't believe no one has ever come across it or thought of it themselves. If you have any proof of concept (using vanilla only) of such more involved systems, please let me know.
mmmPI wrote: ↑
Wed Jun 19, 2019 6:31 am
You can't have infinite scalabilty with a system that has only 1 junction with the main grid, you need to have the whole system of "junction+waiting bay+ unload station" in one design (or you don't need to but that's like wayyy easier) this way it's more many stations than 1 everexpanding.

16 stations is already a big number if you do the math like( with shematic numbers ): train unloaded in 16 second , 16 station, 1 entrance that should support 1 train per second.
if you try to scale you will reach a limit on the entrance junction so might has well include it in the design and copy paste it with the next block of 16 station for example, and at this point , why not build it elsewhere to spread train traffic on the main network ect ect x)
This is very much true and in the end nothing is 'infinitely' scale able but as this is the first time I've used this type of design I want to see how far I can stretch it. In the end I'll overhaul everything or transfer it to a new map and start anew.

Anyways, if you're still interested in this topic, I'll include my map save so you can look at it for yourself, firsthand.

P.S.
(*) The stations involved were 'Tree Circuits Unload' and 'Tree Bay'
Attachments
Erben-Gholan.zip
Map Erben-Gholan by Graiver, ~110h mark
(52.96 MiB) Downloaded 133 times

mmmPI
Smart Inserter
Smart Inserter
Posts: 2673
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by mmmPI »

i had a look at the map i thought about this
there.jpg
there.jpg (279.64 KiB) Viewed 22499 times
This post looks like what you are making.
viewtopic.php?f=194&t=69578

I have made this
abc.jpg
abc.jpg (627.97 KiB) Viewed 22499 times
Your setup make me think of the bottom case where your red box would be the green distance B

Here if i open the bottom station for iron, i will face a problem with 2 trains only, because they could still pile up like now.

Like the risk you have if you don't have 2x as much train as station and you put your waiting bay inline ( 24/16).

The fact that i have 2 trains in a row is because if all the stacker is full with copper train up to 3/4 for example, i think the time for the train to replace the empty train is too big, so i let room for it to be just behind the first one, the stacker can then be as long as it takes for a train to be unloaded. ( or just a bit less)


The problem here is you need B to be free unlike A, for the red train going to freen unload for example. because you share the waiting bay for multiple ressources. Here the distance is as short as possible contrary to your red box, it is also away from the main train network.


This forces you contrary to me to use chain signal all the way while my main network is signaled normally, i understand you tried before to deal with that problem by disabling stations maybe it has to do with one station named the same as all the disabled, one who would enable, and i don't know maybe trains realise their own station is disabled and try to go to the new one.

For a more elaborate version of the setup you could use the signal that is circle in red, at the moment it is closed because there is a train in C, so if you use 'read' it will output 1 red or 1 green, you can use that condition to open/ close the copper train stacker or iron train stacker and place them faraway placing regular signal instead of chain, but this would require you to have 2 different stacker for 2 ressources and also a way to count how many trains are send before the sensor turns off again, i don't have such elaborate setup on the hand though :D.

User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by disentius »

I am not sure what you want, so i built a concept to see if i understand you.

- 16 track Stacker and 4 copper + 4 iron unload stations.
- Two unload belts each station.
- 8 copper trains, 8 iron trains

Logic:
- Unload stations disable when train is present (Red) , and when there is no room for a full train load (Blue). Enabled -> Green
- If there is no station available, trains wait in the stacker. (Cut the plate output belts to create that condition)
- Double signaling to prevent pathing errors when expanding stations or stacker.

Sustainable full output (8 copper belts, 8 iron belts) as long as you mine enough:) Stacker is expandable to 24; bigger needs a double rail.
big picture
Save:
Ore stacker and unload concept.zip
(6.54 MiB) Downloaded 114 times

The save has no mods, I used a few cheat commands, see factorio wiki
used commands
Did you have something like this in mind?
I recommend the Wiki for a comprehensive list of pathfinding rules.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2673
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by mmmPI »

disentius wrote: ↑
Wed Jun 19, 2019 6:13 pm
and when there is no room for a full train load (Blue)
Why have I not think about using that in this context :(
This wasn't mentionned in the thread earlier but is definitively something that helps a lot in the situation.

I do think you've understand the original request but OP has too confirmed.

For me this looks like the "more elaborate settings" , but better realised than I had in mind.

Testing it.
disentius wrote: ↑
Wed Jun 19, 2019 6:13 pm
I recommend the Wiki for a comprehensive list of pathfinding rules.
Good thing you mention it, i felt it was not needed for me to read it anymore and i realised that it had some answers i was asking on the forum. Derp.

Edit:

After testing I realise that your system is not what i had in mind, it does provide with an answer for the 24 trains for 16 stations problem nicely, as the trains wait in the stacker when a station don't need them and do not wait at the wrong spot.

Now OP's original request and experiment was to have a waiting bay that unlocks only when a station don't need a train , so the waiting bay would not be used in times of heavy load.

In this setup, the stacker is still built directly adjacent to the stations and linked with chain signal, it is still part of the normal train travel it is not like another longer lane that's open up when the short path is busy.

It is providing the same functionnality i think as what OP had in mind, sometimes in this game you take the different method because it's easier, sometimes you have this idea in mind and take it as the game to realise it despite all trouble you discover on the way.

The latest setup can be modified to achieve the desired train behavior, but i'm not seeing a "easy" way to do it, that would require the trains to have the opportunity at some point to repath between the stacker or the direct access to the station. They would choose the later unless it's busy.

Everything i have in mind involve counting the trains or using R-S latch, it can be done but i'm slow at it that's the limit of my help x)

mrvn
Smart Inserter
Smart Inserter
Posts: 5681
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by mrvn »

Graiver wrote: ↑
Tue Jun 18, 2019 11:39 am
mrvn wrote: ↑
Mon Jun 17, 2019 11:22 am
To the original problem. You can't have a waiting bay that you enable as needed. Trains leaving A will check if W is enable. If not they skip it. So all your trains are then targeting B. When the first train arrives W is enabled but all trains still go to B, none of them will go to W.
Yes but then again ideally this wouldn't be a problem; I'd have enough trains waiting in the waiting bay until a station opens up. Then ONE train would leave to re-occupy the station in question. If in the beginning trains are looping once or twice between that and their resp. loading stations, I don't really care.
mrvn wrote: ↑
Mon Jun 17, 2019 11:22 am
Your condition for B "T > 0" also seems odd. You enable B when a train is at another station. But as soon as it leaves that other station for B you disable B again? That would simply make the trains loop from A to A to A to A.
I Named the stations wrong in my first picture of the stations' menu's, I do very much apologize. I hope it makes more sense now.
mrvn wrote: ↑
Mon Jun 17, 2019 11:22 am
What you should do is merge the 4 copper/iron unload stations each into one track with a chain signal at the start. (not sure what the last 2 copper unload stations are. They don't fit a pattern). That gives you 4 tracks. Replace your red box with 4 parallel tracks with full signals and then connect them to the stacker with a chain signal. There is no need for trains to switch tracks once they picked one when they leave the waiting bay. Especially not multiple times. Since all the stations connected to one track are for the same item it can't happen that e.g. a copper train blocks iron trains stuck behind it.

The trains will then drive into the waiting bay and depending of which stop they picked try to use one of the 4 parallel tracks. The parallel tracks act as a waiting bay for the 4 stops connected to each track giving you an extra buffer. The waiting bay itself therefore doesn't have to hold all trains. Only the excess that doesn't fit into the parallel tracks. If the chosen parallel track is full the chain signal at the entry will make the train pick another station and different parallel track given some time in the waiting bay. Meanwhile other trains can enter their own parallel track.

This is a bit like what mmmPI suggested except with the waiting bay for the unload station being serial instead of parallel. And the original waiting bay as second stage.
So as I understand it you're saying that each station should have its own personal waiting bay? That could very well work, although I foresee trains waiting at full stations at some point. No I see now you don't say "that each station should have its own personal waiting bay" rather that a bundle of unloading stations of arbitrary size have a waiting bay of arbitrary size. That could also very well work but is a little more difficult to implement and less general than the original idea. Again I like to keep things maximally expandable and maximally modular. Maybe I'll try this if all else fails.

I find it difficult to believe that my first idea isn't implementable, especially in Factorio...

Thanks for the effort!
Graiver
I'm saying that you can bundle stations for the same good into a single track leading to them with trains waiting on them without problems. But stations with different goods must allow trains to pass. I'm saying you can use the tracks between your expandable stacker and the stations as an additional mini-stacker. It's not expandable once you placed the stacker and stations but it's modular. You can make that part as long as you like. But the mini-stacker is not supposed to expand. It's just a buffer between the far away expandable stacker and the stations and allows trains to wait as close to the station as possible and reduces the time between one train leaving and the next arriving.

mrvn
Smart Inserter
Smart Inserter
Posts: 5681
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by mrvn »

disentius wrote: ↑
Wed Jun 19, 2019 6:13 pm
I am not sure what you want, so i built a concept to see if i understand you.

- 16 track Stacker and 4 copper + 4 iron unload stations.
- Two unload belts each station.
- 8 copper trains, 8 iron trains

Logic:
- Unload stations disable when train is present (Red) , and when there is no room for a full train load (Blue). Enabled -> Green
- If there is no station available, trains wait in the stacker. (Cut the plate output belts to create that condition)
- Double signaling to prevent pathing errors when expanding stations or stacker.

Sustainable full output (8 copper belts, 8 iron belts) as long as you mine enough:) Stacker is expandable to 24; bigger needs a double rail.
big picture
Save:
Ore stacker and unload concept.zip


The save has no mods, I used a few cheat commands, see factorio wiki
used commands
Did you have something like this in mind?
I recommend the Wiki for a comprehensive list of pathfinding rules.
A setup like that breaks down at high throughput because the time between leaving the stacker and arriving at the station increases the further the station is from the stacker. The further the station is the the longer the dead time where no train is present. It really benefits from having a mini-waiting bay at each station. Or simply make the trains twice as long so you have half the number of stations for the same number of belts.

User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: [TRAINS] How to properly make a big train stacker?

Post by disentius »

@mrvn:
Agreed. that is why its called a concept. :)

Post Reply

Return to β€œGameplay Help”