Trains should be smarter with blue chain signal

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
imTheSupremeOne
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Wed Aug 30, 2017 4:13 pm
Contact:

Trains should be smarter with blue chain signal

Post by imTheSupremeOne »

TL;DR
When trains facing chain signal at the blue state they should recalculate their way, using the path with lesser distance from chain signal where the train is to signal/chain signal on the ways.

What ?
At now trains wont recalculate their way facing blue chain signal even if there is a free way that can lead them to it destination. They will just stop and wait until their initial way become free.
Image
So I'm thinking that if train facing blue chain signal it should recalculate his way an choose a path that:
1) Can lead him to final destination
2) I think a lot about which one of free path should train choose, should green color be more prior than the blue one and come to conclusion that the train should choose a path with shortest path from blue chain signal to another signal/chain signal.

In this example train should go by the 3rd way:
Image

3) What if path is even at both ways? Then train should use his basic path finding, but it shoudnt consider all the blocked paths.

Why ?
I think that it will be a nice feature, it will fit and make more better railroads that having a lot of trains on way.


P.S. I checked mod Smarter Trains(https://mods.factorio.com/mods/Choumiko/SmartTrains) but it is not making them smarter in way that I'm asking in this topic.
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Trains should be smarter with blue chain signal

Post by mrvn »

While I agree about recalculating the path and taking alternate paths I don't think your example makes much sense. Your path 1 is shorter than all the others and has less signals on it. All the other paths need to cross the same signal that is blocking progress too. What you have build here is a stacker but you haven't signaled it like a stacker.

But back to the siggestion: Your "free path" actually is not free. It just is blocked later. So maybe you should have said that the train should try multiple paths at the blue signal and take the one that gets it closest to its goal. Now the question is: What is closest? In terms of signals the distance to the goal where it has to stop is the same (one signal from the train stop). But the length of the path in general is greater (2 signals to the train stop instead of one and more meter). The "free path" is definetly the worse path IF signals where green. But it gets the train nearer to the goal before it has to stop and that should way in here.
User avatar
imTheSupremeOne
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Wed Aug 30, 2017 4:13 pm
Contact:

Re: Trains should be smarter with blue chain signal

Post by imTheSupremeOne »

mrvn wrote:While I agree about recalculating the path and taking alternate paths I don't think your example makes much sense. Your path 1 is shorter than all the others and has less signals on it. All the other paths need to cross the same signal that is blocking progress too. What you have build here is a stacker but you haven't signaled it like a stacker.

But back to the siggestion: Your "free path" actually is not free. It just is blocked later. So maybe you should have said that the train should try multiple paths at the blue signal and take the one that gets it closest to its goal. Now the question is: What is closest? In terms of signals the distance to the goal where it has to stop is the same (one signal from the train stop). But the length of the path in general is greater (2 signals to the train stop instead of one and more meter). The "free path" is definetly the worse path IF signals where green. But it gets the train nearer to the goal before it has to stop and that should way in here.
Yes. Min distance between signals should be measured in rail segments that train should pass.
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Trains should be smarter with blue chain signal

Post by Engimage »

Every time the train recalculates path it compares the distance in rail segments for every path. It does not look at the number of signals at all. However for every segment there is a penalty if the block is ocupied (signalled red ot yellow).
Once the path is calculated train stays on it until train is not forced to recalculate it again.

There is a set of events that can cause train to repath.
One of them is a train staying at a red chain signal for 5+ seconds if a destination stop has multiple stations with same name. So staying at a chain signal with normal stations will not cause the train to repath.

Anyways my point is that train always checks the whole path and ignores number of signals on it. It considers only the end result. In your example the result is mostly the same.
Post Reply

Return to “Ideas and Suggestions”