如何解决使用单选按钮可按用户偏好指示资源退出路线
我已经使用radio.getValue();
函数来输入和输入1。
在运行模型之前,我想手动选择资源输入路线(输入,enter1或enter和enter1)。我引入变量或参数的方法失败了。
不确定如何将出口链接到单选按钮吗?
解决方法
您可以在exit
块的“退出时”代码中使用此代码:
if (radio.getValue() == 0) {
enter.take(agent);
}
else if (radio.getValue() == 1) {
enter1.take(agent);
}
else if (radio.getValue() == 2) {
// decide yourself which enter block,can use randomTrue(.5)....
}
else {
error("Unexpected radio choice");
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。