将无线电按钮链接到任何logic中的时间表

发布于 2025-02-13 23:55:21 字数 280 浏览 0 评论 0原文

我正在尝试链接一个无线电按钮,该按钮允许模型用户选择模拟的操作场景(方案AE),并且我需要此广播按钮选择来提供条件控制,以指定每个源块要应用哪个速率时间表。

即,如果选择了一个广播按钮,则源“ WestBoundArrival”使用到达附表A1,源“ EastBoundarrival”使用到达附表A2等,

我正在努力寻找以前的示例,以解决此问题。

我认为,使用“操作”选项卡,并使用此变量输出选择源使用的价格链接的方法,从而将单选按钮选择输出变量。我很难创建链接。

任何指针都将受到欢迎。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

离去的眼神 2025-02-20 23:55:21

您只需添加一个参数“选择”,然后将其链接到RadioButton(确保其INT)。

然后,在您的SourceBlock中,您可以添加这样的代码:

choice==0?schedule:schedule1

如果您现在运行模型,则将根据您的RadioButton选择选择源使用的速率时间表。您也可以在运行时更改它。

并且请注意,RadioButton索引基于零,因此首先定义的按钮为0,下一个是1等。

祝您好运!

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!

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文