This provides an easier method of specifying that several trains are alternatives of each other and only one of them should run in any given session. If the same train is referenced in multiple instances of this rule, all these rules will be combined into one common pool, out of which one timetable is picked at random.
|For example: You specify that "1A01 and 1A02 are alternatives" and "1A03 and 1A02 are alternatives". This means that at runtime, the simulation will pick at random one of 1A01, 1A02 and 1A03 to run. The order of the trains in the rule is important. If the common train in the pool of rules is entered first, entries will be weighted in favour of that train. For an equal chance of trains entering, the common train should be entered second in each rule.|
Note however that rule-chains in the style of "1A01 and 1A02 are alternatives", "1A02 and 1A03 are alternatives" and "1A03 and 1A04 are alternatives" don't work, as there is no common train linking all of them together.
It is also possible to use "?" as a wildcard. "1A99-? are alternatives" means that all instances of 1A99-1, 1A99-2, ..., 1A99-9, 1A99-A etc. are treated as alternatives.
If you're using two-character suffixes, such as 1A99-B1, or 1A99-12, the corresponding rule would be "1A99-?? are alternatives". Note however that this second rule wouldn't cover trains with a single-character suffix, such as 1A99-1.
If you need to mix both single and double-character suffixes, you will need to add "1A99-? and 1A99-?? are alternatives" as a third rule.
All trains which are alternatives of each other have an equal chance of being selected to run. Therefore, if you want to weigh chances in favour of a certain train, you need to either create multiple copies of the train that is more probable to run, or revert to using a combination of "Runs as required or as special" and the NotIf rule .
The probability of a train running as required is evaluated only after the selection from the alternatives list has been made. If the train selected from the alternatives list has a non-zero probability of not running, it is entirely possible that no train will run at all.
Last edited by postal on 21/08/2019 at 10:58