Page 1 of 1

How to make a train limiter?

Posted: Sun Mar 24, 2019 8:18 pm
by Diplomatti
Hello, Sometimes the amount of ores i have in my logistics network gets too high and i have to stop my trains running for a while, At the moment i am doing this manually, which as you can guess, is quite annoying when you are busy far away from your station.

I would like to use those wires and decider things for the first time, but i have no idea how to do it.

I would like to have the system setup so that it shows a red signal to incoming trains if the number of ore in the logistics network is greater than 500,000.

like; IF copper ore is > 500,000 Then output a red rail signal. IF Ore < 500,000 output Green rail signal

Re: How to make a train limiter?

Posted: Sun Mar 24, 2019 11:31 pm
by Serenity
You can hook up either rail signals or train stops to the output of a decider combinator. So you can turn a signal red. Or you can disable a train stop

Re: How to make a train limiter?

Posted: Sun Mar 24, 2019 11:54 pm
by SyncViews
How are you managing your train routes? If a train only has one destination, e.g. because you disabled all the stations for the others, it will sit at that station.

Normally this will mean my trains will wait either at the pickup or dropoff end if there is nothing to do. Whichever end you decide to have trains wait, make sure there is enough parking space for all the trains on that route.

Re: How to make a train limiter?

Posted: Mon Mar 25, 2019 12:44 am
by Diplomatti
This is my current main drop off station setup;
https://imgur.com/DUUUSx3

And the minimap view;
https://imgur.com/v6FKRrr

As you can see, i have 1 platform for coal unloading, and 2 for both copper and iron. I have set a train for each platform to manual to stop the others from being able to unload until my stock levels drop down a bit. I also have 11 train parking spaces to the left with a couple of trains waiting there too.

All trains enter from the east and leave at the west end of the station. (copper mine 1 serves a different location in case you're wondering about the rail junction)

I'd just like to force a signal to red based on how much ore i have in the logistics network.

Re: How to make a train limiter?

Posted: Mon Mar 25, 2019 1:42 am
by SyncViews
You can connect a circuit to a signal to force it to red. Possibly use the logistic network output from a roboport.

Not normally needed though, not entirely sure what you are going for. Generally letting a train load/unload "naturally" works out OK for any fairly basic setup.

You can also put condition in the trains route, and disable stations for more advanced uses.

Re: How to make a train limiter?

Posted: Mon Mar 25, 2019 3:22 am
by Manron
You could also disable the unloading inserters. Just wire them to a roboport and set them to work only if the amount of the delivered goods is below the desired threshold.
This way the train will keep parking at the bay, not wasting any room or going around in circles.

Re: How to make a train limiter?

Posted: Mon Mar 25, 2019 10:38 am
by Serenity
For more complex setups there is this mod:
https://mods.factorio.com/mod/train-pubsub

This allows you to have waiting yards with full and/or empty trains and then call trains to stations as needed

Re: How to make a train limiter?

Posted: Mon Mar 25, 2019 11:03 am
by Diplomatti
Thanks for you help everyone.

I have managed to do what i wanted, i think i was over complicating everything, trying to use deciders and power switches and so on.

What i did was a single wire from a roboport to a rail signal and set the rail signal mode of operation to close signal and set the closed condition to If [ORE] > 250k. Much simpler than doing it wrong with combinators!

Re: How to make a train limiter?

Posted: Mon Mar 25, 2019 11:33 am
by nosports
I would place a constant combinator to the trainstop desired

The constant combinator will output the desired ore number(s) in negative terms.
So then wire this combinator & the number of ore in the system to the trainstop and disable/enable the trainstop
(e.g. -500.000 -> if in the system are less then 500.000 ores then the number will get negative and the train stop is enabled and will be open for a train, if 600.000 ores in the system then the combined number is positive -> disabled station)

This will keep the whole rails clear functioning and just switch on the trainstop if needed