The International Simutrans Forum

 

Author Topic: Signals question  (Read 3975 times)

0 Members and 1 Guest are viewing this topic.

Offline faiuwle

  • *
  • Posts: 21
Signals question
« on: September 05, 2015, 06:50:37 PM »
Hi, I can't figure out how to make signals work for me with several train tracks crossing: a N/S train, an E/W train, and a W/S train.  The N/S and W/S trains share the track to the south, but the E/W and W/S trains have different westward tracks.  I wanted the trains to stop when someone else was in the intersection, and for the N/S and W/S trains to stop on the north and west sides (respectively) of the intersection while the other was on the south track.  I couldn't use regular signals because of that, but if I used pre-signals than e.g. the N/S train would always get stuck on the north side of the intersection because of the E/W train.  I don't have a picture of it because I wound up dismantling the intersection so that the E/W and W/S trains didn't intersect at all and making an artificial elevation change + tunnel for the N/S train to avoid them all.  Is it possible to do this with signals, though?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: Signals question
« Reply #1 on: September 05, 2015, 08:15:52 PM »
It's hard to follow your explanation. Was it single-track or double-track? If the former, where were the passing loops? And in all cases, where were the signals placed in all this?

Offline faiuwle

  • *
  • Posts: 21
Re: Signals question
« Reply #2 on: September 05, 2015, 09:34:49 PM »
Here's a picture of what it looks like now.  Originally the tunnel wasn't there and that whole area was flat, and the three tracks intersected.  The signals were on all the tracks just before they entered the intersection.

https://dl.dropboxusercontent.com/u/8644666/Miscellaneous/simutrans.png

Offline gauthier

  • Devotee
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Signals question
« Reply #3 on: September 06, 2015, 07:51:13 AM »
Your explanation is hard to follow, and the screenshot is not relevant as you modified your game. I tried to understand what you were trying to do, my solution is in attached picture. If I misunderstood your problem, could you reproduce the situation you had before adding your tunnel, in a clear map, so we can have a clear understanding of the situation ?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: Signals question
« Reply #4 on: September 06, 2015, 08:45:56 AM »
I notice that the layouts in both images have problems if there is more than one train serving some of the stations. Apart from that major problem, faiuwle can get rid of the tunnel and just have the tracks cross at the same level by adding a signal on the other side of the crossing from Appingmouth Quarry yard. There is however the problem that there isn't enough space between the junction of the sand and stone lines, and the crossing for a train to wait at the signal at the junction. This can be solved by either moving the junction or adding a pre-signal at the Sand Quarry side of the crossing.

A far better solution would be to rearrange everything. I wound move Appingmouth Sand Quarry yard to the left, and move the track now crossing through the center of the image over to the right side of the sand quarry. Or maybe I would even attempt to serve both quarries with a single station with three platforms. Either way, not tracks need cross at all.

Offline faiuwle

  • *
  • Posts: 21
Re: Signals question
« Reply #5 on: September 06, 2015, 06:11:48 PM »
Sorry.  Here is a mock-up of what it was before, minus signals, sorry for the sloppiness, probably not to scale with original: https://dl.dropboxusercontent.com/u/8644666/Miscellaneous/simutrans2.png  There is only one train serving each station, and the white and black lines show where the trains are going.  The sand train and one of the stone trains share the track to the south - in my game currently I just put signals on each track before they merged into the shared track, and that keeps them from trying to use the track while the other train is on it.

I'm not quite sure I understand your second solution - which track is the one crossing through the center of the image, the N/S one from the sand quarry, or the E/W one from the stone quarry?  I actually tried putting the sand quarry station to the left, but because of the slope I couldn't put it close enough to serve the quarry.  Likewise, I don't think the quarries are close enough to use the same station with multiple platforms.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: Signals question
« Reply #6 on: September 06, 2015, 07:20:19 PM »
Sorry.  Here is a mock-up of what it was before, minus signals, sorry for the sloppiness, probably not to scale with original: https://dl.dropboxusercontent.com/u/8644666/Miscellaneous/simutrans2.png  There is only one train serving each station, and the white and black lines show where the trains are going.  The sand train and one of the stone trains share the track to the south - in my game currently I just put signals on each track before they merged into the shared track, and that keeps them from trying to use the track while the other train is on it.
Depending on how the track layout is beyond what we can see, placing simple signals where the single tracks meet the first junction heading towards the stations should work. Although the short distance between the two means that the E/W track will be blocked for a while if the N/S trains departs with a load of sand while the W/S stone trains is out on the shared track. Increasing that distance will solve it, as will passing loops on the shared track. The latter is the better idea for other reasons.

I'm not quite sure I understand your second solution - which track is the one crossing through the center of the image, the N/S one from the sand quarry, or the E/W one from the stone quarry?  I actually tried putting the sand quarry station to the left, but because of the slope I couldn't put it close enough to serve the quarry.  Likewise, I don't think the quarries are close enough to use the same station with multiple platforms.
Well, by relocation the sand quarry station, its track would no longer pass through the center of the image. And making room for the station doesn't require more changes to the landscape than the tunnel did.

Offline faiuwle

  • *
  • Posts: 21
Re: Signals question
« Reply #7 on: September 06, 2015, 07:39:28 PM »
Increasing that distance will solve it, as will passing loops on the shared track. The latter is the better idea for other reasons.

Can you show me what you mean?  What are passing loops?

Quote
Well, by relocation the sand quarry station, its track would no longer pass through the center of the image. And making room for the station doesn't require more changes to the landscape than the tunnel did.

Well, the track from the sand quarry currently circles around to the left of it anyway, it probably wouldn't change the position of the track if I did do terrain modification to put the station to the left.  I would have put it there anyway to avoid all the circling, but IIRC funds were a little tight and I didn't want to do the terrain modification.  I have lots now, though, so I could redo it all.

Offline gauthier

  • Devotee
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Signals question
« Reply #8 on: September 06, 2015, 07:43:06 PM »
Here is my solution for your situation. Using simple signals is not sufficient: the west track is shared between two trains, using simple signal on it will lead to two trains blocking each other on this signal. Using no signal at all would lead, as Ters described, to tracks occupied for too long periods.

Red marks are simple signals, their use is to divide tracks in sections to prevent trains from occupying the track for too long before arriving at their station.
Yellow marks are presignals, when a train departs, they ensure that the train can proceed after the simple signals, avoiding the blocked situation I described above.

Of course, all of this works as long as there is only one train for each station. If you have more, the simple signals must be replaced by presignals, and the signals out of what we can see must be adjusted too.

Offline faiuwle

  • *
  • Posts: 21
Re: Signals question
« Reply #9 on: September 06, 2015, 07:53:33 PM »
Wouldn't the pre-signals mean that the trains exiting the platforms would be blocked by trains on any of the other tracks, though?  E.g. the sand quarry train and the southernmost stone quarry train would be blocked by the E/W train no matter where it was, because both blocks of that track that aren't within the intersection are considered by the pre-signals?  And the trains would block each other when they were waiting at the station-side pre-signals.

Also, I've noticed that at least in recent versions, stations don't seem to be part of signal blocks, is this correct?  I've had e.g. a station on I guess what you probably mean by a "double track" (i.e. two parallel tracks both one way in different directions), being between two signals and a second train could enter that area if it was headed toward the station and the other train was not at the station.  Then, if there is still a train waiting at the second signal when the second train is ready to leave, it would just wait on the platform.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: Signals question
« Reply #10 on: September 06, 2015, 09:17:14 PM »
Wouldn't the pre-signals mean that the trains exiting the platforms would be blocked by trains on any of the other tracks, though?  E.g. the sand quarry train and the southernmost stone quarry train would be blocked by the E/W train no matter where it was, because both blocks of that track that aren't within the intersection are considered by the pre-signals?  And the trains would block each other when they were waiting at the station-side pre-signals.

They would only be blocked by trains in the direction the train they are blocking wants to go. The E/W train will only block the N/S (sand) train briefly as it passes through the cross.

Also, I've noticed that at least in recent versions, stations don't seem to be part of signal blocks, is this correct?  I've had e.g. a station on I guess what you probably mean by a "double track" (i.e. two parallel tracks both one way in different directions), being between two signals and a second train could enter that area if it was headed toward the station and the other train was not at the station.  Then, if there is still a train waiting at the second signal when the second train is ready to leave, it would just wait on the platform.

Stations don't act as signals, but waypoints on stations sort of do. A train approaching a through station to stop there does not reserve the track beyond the station, and a train entering a dead-end station will give up the reservation on the track back out as it passes in. The train will wait at the station as if waiting at a signal in order to reserve a route until the next signal or station waypoint. (Earlier, all waypoints worked this way. Now only waypoints where the train stops or turns around does so.)

Offline faiuwle

  • *
  • Posts: 21
Re: Signals question
« Reply #11 on: September 06, 2015, 10:27:20 PM »
They would only be blocked by trains in the direction the train they are blocking wants to go. The E/W train will only block the N/S (sand) train briefly as it passes through the cross.

Ok, I see.  Thanks, gauthier, I will try to rebuild it like that and see if it works.

Quote
Stations don't act as signals, but waypoints on stations sort of do. A train approaching a through station to stop there does not reserve the track beyond the station, and a train entering a dead-end station will give up the reservation on the track back out as it passes in. The train will wait at the station as if waiting at a signal in order to reserve a route until the next signal or station waypoint. (Earlier, all waypoints worked this way. Now only waypoints where the train stops or turns around does so.)

Ahh, thanks.  For some reason I thought that didn't happen like that in the (possibly older) version of simutrans I had before I upgraded my OS.  I never really used waypoints except on roads to prevent traffic jams in cities, so I wouldn't have noticed the change.

ETA:  It works!  Except for a minor problem where the station that's just out of sight to the south was also linked to another track, and the signals around that station interfered with the system.  So I just added another platform to that station and had the other track only link to that other platform, and now it seems to be fine.  The train from that other track hasn't made a trip yet (since the factory is oversupplied at the moment), but I think it should be fine.
« Last Edit: September 06, 2015, 11:01:41 PM by faiuwle »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: Signals question
« Reply #12 on: September 07, 2015, 05:27:07 AM »
Two bidirectional signals on the same track without passing loops between is a bad idea. Once trains approach from both sides simultaneously, you have a deadlock.

Offline faiuwle

  • *
  • Posts: 21
Re: Signals question
« Reply #13 on: September 07, 2015, 04:08:27 PM »
Right... but this was modelled after setup I usually have where a track will connect three stations, A, B, and C, and stations A and C will be connected to e.g. coal and iron, and station B will be for dropping off the coal and iron at a steel mill.  Then if you just put two signals around station B, the two trains can share the track and take turns at station B.  But in this case there were more stations and more signals, so it didn't work.

Offline gauthier

  • Devotee
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Signals question
« Reply #14 on: September 07, 2015, 05:13:56 PM »
Adding a presignal just before the southern station should be enough, no need to make another platform. Anyway you seem to have difficulties understanding the signaling system, maybe this tutorial could help you ?

Offline faiuwle

  • *
  • Posts: 21
Re: Signals question
« Reply #15 on: September 07, 2015, 08:06:57 PM »
Yeah, I understand most of what is in there now, I just didn't know that the pre-signals would only reserve the next block that the train was going to be going on, and not any possible next block.

I admit that when I first played a long time ago I didn't pay any attention to how to use signals at all, because I discovered fairly early on that if you put a signal between the depot and the main track, and then deleted the signal while the newly created train was waiting at it, you could have a single track with multiple trains on it, just passing through each other like ghosts, with no problem.  Of course, they've fixed that since then...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: Signals question
« Reply #16 on: September 08, 2015, 09:12:21 AM »
If the signal following a presignal is another presignal, then indeed a presignal can reserve further ahead. But that is rarely encountered.