This tutorial is by Michael Stephan (GreatNortherner). It will teach you how to make random flagstops, i.e. signals that can turn yellow or red unpredictably.
This way, the player won't know by looking at the task list if they'll have to stop at a given location, and it will be different each time the scenario is run.
The tutorial helps you write a functioning scenario with a 60% chance for the train order signal to switch to yellow/yellow and a 40% chance for red/red.
The tutorial is written for the GN Cascadian Route with Everett expansion. It is possible, but not very easy, to adaptit it for your own route. See the caveat written by Michael lower down in the thread.
Link to the tutorial in a forum thread: