I am trying to link a radio button which allows the model user to select an operating scenario for the simulation (scenario A-E), and I need this radio button selection to provide conditional control to specify which rate schedule is to be applied by each source block.
i.e. if Operating Scenario A radio button is selected, Source 'WestboundArrival' uses arrival schedule A1, Source 'EastboundArrival' uses arrival schedule A2 etc
I am struggling to find a previous example of how to tackle this.
I think that an approach whereby the radio button selection outputs a variable using the 'Action' tab, and using this variable output to select the rateschedule used by the source. I am having difficultly in creating a link.
Any pointers would be welcomed.
You can just add a parameter "choice" and link this to the radiobutton (make sure its an int).
Then in your sourceblock you can add code like this:
choice==0?schedule:schedule1
If you now run your model, the rate schedule used by source will be selected based on your radiobutton selection. You can also change it during runtime.
And please be aware that the radiobutton index is zero based, so the button defined first is 0, next one is 1 etc.
Good luck!