Is there a train in the station? (and other train help)

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
RoddyVR
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Thu May 07, 2015 6:29 am
Contact:

Is there a train in the station? (and other train help)

Post by RoddyVR »

I'm planning on starting on a real railroad binge (only did little ones so far), and looking for good ideas to use. Hoping that some wheels I wont have to invent.

1. anyone have a way of knowing (for the circuit network) that a train is in the station? need this to limit the smart inserters from taking stuff out/putting stuff in at the very last moment the train is in the station (this seems to be a problem in a bunch of the methods i'd like to use).
2. need advice on how to handle refueling of trains. separate refueling station, or an inserter at the main base that puts fuel into the locomotives, or small refueling setups at each stop that need to be supplied by the very trains that they're feeding.
3. What items should be brought to the outposts by every train (thinking of a bit of reserved space in first car of each train that carries essential resupplies to all outposts). walls, lasers, construction bots, electric poles, repair kits... is there anything i'm missing?

In general, i'd like an opinion from those who have done rail systems on the setup I plan to use... maybe you've tried something I think is a good idea and have found flaws that I don't see yet. might save me from needlessly building/setting up something useless (i'd appreciate it).

1. One way rails only. every path is two lines, one in each direction.
2. Two engines (same direction) and 4 cars on each train. probably engine-4 cars-engine
3. Three way intersection only. considering the length of my trains I think building large enough circle intersections to avoid the problems that they seem to have seems unwieldy.
4. signals along the tracks every 7-8 car lengths (a bit longer then the trains, but basically train length), so that one train can almost follow the one in front of it at min distance.
5. don't have a specific design in mind yet, but for stations planning loading on one side of car, unloading on the other, most likely powered by substations (so that poles don't interfere with inserters and belts)
6. I'm hoping I can make it so that any car can have anything loaded into it, and separate the cargo by changing what stations the trains go to, but I cant figure out a way to do that with the first car (that I would like to carry resupplies for the outposts AND some cargo). If someone doesn't suggest some method of controlling what gets placed into a wagon (other than assigning filters to the whole wagon), i'll have to designate the first car for specific cargo (which really plays havoc with my oil trains, might have to not use first car of oil trains).

Some info I didn't run into, though suspect its probably in the wiki or forum.
How much fuel does the train burn? Is it a safe bet to assume that atleast one piece of fuel will be burned up between two stations, and how far apart do they have to be (how long a ride lets say)? I would like the trains to run on solid fuel but if each of those takes for ever to burn up and I decide to use the fuel as a marker for when a train is in the station, then I might have to go to wood if burns faster.

Some of the loading/transport logic seems MUCH easier if I know that when a train is unloaded, it is FULLY unloaded (including all the supplies and so on). Is doing something like this (and recycling the unneeded stuff back onto the train) worth trying to set up, or will this be way too cumbersome, and I should just find better logic for the loaders?

How long does it take a full row of inserters (or two rows if that's worth doing) take to unload a fully loaded car into chests(and load, if its not same time)? How long do you generally make your trains wait at stations?

One ore unloading station at the main base, or one for each ore type? sorting it out seems like an easy thing to do before it gets to smelters, but would then probably have to have more then one station feeding into the sorter anyway (once the number of trains goes up) and then might as well designate stations and not sort at all. cant decide.

any advice from those who have built train systems is highly appreciated, I like to know what i'm building before I invest a bunch of time into it.

User avatar
DerivePi
Filter Inserter
Filter Inserter
Posts: 505
Joined: Thu May 29, 2014 4:51 pm
Contact:

Re: Is there a train in the station? (and other train help)

Post by DerivePi »

1. "way of knowing (for the circuit network) that a train is in the station?" - have a smart inserter off load one unit of fuel into a smart chest to register when a train has arrived (fuel can be loaded at the same time just offset it a tile). Use a timer to reset after a given amount of time. More advanced - use a unique item stored in the first wagon to identify what train is at the station. Ex. smart inserter offloads 3 wood into smart chest. Based on a count of 3 the station is programmed to load all of the items from bin #3. (note - very complicated and soon to be unnecessary due to planned game revisions).
2. "how to handle refueling of trains" - I use a central factory layout. All stations at the central factory have refueling for the trains. Otherwise, have a delivery train deliver coal (as well as other items) to your outposts.
3. "What items should be brought to the outposts by every train?" - do a search for "FETCH" most of the items you want to have on hand will be used by the player and the player can only be at one place at a time. Basically, you need a pack mule to follow you around and resupply you. Other items I like to have on hand - RR straight, RR curved, RR-Signals, RR Station Marker, Big Electric Tower, Red Wire, Blueprint of RR Circle, Roboport, Con Bots, Supply chests, medium electric poles, Ammo of choice, Distractors, Poison

General:
1. One way rails only. - yes, definitely. Further, be consistent with your handedness. Use right handed lanes or left handed lanes, don't mix.
2. I have a single engine with 4 wagon preference. The extra acceleration that comes with another engine doesn't win me over.
3. All intersections should be a circle. And, the circle shall be owned by only one train at a time.
4. Signals with that spacing would be advantageous. I usually place additional signals as an after thought.
5. I would suggest unloading at one station and then have another station to load. You can maximize the unloading and loading process. Further the unloading station could be product specific and the loading station could be generic and shared for several different routes of trains.
6. Have a look here for the wagon sorter - https://forums.factorio.com/forum/vie ... 8&start=70 - At each station, offload from the active wagon to a filtered stationary wagon with the filters set to what items you want delivered there.
http://i.gyazo.com/3e259112ad3aab64b4a8094bc589b9d7.jpg

Further:
- Keep trains fully fuelled with anything. They don't use much fuel. I don't understand what rate of consumption has to do with using the fuel as a marker.
- For ores, you can unload a full wagon in about 15 seconds. For circuits or (worst case I think) alien artifacts the stack size is considerable and you will need much longer. Additional features for the game are planned on that will address recognizing the load condition of the train. Again, use a separate loading and unloading station.
- The simple way is to have specific stations for specific ores. "Sorters" (do a search) are expensive in material and space.

Here is a link to a schematic that I developed some time ago that will ID a train and then load a specific package. Very hard to setup, but fun to develop.
https://forums.factorio.com/forum/vie ... f=8&t=4842

RoddyVR
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Thu May 07, 2015 6:29 am
Contact:

Re: Is there a train in the station? (and other train help)

Post by RoddyVR »

In the last couple days, got my rail road up finally. I'm happy with the ore outposts, they're simple, load all the ores into the trains (mixed) and sort (via robonetwork) at the unloading station in the main base. I know i'll run into problems if the smelting doesn't keep up with mining, and for now just handling it with large amound of storage at the unloading station. Eventually, when I setup up a proper robonetwork at the central base, will probably stretch a single wire along all the rails from a smart chest that has a single coal if coal needs to be mined, a single iron if more iron is needed and so on.
Oil, I tried to set up a little more structured from the beginning.
Oil trains are dedicated to oil only, and their loading/unloading is separate stations from the other
At home base the unloading station takes out all filled barrels (simple smart inserter filter on full barrels) and fast inserters fill up the cars with empty barrels. no logic used at all in unloading station. With 7 inserters per wagon on each side, it takes9 swings of the fast inserter to completely empty a full car, so even a 10 second stop will be enough to take all the oil on any train.
At oil oupost,
6 insterters for each wagon (with maxed stack bonus that's 30 barrels per "swing" of the inserters) with incoming barrels split evenly among the 6 chests. (actually split evenly among all 24 for the train).
train arrives always filled to the brim (for now with only empty barrels, through later will have one train making a circuit of many outposts, so it may come half full, but still with exactly 300 barrels total). If there are atleast 30 full barrels in the chests for a car, then the smart inserters on the other side activate to take out 30 empty barrels (one swing), this opens up the space in the wagon for the fast inserters on the loading side to put in their 30 barrels, the spread of barrels is even among the 6 chests, so there will never be 6 barrels in one and 4 in another. if there are still over 30 barrels in the loading side, then both sides take another swing. Early version had 7inserters per wagon, but encountered problem that when 35 are taken out, only 30 can be put in (cause there are only 3 cleared stacks, and one half stack, which does not allow full barrels to be input. Only thing I still have to solve is the possibility of train leaving between the empties being taken out and the full being put into their place. haven't had it happen yet, but suspect its possible.
My first attempt at a timing circuit to keep track of when loading/unloading can happen did not work... gonna write out my thoughts on how to set it up, and hopefully either i'll see the error while writing it, or someone can point me to it if they see it.

Train arrives,
Smart inserter A takes fuel from locomotive, puts it into chest A. Inserter A red condition prevents it from working while fuel is in chest A (so it doesn't empty the locomotive).
When there is fuel in chest A, inserter B starts taking control items from chest B and puts them on a belt. There are enough items in this chest that it takes the inserter 6 seconds to take them all out and put them on the belt. This belt stretches for 25 seconds and takes it's load to inserter C that puts the control items into chest C.
All inserters that unload empty barrels from the train are programmed to do so only when chest C is empty (the 25 seconds that the control items are traveling around the belt).
By the time the last control item is put into chest C, the train has left (25 seconds on the belt plus the 6 it takes to unload and load the items from/into the chests is one second longer then the train is programmed to wait at stop).
When Chest C contains all the control items (I haven't timed how many it takes a smart inserter 6 seconds to move), this activates inserter D to move fuel from Chest A to the chest from which locomotives are refueled.
When Chest A is empty Inserter E moves all control items from chest C back into chest B (they are pretty much next to eachother). With inserter stack bonus this takes way less then 6 seconds to do, so should be finished before next train pulls in.

The length of the belt between B and C controls how long barrels can be unloaded/loaded into train. the amount of control items that goes between B and C controls how long to wait for the train to leave after stopping loading/unloading so that this process is not going on when the train starts to pull out.
I've edited the process while writing it up, this wasn't what I had in the game yesterday, so will try out today to see if it works. if you see any flaws, please let me know.

User avatar
DerivePi
Filter Inserter
Filter Inserter
Posts: 505
Joined: Thu May 29, 2014 4:51 pm
Contact:

Re: Is there a train in the station? (and other train help)

Post by DerivePi »

So here is my concept for a train trigger and connected timer:
TRAIN TRIGGER AND TIMER.gif
TRAIN TRIGGER AND TIMER.gif (25.29 KiB) Viewed 13001 times
Circles with letters are red/green circuits connected to a smart chest - each letter represents a different chest that provides input
The Red/Green lines are the wired connections to the smart inserters

Timer - Using circuit D - provide an "start" condition (ex. coal at train is > 0)
Once the timer is started, the "Second Hand" cycles. Each time a cycle is completed, the "first Hand" adds to it's counter (ie the number of wood items in circuit B are the number of cycles completed - ex. if there are 5 items in B then the timer has operated for 11.25 secs approx.)
Loading/Offloading of a train can be synchronized by reading circuit B (ex. Offload everything from wagon while B: wood < 8, then Load while B: wood > 7). By putting several stacks of wood in the chest for B, you could have a timer that can time for several minutes.

As a note, for some operations, circuit A should be checked to see if the clock is still running because when the clock resets, there is a short time when B may re-trigger as it's smart chest is emptied.

RoddyVR
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Thu May 07, 2015 6:29 am
Contact:

Re: Is there a train in the station? (and other train help)

Post by RoddyVR »

I like the size of your timer and the fact that the condition to it can be set with a number instead of by belt length like I was thinking.
I want to make sure I completely understand how it works, and I think I have an improvement or two.

The Train trigger takes a piece of coal from the locomotive only if the timer's counter (B chest) is empty, that makes sense, what I don't understand is the tie in with the supply line. you seem to want to limit the supply line so that it allows emptying D, but would that not be simpler if you combine the two non smart chests on the train trigger into one, and move the smart inserter that puts coal into train above that one chest with a condition to only fill up the supply chest when D is empty.
__2
DFS
1_F
LLLLLLL

L is locomotive,
D is chest D
F is a fast inserter
1 is smart inserter same as now (coal in d =0 and wood in b =0)
2 is smart inserter that takes fuel from station (coal in d =0, and I guess wood in B > 0 though i'm not sure why you need that). Why do you have it as a condition that train is only refueled while timer is running?)

The timer as I understand is 3 loops,
the Start Loop (the one with chest A) has one piece of wood in it, if the wood is in the chest then there is officialy no train in station. When train arrives the piece is taken out, goes around the belt, but is not put back in until the timer's counter has reached its set number (ie the train has been here as long as its supposed to).
The Timer Loop (the one with chest C) has one piece of wood, that runs around in a circle as long as the Start loop is active. every time the piece goes through the chest, it tells the Counter Loop to add one to the count.
The Counter loop (the one with chest B) has a bunch of wood in the bottom chest (enough to satisfy maximum needed for timer), and 0 wood in the top chest when the timer is not running - upto set number when the timer is running. This loop basically starts up when the start loop is active, counts how many time the Timer loop has gone around, and resets when the Start loop is reset.

Two things jump out at me, one is that you set counter = 1 pretty much with the start up of the timer (just a few ticks behind the Timer loop starting up the first time), so you're counting how many timer loops have started, not how many are completed. So when the 5th item is put into B, then only 9 seconds have really passed, when 11.25 pass, the 6th item will be on its way to the chest.
The other is what you "note" at the end, having to check both conditions to make sure you're not catching the timer in reset means that my loading/unloading logic will have spots where I cant connect any more condition other then the timer... not good.
SO I think if i'm gonna have more then just "is a train here checks" at an outpost, i'll add a layer of chests that combine conditions for the number of items in B that I need, and the A condition being true. So that I can be sure that i'm always satisfying both the "timer is running" and "timer count is at X" conditions with one wire connection.

And a sort of general question that this setup brought to my attention. Is there a description anywhere on what order the game checks conditions of various inserters in? what I mean is, in that in your set up, if the game processes inserters in the order of:
1. smart inserter that puts coal into D
2. fast inserter that takes coal from D
3. Smart inserter connected to logic condition D.
then the third inserter will never activate (breaking the whole system).
Same thing on the Timer, if the order is: Smart that puts wood into C then fast that takes it out of C, then the smart that puts wood on belt going to B.
I'm not sure if the game processes inserters in any set order,like all fast, then all smart or something, or in something random/unpredictable like order/time placed on map.

User avatar
DerivePi
Filter Inserter
Filter Inserter
Posts: 505
Joined: Thu May 29, 2014 4:51 pm
Contact:

Re: Is there a train in the station? (and other train help)

Post by DerivePi »

RoddyVR wrote:The Train trigger takes a piece of coal from the locomotive only if the timer's counter (B chest) is empty, that makes sense, what I don't understand is the tie in with the supply line. you seem to want to limit the supply line so that it allows emptying D, but would that not be simpler if you combine the two non smart chests on the train trigger into one, and move the smart inserter that puts coal into train above that one chest with a condition to only fill up the supply chest when D is empty.
My concern is that the fuel taken from the locomotive won't be returned to the locomotive. Over time, the chest will fill and then chest D will always register with a piece of fuel in it. With the separate loop, the return of the fuel is advantaged. When a new train arrives (before the timer starts), the trigger fuel (5 coal for my system) from before will be loaded into the empty space on the locomotive, before the supply fuel is allowed to top off the locomotive. Of course this is unnecessary if the locomotive spends 5 or more fuel.
RoddyVR wrote:Two things jump out at me, one is that you set counter = 1 pretty much with the start up of the timer (just a few ticks behind the Timer loop starting up the first time),
The test timer I assembled actually used fast belts for the second hand. The time it took to complete a loop was about the same as the time the first hand took to dump the first item into the counter chest. But, you are right. The first item will take a different (probably shorter) amount of time to get to the chest. Thinking about it, you could combine the first and second hand loops into just one loop with a relay of chests at the end to trigger the next item (hmmm). Also, the 2.25 sec is a guesstimate.
RoddyVR wrote:The other is what you "note" at the end, having to check both conditions to make sure you're not catching the timer in reset means that my loading/unloading logic will have spots where I cant connect any more condition other then the timer... not good.
Yes, this is a pain. But, can be ignored if you time the train with the timer. Ie, the train leaves before the timer resets.
RoddyVR wrote: And a sort of general question that this setup brought to my attention. Is there a description anywhere on what order the game checks conditions of various inserters in?
I imagine, do to the desire for determinism in the game, that this is not random and that actions are determined on the previous tick and acted out on the next. I will say that smart inserters with an instant trigger (C acts like an instant trigger) will dump things out of a box, but will not grab and move things from a belt.

Thank you for your response! Sometimes I think people don't understand the schematic, but you've grasped it very well.

roothorick
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Mon Aug 11, 2014 5:22 am
Contact:

Re: Is there a train in the station? (and other train help)

Post by roothorick »

RoddyVR wrote:1. anyone have a way of knowing (for the circuit network) that a train is in the station? need this to limit the smart inserters from taking stuff out/putting stuff in at the very last moment the train is in the station (this seems to be a problem in a bunch of the methods i'd like to use).
One trick I know (but never had to use) is pretty easy but kinda messy and relies a little on timing (but in this case, it's unusually robust because it's very simple). Smart chest, smart inserter taking fuel out of the train and putting it in the chest, slow inserter taking fuel out of the chest onto a conveyor belt with another inserter (fast, for safety) putting it back in. Predicate the smart inserter on whatever your fuel source being less than 2. When the train leaves, there's so little fuel in the chest that it quickly empties out onto the belt. Since it's going into the chest faster than it's coming out, fuel > 1 is your signal that a train is present. It works as long as the fuel present in the engine as it arrives is above, oh, 12 or so (if you're getting that low, you either have some VERY extreme lengths to cross, or are doing something horribly wrong), regardless of the actual number. You'll have to refuel the train somewhere else for this to work, as that could block the inserter putting the fuel back in, which would break the timing.
2. need advice on how to handle refueling of trains. separate refueling station, or an inserter at the main base that puts fuel into the locomotives, or small refueling setups at each stop that need to be supplied by the very trains that they're feeding.
Depends on exactly where each station is, really.

If your intended fuel source is basically right there, just run a conveyor from your fuel source to an inserter sitting directly next to where the engine stops. Inserters won't place objects on the track itself; they instead hover over the track, waiting for a train to arrive. If what you're hauling is also the intended fuel, well, there you go. Trivial. Normal or burner inserters usually cut it just fine here; the train will almost always take much longer to load/unload than it takes to top off its fuel.

If not, it's usually easiest to have a simple station near your refinery block/coal mine dedicated to just refueling, that each train stops at for just 5 seconds (or longer, if it takes a really long trip and blows through enough fuel that 5 seconds isn't enough to top off.) Same idea: Inserter (this time usually a fast one) at engine positions pulling fuel off a conveyor into the engine. You really only need one station, at one end or somewhere in the middle -- trains hold A LOT of fuel and can run for literally hours real-world time on a full tank of coal. The refueling station can be quite distant, but if it's also out of the way, that's extra time added to the train's trip. My fueling station is usually right inside my main base, as once I'm rolling out trains, I'm probably at the point where my only coal sinks are vehicles, plastic, and various very low volume products like grenades, so I never expand beyond my very first coal deposit.

I've also used logistics networks to serve fuel to the trains. Just have the inserter pull from a requester chest taking in fuel. Done.
3. What items should be brought to the outposts by every train (thinking of a bit of reserved space in first car of each train that carries essential resupplies to all outposts). walls, lasers, construction bots, electric poles, repair kits... is there anything i'm missing?
Call me stupid, but so far I've been either doing that by hand or running roboports alongside the tracks. If that became impractical, I think I'd just dedicate an entire train to it. For the actual supplies... probably only one stack each of repair kits, laser turrets, walls, maybe gates and replacement bots... if anything else is getting full-on destroyed, I've got bigger problems than a building or two that needs to be manually replaced.
1. One way rails only. every path is two lines, one in each direction.
Very much so established standard practice, but if there's only one train (not route, just one train period) that ever enters that block, it's a waste. One-track-two-way blocks are fine if there's only one train that goes into that block. You can get away with two or three by putting a balloon loop at the end segmented into multiple blocks with signals (protip: put the station on the balloon itself), but even with just two you have a lot to gain from adding the second track. Usually, I'll have two-track-one-way-each "freeways" connecting up single-track last mile blocks branching off to each mine, with a balloon loop just past each outpost station (for no other reason than eliminating the extra engine). The main base stations are one-way-through, with a turnaround going back into the freeway.
2. Two engines (same direction) and 4 cars on each train. probably engine-4 cars-engine
Honestly? Scale the number of cars to the input/output volume of your stations. Most of my setups have only one car per train, and only one train per outpost on a simple end-to-end route -- it's all I need. But, usually, I don't have to go very far. Engines, I say add engines as needed when the train isn't making its rounds fast enough for adding a car to make an appreciable throughput difference. Where exactly that threshold is depends on the distance and is more of a judgement call than anything. In any case, it doesn't need planning in advance -- other than the refueling station, you don't have to change station layout at all to add engines. Just tack 'em on to the end.
3. Three way intersection only. considering the length of my trains I think building large enough circle intersections to avoid the problems that they seem to have seems unwieldy.
Take a YAGNI approach to junctions -- only place junctions where a specific current or planned train route will actually benefit from turning.

Also, in almost all cases, all you really need is a simple double junction (or a variation on it), which can very easily merge four two-track freeways without risk of deadlock, even more if you put multiple in short succession. The only other junction you may need is putting a station very near a two-track freeway on a passing loop with a "half-balloon", "in-line", so a train can go directly to the oncoming track from the station. These junctions are very accommodating to the primitive signal system we currently have, due to their simplicity.

It's very rare that you'll benefit a from full-blown train circle -- the drawback of it needing to be a single monolithic block (currently; chain signals SHOULD fix this) will eat anything you gain, making the double junction (with, rarely, an in-line "half-balloon" a ways "upstream" of the merge direction) much more efficient for "real game" use. (Even with chain signals, a double junction will still usually serve you better.)

Keep the two tracks of a freeway a ways from each other (I find a circle's diameter works best) so you have space to build and signal new junctions.
4. signals along the tracks every 7-8 car lengths (a bit longer then the trains, but basically train length), so that one train can almost follow the one in front of it at min distance.
The rule of thumb is "one train length", using the longest train to use that track as the meter stick, so you've got a pretty good plan already. It's really a maximum though -- if you have existing smaller blocks and have no trouble just making new signals, leave your existing blocks alone, there's no significant downside to them being shorter. I uniformly use 16 (normal) tiles (approx. one engine and car) just for the sake of simplicity.

Junctions are a bit different: you want the blocks in the junction as small as possible to minimize how often a train has to wait for another train, BEING CAREFUL not to create possible deadlocks. This is pretty easy to do with passing loops, basic double junctions, and balloons, but more complicated things like train circles require special considerations.
5. don't have a specific design in mind yet, but for stations planning loading on one side of car, unloading on the other, most likely powered by substations (so that poles don't interfere with inserters and belts)
I don't have a discrete station layout, but I build them from fixed templates -- each car position gets one of a few minor variations on the same specific layout, right down to where the substation, poles, and conveyor belts are positioned, and the head/tail (where the station post is and where the engines will stop) each get a template too. Then I build the station from these blocks based on what I need. In the late game I'll have blueprints of these templates and just plop them down in order.
6. I'm hoping I can make it so that any car can have anything loaded into it, and separate the cargo by changing what stations the trains go to, but I cant figure out a way to do that with the first car (that I would like to carry resupplies for the outposts AND some cargo). If someone doesn't suggest some method of controlling what gets placed into a wagon (other than assigning filters to the whole wagon), i'll have to designate the first car for specific cargo (which really plays havoc with my oil trains, might have to not use first car of oil trains).
This is easy on its surface, but hard in practice. You can't wire a train car like you would a smart chest, so you can't predicate a smart inserter's behavior on what's in the car. There's a few ways around this.

One trick is to play with abusing timing -- how quickly a chest (or conveyor belt) is loaded, how quickly it is unloaded into the train, and how long the train stays in the station. This will break down quickly if the receiving end cannot fully unload the car. (Usually due to not actually using the supplies as fast as they're coming in, which is probably what you want, but exactly what will kill this kind of system.)

Another is to run logic wiring from the outpost all the way back to your main base. I don't know offhand if the large poles can reach with logic wires as far as they do with power transmission -- if not, this will get annoying to build, fast. Once you've got it wired up though, it's pretty straightforward -- lay out and wire an array of smart inserters, set their predicates for "less than" on the things you want to keep in stock, have them throw said items on a conveyor, and have an inserter (a plain old fast inserter will work nicely) load the conveyor onto the train. On the other end, an inserter unloads the supplies into a wired-in passive provider chest (it must be passive, and the place these items will be stored) for your bots to pick up. But if you have one supplying station provide for multiple outposts that are served by separate train routes, this breaks down. You'd need a way to tell which train arrived, and pile some very complex logic (and I mean "full-blown logic gates" level complexity) on top of that. As a workaround, you could put all the outposts served on a single route, with each train visiting every outpost. This will work with multiple trains so long as they all visit every outpost. Inefficient, but you can achieve the same throughput with more and/or bigger trains, so it should be very viable. You'll probably want to reserve a slot or two for each supply, so it doesn't get jammed up with the rest of the system if the trains don't get emptied on the receiving end.

There's probably a way to use a couple reserved slots as signals between the stations via smart chests/inserters, but it's rather nontrivial and the details likely rely on abusing timing, and therefore it would be quite fragile.

As you touched on, another robust solution is simply to reserve or block every slot in the target car, and blindly fill those slots. Not as bad as it sounds -- you can reserve the unused slots explicitly for the cargo you're hauling in the first place, so you can still use (almost) all of its capacity. This poses a problem for oil, yes. (Honestly, I just run a pipeline. Pipes are actually cheaper for the same distance -- pipe-to-grounds are ~1.36 iron plates per (normal) tile traveled, while rail takes 2.25.)

An alternative is to dedicate a train, most likely with a single car, to supplying all stations, visiting each one in turn before returning home, so you can deal with it in a separate loading station and can fully dedicate your main stations to their purpose. You'd have a separate train stop for it at each outpost, with an unloading setup. (This is where the half-balloon above the main junction would come in.) This is the option I'd probably go with, as it requires the least amount of changes to the existing systems, and is probably the most efficient way to supply oil outposts serving by pipeline. (I wouldn't even need to do much with single-track branches -- the station can be on the balloon itself, and segmented, so you can get away with two, maybe three, trains here.)

0.12 is likely to change all of this as you will be able to wire train stops, but details on what exactly that'll enable you to do haven't been revealed yet.
How long does it take a full row of inserters (or two rows if that's worth doing) take to unload a fully loaded car into chests(and load, if its not same time)? How long do you generally make your trains wait at stations?
Two rows are definitely worth it, especially for short trips. Even for longer jaunts, the station can service each train twice as fast and therefore get twice as many trains through in a given length of time.

How fast? Depends. First of all, yes, there's a small difference between loading and unloading. When unloading, the inserters reach to the center of the car, which lengthens their "cycle"; this gets more pronounced the farther they are from that center. When loading, however, they just go to the tile in front of them, which during loading happens to be the train car; this means the length of their cycle is constant vs. their exact position relative to the car, and faster in any case. This difference strikes me as probably unintended, but maybe not, it's been this way for a long time.

Now for actual numbers. My current 14-up design, with all six inserter stack upgrades, can fully load a car with 50-stack items (like ore) in ~9 seconds and unload in ~12. Without the upgrades, simple math says it'd be ~45 and ~60 respectively. Explains why I tend to run such short trains, doesn't it? Reducing the number of inserters, of course, slows down the process, but does have some fringe benefits (less standby power consumption, for one, and keeping all the inserters on one side makes the conveyor paths easier).
One ore unloading station at the main base, or one for each ore type? sorting it out seems like an easy thing to do before it gets to smelters, but would then probably have to have more then one station feeding into the sorter anyway (once the number of trains goes up) and then might as well designate stations and not sort at all. cant decide.
A separate station for each incoming good is much easier to set up, offers higher overall throughput (because they can service trains faster), and has only a few, very minor downsides (requires its own separate buildout with its own rail leg and its own materials; takes more space; may complicate rail layout; possibly very slightly more standby current depending on your design... that's pretty much it). Furnace blocks tend to get very big, very fast, so feeding two blocks from the same position is awkward and has no real benefit.

RoddyVR
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Thu May 07, 2015 6:29 am
Contact:

Re: Is there a train in the station? (and other train help)

Post by RoddyVR »

Been playing on a map where i picked initial settings specialy to force me into using rails. Finaly getting to the point where the initial deposits are running out (and i'm done with all non alien science already), and have started up heavy use on my rails, testing out a few different approaches before i settled on what i've got now.
Its still prety new, so not every thing is tested (and its by far not stress tested, as i only have 4 trains so far), but i'm loving the theory and its practical application so far.

I've shrunk my trains to 1 engine and 2 cars each. Realized (with your help) that i was basicaly just joining two of these trains together for no real gain, but making the stations twice as long cause of it.
Have almost no oil on this map (6 dried up derrick in main base, and 3 in an outpost, but nothing else revealed so far, might have to go hop in a car/tank and drive far far away to find any oil, so my trains are being fed on coal for now. refuiling them at the main station is working well, you guys were right, they take for ever to eat through their 150 coal (tested by turning off the feed to one, didnt time it tough, but it was for ever).

Have widened the space between my two rails quite a bit. Dont remember where i saw this suggestion (wathed a bunch of youtube videos last few weeks), but i loved it, my rail system is all one way (a reail going each way), but the problem i had was that turning trains around after they reach their stop (but not the end of the main line) would make the train cross the main line (both directions) or force making loops that were a pain to set up signals on, and (from what i've read/seen) have a tendency to get clogged up.
Right now my two one way rails are placed just wide enough to put a half loop between them, to make turning trains around at any point (basicaly after each station) a completely crossless endeavor. And now that my trains have gotten shorter, they actualy fit into this half loop, so they can turn around and not stall any of the trains on the main line at all.

For now i only have 2 outposts (one with ores, and one for oil), but once i have more, and need branches off the main line, i think i'll try to make a right turns only system so that i dont have any rail crossings even after putting the turns in. To make a left turn, a train will have to go beyond it, turn around, and make a right turn. So a junction will look like this:

Code: Select all

|   |
| _ |
|/ \|
|   |
|   |\_____
|   |
|   | _____
|   |/
|   |
|\_/|
|   |
Still gotta figure out what distance i want between the turn and the half loops, so that trains making a left turn dont hold up trafic on the main line much.
Dam it, just drawing it this way made me realize that this is essentially the same thing as a standard loop with only 3 lines coming on/off it. Now i gotta understand why these loops get gridlocked and how the 3 way junction thing is better.

Now i gotta figure out how to build those 3 way intersections, as it seems my way is just a variant of the loops system.

Post Reply

Return to “Gameplay Help”