Hey there,
At first, sorry about yet another signalling bug report James :/
This is not a critical bug as it allows the one_train_staff to be used when it shouldn't, however it operates differently than it's description in the in-game help, which states that the one_train_staff cabinet can only be used for dead end tracks or very simple tracks with only one train operating on it.
I just used the one_train_staff on an intermediate single tracked section and it worked perfectly well.
This is not wrong so far since, for example (at least according to Wikipedia) the track between Exeter and Plymouth used one_train_staff for such an operation.
For sure, when a train passed a single tracked section from Exeter->Plymouth, another train could only enter the section from Plymouth->Exeter (fun fact: or had to get the staff from the other side by horse)
This is not the case for one_train_staff cabinets in Simutrans-ex. Whenever the track between the cabinets is free, a train can enter from whichever side.
You can see this behavior in layout 5 of this save:
https://dome.xileks.de/simutrans/signal_bugs.sveThere is another useful bug which makes the one_train_staff working method much more useful than it should be (and token block, compared to it, nearly useless)
- When a train approaches the "one train staff"-cabinet, it will come to a halt to check whether the staff is available inside the cabinet
It simply doesn't!
See the save, it's the same when you use one_train_staff the way is is intended to use
There is an additional problem happening when you use the block reservation tool to clear the reservation of a one_train_staff reservation and there is another train waiting at the cabinet.
The train in the section will correctly fall back to drive_by_sight but the other train will immediately start reserving the section but won't start moving causing the train in drive_by_sight to stop due to reserved tracks.
You can also reproduce this in the save at layout 5:
1. stop the train in the single tracked section
2. wait until the other train is waiting at the cabinet
3. let the stopped train continue and clear its reservation
My suggestions about the one_train_staff working method:
Just as time interval signalling which, apart from the start does only create short reservations where the train actually is, just don't create a reservation for the whole one_train_staff-block.
- When a train enters a one_train_staff cabinet tile, it will come to a halt.
- When the staff is available (this means some staff_available flag is set to true), grab the staff (which means to set the staff_available flag to false and setting the trains working method to one_train_staff)
- Otherwise wait until it is available*
- When the train enters another one_train_staff cabinet tile, return the staff(which means setting the staff_available flag to true and setting trains working method to drive_by_sight
- When a train in one_train_staff collides with another train, which could happen when someone builds some crazy track layout, the train should come to an emergency halt, just as it currently does in time_interval_signalling
- Setting staff_available flag does always happen to all neighboring cabinets.
I want to mention that this would be perfectly compatible to the currently described use of one_train_staff in the in-game help, just adding some new functionality taken from the real-world.
*About the waiting: It would be nice to also simulate this "...because if the staff is not there, the train must stop while a man is sent on a horse to get it..." Which means, if the staff is not available, but is in the next cabinet on the trains route, after "distance/riding_speed time", the staff will be removed from that cabinet and after "2*distance/riding_speed" time, the train waiting for it will continue its journey.
Furthermore, I have read about "Staff and ticket" token system, which is actually exactly what I needed to run my second line on my first railway track.
I simulated some kind of "timetable and train order" operating method on this track, using schedules and drive_by_sight, later on using schedules and time_interval, but "Staff and ticket" would have been a much easier.
Assuming my suggested one_train_staff working method, this could be added the following way:
- When a train enters a staff_and_ticket cabinet tile, it will check for the staff just as the one_train_staff cabinet would.
- If the staff is available, it will continue in one_train_staff operating method.
- If the staff is not available, but the time_since_last_train is less than what I will call "max_following_time" AND the last train that entered the section did not already return the staff, that train will switch to ticket operating mode and our train will continue in one_train_staff working method.
- When a train in ticket operating method enters a staff_and_ticket- or one_train_staff cabinet, it will switch back to drive_by_sight, but won't stop, because it doesn't need to return a token.
- When a train in one_train_staff working method enters a staff_and_ticket- or one_train_staff cabinet, it will stop and return the staff.