trinnguyen / bahndsl

BahnDSL: A Domain-Specific Language for Configuring and Modelling Model Railways
GNU General Public License v3.0
1 stars 0 forks source link

Link Distant Signals with their Main Signals #22

Open eyip002 opened 3 years ago

eyip002 commented 3 years ago

There should be a way to relate a distant signal to its main signal in the Bahn configuration file:

There should be a way to query the relationship in the interlocking algorithm:

BLuedtke commented 1 year ago

Challenge: Some distant signals do not have a single concrete main signal they refer to. Example: A distant signal after which a point follows, which allows travel along one of two paths, with both paths having e.g. exit signals down the line.
IMO, the distant signal would probably have to indicate either both main signals that follow (go if both are go, caution if one of the two is not go, stop if both are stop), or the related main signal would have to change dynamically with the track state. Both options are difficult to support in BahnDSL, though for the first, all that the BahnDSL config has to do is indicate a relation of a distant signal to multiple main signals. The distant signal can be set to the appropriate related main signal during interlocking, where the track state is known.