Train pathing: Add a small cost to signals

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

mrvn
Smart Inserter
Smart Inserter
Posts: 5999
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Train pathing: Add a small cost to signals

Post by mrvn »

TL;DR
Given similar paths a train should choose the one with less junctions as signified by fewer signals.
What ?
During path finding give signals, even when green, a small cost between maybe 1-10.
Why ?
Many people use multiple parallel tracks to increase throughput of the train network. In such a setup the train will pick one track or the other pretty much randomly and even switch tracks. Often there is an outer track where trains split of to stations or join returning from stops and an inner track that has few interruptions. What is lacking is a way to make the inner track preferable with all else being (nearly) equal. By keeping the outer track clear it makes it easier for trains returning from a stop to merge the flow.

Similar on multi lane junctions the best path is the one crossing the lest number of lanes. In a high throughput junction every crossing will be protected by individual signals. So the path with fewer signals usually mens fewer crossings and should be preferred. This allows more trains to drive across the junction at the same time. If there are lane changers before the crossing then changing a lane so fewer crossings happen at the junction would be a good thing even if it increases the path a few tiles. Again there is nothing weighing the path finding in this way.

Besides those use cases where I believe the cost for signals would improve path finding naturally the user could also intentionally place signals to increase the cost of one path over another.

Unlike adding a dummy train station (cost +2000) or circuit controlled signal (cost +1000 while red) the cost of a signal should be minimal. It is intended only as a nudge to prefer one of a set of near equal paths. The cost must be small enough so that occupied segments manage to overpower it. That way trains aren't all waiting for one lane to free up while the other sits idle as is the case with train stations and circuit controlle signals.
Post Reply

Return to “Ideas and Suggestions”