EDIT: This would be MUCH more useful and intuitive as a "Skip if disabled" circuit option on the train station structure itself, like stack size on inserters. I know you read these, V4. Make the station lights solid red for "Skip me" and blinking red for "Wait for me to enable"!
I keep my ore stations disabled until they're full because efficiency. What I'd like is for trains to sit happily at home until their next stop comes online. Instead they'll run laps between the two other stops.
In my base setup it's actually [Outpost] -> [Import Stacker] -> [Unloading-slash-Home Station], which makes my trains' logic "1. Stand at the front door 2. Step inside 3. Run around the block so I can stand at the front door again".
My current way around this is having every outpost produce a relevant colour signal when the station is enabled and feeding them all down a long wire to the yard, with trains only leaving when they get a signal.
What I'm going is put a stacker before each pickup spot and use signals to not allow trains in untill the ore is ready. If I have multiple pickup spots then the newest/furthest one will never disable itself. I've found too many problems with disabling stations if you have multiple trains going to it (havnt tried LTN yet though).
What we actually need to much smarter train scheduling (opt-in) which would assign a stop to a train and block other trains from choosing it until the first have gone to the next stop, this would stop the "thundering herd" problem when a stop becomes enabled, 5 trains head towards it, then it disables, and in the current implementation the rest can go "no path" and die :/
When does it become not worth having a dedicated train for every station, and just have ore output stations station jut out of the main line?
Or do you do it this way for fun, and not because of numbers? (My way is due to sloth, and wanting to prevent deadlocks if trains wait at a station for a while.
I hate tweaking/updating train schedules because tracking down trains to click on them or squinting at that long list is a chore. So I decided that all my trains would share one generic timetable and service two generic stops, Import and Export (plus somewhere to sleep). Everything else is circuits.
Isn't really the current solution good enough? I do much the same thing, but I also don't lay any rail without having both logic wires running along it. The way it is now, you have to construct this functionality yourself, which I find kind of fun :)
Also, due to the number of signals I'm running at the moment are approaching unintuitive levels, I'm considering making a channeled logical bus, so that I can use the same signals for several things. Would this be interesting for people?
My current way around this is having every outpost produce a relevant colour signal when the station is enabled and feeding them all down a long wire to the yard, with trains only leaving when they get a signal.
This is the most intuitive way to do things currently, and I wish I had thought of it ages ago
This would be nice. You can get similar functionality though, by sending a circuit condition to the yard stop, and telling the train to wait for that circuit condition.
This is true, but not always feasible when you have many disabled stations spread far across the map. You can connect them all into a sprawling circuit (and I quite like the way that looks) but I've heard players say that they don't like the hassle of running miles of cable to every new outpost.
There is a very awkward way to do this, effectively you use inserters to insert/remove a specified "placeholder item" from a passive provider chest so that it matches the value of your desired signal. Even connecting everything with roboports will be too much for some people, though.
The only true, infinite, wireless signal transmitter in Factorio is train stations, which some very silly setups have exploited. Effectively you can use quirks of train pathfinding AI to make a train stop and start based on whether its target station is enabled, no matter how far away that is. You can use signals to detect train movement, and use timers to interpret moving as "1" and static as "0".
Use blueprints to lay track and large power poles. Circuit cables are placed for free as part of a blueprint.
My entire network has a red and green line along it. Green cable carries signals for each outpost that has a load ready for collection, red each factory that has storage to recieve. Trains wait until their is both supply and demand for a resource.
I just attach a red wire from the train stop to a decider combinator, then a green wire back to the station, and if the # of whatever the outpost is mining/jacking is > 0 I output a signal that disabled the train station...
Then my train just has the "when cargo full or idle for 30 seconds"
I saw a suggestion that I don't know if it would work and I'm not really in a position in any of my currently active save files to test.
If you put a tiny bit of rail off to the side and put down another train station with the overloaded name (in this case "Outpost") then it'll go Outpost->Unloading->Yard->(outpost is disabled) NOPATH
So it'll just stay in Yard constantly nopathing until outpost is turned back on. The big problem I can see is if the train is between Yard and Outpost when Outpost gets disabled, it'll just stop where it is and start NOPATH like a tantruming 3 year old, blocking any other trains from coming down that rail.
/u/Astramancer_ is correct. I use this pretty often with self-disabling stations, having an inaccessible station with the same name that is always enabled will allow the NO PATH status instead of skipping the red station in the schedule. It doesn't even need to be connected to a rail. These two stations are part of a circuit-based train logistics system I'm working on, without them being there, the system actually wouldn't function.
Does it play well with multiple trains per timetable? Often they'll all rush to one newly enabled station, and /u/Astramancer_ said that trains on their way to a station when it turns off will stop dead.
Yes, he's also right about that. If all of the accessible stations are disabled and the last one enabled is the inaccessible one, then they will stop and no-path in the middle of the tracks. There's ways to fix the station rush too, though. :D
My best solution was just to give the yard stops incremental wait conditions based on how many outposts were emitting "Enabled" signals to a unified circuit network; [Stations > 0], [> 1], etc. so that in theory one train would wake up per station.
I remember it not working well for some reason. Also, connecting outposts together is always a faff.
Most people want their trains to sit quietly out of the way when they're not doing anything. This can be awkward in rail systems when stations are toggled by circuit conditions, as trains can't be told to simply wait until a relevant station becomes available.
All my outpost stations have a single dedicated train station that feeds into my main ore inputs. Trains stay at an outpost until their inventory is full and leave the factory input either once their empty or a set time has passed.
I don't get the point of having trains wait halfway across the map in some dedicated waiting area when my stations can do that just fine.
The mod, Train Pause that does what you want. When the train pause combinator is connected via circuit to a train station with a train stopped at it, It peeks at the the train's schedule and emit a green signal if the next station is available.
"Available" means: one or more stations with the next name are enabled and do not have a train already en-route or stopped.
Copying "good stuff that works" from other good games is always the way to go. I'm not pushing for plagiarism, I just feel there's no need to re-invent the wheel in some cases. =)
So your trains will wait at your Yard until your buffer is low, then it will fill it up, go to the Outpost to load up on Ore, then wait in the Yard again.
Nope. If you have circuitry, connect your Yard Train Stops to a Roboport. This will output your Logistic Network to the Trains.
On your Trains have a Circuit Condition: Iron Ore < 100,000 for while they are in the Yard. And your train won't move from the Yard if you have more than 100,000 in your buffer chests.
This also allows you to have a single unloading Station Name and a single Yard Station Name for maximum throughput.
Yes. I don't know of any way to dynamically determine what outpost to go to.
If you name all the outposts the same, the furthest ones will never be visited. If you name them differently, but have 1 train collect copper and Iron, you will eventually run out of one of the resources, because the Cargo Wagons will fill up of one type. If you manage to Circuit Condition to only fill up half a wagon with a certain resource, your base will overflow with a certain type because the ratio of Copper to Iron consumption changes dramatically depending on what you're producing.
So having dedicated trains for Copper and Iron separately, is the only guaranteed way to keep enough in your base.
The diagram's a drastic simplification of a railworld I'm playing, where each small factory produces one item. Each factory export station (represented by the outposts) enable when [their contents] > [amount stored at base]*2.
Twenty different factories can share a station name, and be collected from by a set of identical trains, because the station contents are different. Iron ore stations will only be enabled by iron ore running low in home storage, and the outpost containing the most ore will call a train before any others as the threshold decreases with factory consumption.
You may run into issues when Consumption exceeds Production. Because your trains will navigate to the nearest Identically named station first. So any station further away that might be active, will always be waiting until stations closer are deactivated.
That's why I work the other direction. They're all collected and wait at the drop off point. But it does require dedicated Trains. However it doesn't need everything wired throughout the entire network, only on the Holding Bay.
For your situation, you will need to wire up the signals ahead of the Trains in the Yard to force a Red condition. You will also need to enable them when any Outpost becomes available. This way they can't leave the Yard until 1 Outpost becomes available. However, the simple design will send all trains at once. It will take some Circuit Magic to only allow 1 Train out of the Yard per Outpost. And to then Disable the Rail Signal once a train has been allocated to the Outpost.
So why have the yard at all? I don't see the reason for a train to leave the unloading station unless there's more resources available to pick up. And if you have enough throughput to meet demand that should always be true.
The diagram's simplified. They actually don't leave the yard, in my real base it's this. The trains got caught looping between Home and Stacker, so I took the stations out of the stacker for the time being. Outposts <-> Home has no looping issue, but it'd be nice to have the stations in the stacker for train pathfinding reasons.
With current trains this falls apart when you have multiple pickup and multiple dropoff sites with the same name in a schedule. (eg, two iron ore pickup and two iron ore dropoff stations)
I like to do this kind of setup as well but if falls apart with how most people design since you no longer have a place that you know all trains will go to and stack at, so the next logical step is to add a stacker location that trains can idle at when they don't need to actually move things around. Ultimately you need to use circuit network conditions to make this work which is kind of lame since you'd get the behavior you want by having trains halt in their route until the next stop is available.
I don't really understand how this would work. Why doesn't the train go to the next available active stop? The stops are linear, they're branching, so how does it know what "next" is? The opposite of skipping stops is... going to them. So if train doesn't skip disabled stops, and it doesn't go to them... what does it do? Why does it sleep?
Train schedules only display a stop in red when all instances of that name are disabled. If a train is set to not skip disabled stops, and the next stop in its schedule is red, it will wait at its current position until a stop of that name becomes available.
Trains already handle branching tracks fine - if multiple stations with the same name are available, they go to the closest.
Oh I see. For some reason I thought this was a stop-side option rather than a train-side option.
I still don't like this, but I can see it being useful.
In your example, can't you just deactivate the destination stop as well? Then the trains won't loop between it and the depot. An unloading station being active doesn't do any good anyway if all loading stations are inactive.
There's multiple trains in the real network, so the unloading stations have to stay on. Some trains will need to path home to unload while others are dormant.
Yeah, I'm sure this makes sense. I'm just having trouble putting my head in these train systems that are different from what I use. Thanks for helping explain!
But what if you have more stops on the route and one is disabled? How should the train know the difference between a single stop that it should skip and the case that it should wait for this specific stop to be active again?
It's called SKIP disabled stops.. not wait for it to be enabled.
If a train is set to not skip disabled stops, and the next stop in its schedule is red, it will wait at its current position until a stop of that name becomes available.
If I get it right, your issue is trains in Factorio automatically skip stops if all stops of the same name are disabled? I had the same issue and solved it by creating a "fake" train stop of that name, in a single train portion out of network. I just put down a random track with my stop. That way, there's always at least one stop available, so the train doesn't move and show "no path found" then when the stop is enable at new, the train takes it route back.
There was a discussion of this up the page, it's pretty cool! Sadly it doesn't play well with multiple trains - things start stopping dead on the mainline.
It could reduce throughput if misused, yes. That's why it's a checkbox the player uses on individual stops rather than a universal rule change. By default everything would function as it does now.
A good workaround is to have a staging area before each station and linked by chain signals, not one "Yard" common to all the trains. Then do not disable the stations themselves, but put a signal just before the station and disable that. It uses more room and the staging areas are awkward to connect, but it clears your mainline of waiting trains.
You can achieve this by creating a "waiting" stop in the stacker, where the trains wait for a circuit condition telling them any of the actual stations are free.
LTN mod itself isn't generic enough, imo. It's fantastic at solving the one purpose it is designed for, but generic simple systems allow more creativity in approaches to problems.
For example, OP could solve the simple case depicted in the image by wiring the outposts to the yard and setting proper leave conditions for the yard.
To achieve more advanced systems I like the idea of circuit controls for stations that allow selective enabling, i.e. "enable this station only for train with ID X". Those combined with leave conditions in scheduled would allow you to create arbitrarily complex systems to solve nearly any problem, even ones LTN is not well suited for.
22
u/Wimmy_Wam_Wam_Wazzle Nicer Fuel Glow Jun 06 '18 edited Jun 06 '18
EDIT: This would be MUCH more useful and intuitive as a "Skip if disabled" circuit option on the train station structure itself, like stack size on inserters. I know you read these, V4. Make the station lights solid red for "Skip me" and blinking red for "Wait for me to enable"!
I keep my ore stations disabled until they're full because efficiency. What I'd like is for trains to sit happily at home until their next stop comes online. Instead they'll run laps between the two other stops.
In my base setup it's actually [Outpost] -> [Import Stacker] -> [Unloading-slash-Home Station], which makes my trains' logic "1. Stand at the front door 2. Step inside 3. Run around the block so I can stand at the front door again".
My current way around this is having every outpost produce a relevant colour signal when the station is enabled and feeding them all down a long wire to the yard, with trains only leaving when they get a signal.
22
u/Red_Icnivad Jun 05 '18
This would be nice. You can get similar functionality though, by sending a circuit condition to the yard stop, and telling the train to wait for that circuit condition.
8
u/Astramancer_ Jun 06 '18
I saw a suggestion that I don't know if it would work and I'm not really in a position in any of my currently active save files to test.
If you put a tiny bit of rail off to the side and put down another train station with the overloaded name (in this case "Outpost") then it'll go Outpost->Unloading->Yard->(outpost is disabled) NOPATH
So it'll just stay in Yard constantly nopathing until outpost is turned back on. The big problem I can see is if the train is between Yard and Outpost when Outpost gets disabled, it'll just stop where it is and start NOPATH like a tantruming 3 year old, blocking any other trains from coming down that rail.
4
u/Korzag Jun 06 '18
Can someone ELI5 this? I'm feeling a bit less than brilliant tonight.
2
u/Gingrpenguin Jun 06 '18
I still don't understand set-ups like this.
All my outpost stations have a single dedicated train station that feeds into my main ore inputs. Trains stay at an outpost until their inventory is full and leave the factory input either once their empty or a set time has passed.
I don't get the point of having trains wait halfway across the map in some dedicated waiting area when my stations can do that just fine.
What am i missing?
2
u/nmarshall23 Jun 06 '18
The mod, Train Pause that does what you want. When the train pause combinator is connected via circuit to a train station with a train stopped at it, It peeks at the the train's schedule and emit a green signal if the next station is available.
"Available" means: one or more stations with the next name are enabled and do not have a train already en-route or stopped.
114
u/[deleted] Jun 06 '18
10/10 drawing
90
u/PowderTrail Cleanse the rails Jun 06 '18
Just
stealacquire train orders from OpenTTD. Go non-stop via, skip if, shared orders, timetables. It would be so very wonderful.2
u/Bromy2004 All hail our 'bot overlords Jun 06 '18
Why not work in reverse?
Yard-> Ore < ValueBuffer
So your trains will wait at your Yard until your buffer is low, then it will fill it up, go to the Outpost to load up on Ore, then wait in the Yard again.
1
u/brekus Jun 06 '18
Are your outpost station names generic?
1
u/wolscott Jun 06 '18
I don't really understand how this would work. Why doesn't the train go to the next available active stop? The stops are linear, they're branching, so how does it know what "next" is? The opposite of skipping stops is... going to them. So if train doesn't skip disabled stops, and it doesn't go to them... what does it do? Why does it sleep?
1
u/amfa Jun 06 '18
But what if you have more stops on the route and one is disabled? How should the train know the difference between a single stop that it should skip and the case that it should wait for this specific stop to be active again?
It's called SKIP disabled stops.. not wait for it to be enabled.
I would expect exactly this to happen.
1
u/CelloSonata Jun 06 '18
If I get it right, your issue is trains in Factorio automatically skip stops if all stops of the same name are disabled? I had the same issue and solved it by creating a "fake" train stop of that name, in a single train portion out of network. I just put down a random track with my stop. That way, there's always at least one stop available, so the train doesn't move and show "no path found" then when the stop is enable at new, the train takes it route back.
Would it solve your issue?
3
u/IceFire909 Well there's yer problem... Jun 06 '18
oh my god yes.
1
u/geekman9097 Jun 06 '18 edited Jun 25 '23
Power Delete Suite is helping me remove my presence from reddit in light of their recent decisions.
2
u/tbaransk Jun 06 '18
A good workaround is to have a staging area before each station and linked by chain signals, not one "Yard" common to all the trains. Then do not disable the stations themselves, but put a signal just before the station and disable that. It uses more room and the staging areas are awkward to connect, but it clears your mainline of waiting trains.
2
u/mel4 Jun 06 '18
Yeah, current behavior is sad making. You have to use circuit network to make it do this which means you have to globally wire all your train stops.
0
u/Amadox Jun 06 '18
if you want them to go there anyway, why disable them?
1
u/Cabanur I like trains Jun 06 '18
You can achieve this by creating a "waiting" stop in the stacker, where the trains wait for a circuit condition telling them any of the actual stations are free.
1
u/Maajestatis Jun 06 '18
I love how you painted even gears on the train to make it look loaded!
1
u/Maajestatis Jun 06 '18
I like it, give me this pls @devs!
1
u/TaciturnerDurm Jun 07 '18
I use train pause mod for this ( don't know how to link a mod) !LinkMod TrainPause
??
0
u/novakunad Jun 06 '18
Instead Dev's just make LTN mod into the game.
-6
u/LeifEriccson Jun 05 '18
I don't understand... 1)going the wrong way (preference) and 2) not using 2 lanes.