trains 0.13: noob needs help

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Aurawastaken2
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 01, 2016 12:41 am
Contact:

trains 0.13: noob needs help

Post by Aurawastaken2 »

I can't seem to understand signals, it seems simple, but when I try to use them my trains get stuck everywhere, it's a bit discouraging as there's no ingame explanation as to why they behave the way they do. I watched videos, read tutorials, saw how crazy some setups were and I just decided to keep it simple, but it still ended up malfunctionning.

Since managing everything seemed complicated [trains crossing other train tracks, trains going in several directions etc], I decided to have a simple loop, with branches to go to a station and come back to the main loop. It means trains lose time going round on it but at least it seemed easy to setup. I was wrong.

Image

That's what I did, and that's how it ends up:

Image

Now I might be a retard, but I'll explain how I understand the logic behind signals so that someone can correct my false assumptions:

Signals are paired 2 by 2 [an end of track counts as a signal], if a train is between two signals on the same piece of track, then the first is red, the second one is green and vice versa. chained signals simply repeat the last signal on the same piece of track after them.

According to that logic there's no reason why my blue train is stopped here. At all.

And to add insult to the injury, when I test that on simple test tracks it works perfectly. So I got to assume that this happens either because 0.13 is bugged or because my circuit is a huge loop. But it still makes no sense at all, especially as I paid attention to put signals and even chained signals on different branches. There's nothign on the main loop so that they don't get confused.

Now how come something as simple as my setup doesn't work and something like that does?

Image

I'm slowly turning chaotic evil, pls halp.
kinnom
Filter Inserter
Filter Inserter
Posts: 706
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: trains 0.13: noob needs help

Post by kinnom »

Add a few signals on the line that does not go to the station
no yes yes no yes no yes yes
Aurawastaken2
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 01, 2016 12:41 am
Contact:

Re: trains 0.13: noob needs help

Post by Aurawastaken2 »

kinnom wrote:Add a few signals on the line that does not go to the station
what? why? and how? Randomly? I'm trying to understand here.
kinnom
Filter Inserter
Filter Inserter
Posts: 706
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: trains 0.13: noob needs help

Post by kinnom »

If you hover over the rails in front of the station, it'll say there's one train in that block - the red train, which is blocking the blue train.
By adding signal you break up the block in several smaller blocks.
no yes yes no yes no yes yes
Aurawastaken2
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 01, 2016 12:41 am
Contact:

Re: trains 0.13: noob needs help

Post by Aurawastaken2 »

The red train isn't between the two signals, it's behind the chained signal, how could it be a problem?

edit:

between the two singals, it says there's one train in the block, after the red one it says there's two, and between the chained signal and the signal it says there's 0.

This whole thing doesn't even pretend to make any sense to me.
Aurawastaken2
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 01, 2016 12:41 am
Contact:

Re: trains 0.13: noob needs help

Post by Aurawastaken2 »

bump
Frightning
Filter Inserter
Filter Inserter
Posts: 814
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: trains 0.13: noob needs help

Post by Frightning »

The thing to understand about rail signals, is that they define blocks, and only 1 train can ever reserve a block at a time (and hence only 1 train can ever occupy a block at a time). With your current setup, because of the splits and merges, your main line is all one block with the beginning of the entrances and exits of the stations as part of that block. This means that the train in the station can't leave it and enter the main line unless the main line is empty (no trains on main line). You have 1 train on the main lane waiting for to enter the very same station, but it can't because that station is occupied, thus you have a train deadlock.

The way to solve this problem is the signal off the junction part from the rest of the network, so what you need, is signals on the main line before and after each split and merge (and to ensure that a train will never block the junction itself, use chain signals before and regular after, so it can only enter/exit the main line if it can actually clear the junction itself). Note that no amount of fancy signalling can make deadlocks impossible, there is always the possibility of having too many trains on the network ((an easy consequence of the finiteness of the number of blocks in the network! Exactly how many a given network can handle no matter what is not always easy to ascertain, and in practice, in large networks, that safe number can be exceeded due to distribution of traffic.)

The other two details worth knowing about signaling is that in order to allow 2-way traffic in a given block, you must have paired signals (one on each side). In a 1-way piece of track, the signals must be on the right relative to the direction the train is travelling! (this is also important to know for which one should be a chain signal at a 2-way junction).
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: trains 0.13: noob needs help

Post by Nexela »

Until you get a full grasp of things that can be done The easiest way to think about signaling is in terms of entrances and exits. The same applies for one way track as well as two way track. two way track is just mirrored in signal placement

Signals Divide one block into 2. The block BEFORE the signal is the entrance block and the block AFTER the signal is the exit block. A block is every piece of rail that shares the same exit signal between Its entrance and its exit. No matter how many rail pieces come into, out of, or across it.

In your picture the Bottom Train can't leave because the top train is partially in the same block as the bottom trains exit block.

Blue is block 1, yellow is block 2, red is block 3. As you can see the top train is in block 1 and that is what the bottom train sees when it wants to exit into block 1.
The chain signal is stopping the train before yellow block because the yellow blocks exit to red is occupied. In other words the yellow block is BLOCKED by the red block, and The red block is BLOCKED by the blue block, creating never ending Deadlock.
3blocks.png
3blocks.png (3.06 MiB) Viewed 3944 times

In the following example. Blue circles are chain signals and red circles are regular signals
If the rails are signaled this way the top train would park in the yellow block #5. If there was a train already in the yellow block then top train would park in the brown block #1.
Neither of these positions block #3 so if a train was coming on #2 to go somewhere further up the line it would be able to pass through block #3 since block #4 does not have a train on it.
However if there was a train parked on #4 because the bottom train left and was occuping block #7 any trains wanting to go to the station would be able to go through #3
signaled.png
signaled.png (3.06 MiB) Viewed 3944 times
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: trains 0.13: noob needs help

Post by Nexela »

As to how the other thing works lets break it down.

First it is a One way, 2 lane track where we drive on the right.
First, We can tell it is One Way because there are only signals one side of the track piece.
Second, we can tell it is drive on right because the signals are on the right side of the track in the trains direction of travel. and the track with signals on its right is also the rightmost track. For this to work for drive on left the tracks would have to be further apart for the signals to fit in the middle).
4x2ldor_BASE_1.png
4x2ldor_BASE_1.png (1.34 MiB) Viewed 3936 times
So now that we know what it is we have to figure it how to signal it. We know that each entrance has 3 exits. So EACH of the four entrances has 3 possible exits.
4x2ldor_EXITS_2.png
4x2ldor_EXITS_2.png (1.33 MiB) Viewed 3936 times
Since we don't want trains stopping in the middle of this thing we want to use Chain signals for the entrance. And we want a regular signal at the exit to the junction so we don't hold up any other trains wanting to come in for longer then we have too.
4x2ldor_Entrance_exits_3.png
4x2ldor_Entrance_exits_3.png (1.51 MiB) Viewed 3936 times
At this point we could stop and not even worry about the signals on the inside and the junction would be 100% functional. However only 1 train would be allowed in the junction at a time. If one was coming from the west wanting to go south. And one was coming from the east and wanted to go north. one of them would have to wait for the other. To get around that you can signal on the inside to make a bunch of smaller blocks.
vanatteveldt
Filter Inserter
Filter Inserter
Posts: 947
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: trains 0.13: noob needs help

Post by vanatteveldt »

First off, read viewtopic.php?t=18621 and probably viewtopic.php?f=18&t=30304

Then, I wrote a little post detailed my take on line and station construction which is scalable and deadlock free: viewtopic.php?f=8&t=30357

As a summary, I have the following principles:
1) track is either main line, junction, or station
2) mainline is simple dual one-way track with normal signals at regular intervals
3) junctions have chain signals before crossing tracks, normal signals after crossing track and before joining tracks (http://i.imgur.com/DcJpEww.jpg?2)
4) stations are on their own 'spur' lines and have a way to turn around and waiting bays as needed to make sure waiting trains are never on the main line. Chain signals at the end of waiting bays, regular signals at the start of waiting bays and before and after (un)loading bays

That should get you good thoughput and never cause deadlock, as long as you make sure a station can "fit" all trains that use it so it never jams the main line.
Post Reply

Return to “Gameplay Help”