Page 1 of 1

Building useful Rail Networks

Posted: Fri Aug 29, 2014 10:41 am
by R Daneel Olivaw
Howdy,

I'm a relatively new Factorio player (just more or less finished my first playthrough), and I haven't really used Trains yet, and I can't quite see yet how to use them properly. I think they look pretty cool though, so I would like to use them in the future.
I've experimented a bit with the basic mechanics, my remaining questions are mainly about slightly more advanced stuff, and how it all fits together... Most of these questions don't have an objectively best answer, all opinions are welcome :)

TL/DR : What's the most effective and hassle-free way of organizing an efficient and expandable rail network?

How do you manage adding stations to train schedules?
Suppose you add a 4th Iron Mining outpost, you'ld then want your existing Iron Ore trains to also visit that station. But as far as I can tell, that would require manually chasing down each of those trains, to add the new station to their list...
(There are obviously some implicit assumptions present here. For example, this would be less of a problem if you have just 1 large train instead of multiple small trains. Or if you have 1 dedicated small train per outpost, instead of having all the small trains cover all the outposts to provide some inherent load-balancing).
(As an aside : removing stations seems to be handled gracefully?)

Doubleheaded trains vs small loops to turn around : both seem to work fairly well, it's mainly about the resource cost of the extra locomotive vs the resource and space cost of the loops? Or does the path-finding AI handle one option better than the other?
Either option requires signaling, as your trains would be sharing the same tracks. Longer trains require bigger loops, more trains require more extra locomotives.

Short vs long trains : I imagine that again, both work well, with shorter trains being more expensive due to a higher train-to-locomotive ratio, and long trains mainly requiring more space (stations, turns, loops, ...) and complexer stations?
As far as signaling and pathfinding goes, in the abstract it would seem to be fairly balanced as well, though the concrete implementation might favour one strategy more...

What level of resource-type dedication is usually most convenient?
If your trains/wagons are not very dedicated, you need filtering on the output side (smart inserters for unloading), if you're mostly dedicated, you might be able to get away with dumb inserters if you manage your train's station schedules closely (which you'ld probably want to do, as your trains then spend more time doing useful work, and less time making useless trips and stops).
Long trains with wagon-level dedication would have to be symmetric, unless you go pure double-headed without loops?
If you mix stuff, do you take any specific measures to avoid deadlocks or overflows?

Re: Building useful Rail Networks

Posted: Fri Aug 29, 2014 12:17 pm
by ssilk
R Daneel Olivaw wrote:TL/DR : What's the most effective and hassle-free way of organizing an efficient and expandable rail network?
Space. Everything needs more space then expected. I try to use as much space as possible.
How do you manage adding stations to train schedules?
Click on the last train stop (it's a train stop, not a train station!), then on the train stop you want to add, then the "+". The new stop is added after the old. To add one in the first place you need to redo the whole list yet. This is currently a compromise.
Doubleheaded trains vs small loops to turn around : both seem to work fairly well, it's mainly about the resource cost of the extra locomotive vs the resource and space cost of the loops? Or does the path-finding AI handle one option better than the other?
No. In my eyes a double headed train is not really expandable, but for just playing to the rocket-defense they are ok.
Either option requires signaling, as your trains would be sharing the same tracks. Longer trains require bigger loops, more trains require more extra locomotives.
It makes currently sense to set you an limit in length and do not change it later. See reality: Tracks are built for the worst case, the longest possible train, cause a shorter will make no problem, but a longer will. Currently I generally built the tracks for 8 wagons (2 loco + 6 wagons). But that may change.
Short vs long trains : I imagine that again, both work well, with shorter trains being more expensive due to a higher train-to-locomotive ratio, and long trains mainly requiring more space (stations, turns, loops, ...) and complexer stations?
No, not complexer, it's just more, much more space needed and it can't work anymore with belts only, you need a logistic network to fill the station (now station, not stop). You should seperate the station-logistic from the rest, so that your robots can work efficient.
As far as signaling and pathfinding goes, in the abstract it would seem to be fairly balanced as well, though the concrete implementation might favour one strategy more...
No, not really. It depends on your overall size. Do you have much resources? Low? How distant are they? Such questions, no general strategy possible.
What level of resource-type dedication is usually most convenient?
Well. With logistic network at your stations this is no problem: Just transport everything, make the storage in the station big enough and let the robots sort the right items out.
For the transport of resources for example I don't use anything special, I just transport as much as I can of each type and at the target I sort the stuff into the right place. This is much easier, then to make complex setup with wagons etc.

Re: Building useful Rail Networks

Posted: Fri Aug 29, 2014 2:36 pm
by bonob
ssilk wrote:
R Daneel Olivaw wrote:Doubleheaded trains vs small loops to turn around : both seem to work fairly well, it's mainly about the resource cost of the extra locomotive vs the resource and space cost of the loops? Or does the path-finding AI handle one option better than the other?
No. In my eyes a double headed train is not really expandable, but for just playing to the rocket-defense they are ok.
Building an efficient multiple-tracks two-heads variable-lengths station remains a major objective of mine.
The path-finding used to make that impracticable a few minor versions ago, but that might be better now, I have to try again.
Though, as ssilk said, you need a loooot of space in any case; as much as I try, I always end with everything cluttered in a much too small space...

Re: Building useful Rail Networks

Posted: Fri Aug 29, 2014 2:53 pm
by n9103
ssilk wrote:
Short vs long trains : I imagine that again, both work well, with shorter trains being more expensive due to a higher train-to-locomotive ratio, and long trains mainly requiring more space (stations, turns, loops, ...) and complexer stations?
No, not complexer, it's just more, much more space needed and it can't work anymore with belts only, you need a logistic network to fill the station (now station, not stop). You should seperate the station-logistic from the rest, so that your robots can work efficient.
How do you figure that ssilk? This coming from the leader of the pro-belts party.
If you're maintaining plenty of space, then I can't see how you'd be worried about having plenty of space for all the cars to be loaded by belt (multiple belts since you're up to 6 cars). Just means a LOT of splitters, and roughly balancing your extraction between different initial belts.

Re: Building useful Rail Networks

Posted: Fri Aug 29, 2014 3:15 pm
by ssilk
It's just many experiments and experience. I came to a point, where I could not place any more belts, but the trains wanted to be un/loaded.
That's above 10000 items per minute.

From a different point of view: When the train station is in the center you need at some point a much faster distributiion into the area (unloading) than possible with belts.

And from another point of view: It's much, much easier. I currently also try to avoid bots, but for the trains it has so many advantages and is so much faster to built that up, that I would like to say this is like stonehenge vs. golden gate bridge. :mrgreen:

Re: Building useful Rail Networks

Posted: Fri Aug 29, 2014 4:03 pm
by n9103
Care to diagram that for us?

Re: Building useful Rail Networks

Posted: Sat Aug 30, 2014 9:16 am
by R Daneel Olivaw
Thanks for your input guys!
How do you manage adding stations to train schedules?
Click on the last train stop (it's a train stop, not a train station!), then on the train stop you want to add, then the "+". The new stop is added after the old. To add one in the first place you need to redo the whole list yet. This is currently a compromise.
I'm not sure if I understand you correctly, and I can't try this out in my current game yet, but that sounds like the procedure for adding a train stop to a single train, unless I'm missing something? I was mainly wondering about if there was an easy way to do this for all trains (or, even better, a subset of trains), without having to get physically near all of them (which might not be so simple, considering they'ld be driving around all the time, and there's no easy way to see which ones you've already taken care of).
I suppose the easiest way might be to have central station (for example the 1 place where you fuel locomotives etc) where all trains pass relatively frequently, so you'ld just have to camp out there for a few minutes, and then you could be reasonably confident to have updated all trains.
Or, assuming that you're usually adding a new station only because you're decommissioning an old station soon (mine ran out or so), you could camp out at the old station for a while before destroying it...

Re: Building useful Rail Networks

Posted: Sat Aug 30, 2014 3:21 pm
by sillyfly
As far as I know there is no easy way to modify the schedule for a train without being physically adjacent to it, but I do remember some suggestions to add such mechanism (Look for train suggestions in the ideas & suggestions forum).

I tend to make my trains 3 cargo wagons long - I find it to be a convenient size for speed and station design (the longer the train the slower it goes and the larger the stations need to be), though I try to design all my system to accommodate larger trains (5-7 wagons mostly).

As for layout - I like one-headed trains, and I make all my tracks one-way, so the loops can be as small as possible. Of course, it means double the tracks, but I think it pays off in throughput and clarity of layout.

For station design I agree with ssilk - once your throughput gets high enough, belts are just not good enough, unless you want to make massive stations. I do load my trains with belts (in mines etc.), but I always unload with robots (except maybe if I make a train too early for that).

Re: Building useful Rail Networks

Posted: Sat Aug 30, 2014 5:37 pm
by Blackence
There is a "Fat Controller" mod that offers train remote control. Open the train GUI, click the "add train" button, and then you can always use the "C" button to center the view on that train and change its schedule etc. no matter where it might be at that time.

I use that mod in my current game in combination with the "ressource spawner overhaul" mod and, of course, the automatic rail laying machine which basically is a strict requirement for the ressource spawner overhaul, unless you want to go insane.

For efficient rail networks I'm still experimenting. A single rail car with barrels can already transport a lot of oil (up to 5000 IIRC, though you should probably reserve 50% of slots for empty barrels delivery to outposts, at least that's how I did it), so that train only has a length of 3 including loco right now, and I only use 1 waggon actually... For iron/copper you need more. I've used a length of 4, but now I want to try a total length of 11 to see if I like it more. I want to give it a try using only 1 loco. It's quite slow that way, but that should improve the character's survival chance. :D Might be an issue when I want to travel to one of my outposts and the slow copper train is blocking the path of my fast loco without waggons. Probably should add some bypass areas.

Generally, more trains => higher deadlock probability if you don't take care when building intersections. And short trains => probably higher fuel usage for transporting the same amount of ressources. Long train => un/loading requires more ressources (inserters, chests, belts, splitters, etc).


Maybe you could have a "drive through" (…) station where a train stops for e.g. 15 seconds to have the first 3 waggons unloaded, then moves a few tiles and waits another 15 seconds to have the next 3 waggons unloaded, etc. That needs 2 or more train stops at each station and complicated schedules and is probably not too efficient, but it's a compromise for the short/long train decision: Long trains and cheap un/loading infrastructure at the same time. :-)

Re: Building useful Rail Networks

Posted: Mon Sep 01, 2014 4:17 pm
by ssilk
n9103 wrote:Care to diagram that for us?
Try it yourself: I had two unloading stations in a distance of 6 tiles between. The wagon length was 4. It is impossible to keep up with the input, if you target unloading a train each 30-60 seconds (which means, that you unload a train in under 15 seconds!)

Is is absolutely no problem to do that with robots. And from the time building this: It takes about 5-10 minutes to built a bot-station, but about 30-60 to make that with belts.

You can make that if you have much more distance between the stations. But is that then still a "station" or it that just separate stations, which are just have the same name? And well, you need some space for trains, but so much?
R Daneel Olivaw wrote:I was mainly wondering about if there was an easy way to do this for all trains (or, even better, a subset of trains), without having to get physically near all of them (which might not be so simple, considering they'ld be driving around all the time, and there's no easy way to see which ones you've already taken care of).
All visibile signs in the game and game develpment say me, that this will be at some time the case, but not yet.
Well, it is working, but it takes it's time.

Blackence wrote:Maybe you could have a "drive through" (…) station where a train stops for e.g. 15 seconds to have the first 3 waggons unloaded, then moves a few tiles and waits another 15 seconds to have the next 3 waggons unloaded, etc. That needs 2 or more train stops at each station and complicated schedules and is probably not too efficient, but it's a compromise for the short/long train decision: Long trains and cheap un/loading infrastructure at the same time. :-)
I tried that: That is useless. The gain for long trains is, that you load/unload many wagons at once.

Re: Building useful Rail Networks

Posted: Mon Sep 01, 2014 5:58 pm
by n9103
Sounds like you're packing yourself in too tightly, but you already admitted this.
Also, your time figures are deceptive, since you're not including the full cost of the bots vs belts.
Plus, one you set one up, you're free to use it in blueprints just the same.

As for the pedantics of them being the same station or not. as soon as you have more than one track to unload, I'd call them separate, however, if they're going to the same place then it doesn't matter. Also, still pedantic.

This possibility of bots being better than belts for certain tasks has always been in the game, but you yourself proved that anything belts can accomplish, they will do better than bots.
If you're forcing the issue of space, then you pretty much have to concede the issue of price or speed.
You should know this from your belt studies awhile back.
Nothing in the basic mechanics between belts and bots has really changed since then.

Re: Building useful Rail Networks

Posted: Mon Sep 01, 2014 7:08 pm
by Zourin
Step 0: Acknowledge the distance. If it's a modestly short distance, consider a simple belt line instead. Trains should be used to move goods that have to travel distances longer than what is covered by a radar dish. For less, reconsider a belt or drone.

1. Know what kind of rail. There are two types of rail systems: Shuttles and Loops.

Shuttles are simple, one-track, down-and-back systems that can only support one train at a time. They are cheap to make, easily extended, and require no signal networks, but the one-train limitation means longer waits if you want to get from point A to point B.

Loops are more intricate, resource, and space consumptive to build, but can support multiple trains, meaning shorter wait times. With a signal network in place, you can use 'cut-arounds' so that trains at stations don't impede passing traffic. Generally, every length of track is 'one way only without VERY careful planning. With a Loop system, any train can move to any other part of the network without having to pass every other station.

2. Know what you're building the rail for: Is it a resourcing outpost pumping ore or oil? Is it a factory outpost you're outsourcing some of your production to, such as a chip, military, or science production facility? Identify what the outpost needs to bring in, and what it will be shipping back. Make sure the pick up and drop-off locations provide proper logistics for both item flows.

3. Make smart stations. With some planning, you can prevent excess consumption when end-products start to become overproduced, allowing resources to go to where they are needed instead of making excess junk that's laying around.