全球FlexSim系统仿真中文论坛

搜索
查看: 2838|回复: 7
打印 上一主题 下一主题

除了用message机制外,有没有好点的办法让item在暂存区停留一定的时间再走?

[复制链接]
跳转到指定楼层
1#
liguanyu 发表于 2021-2-4 09:45:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
新人求助
推荐
clayclay 发表于 2021-2-7 14:34:59 | 只看该作者
liguanyu 发表于 2021-2-5 10:00
“关闭输出端口一段时间” 这个时间是调用啥函数实现的呀
我现在一个模型里面用了好多senddelayedmess ...

closeop (obj object, num outputportnum)
Close one output port of object
Description
Close just outputportnum of object. Closing an output port of an object will block the exit from the object through that port. Modelers should only use this command when working with fluid objects because the internal behavior of discrete objects controls the opening and closing of their ports, and therefore this command may be overridden. For discrete objects the modeler is referred to closeoutput() and stopoutput().
Example
closeop(current,1)
参见帮助文件里面,这样调用应该也是可以的,需要自己去试试。
2#
clayclay 发表于 2021-2-4 11:47:47 | 只看该作者
调用PF模块里面的delay不可以吗?
3#
 楼主| liguanyu 发表于 2021-2-4 15:06:13 | 只看该作者
clayclay 发表于 2021-2-4 11:47
调用PF模块里面的delay不可以吗?

这个好像可以 不过不喜欢用pf...
4#
clayclay 发表于 2021-2-5 09:32:47 | 只看该作者
liguanyu 发表于 2021-2-4 15:06
这个好像可以 不过不喜欢用pf...

还可以用触发器,进入触发关闭该缓冲区的输出端口一段时间亦可以。
5#
 楼主| liguanyu 发表于 2021-2-5 10:00:40 | 只看该作者
clayclay 发表于 2021-2-5 09:32
还可以用触发器,进入触发关闭该缓冲区的输出端口一段时间亦可以。

“关闭输出端口一段时间” 这个时间是调用啥函数实现的呀
我现在一个模型里面用了好多senddelayedmessage(),搞得好乱,但是不用我又不知道有什么东西可以再触发这个事件。。
6#
clayclay 发表于 2021-2-7 14:28:16 | 只看该作者
Object.output.close()
最新版应该是调用这个命令。
老版可以用closeoutput()。
8#
JYF-芳 发表于 2021-2-10 08:55:34 | 只看该作者
在暂存区触发器中的进入触发,编写以下代码
closeoutput(current);
senddelayedmessage(current,50,current,0,0,0);(其中50为延时时间,可更改到想要的值)
再在暂存区触发器中的消息触发,编写以下代码
openoutput(current);
即可
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|全球FlexSim系统仿真中文论坛 ( 京ICP备14043114号-2 )

GMT+8, 2024-5-14 13:08 , Processed in 0.087400 second(s), 14 queries .

Powered by Discuz! X3.3© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表