Page 1 of 1

track signals should send Train-ID to circuit network

Posted: Sun May 14, 2017 1:58 pm
by Tekky
TL;DR
In the upcoming version 0.15.11 a station is able to send a unique Train-ID to the circuit network. I suggest that track signals should have the same feature.

What ?
According to this post by a Factorio dev, version 0.15.11 will introduce a new feature that stations with a train stopped at it will be able to send the unique ID of the train to the circuit network.

I suggest that track signals should have a similar functionality. In "pulse mode", whenever a train passes that signal, they pulse the Train-ID to the circuit network. In "hold mode" they send the Train-ID as a continuous signal to the circuit network, as long as the train occupies the block after the signal.

EDIT: As stated in a later post of mine, I believe it would also be useful if the track signal would also be able to send the cargo contents of the train to the circuit network, instead of only the Train-ID.

Why ?
This would allow the circuit network to keep track of the position of individual trains.

Related suggestions
In the following thread, it has been suggested that the unique Train-ID mentioned above should not be some internal value, but rather a user-defined value.

viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive

Having such a user-defined value would make my suggestion even more useful.

Re: Signals should send Train-ID to circuit network

Posted: Sun May 14, 2017 2:06 pm
by Dimanper
Devs, PLEASE do it.

Re: Signals should send Train-ID to circuit network

Posted: Mon May 15, 2017 7:53 pm
by Tekky
Also, it may be useful for rail signals to also transmit the cargo of the train, just like stations do. That way, the circuit network could, for example, count the amount of cargo approaching a certain station.

In short, it would be good if rail signals would transmit the same data as train stations.

Re: Signals should send Train-ID to circuit network

Posted: Fri May 19, 2017 2:09 pm
by Tekky
On the other hand, in "hold mode", it may be better for the signal to provide information on the train approaching the signal, instead of information on the train that has already passed it. I am undecided.

Re: track signals should send Train-ID to circuit network

Posted: Tue Feb 20, 2018 12:17 am
by Tekky
Meanwhile, someone else has started a new thread with the same suggestion as mine. Here is a link to that thread:

viewtopic.php?f=6&t=52504 Receive signals from moving trains

It is also worth noting that, meanwhile, someone else has made the suggestion that the number of players on a train should also count as content that is sent to the circuit network. Here is a link to that thread:

viewtopic.php?f=6&t=54203 train stop circuit network 'contents' should include player

As I have pointed out in that thread, if that suggestion and my suggestion were combined, it would be possible for the circuit network to detect trains with players onboard and give them priority, by forcing the signals of other trains to red.

Re: track signals should send Train-ID to circuit network

Posted: Tue Feb 20, 2018 11:18 am
by Engimage
How do you identify priority? If a block has incoming train it goes yellow. This means you can't stop that train already. And if the block is free there is no sense in blocking trains.
The only thing here would be if the trains could prematurely reserve blocks way ahead of them (further than yellow suicide path) then it can make sense. But really - why should you interfere with a simple working thing with clear logic?

As to circuit network output. It makes sense to read train ID of a train occupying the block. This looks nice on a fully automated network but if you add a player then a block can be effectively occupied by several trains at a time - so what value should signal output then?

Also I do not get the purpose of detecting a player onboard the train or even more outputting player inventory to network. You obviously can't interfere with player's inventory (neither load or unload it) so why should you bother?

Re: track signals should send Train-ID to circuit network

Posted: Tue Feb 20, 2018 11:43 am
by Tekky
PacifyerGrey wrote:How do you identify priority? If a block has incoming train it goes yellow. This means you can't stop that train already. And if the block is free there is no sense in blocking trains.
It does make sense to block trains even if the block is currently free, because this will prevent low-priority trains from entering that free block through a different signal. That way, only the signal of the high-priority train will show green. However, I do agree that this is a bit messy and it may be better for priority trains to simply reserve a larger distance ahead of them.

Related thread:
viewtopic.php?f=6&t=57742 Express/Priority Trains

PacifyerGrey wrote:As to circuit network output. It makes sense to read train ID of a train occupying the block. This looks nice on a fully automated network but if you add a player then a block can be effectively occupied by several trains at a time - so what value should signal output then?
That is a good point. I guess it would be best to output some error value as the Train-ID, for example the number -1 (since all Train IDs are >0 and 0 indicates no train.)

PacifyerGrey wrote:Also I do not get the purpose of detecting a player onboard the train or even more outputting player inventory to network. You obviously can't interfere with player's inventory (neither load or unload it) so why should you bother?
Train stations and track signals currently output train cargo contents to the circuit network, not player inventory contents. I never suggested to change that. I was only talking about an additional signal being sent to the circuit network indicating the number of players onboard the train, so that, for example, the circuit network could detect trains with players onboard and give them priority.

Re: track signals should send Train-ID to circuit network

Posted: Tue Feb 20, 2018 11:55 am
by mrvn
Trains in manual mode don't use yellow signals making them rather dangerous. So yes, you would turn every signal leading into tracks reachable soon by the players train to red. That would make it far more likely that trains will clear the area and the player can drive on without crashing into trains.

Personally I think that would be horrible complex to design. Way to many combinators needed. Better to pick a station near where you want to go and drive on automatic.

Re: track signals should send Train-ID to circuit network

Posted: Tue Feb 20, 2018 12:28 pm
by mp0011
Personal train priority (despite I am against it) could be achieved by simply extending "yellow arrows path marker" infinitely long, and lock entire way to destination station.
Or just set how many blocks such train may reserve. AFAIK, now it's only reserve distance equal to braking distance with bonuses.

Re: track signals should send Train-ID to circuit network

Posted: Tue Feb 20, 2018 1:55 pm
by mrvn
mp0011 wrote:Personal train priority (despite I am against it) could be achieved by simply extending "yellow arrows path marker" infinitely long, and lock entire way to destination station.
Or just set how many blocks such train may reserve. AFAIK, now it's only reserve distance equal to braking distance with bonuses.
What is your destination when on manual? :)

Re: track signals should send Train-ID to circuit network

Posted: Tue Feb 20, 2018 2:08 pm
by mp0011
The complaint was, automatic train with passanger has no priority over regular trains. That fix it.

I do not drive manually on main railway, and each branch (with low traffic) may just have a station right after main railroad exit.
So, You drive to that station automatically, with priority, and from there You drive manually with no priority, wherever You wish...