How to PROPERLY use Enable/Disable of a Train Station

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Terukio
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Mon Mar 21, 2016 11:30 pm
Contact:

How to PROPERLY use Enable/Disable of a Train Station

Post by Terukio »

Hi everyone,

My current goal is to name all of my outposts the same so trains can path to whichever one has enough ore for a full load (>= 8000).

I am able to enable/disable to stations fine, but the problem is (I don't have loops, my locomotives are LCCCCL with each locomotive facing the opposite direction.) when one station disables, trains will get a no path error because they can't turn around to go to another loading station due to not having loops. Any suggestions on how to get around this?

I have another question about a parking garage for my trains:

I have parking lots that only enable when all ore patches do not have enough ore to fully load a train. They turn on and trains then path to them because all P.U. stations are turned off, but occasionally turn off again before they can reach them due to a P.U. station now having enough ore, resulting them going to the ore drop off station empty since it is the next station in the list, even when the list goes as follows:

Iron Ore P.U.
Parking Lot
Iron Ore D.O.
Parking Lot

Is there a way to restrict a train so that they only path to the D.O. station when they have a full load?

Final question I'm currently wrestling:

I want my D.O. stations to all have the same name, Iron Ore D.O., for smelting from ore to iron and from ore to steel. The problem is, they tend to path to the closest one all the time leaving the other two dried up. I attempted to only open the station is the amount of ore in the buffer chests is below the average of the total available ore successfully, but this results in nasty pathing issues when the station turns off in at an inconvenient time.

Any thoughts/solutions/criticism is wanted and welcomed.

Thanks ahead of time.

-Terukio

Shokubai
Filter Inserter
Filter Inserter
Posts: 470
Joined: Mon May 02, 2016 3:17 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Shokubai »

In total...you want a mod.

If you want simple solutions you need to add a bypass lane(or loop) to all of your stations and potentially some central turnabouts to allow your trains better pathing opportunities.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Aeternus »

Restricting a train from going to the DO unless it has a full load... not possible, 'though it is possible to kick the train out of the DO due to insufficient cargo. Not sure why you'd want to though, if it has any ore, might as well drop it off...
DO station flexibility is possible. You can use signals that are controlled by combinators to create a round-robin style handling of the platforms. Or you could probably design a system where the platform with the lowest resource count is set to active. I've tinkered a bit with it in the past but never really got it to work, probably because I kept building such stations too small...

Shokubai
Filter Inserter
Filter Inserter
Posts: 470
Joined: Mon May 02, 2016 3:17 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Shokubai »

Terukio wrote:My current goal is to name all of my outposts the same so trains can path to whichever one has enough ore for a full load (>= 8000).
This part alone usually works poorly since trains will prefer the closest station. Disabling stations is an obvious solution but I find its best to not use same named stations separated by any great distance. Usually I stick with a name per deposit or depot. You could get away with regional names perhaps and have a regional depot where trains wait until a station enables but the problem is going to be how to just release 1 train and not 10.

inteljoe
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Apr 20, 2016 9:04 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by inteljoe »

Typically I set up a mine with 1-2 pick up stations. And then my smelter has any number of drop off's. Although I use terminus stations so the whole loop thing doesn't work with me.

I also use a 4 lane highway essentially for the trains, and then drop down to 2-lane for depots/mines/factories. I make sure to lay enough distance so that the trains can queue up for how many trains I put in.

In one set up that I configured. I had 240 smelters fed by 4 drop off's. The smelters could process about 12k iron a minute, so it was key to make sure that all the DO's were used (set to the same name). So I set a circuit condition to disable the entry signal after I had x amount of iron ore in storage (it was generally 16k or 32k, basically 1-4 trains full is what you are aiming for).

I wasn't a big fan of disabling the station, I used to do this but what I found what would happen is that if I had a train that was going to Mine A then DO1 then Mine B then DO1, if the DO was disabled it would just go between the two mines. There was another way I configured the trains on a similar build, and what I found is that if the DO station was disabled it the train would pull out and then head back in. This didn't bother me at first, but I found that the problem was that it was using full and eventually would run out. Typically setting the circuit condition on the entry switch was better, at least for me, because the trains would just queue up. And assuming you have the throughput for it they will just go to the next station after a number of ticks.

Terukio
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Mon Mar 21, 2016 11:30 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Terukio »

I'm reading your replies and considering the solutions, but I don't want to give up on my goal just yet. I would love to just be able to plop down a train and copy paste the conditions from one train to another and have it all work, draining outposts evenly by not preferring the closer one.

Does anyone have any experience with the "Smarter Trains" mod? Would this mod allow me to do what I specified in the OP?

Thanks again.


Selvek
Fast Inserter
Fast Inserter
Posts: 238
Joined: Fri May 06, 2016 4:04 am
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Selvek »

We are so close to a fully capable railway system... I keep hoping for a signal which is emitted (somehow...) when a train decides to path to a specific station. Without that, any kind of system like this will be limited by the problem of trains pathing to a station which already has trains on the way...

Shokubai
Filter Inserter
Filter Inserter
Posts: 470
Joined: Mon May 02, 2016 3:17 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Shokubai »

I think a fairly simply thing that is missing is a "goto command" Its just an if true goto order #x if false continue down the list.

Using this problem as an example we could do orders like this.

1 Parking Lot (here train waits for an open PU)
2 Iron Ore P.U.
3 Goto 1 Inventory Not Full (should catch any trains on track when a station closes)
4 Iron Ore D.O.

Muche
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Muche »

Selvek wrote:We are so close to a fully capable railway system... I keep hoping for a signal which is emitted (somehow...) when a train decides to path to a specific station. Without that, any kind of system like this will be limited by the problem of trains pathing to a station which already has trains on the way...
I was thinking maybe something like a sensor attached to a block that could emit multiple signals about the train in that block - ID, status (running/stopped on red/stopped on blue/no path/out of fuel/etc.), destination. However that could mean you'll have to put them everywhere if you want to find a specific train.

Zaka
Inserter
Inserter
Posts: 36
Joined: Mon Jun 27, 2016 5:23 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Zaka »

Terukio wrote:Hi everyone,

My current goal is to name all of my outposts the same so trains can path to whichever one has enough ore for a full load (>= 8000).
Ok. So we have the same goal.
Terukio wrote:I am able to enable/disable to stations fine, but the problem is (I don't have loops, my locomotives are LCCCCL with each locomotive facing the opposite direction.) when one station disables, trains will get a no path error because they can't turn around to go to another loading station due to not having loops. Any suggestions on how to get around this?
The issue is that the station is disabling when a train is pathing to it. I would suggest that you add a loop somewhere in you system even if it is a giant square that a train can drive around.
Loop
Terukio wrote:I have another question about a parking garage for my trains:
I have parking lots that only enable when all ore patches do not have enough ore to fully load a train. They turn on and trains then path to them because all P.U. stations are turned off, [...]
Is there a way to restrict a train so that they only path to the D.O. station when they have a full load?
Why are you disabling the waiting bays? No matter what the trains have to be somewhere and the waiting bay (or depot) is their resting spot.
Waiting Bays
Terukio wrote:I'm reading your replies and considering the solutions, but I don't want to give up on my goal just yet. I would love to just be able to plop down a train and copy paste the conditions from one train to another and have it all work, draining outposts evenly by not preferring the closer one.
Why?
If you consider the mining process, you will always be creating new mines further away and the cleared ground provided by the exhausted mine is more open space for your factory.

If you consider the resource gathering process (mining/smelting) it is, like all things factorio, a producer/consumer process. Trains are the medium by which the resource is transported.

Looking at it this way a train has three conditions 1)Loading 2)Unloading and 3)Moving. Basic loading and unloading is no issue, it's the moving part that is the problem... When do we move and when do we sit still?

A Train should only move when it has a destination.

If we make this a rule then we have to figure out the order of the stops. I chose: Waiting Bay -> Mine -> Smelter.
My train schedule is:
Waiting bay wait for circuit condition Green > 0
Mine wait for Full
Smelter Wait for Empty

My smelter stops are always enabled (although I have some ideas on balancing that).
My Waiting Bays are always enabled (so my trains have somewhere to go).
That leaves the mines to control where and when the train moves.

Since a train must always have a valid destination, it would stand to reason that the number of trains that are released from the waiting bay MUST BE <= the number of mines with resources to load. So we need to count the mines that want to load and then release the trains to only those mines.

Since it is possible to have the max number of trains in operation we must have space for ALL OF THEM at the smelter and the waiting bays.

To this end I have chosen 10 trains, with 10 waiting bays, 1 to 20 mines and 4 smelter unloading bays with 6 waiting bays at the smelter.

In the waiting bays screen shot above the (C)opper bays are empty. All 10 of the trains have picked up ore from the 5 copper mines and are waiting at the smelter. I have more copper mines than I can use, the two green lights next to the C are showing that there are 2 mines ready for loading. The (I)ron trains are mostly in the waiting bay, I currently have only 1 active Iron Mine and the smelter is emptying the trains faster than the mine can produce material.

User avatar
Lav
Filter Inserter
Filter Inserter
Posts: 384
Joined: Mon Mar 27, 2017 10:12 am
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Lav »

I'm widely using station enabling/disabling in my games. I don't use dedicated waiting bay stations however, and am too lazy to cover my entire factory with circuit networks. So my system is fairly simple:

1. Resource collection trains bring resources from mines to "central" distribution stations. Depending on deposit size I may use one or two trains per deposit, and the stations on these routes are always active.
2. Resource distribution trains bring resources from "Centrals" to all recipients. Their schedule is fairly simple:

a. Go to Central loading station until full inventory.
b. Go to each consumption station in sequence until inventory is empty OR consumption station has sufficient resources (amount depending on station needs).

3. Resource consumption stations are the ones that get disabled - their enabling criteria is that the stores of resource they're receiving become too low.

For example, when iron stores at my science station become < 3K, the station gets enabled. A train immediately departs from the distribution station, arrives to the science station, and unloads until station stores reach 12K. The station itself gets disabled pretty quickly after train's arrival when the stores exceed 3K threshold, ensuring that other trains from the distribution station won't route to it.

Essentially, most of the time my distribution trains are staying on the central stations, ready to depart to whatever consumption station gets enabled first. There may be several distribution trains per central station, each with identical set of orders.

Actually, I'm pretty sure I could get away with naming all consumption stations for the same resource identically - unloading varying amounts could be done with a single decider combinator per station instead of putting the conditions into train orders.

Terukio
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Mon Mar 21, 2016 11:30 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Terukio »

Why are you disabling the waiting bays? No matter what the trains have to be somewhere and the waiting bay (or depot) is their resting spot.
I choose to disable the waiting bays only when the outposts don't have enough ore to be worth the trip. This way, my trains aren't needlessly going to the waiting bay when they could instead be traveling from point A to point B and back again without the need of an additional trip. For example, if I have 3 mines and they're all saturated with ore, I don't want my train going to the waiting depot when it could just be going from the mine to the smelters and back again.

Since your trains go to the waiting bays, I'm assuming you turn on/off a rail signal allowing only a certain amount of trains to go to the mines that have ore. I suppose that is essentially what I would like to do, but I can't shake the feeling that making a needless trip to the waiting bay is a waste of the train's time.

I will give your ideas a try though, with new 4x4 intersections including that roundabout square you have. By chance do you have a blueprint?

-------------------------------

Loving all the input guys, keep the ideas flowing!

Terukio
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Mon Mar 21, 2016 11:30 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Terukio »

Zaka,

I re-read your post a couple of times now and I can't quite grasp how you could possibly have the throughput required for you setup. Say you had 2 mines with resources ready to go, either all 10 of your trains path to those two mines which require a decent amount of stacker lanes such that your lines don't back up, or you limit the amount of trains released to the outposts equal to the number of mines (2 in this case) that have ore. 2 trains going back and forth from a mine to the smelting is no where near enough throughput. How do you get around this? Let trains equal to two times the number of mines available be released from the waiting bay? Which would also cause back ups at the mines?

Zaka
Inserter
Inserter
Posts: 36
Joined: Mon Jun 27, 2016 5:23 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Zaka »

Lav wrote: Essentially, most of the time my distribution trains are staying on the central stations, ready to depart to whatever consumption station gets enabled first. There may be several distribution trains per central station, each with identical set of orders.
I've gone the other way on this. To build green circuits I need two Copper Trains and one Iron train. those trains wait at the Green Circuit Unload until they are empty. Then they depart for the Smelter output, load up and go back to Green Circuit Drop off and wait again. I use a fixed number of trains based on the needs of the sub-factory.
Terukio wrote:I choose to disable the waiting bays only when the outposts don't have enough ore to be worth the trip. This way, my trains aren't needlessly going to the waiting bay when they could instead be traveling from point A to point B and back again without the need of an additional trip. For example, if I have 3 mines and they're all saturated with ore, I don't want my train going to the waiting depot when it could just be going from the mine to the smelters and back again.
What do you do when two trains complete unloading, but only one mine is ready? It would seem to me that this is were the "No Path" problem happens. Have the waiting bay in the schedule gives the train a destination after departing the smelters. See my Rule #1: A Train should only move when it has a destination.
Terukio wrote:Since your trains go to the waiting bays, I'm assuming you turn on/off a rail signal allowing only a certain amount of trains to go to the mines that have ore. I suppose that is essentially what I would like to do, but I can't shake the feeling that making a needless trip to the waiting bay is a waste of the train's time.
I don't disagree that it is a waste of time, but if you don't control the number of trains that are going to the mines you end up with trains with no destination. So we have the corollary to Rule #1: the number of trains that are released from the waiting bay MUST BE LESS THAN OR EQUAL TO the number of mines with resources to load.
Last edited by Zaka on Sat Jun 03, 2017 4:35 pm, edited 2 times in total.

Terukio
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Mon Mar 21, 2016 11:30 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Terukio »

Zaka,

I think I've moved towards your idea of having the waiting bay always be an option. Although it is a waste of time, I can control trains this way. In response to my previous statement about not being enough throughput, I've decided to let trains equal to (iron ore available at all outposts/8000) be released from the waiting bay. In order to make this work properly, I will only output the total ore available at a station if that station has >=8000 ore. So if a station only has 7000 it will be closed and output 0 ore. If it has 17000 ore it will be open and output 16000 ore to the waiting bay allowing 2 trains to leave. Also, I've decided to incorporate an escape route after the stacker before the mining outpost so that trains can leave the station if it happens to close during waiting time.

Why do I care about outputting the ore value? Well, I don't just want one train working because I only have one mine, I want trains equal to the amount of available ore/8000 because that way trains can queue up at the station efficiently.

This is all contingent upon a question I cannot answer at this time: "If a train paths to an iron mine and it shuts down while en route or at the stacker, will it go to another open iron mine or will it go drop off an empty load at the smeltery?"

I guess if one train every now and then goes to the smeltry empty its not the end of the world, but if it happens more often than not, that is needless down time.

Best I can do right now is brainstorm as I don't have access to my factory to test these theories. Let me know what you think.

Zaka
Inserter
Inserter
Posts: 36
Joined: Mon Jun 27, 2016 5:23 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Zaka »

Terukio wrote:I've decided to let trains equal to (iron ore available at all outposts/8000) be released from the waiting bay. In order to make this work properly, I will only output the total ore available at a station if that station has >=8000 ore. So if a station only has 7000 it will be closed and output 0 ore. If it has 17000 ore it will be open and output 16000 ore to the waiting bay allowing 2 trains to leave. Also, I've decided to incorporate an escape route after the stacker before the mining outpost so that trains can leave the station if it happens to close during waiting time.

Why do I care about outputting the ore value? Well, I don't just want one train working because I only have one mine, I want trains equal to the amount of available ore/8000 because that way trains can queue up at the station efficiently.
Thoughts that make you go "Hmmm". I see the goal is faster resource movement, but I'm not sure if my system would be compatible with the idea. Although in general I like it.
Terukio wrote:Let me know what you think.
I like your ideas and would be interested to see how you implement them.

Terukio
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Mon Mar 21, 2016 11:30 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Terukio »

Zaka wrote:I like your ideas and would be interested to see how you implement them.
I'll see what I can do when I get home in a little while, might not be able to get much done today as I have other obligations, but I will report back here with my findings.

Zaka
Inserter
Inserter
Posts: 36
Joined: Mon Jun 27, 2016 5:23 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Zaka »

Terukio wrote:I will give your ideas a try though, with new 4x4 intersections including that roundabout square you have. By chance do you have a blueprint?
I currently have 4 blueprints and they are shamelessly based of the rail layout from Zisteau's Factorio Meiosis youtube series.
https://www.youtube.com/playlist?list=P ... XYpCE4UIr3
The blueprints are in 4 versions Solar/No Solar and 2 lane and 4 Lane and have "Armoured" sections in the Mk2 (2 lane) version that are suitable for extending the rails beyond the walls. All rails have installed wiring:

Mk2 Rails: https://drive.google.com/open?id=0B1hy5 ... WxMRjhTRjg
Mk2 Rails No Solar: https://drive.google.com/open?id=0B1hy5 ... DBLX3JHSXc
Mk3 Rails: https://drive.google.com/open?id=0B1hy5 ... zhQcGd6bjg
Mk3 Rails No Solar: https://drive.google.com/open?id=0B1hy5 ... GZsYXBHWUk

(edited because the blueprint books are just too **** big)

Zaka
Inserter
Inserter
Posts: 36
Joined: Mon Jun 27, 2016 5:23 pm
Contact:

Re: How to PROPERLY use Enable/Disable of a Train Station

Post by Zaka »

Terukio wrote:I re-read your post a couple of times now and I can't quite grasp how you could possibly have the throughput required for you setup. Say you had 2 mines with resources ready to go, either all 10 of your trains path to those two mines which require a decent amount of stacker lanes such that your lines don't back up, or you limit the amount of trains released to the outposts equal to the number of mines (2 in this case) that have ore. 2 trains going back and forth from a mine to the smelting is no where near enough throughput. How do you get around this? Let trains equal to two times the number of mines available be released from the waiting bay? Which would also cause back ups at the mines?
I didn't see this earlier, so I'll tackle it now.

1: All trains in waiting bay. No mines requesting pick-up.
2: Mine 1 requests pick up. Count +1.
3: Release Train from waiting bay. Count -1.
4: Mine 2 requests pick up. Count +1.
5: Release Train from waiting bay. Count -1.
6: Mine 1 requests pick up. Count +1.
7: Release Train from waiting bay. Count -1.
8: Train arrives at smelter.
9: Mine 2 requests pick up. Count +1.
10: Release train from waiting bay. Count -1.
11: Train arrives at Smelter. Train arrives at waiting bay.
12: etc.

Multiple trains can be released to service one mine, but they will only be released when the mine calls for pick up. The mine station logic will only allow a train to be requested after the first train has departed (#6 above).

If you look at the picture of the waiting bays a couple of posts up and read the text I state:
Zaka wrote:In the waiting bays screen shot above the (C)opper bays are empty. All 10 of the trains have picked up ore from the 5 copper mines and are waiting at the smelter. I have more copper mines than I can use, the two green lights next to the C are showing that there are 2 mines ready for loading. The (I)ron trains are mostly in the waiting bay, I currently have only 1 active Iron Mine and the smelter is emptying the trains faster than the mine can produce material.
This was not a mis-type. 10 trains have been used to service 5 mines and 2 mines are calling for service again (but all the trains are moving to the smelter, waiting or unloading at the smelter, or moving to the waiting bays).

Post Reply

Return to “Gameplay Help”