全球FlexSim系统仿真中文论坛

搜索
查看: 610|回复: 1
打印 上一主题 下一主题

怎么实现分解器向它的两个下游端口发送实体,一端口是use transport,另一个端口不...

[复制链接]
跳转到指定楼层
1#
wumian 发表于 2022-11-1 16:15:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
2#
zorsite 发表于 2022-11-1 20:55:31 | 只看该作者
本帖最后由 zorsite 于 2022-11-1 20:57 编辑

一开始还以为是求助,写了如下代码。
  1. //货物(2号端口输出)使用运输工具,托盘(1号端口输出)不用。
复制代码

后来才发现在教学
对比了一下软件自带逻辑,发现多了两个命令,通知移出临时实体和移入临时实体完成。
软件自带代码如下:
  1. treenode disp = current.centerObjects[1];

  2. if (port == 1) {
  3.         return disp;
  4. } else {
  5.         transportoutcomplete(current, item, port);
  6.         transportincomplete(current.outObjects[port], item, opipno(current, port));
  7.         moveobject(item, current.outObjects[port], port);
  8. }
复制代码




[size=13.3333px]transportincomplete(obj object, obj item [, num inport, obj transporter])
Notifies the FixedResource object that item will now be moved into it
Description
This command notifies a downstream FixedResource object that the specified item will now be moved into it from an upstream object. This should only be used if the upstream object's Use Transport field is checked, but you are moving the item explicitly, instead of using an FRLOAD task. This allows the downstream FixedResource to manage data on how many items are slated to enter the object, but haven't arrived yet. Execute this command just before you move the item out with the moveobject command. For more information, refer to the FixedResource documentation. If this command returns 0, then the object has been stopped using the stopobject command, and you must wait until it has been resumed before moving the item into it.

Example
transportincomplete(current.outObjects[port], item, opipno(current, port));

This example should be executed from the Request Transport From field before a moveobject command if you decide that you don't want to use a transport, but rather want to immediately move the flowitem



[size=13.3333px]transportoutcomplete (obj object, obj item [, num outport, obj transporter])
Notifies the FixedResource object that item will now be moved out of it

Description
This command notifies the FixedResource object that the specified item will now be moved out of it. This should only be used if the object's Use Transport field is checked, but you are moving the item explicitly, instead of using an FRLOAD task. This allows the FixedResource to manage data on how many items are still in the object but are ready to leave. Execute this command just before you move the item out with the moveobject command. For more information, refer to the FixedResource documentation. If this command returns 0, then the object has been stopped using the stopobject command, and you must wait until it has been resumed before moving the item into it.

Example
transportoutcomplete(current, item, port);

This example should be executed from the Request Transport From field before a moveobject command if you decide that you don't want to use a transport, but rather want to immediately move the flowitem





您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-5-3 21:00 , Processed in 0.087633 second(s), 14 queries .

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

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