Author Topic: Unpractical routing?  (Read 1779 times)

0 Members and 1 Guest are viewing this topic.

Offline xlfpx

Unpractical routing?
« on: June 08, 2016, 09:32:47 AM »
Take a look at this situation I'm having at the moment. The train waiting in the station has a clear path going all the way to his destination by using the second lane. none of his path is occupied. why does he instead decide to wait for the first lane to clear up? sure, the first one is marginally shorter, but why not take the second one directly?
 here again: https://www.dropbox.com/s/2w0tlccs3pdonms/justwhy.png?dl=0 why does this train choose to deliberately block itself, rather than to just take the other lane?

I know this could technically be solved by making the two lanes one-directional, but I don't see why I would need to restrict it like that
« Last Edit: June 08, 2016, 09:47:59 AM by xlfpx »

Offline Tjoeker

Re: Unpractical routing?
« Reply #1 on: June 08, 2016, 11:17:32 AM »
I suggest you make the rails one way. (see attached file)
By placing the same signal on top of the the already existing one, you make the route one way.
By clicking on it again it will change the direction.

the second picture: the train prefers the shortest route, and it saw it was clear until the next signal (it doesn't know there is a train on the other side of the signal)

oops, just saw you knew this :)
Train will indeed always look and wait for the shortest route to be clear. (as far as I know)
Hence you should make the rails one way. If you're more advanced with the signalling you could probably work something out with long signals.
« Last Edit: June 08, 2016, 11:28:04 AM by Tjoeker »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4453
  • Total likes: 141
  • Helpful: 105
  • Languages: EN, NO
Re: Unpractical routing?
« Reply #2 on: June 08, 2016, 02:54:45 PM »
Tjoeker is right, vehicles in Simutrans always finds the shortest* possible path, and sticks to it unless it discovers that the way has been physically removed or "permanently" blocked. The philosophy behind this is predictability. Trains won't suddenly go all the way around the world because all other paths were temporarily blocked, which could happen in for instance Transport Tycoon.

You can use waypoints to tell some trains to use one track, and other trains to use the other track. Another solution is to make one track, usually the high speed track, electrified and a little bit longer than the unelectrified low speed track.

Two-sided signals are a deadlock waiting to happen in all but very limited circumstances. While real life train controllers plan ahead to avoid such things, Simutrans has no foresight.

*Length alone is not the deciding factor. Steepness, curvature and traffic is also taken into account.

Offline sdog

Re: Unpractical routing?
« Reply #3 on: June 08, 2016, 05:02:18 PM »
Quote
Two-sided signals are a deadlock waiting to happen in all but very limited circumstances. While real life train controllers plan ahead to avoid such things, Simutrans has no foresight.
It would be a good idea not to make two-sided signals the default when placing one. I've used them in some awkward combinations with long-block signals, so there can be a use.

That might still be achieved by either (a) make a toggle in settings to enable two-sided signals or (b) let pak sets define two-sided signals as another signal type. In both cases keep regular signals for two one-way directions, with a toggle as it is now. (One might guess the orientation by looking forward or back to points or other signals.)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4453
  • Total likes: 141
  • Helpful: 105
  • Languages: EN, NO
Re: Unpractical routing?
« Reply #4 on: June 08, 2016, 06:03:44 PM »
It would be a good idea not to make two-sided signals the default when placing one. I've used them in some awkward combinations with long-block signals, so there can be a use.

That might still be achieved by either (a) make a toggle in settings to enable two-sided signals or (b) let pak sets define two-sided signals as another signal type. In both cases keep regular signals for two one-way directions, with a toggle as it is now. (One might guess the orientation by looking forward or back to points or other signals.)

Maybe just making two-sided set-up the last option. I'm not sure auto-guessing would work well, except when there are other signals, but in those cases, the "new" way of building signals by dragging might be used. There is a precedent for which way single sided stuff initially face, which is used for various signs.

Offline sdog

Re: Unpractical routing?
« Reply #5 on: June 08, 2016, 09:08:01 PM »
Only have ctrl-click toggle to two-sided signals might be an alternative. It would hide a mostly useless option, while making it still available for advanced users, for the rare cases where it can be used.

I remember that two-sided signals gave me quite a lot of trouble when I started playing with signalled railways.

Offline xlfpx

Re: Unpractical routing?
« Reply #6 on: June 08, 2016, 09:28:03 PM »
thanks, guys! appreciate the help. I finally did solve the problem with a combination of one-directional and bi-directional tracks, preventing deadlocks with pre-signals.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4453
  • Total likes: 141
  • Helpful: 105
  • Languages: EN, NO
Re: Unpractical routing?
« Reply #7 on: June 09, 2016, 04:47:44 AM »
Pre-signals are very rarely needed. All they do, is effectively remove the next signal. I have only found them useful for sidings where I "need" a two-sided signal at the entrance, where they cancel the effect of the signal facing out. The other use I can think of is when one insists on adding more signals than needed just for visual realism.

Offline DrSuperGood

Re: Unpractical routing?
« Reply #8 on: June 09, 2016, 04:29:23 PM »
Pre-signals can also be used at flat intersections (where trains have to cross other lines). One can place the pre-signals at the intersection entrances and normal signals at the intersection exits. Then one just needs to sure the block directly after the exit signals is large enough for the largest train on the line to use and it works. Trains will never sit on the intersection blocking it.

Of course a similar effect can be achieved by removing the exit signals. However since that costs you money or requires manual counting it is often easier to plonk down pre-signals and let it work. No such issue exists with multi-level intersections as traffic will never block traffic going to other directions.

Another use is with terminal stations. Such stations can be prone to deadlocks if a train leaving blocks trains from entering as the exit path might be blocked due to trains trying to get into the entrance path. Again it could be substituted by signal removal of the exit signal however that also can end up more costly or take longer to perform.

That said I do agree they are mostly useless. They would be far better if they reserved enough blocks (instead of just 1 block) after the next block to hold the convoy. That way they would be critical for efficient deadlock free intersections as they would allow convoys longer than the current signal spacing to use them without lowering signal density for smaller convoys. If they then encounter another pre-signal before finding enough block space for the convoy (eg another intersection closely after a intersection) then they will skip the next block (as instructed by the pre-signal) before continuing to find sufficient block space. This would solve most of the deadlock situations I see in multiplayer servers where flat intersections are used.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4453
  • Total likes: 141
  • Helpful: 105
  • Languages: EN, NO
Re: Unpractical routing?
« Reply #9 on: June 09, 2016, 06:02:17 PM »
Pre-signals can also be used at flat intersections (where trains have to cross other lines). One can place the pre-signals at the intersection entrances and normal signals at the intersection exits. Then one just needs to sure the block directly after the exit signals is large enough for the largest train on the line to use and it works. Trains will never sit on the intersection blocking it.

Of course a similar effect can be achieved by removing the exit signals. However since that costs you money or requires manual counting it is often easier to plonk down pre-signals and let it work. No such issue exists with multi-level intersections as traffic will never block traffic going to other directions.

I don't get it. Why would there be any exit signals to remove in the first place?

That said I do agree they are mostly useless. They would be far better if they reserved enough blocks (instead of just 1 block) after the next block to hold the convoy. That way they would be critical for efficient deadlock free intersections as they would allow convoys longer than the current signal spacing to use them without lowering signal density for smaller convoys. If they then encounter another pre-signal before finding enough block space for the convoy (eg another intersection closely after a intersection) then they will skip the next block (as instructed by the pre-signal) before continuing to find sufficient block space. This would solve most of the deadlock situations I see in multiplayer servers where flat intersections are used.

Interesting idea. Makes the name even more unsuitable, though. I'm not sure what one would call such a signal to make its purpose clear, even if not at first glance.

Offline DrSuperGood

Re: Unpractical routing?
« Reply #10 on: June 10, 2016, 04:34:56 AM »
Quote
I don't get it. Why would there be any exit signals to remove in the first place?
Because it is easy to drag evenly spaced signals from the intersection exit rather than count 1 max train length from the exit and then start dragging. As I said, you can then delete the exit signal or place pre signals at the entrances, the choice is really up to the user.

Quote
Interesting idea. Makes the name even more unsuitable, though. I'm not sure what one would call such a signal to make its purpose clear, even if not at first glance.
Name is not so important as long as any changes are reflected in the help. It would certainly make it more useful though, especially for mixed freight networks where some trains are longer than others.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4453
  • Total likes: 141
  • Helpful: 105
  • Languages: EN, NO
Re: Unpractical routing?
« Reply #11 on: June 10, 2016, 05:40:01 AM »
Because it is easy to drag evenly spaced signals from the intersection exit rather than count 1 max train length from the exit and then start dragging. As I said, you can then delete the exit signal or place pre signals at the entrances, the choice is really up to the user.

Then I understand. Without the crossing lines, these extra signals are just a visual disturbance. That is enough of a reason for me to remove them, or avoid building them, long before the question of crossing traffic ever arises. So in my mind, these signals don't exist.

Offline kierongreen

Re: Unpractical routing?
« Reply #12 on: June 16, 2016, 08:52:44 AM »
They were possibly more useful before path based signalling... there are still situations though where it's handy to have signals at terminal stations for example as this allows a train to reverse and start moving forward again before the junction is clear.

Offline DrSuperGood

Re: Unpractical routing?
« Reply #13 on: June 16, 2016, 03:56:59 PM »
Quote
there are still situations though where it's handy to have signals at terminal stations for example as this allows a train to reverse and start moving forward again before the junction is clear.
Bi-directional stop signals do this as well.

The only difference is that they do not need the exit block to be free before the train is allowed to move across the intersection. If signal spacing is appropriate for convoys then this means the intersection will never be blocked by a train trying to exit but unable to due to the exit block being blocked. Same effect can be achieved with bi-directional stop signals by using appropriate signal spacing and deleting the exit signal. If signal spacing is not appropriate it means practically nothing and only slows down exit throughput slightly due to extra waiting.

Now if they could always appropriately reserve for convoys by reserving multiple blocks in advance they would be a lot more useful as they would do more than what one can do by simply deleting the exit signal of an intersection.