Factorio

Factorio

View Stats:
Malidictus Jul 9, 2020 @ 9:11am
Can you set a Rail Signal via the Circuit Network?
I have a traffic management issue of my own making, where trains merge into a busy line, backing up traffic. I'd like to block the mergers when the main line backs up... And I can't figure out how to do that.

Attaching a wire to a Rail Signal allows me to read its state, potentially even as things other than colours. However, I don't see any kind of UI for SETTING the signal. Can I, for instance, set a signal as red on circuit condition even if no train is in that segment? If so, how? I've tried to Google the answer, but all it gives me is generic guides which don't cover this subject, and a few Reddit posts which just tell me to "use" the Circuit Network without explaining how.
Originally posted by Fel:
You can force a standard signal (not chain ones, those only allow read) to red.

You probably only connected a chain signal and assumed that both worked the same way for circuit network, which is true for the read part but the standard "rail signal" has an extra option called "close signal" which works very similarly to the "enable/disable" for inserters for example.
The main difference is that you are deciding between "forced red" and "decide by yourself like usual".


By the way, your case should be fairly easy, just pair the signal on the main line with a rail signal, or even chain a few like that to detect incoming trains on the main line, read them with circuit network and you can set for example "red > 0" for the close signal for your incoming line.

This does mean stopping them at a standard signal instead of a chain signal, so you will probably have to play around with the thing a bit to figure out the best way to implement it (my tip would be having the standard signal right before the chain signal at the start of the intersection but it's most likely not the only way).

Hopefully this helps a bit.
< >
Showing 1-15 of 16 comments
Tucci Jul 9, 2020 @ 9:19am 
Sounds like you just need to learn about Chain Signals. Here is a link to a pretty good train/signal tutorial on reddit.
https://www.reddit.com/r/factorio/comments/4f38sk/factorio_train_automation_complete_parts_23_and/
The author of this thread has indicated that this post answers the original topic.
Fel Jul 9, 2020 @ 9:26am 
You can force a standard signal (not chain ones, those only allow read) to red.

You probably only connected a chain signal and assumed that both worked the same way for circuit network, which is true for the read part but the standard "rail signal" has an extra option called "close signal" which works very similarly to the "enable/disable" for inserters for example.
The main difference is that you are deciding between "forced red" and "decide by yourself like usual".


By the way, your case should be fairly easy, just pair the signal on the main line with a rail signal, or even chain a few like that to detect incoming trains on the main line, read them with circuit network and you can set for example "red > 0" for the close signal for your incoming line.

This does mean stopping them at a standard signal instead of a chain signal, so you will probably have to play around with the thing a bit to figure out the best way to implement it (my tip would be having the standard signal right before the chain signal at the start of the intersection but it's most likely not the only way).

Hopefully this helps a bit.
Malidictus Jul 9, 2020 @ 9:31am 
Originally posted by Fel:
You can force a standard signal (not chain ones, those only allow read) to red.

Aha! Yes, that's exactly what I needed, than you :) You are correct - I hooked up a Rail Chain Signal and assumed both worked the same way. I'm not sure why they don't, but it likely has something to do with the logic of chain signals.

Yes, I'm going to need to introduce a standard signal somewhere in the line, but this should be fine. In fact, a circuit-controlled standard signal will likely be more explicitly-controlled than a rail chain signal. That might, in fact, help streamline my depot a little, as well. Thanks a bunch!
AlexMBrennan Jul 9, 2020 @ 9:40am 
I'm not sure why they don't, but it likely has something to do with the logic of chain signals.
It is supposedly impossible[forums.factorio.com] because chain signals "only relay the state from signals ahead of them". Then again, this is explanation is obviously wrong (place a rail, place a chain signal, place a wagon on the track and you will find that the signal will be red even though there is no regular signal that could possibly be relayed by the chain signal) so it seems like even the developers don't know how their game works.
Malidictus Jul 9, 2020 @ 9:46am 
Originally posted by AlexMBrennan:
It is supposedly impossible[forums.factorio.com] because chain signals "only relay the state from signals ahead of them". Then again, this is explanation is obviously wrong (place a rail, place a chain signal, place a wagon on the track and you will find that the signal will be red even though there is no regular signal that could possibly be relayed by the chain signal) so it seems like even the developers don't know how their game works.

I'm willing to believe it's some kind of technical limitation. It's entirely possible all dead-end rail pieces have an invisible signal at the end always reading red. In order to change the state of a Rail Chain Signal, it might be necessary to implement some kind of conditional override, which might add extra overhead. My guess is this is some combination of "too much work for too little benefit" and "too much extra load for something that'll see almost no use." I'm already starting to tank my UPS in my current game, and it's not my installed mods doing it :)
Warlord Jul 9, 2020 @ 1:12pm 
Originally posted by AlexMBrennan:
It is supposedly impossible[forums.factorio.com] because chain signals "only relay the state from signals ahead of them". Then again, this is explanation is obviously wrong (place a rail, place a chain signal, place a wagon on the track and you will find that the signal will be red even though there is no regular signal that could possibly be relayed by the chain signal) so it seems like even the developers don't know how their game works.
The actual wiki article for Chain Signals[wiki.factorio.com] states:
Both normal signals and chain signals prevent a train from entering the next block if it is obstructed. However, a chain signal also looks ahead to the next signal, and turns red if the next signal is red.
Thus they don't "only" copy the next signal, but also act as one for the block they guard.

Originally posted by Malidictus:
I'm willing to believe it's some kind of technical limitation. It's entirely possible all dead-end rail pieces have an invisible signal at the end always reading red. In order to change the state of a Rail Chain Signal, it might be necessary to implement some kind of conditional override, which might add extra overhead. My guess is this is some combination of "too much work for too little benefit" and "too much extra load for something that'll see almost no use." I'm already starting to tank my UPS in my current game, and it's not my installed mods doing it :)
Are you saying you ended (no more signals, but still more rail) a rail line with a chain signal, and it showed red?

Regardless, it depends on what you wish to accomplish. It sounds like you are using ZERO regular signals within your stations, which can result in blocks back on the main line. A proper station should also have room to park every train waiting to arrive at it, and have no waiting trains block intersections.
Last edited by Warlord; Jul 9, 2020 @ 1:15pm
Malidictus Jul 9, 2020 @ 2:04pm 
Originally posted by Warlord:
Regardless, it depends on what you wish to accomplish. It sounds like you are using ZERO regular signals within your stations, which can result in blocks back on the main line. A proper station should also have room to park every train waiting to arrive at it, and have no waiting trains block intersections.

I'm not sure how you came to any of these conclusions, but none of them are correct. My issues are entirely separate and largely irrelevant to the subject of the thread. I speculated fairly loosely on how Rail Chain Signals might work, but that too was largely unrealted to the subject, as well.
Warlord Jul 10, 2020 @ 12:30am 
I guess I mis-read this then:
Originally posted by Malidictus:
Yes, I'm going to need to introduce a standard signal somewhere in the line, but this should be fine.
If you had rail signals, that should have fixed the issue of trains backing up on the line. If they still backed up with proper rail/regular signals, then I thought the problem most likely is a lack of train parking. It's just the conclusion I jumped to. *shrug*

Without screenshots, all I can do is imagine what the problem looks like, then try to offer suggestions based on what I think it is.
Last edited by Warlord; Jul 10, 2020 @ 12:33am
Malidictus Jul 10, 2020 @ 4:34am 
Originally posted by Warlord:
If you had rail signals, that should have fixed the issue of trains backing up on the line. If they still backed up with proper rail/regular signals, then I thought the problem most likely is a lack of train parking. It's just the conclusion I jumped to. *shrug*

The reason I deliberately don't go into too much detail on the actual issue I'm trying to solve is because people have a tendency to over-analyse my request and offer supplementary advice while ignoring the actual question. You can see this happen with the first response I got. My primary question was a mechanics one, and it was already answered.

To explain, however - the issue in my case is not of signalling or parking. It's an issue of throughput. I simply have far more trains going through an intersection than the intersection can support. They back up because throughput through the intersection is slower than the volume of traffic, so trains stack up waiting to go through it. I said the issue is of my creation, because I made too large of a train depot and I place it right on one of my most trafficked lines. As a result, trains going in and out of the depot place so much traffic that they end up blocking trains passing through.

Incidentally, my original idea also failed to address the issue. I successfully prioritised traffic on the main line over traffic from the dept. What that did is it introduced SO MUCH waiting time to leave the depot that LTN requests started timing out before my trains even left. I'm starting to burn myself out on Factorio in general, but one of the last things I'll do is likely upgrade that main line to 4 rails, two in either direction, with larger less bottlenecking intersections. I don't like the intersection designs that Google's giving me, so I'm in the process of designing my own.

Either way, now I know how to set rail signals via circuit network.
Fel Jul 10, 2020 @ 5:16am 
For junctions you can of course design your own, it's a great exercise or logic and if you know what you are doing you can make each specifically for what you want from the intersection.

There is a thread with a whole lot of designs for 2, 4, 6 and 8 lanes (6 lanes only has 1 but it's there):
https://forums.factorio.com/viewtopic.php?f=194&t=46855

It also has some space-intensive junctions for 2 lanes that have about 3 times the throughput of basic ones line roundabouts.

Even if you don't want to use them, or can't because of space they can give you some insight on different approaches to rail junctions.
Tucci Jul 10, 2020 @ 7:50am 
Originally posted by Malidictus:

The reason I deliberately don't go into too much detail on the actual issue I'm trying to solve is because people have a tendency to over-analyse my request and offer supplementary advice while ignoring the actual question. You can see this happen with the first response I got. My primary question was a mechanics one, and it was already answered.

To be fair, when most people ask questions like this they're trying to over-engineer a solution because they don't understand some core mechanics of the game. This becomes evident when they describe their problem a little more and/or provide screenshots and the solution is clearly much simpler than the person thought.

The initial post in this thread followed that formula almost to a T, where this is the problem you describe:

Originally posted by Malidictus:
I have a traffic management issue of my own making, where trains merge into a busy line, backing up traffic. I'd like to block the mergers when the main line backs up... And I can't figure out how to do that.

Where the obvious solution is proper use of chain and rail signals. However, once you actually described your problem in a little more detail I (and likely Warlord though I won't speak for them) see that the problem was much more complex than you initially stated. So, my apologies for jumping to conclusions.
Warlord Jul 10, 2020 @ 8:47am 
*chuckles* Yeah, if you knew the average question asked here, forgive us in jumping to some conclusions. I will take your word at it being more complex than we assumed. It's pretty rare that an issue with signalling is caused by an honest-to-goodness high-traffic rail system. My own bases don't tend to have enough traffic (or I lucked into putting my high traffic furnaces out of the way) to require more than 1 rail each direction.
Last edited by Warlord; Jul 10, 2020 @ 8:48am
Malidictus Jul 10, 2020 @ 8:48am 
Originally posted by Tucci:
To be fair, when most people ask questions like this they're trying to over-engineer a solution because they don't understand some core mechanics of the game. This becomes evident when they describe their problem a little more and/or provide screenshots and the solution is clearly much simpler than the person thought.

Understandable, and no worries. It's on me to set proper expectations. I was hoping to skip to the chase by deliberately avoiding detail, and instead it led to confusion. Unfortunately, the scale of my facility has gotten to the point where structural issues like these don't really have good solutions beyond ripping up and moving large chunks of infrastructure. You can't have 80+ trains constantly on the move and not create massive gridlock, but it's just gotten much worse of late.

The amount of circuits I'm consuming created a cascading series of optimisations in wire production and mining which - along with Bulk Rail Loaders and Bucket Wheel Excavators - have pushed so much material through the train network that it simply can't cope any more. It's not the stations or the signals. It's the rails themselves :)

Originally posted by Fel:
For junctions you can of course design your own, it's a great exercise or logic and if you know what you are doing you can make each specifically for what you want from the intersection.

Thank you, I'll definitely have a look. It doesn't hurt to grab ideas from other people :) But again - the issue in this case isn't really the intersection design. It's trying to pass more trains than this can ever realistically support. Some days I wish we had train tunnes. I know there's a tunnels mod, but I'm not sure if it's still being supported and if it has technical/performance issues. I'd personally use a Cloverleaf interchange if I could get the two perpendicular lines to run over/under each other.
Malidictus Jul 10, 2020 @ 8:51am 
Originally posted by Warlord:
*chuckles* Yeah, if you knew the average question asked here, forgive us in jumping to some conclusions. I will take your word at it being more complex than we assumed. It's pretty rare that an issue with signalling is caused by an honest-to-goodness high-traffic rail system. My own bases don't tend to have enough traffic (or I lucked into putting my high traffic furnaces out of the way) to require more than 1 rail each direction.

Right, I assume you guys get a fair few basic questions :) But yeah, my issue really is traffic. Like I said - I put a 40-platform depot station right on a high-traffic line, so trains trying to merge into and out of that line either back traffic up for miles or else just never get to merge. I could potentially try to limit my trains into only merging ALONG the direction of traffic to avoid them driving across both lines... Actually, I probably should have done that before upgrading to four rail lines :) My mistake was using a large number of smaller trains rather than using larger trains. However, everything's set for 1\3 trains now, and changing it would take me far too long to be realistic.
Fel Jul 10, 2020 @ 8:59am 
Originally posted by Malidictus:
Thank you, I'll definitely have a look. It doesn't hurt to grab ideas from other people :) But again - the issue in this case isn't really the intersection design. It's trying to pass more trains than this can ever realistically support. Some days I wish we had train tunnes. I know there's a tunnels mod, but I'm not sure if it's still being supported and if it has technical/performance issues. I'd personally use a Cloverleaf interchange if I could get the two perpendicular lines to run over/under each other.

That post was directly answering what you wrote right above it, so it was completely about intersections on purpose:
Originally posted by Malidictus:
I'm starting to burn myself out on Factorio in general, but one of the last things I'll do is likely upgrade that main line to 4 rails, two in either direction, with larger less bottlenecking intersections. I don't like the intersection designs that Google's giving me, so I'm in the process of designing my own.

Since you didn't like what google gave you for intersections I was giving you an alternative source with a lot of widely different designs and a comprehensive test on how well they each work.

There are various topics around the forums and reddit about 4 rails designs and the conclusion often boils to the fact that the bottleneck of most rail systems are the intersections.
Several people dug extensively to figure out intersections with 2 rails that give a much higher throughput compared to most 4 rails ones, usually at the cost of space but 4 rails intersections are already pretty large already.


When working with LTN and having a bottleneck around your dispatch station there are several ways to treat the problem, better intersections are one of them, so it's fine to explore that but as with many things in this game there are multiple solutions for most problems, heavy-duty LTN networks are no exceptions to that.
< >
Showing 1-15 of 16 comments
Per page: 1530 50

Date Posted: Jul 9, 2020 @ 9:11am
Posts: 16