Is loop based train design totally broken?

Post all other topics which do not belong to any other category.
Miravlix
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Wed Jun 01, 2016 8:48 am
Contact:

Is loop based train design totally broken?

Post by Miravlix »

I really detest how multi-headed train design works, it's completely stupid if the train has different items in it's wagons, since if it visit two stations and tries to return home, it is facing the wrong way, so I've been focusing on the single direction train designs and I simply can't get it to behave well.

A simply setup with 4 stations for copper/stone/iron/coal and I constantly experience that some train think it's a good idea to loop into another station on it's way to it's own unloading station. This situation arises because some signal is blocked by another train and the looped stations create a path it can move down, never mind that it's a completely stupid path choice that's way longer than if it went straight on behind the other train.

That the train will take these bad detours also shows that the train is most likely doing insane pathfinding, because every single rail is a legal destination.

Maybe some right or left only system, so it wouldn't actually be a legal route for it to loop into each station, but having a train needing to loop around the entire base, if I'm unlucky with the location of the next copper mine, doesn't sound good.
User avatar
bigyihsuan
Filter Inserter
Filter Inserter
Posts: 299
Joined: Thu Jan 01, 2015 12:57 pm
Contact:

Re: Is loop based train design totally broken?

Post by bigyihsuan »

I don't know what you're doing, but here's some tips:
  • Allow at least 1 train length of track before and after the station junction. This'll let a train about to leave the station a place to wait if another train is passing through the loop.
  • Place a loop after the station, following the above bullet. This will let the train to turn around right after leaving its station.
  • Make sure to use chain signals. They're very helpful with making sure that a train will always make it through the crossing points, junctions, and loops.
Loop-based systems aren't broken, you just have to spam loops anywhere you can.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3714
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Is loop based train design totally broken?

Post by DaveMcW »

The correct way to do single-engine trains is to put a loop inside every station. Then a train never has to go out of its way to turn around.

I hope you are using a pair of one-way tracks everywhere, that is just smart design for any rail system.
lpw
Inserter
Inserter
Posts: 21
Joined: Tue Jan 06, 2015 10:50 pm
Contact:

Re: Is loop based train design totally broken?

Post by lpw »

I can just suggest reading through this post viewtopic.php?f=18&t=18621
It's kind of long but will probably answer all your problems.
Tnarg
Long Handed Inserter
Long Handed Inserter
Posts: 68
Joined: Tue Apr 19, 2016 8:23 am
Contact:

Re: Is loop based train design totally broken?

Post by Tnarg »

If it helps here are my junction blueprints I use.
viewtopic.php?f=8&t=28769
Note: the blueprints fit over each other so you can make over 500 different junctions if you want.

I was thinking about making a few station blueprints but they would be dependent on the size of the trains so would be less useful to people unless the they use 1-2 trains like me.
User avatar
taiiat
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Sat Apr 02, 2016 8:39 pm
Contact:

Re: Is loop based train design totally broken?

Post by taiiat »

it sounds like your stations are on your main rails of travel? don't do that. Stations should always be off of the main paths of travel.

one way loops with appropriately placed turning points is the 'correct' way to use Trains though, so it definitely works.
DaveMcW wrote:The correct way to do single-engine trains is to put a loop inside every station. Then a train never has to go out of its way to turn around.

I hope you are using a pair of one-way tracks everywhere, that is just smart design for any rail system.
incredibly important information.
saturn7
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Apr 27, 2016 6:14 pm
Contact:

Re: Is loop based train design totally broken?

Post by saturn7 »

Also if a train station has a loop, expect that other trains use the loop too (even if only one train goes to that station), and signal it accordingly.

That's because due to the current pathing algorithm, trains sometimes take detours, and suddenly going through another station's loop is needed.
Miravlix
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Wed Jun 01, 2016 8:48 am
Contact:

Re: Is loop based train design totally broken?

Post by Miravlix »

saturn7 wrote:Also if a train station has a loop, expect that other trains use the loop too (even if only one train goes to that station), and signal it accordingly.

That's because due to the current pathing algorithm, trains sometimes take detours, and suddenly going through another station's loop is needed.
Only response that seems to understand the issue correctly, unfortunately it seems to say the same thing I did, that loops is broken because every path is legal because of looping.

Four stations horizontal, with *separate* T-Sections going to each, so if a train destination station is the last the 3 other stations is still *LEGAL* paths, if any signal is blocked on the vertical line. Plenty of space between each t-section for a couple of trains to park, but sometimes my trains think it's a brilliant idea to loop into a station on it's way to it's own station and that is just a disaster and make me classify it as totally broken, because I can't see a way to design around it, that doesn't involve shooting myself in the foot repeatedly with a nuke.

Too bad, loop based design is clearly better on paper (although more complicated), but won't actually hold up to it's promise due to how the train pathfind.
User avatar
StoneLegion
Filter Inserter
Filter Inserter
Posts: 687
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: Is loop based train design totally broken?

Post by StoneLegion »

Just based on the title then it sounds like it's working ;)
alexzzzz
Inserter
Inserter
Posts: 36
Joined: Sat Jan 17, 2015 5:28 pm
Contact:

Re: Is loop based train design totally broken?

Post by alexzzzz »

I tried double-headed trains once (187 hours of playing) and realized that their only real advantage is that train stations can be pretty compact. However, the problem with engineering trains coming back to their home depot in reverse seemed to be unsolvable. So, in the new game I decided to return to single-headed trains and loops everywhere.

My standard train station with two loading terminals, one unloading terminal for supplies and a waiting area for three incoming trains:
Standard Train Station
leffe108
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 27, 2016 7:16 pm
Contact:

Re: Is loop based train design totally broken?

Post by leffe108 »

So far I only have one train of each resource type in my 0.13 game. What I did with the new waiting conditions and circuit network was to:
  1. Each resource has its own platform at the main base
  2. Add chests at unload station at main base
  3. Connect buffer chests to the station using logic wires
  4. In the train schedule make the resource train not leave main base to get more resources unless the stored amount in the chests is less than eg. 500 or 1k.
This way, most of the time the trains stand waiting at their station in the main base and should they for whatever reason want to loop in a resource loading station, chances are high its empty or the train will soon depart as each resource station buffers more resources than to fill a train in chests.

How to scale this to more trains per resource I haven't figured out yet. I could have them leave the main unload station and park at some railway yard where there is more space but will need to connect it with logic cables to the main base unload area to carry over the signal on when to go and get more resources.

I don't know or think this is THE solution. Just doing it this way for fun and it may help with the problem discussed here.
Turtle
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat May 31, 2014 9:45 pm
Contact:

Re: Is loop based train design totally broken?

Post by Turtle »

I don't understand why you're using double-headed trains in a loop design. I think you're mixing Loop-based rail networks with single-rail networks. In a loop-based network, you should only have one direction in and one direction out for every station. Are you using single track or double track? Perhaps you should post a screenshot or your save so we can take a closer look and provide better solutions.
NameLips
Inserter
Inserter
Posts: 37
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

Re: Is loop based train design totally broken?

Post by NameLips »

As an old Transport Tycoon player, the main problem I have with the trains is that I can't make the complex junctions I'm used to because we can't use the z-axis to make tracks run over and under each other without intersecting. :P
ccik
Inserter
Inserter
Posts: 39
Joined: Sun Mar 16, 2014 11:46 am
Contact:

Re: Is loop based train design totally broken?

Post by ccik »

I always use single headed trains, but i've managed to avoid most of the deadlocking issues. In my opinion, these are the 2 most important design aspects for loop-based systems:

1. Always split your stations off the main-line. First, spit off a 2-track line from the main line. Then, build your station on one side of this track, loop the exit off the station around, done. Most important: Use this junction from the main line only for one station. Every station has it's own branch line, so the only reason for trains going through these stations is the train has to stop at the station itself.

2. I always build a bypass line in all my outposts. Two reasons: If i want to do something in the outpost, i can park my train there withouth disturbing the normal traffic. Second, if a train needs to loop through a station, there is a bypass which allows travelling through the station even when a train is loading.
hi_impact
Inserter
Inserter
Posts: 28
Joined: Wed Jun 01, 2016 5:29 pm
Contact:

Re: Is loop based train design totally broken?

Post by hi_impact »

Sounds like this problem is self inflicted. There is literally no problem with looped train networks if you signal them properly. I think you got all the help links in the thread to fix it, good luck.

most trains run double-headed in real life.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Is loop based train design totally broken?

Post by ssilk »

hi_impact wrote:most trains run double-headed in real life.
Not correct. Depends on what country or what kind of transport you are speaking from.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Is loop based train design totally broken?

Post by siggboy »

I think nobody really understands why he's annoyed. He is annoyed because the trains use the loops that he has built into the stations in order to take detours. The loops give trains with a blocked path the possibility to find a new route which is a large detour, because the train can use any station to turn back towards its original destination.

It's a limitation of the pathfinding algorithm and has nothing to do with OPs skill (or lack thereof) building a rail network.

Maybe somebody can start making suggestions of how to avoid this instead of repeating the same advice over and over again which is not really helpful in this case.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Is loop based train design totally broken?

Post by 5thHorseman »

siggboy wrote:I think nobody really understands why he's annoyed. He is annoyed because the trains use the loops that he has built into the stations in order to take detours. The loops give trains with a blocked path the possibility to find a new route which is a large detour, because the train can use any station to turn back towards its original destination.

It's a limitation of the pathfinding algorithm and has nothing to do with OPs skill (or lack thereof) building a rail network.

Maybe somebody can start making suggestions of how to avoid this instead of repeating the same advice over and over again which is not really helpful in this case.
I need to know first why a train looping through a station is a bad thing if that train doesn't stop there, isn't blocked when there, blocks no other trains on its way through, and by taking the shortcut gets to its destination faster than it would. The suggestions above help alleviate those problems, it seems, even if they don't stop the shortcutting.

To be more brief, if you eliminate all the actual (train stoppage) problems, is the train going through the station still an issue?
User avatar
MrGrim
Fast Inserter
Fast Inserter
Posts: 241
Joined: Sat Apr 09, 2016 7:58 pm
Contact:

Re: Is loop based train design totally broken?

Post by MrGrim »

5thHorseman wrote:I need to know first why a train looping through a station is a bad thing if ... taking the shortcut gets to its destination faster than it would.
That's the problem right there. That assumption is not actually correct. I've seen trains take wild detours that more than double their trip length for inexplicable reasons. I've learned to just live with it, but the logic for "fastest" route could definitely do with some tweaking. I run a medium train network on my map with about 18 2-4 trains. The busiest intersections might experience wait times of a few seconds at worst. I haven't had any deadlocks for a long time. If an intersection is even a little bit congested (and I mean as in give it 5 seconds and it'll be 100% clear) a train will sometimes lose its mind and travel half way in the opposite direction to take a loop in a far remote outpost rather than deal w/ that intersection.

More gratuitous loops it is, then. :D
DarkHelmet
Inserter
Inserter
Posts: 40
Joined: Sat Apr 16, 2016 5:46 pm
Contact:

Re: Is loop based train design totally broken?

Post by DarkHelmet »

Trains do weird things in Factorio.

Take alexzzzz's station in viewtopic.php?p=185204#p185204... I've seen trains following another train past stations like that, and the pathfinder suddenly deciding that it would be great to drive right through the station simply because it was too close to the train ahead of it.

I've modified my main saves to only allow stations to be entered and exited from a single direction to avoid that. If the train isn't going to/from the core, it can't get in or out, or detour through the station on the way past. In my bases, trains generally leave the mainline at a curve junction, turn around and can only go back the way they came.

And other times they just sit there like idiots at a bypass / alternate route fork because they want to go through the only one that's occupied. Some of that inititive that makes them go on grand detours would be great in situations like that.

Yeah, Factorio trains are weird. Particularly if there's curved or angled track involved.
Last edited by DarkHelmet on Tue Jul 19, 2016 4:52 pm, edited 1 time in total.
A guide to planning your factory's space requirements:
1) Figure out how much space you need, double it to be safe.
2) Wrong! There's never enough space.
Post Reply

Return to “General discussion”