Train automation : Is it possible to...

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Mastermindx
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Mar 26, 2021 8:52 pm
Contact:

Train automation : Is it possible to...

Post by Mastermindx »

Hi guys.

I having trouble automating trains. I'm not sure if what I'm trying to achieve is possible in vanilla...

I built a train "subnetwork" for regional smelting. I was thinking about having my delivery station for the ore, having a bunch of "wait" station (all with the same name) and then name all the ore patch train stop with the same name and have a condition that disable the train stop if there isn't enough ore at the station to fill a train.

I figured my train schedule would be
- Ore Delivery
- Wait station
- Ore patch.

The issue I ended up with while trying to make it work is : if all ore patch are disabled, the train will just skip them and go back to the "ore delivery" station. You guys know of any automation trick to achieve that (hopefully one that wouldn't result in a race conditon, ie 2 train waking up at the same time, so 1 skip and loop to Ore Delivery).

Train automation could really use preconditions for stations! (<--On official wishlist for expansion/DLC. Like... Go to this station only if you have less than X mj of left of fuel? hint :P)

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

Re: Train automation : Is it possible to...

Post by mmmPI »

Mastermindx wrote:
Wed Mar 31, 2021 11:49 pm
if all ore patch are disabled, the train will just skip them and go back to the "ore delivery" station.
Instead of disabling the ore patch, reduce the limit of incoming train to 0.

You will not be able to precisely decide which train wake up, but only 1 should wake up when any ore patch limit goes positive again.

If all limit are 0 trains that were already heading toward an ore patch should complete their route, others should wait for an ore patch to activate again instead of the skipping behavior.

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

Re: Train automation : Is it possible to...

Post by astroshak »

Quite honestly, I never understood the purpose of the “wait station”. IMO better to use a stacker at the mines, and for the ore drop offs, and just have the trains move when full or when empty.

Setting the train limit at the mines is useful for ensuring that trains don’t come unless there is a full load waiting for them, but has the minor drawback of requiring that you always have one mine ready when a train wants to leave the drop off station, or it will just sit there waiting for a mine to open up. I call that a minor drawback not as a pun, but because its what you should be doing anyway : you should be ensuring that you always have enough mines that there is a load waiting for an incoming train somewhere, whether you are enabling/disabling the station, setting the limit dynamically, or just ignoring those two things entirely.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Train automation : Is it possible to...

Post by ptx0 »

astroshak wrote:
Thu Apr 01, 2021 1:53 am
Quite honestly, I never understood the purpose of the “wait station”. IMO better to use a stacker at the mines, and for the ore drop offs, and just have the trains move when full or when empty.
because you can have fewer trains shared among more stations.

it won't leave for a drop-off until that one needs a train.

you can have trains full and ready to go, instead of forcing it to wait at the producer station, which would hang up all the trains behind it. though their schedule is a bit incorrect because wait station should go after the producer, not before it. sounds like they're trying to oversubscribe their producer instead of overproduce, like i describe.

Mastermindx
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Mar 26, 2021 8:52 pm
Contact:

Re: Train automation : Is it possible to...

Post by Mastermindx »

astroshak wrote:
Thu Apr 01, 2021 1:53 am
Quite honestly, I never understood the purpose of the “wait station”.
Well, I could run 6 trains with 2 spots at each mines wtih a 60% efficiency... Or I could run 4 trains, 3 wait station and all train run at 90%+ efficiency.

And as mine production slowly goes down, train stop going there for nothing.

Also helps to do automatic load balancing.

Is that required? Nope... Is it more efficient, save space and micro management? Yup.

Mastermindx
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Mar 26, 2021 8:52 pm
Contact:

Re: Train automation : Is it possible to...

Post by Mastermindx »

though their schedule is a bit incorrect because wait station should go after the producer, not before it
In my use case, I don't really need to. I have only 1 smelting stop. I don't need wait area, I just need open rail before the stop(I have space for 7 train "inside" the smelting station for incoming train + 2 drop off stops). Having a wait station before the producer allows the train to wait to know which producer will be ready to welcome it first. And since each mine production may go down at a different rate as time goes by, train schedule will automatically readjust over time.

But since there it only 1 smelter, the train will always stop at the same smelter, it doesn't exactly care whether it is ready or not to receive it, it has nothing else to do and nowhere else to go.

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

Re: Train automation : Is it possible to...

Post by astroshak »

ptx0 wrote:
Thu Apr 01, 2021 3:01 am
astroshak wrote:
Thu Apr 01, 2021 1:53 am
Quite honestly, I never understood the purpose of the “wait station”. IMO better to use a stacker at the mines, and for the ore drop offs, and just have the trains move when full or when empty.
because you can have fewer trains shared among more stations.

it won't leave for a drop-off until that one needs a train.

you can have trains full and ready to go, instead of forcing it to wait at the producer station, which would hang up all the trains behind it. though their schedule is a bit incorrect because wait station should go after the producer, not before it. sounds like they're trying to oversubscribe their producer instead of overproduce, like i describe.
Maybe if you are separating the drop offs? I tend not to do that for the main base. Outposts tend to get their own trains, with their own unique drop off stations,I guess that’s what you are trying to limit?

I’ve never had a train sit at the producer (the mine) waiting for a drop-off spot to open up. Not once. Large enough stackers to hold all the trains intended to go to that outpost or area ensure there is always a space for the full train to go sit at its drop off. Generally, trains in my games sit in the drop off stacker waiting for a spot to move to to unload, then they go get a full load and come back waiting to unload. Train stop limits are set at the mines, but never the unloading stations.

Post Reply

Return to “Gameplay Help”