全球FlexSim系统仿真中文论坛

搜索
查看: 4994|回复: 2
打印 上一主题 下一主题

如何让操作员搬运货物后在中间端口等待

[复制链接]
跳转到指定楼层
1#
dongqaqa 发表于 2019-7-1 22:03:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 dongqaqa 于 2019-7-1 22:06 编辑
. y# v5 n; F6 K* ^* z, j
1 l9 E" Z) H9 K3 V各位大神请帮忙指点下,见下图,操作员在queue6拿起货物后去桌子那边等待T时间后去queue8卸载,T根据产品的类型设置,我在queue6临时实体流--使用运输工具里写了自定义代码& L' j4 n2 |" Y
treenode dispatcher = centerobject(current,2);
# s8 J1 T5 P2 z* A  {treenode ts = createemptytasksequence(dispatcher,priority,preempt);1 g- A% p. i2 F: b( g
treenode mid = centerobject(current,3);
' ]6 b2 Z! o( f/ Q  {; r5 |+ pTable delayT = reftable("Type");
. s* \, b( o8 c1 a) aint i = delayT[1][1];

( \+ C7 m8 j( E% C/ N7 Ginserttask(ts,TASKTYPE_TRAVEL,current,NULL);5 K: S. X; F4 ]; b, A
inserttask(ts,TASKTYPE_LOAD,item,current,port);
$ R6 }$ L5 F4 [+ e5 C! Einserttask(ts,TASKTYPE_TRAVEL,mid);3 I: C4 V- ~% `! K( S0 x
inserttask(ts,TASKTYPE_SENDMESSAGE,current,NULL,1);- V( |) S$ U: ~# o1 s/ d2 f
inserttask(ts,TASKTYPE_DELAY,NULL,NULL,i,STATE_BUSY);
0 _$ }( r/ B/ W& M- t1 c1 xinserttask(ts,TASKTYPE_SENDMESSAGE,current,NULL,2);
2 |, f: V6 R* d6 j; ginserttask(ts,TASKTYPE_TRAVEL,destination,NULL);  [1 e9 ]) Z. R. r' x( b
inserttask(ts,TASKTYPE_UNLOAD,item,destination);
, A; n( p. U' Ginserttask(ts,TASKTYPE_TRAVEL,current);
$ ^1 c* Y& ^+ cdispatchtasksequence(ts);
- U/ n2 O# s6 y$ V6 L" R// return a 0 so this object will know that you made your own tasksequence and it doesn't need 0 U0 k, M6 b8 _
//to make the standard tasksequence automatically
2 |# @! s' ^& Ureturn 0;  
& v0 j% s% w/ I# x6 t( t- C, g9 z! l2 l

本帖子中包含更多资源

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

x
2#
慧娴亚伦 发表于 2019-7-1 22:38:50 | 只看该作者
  1. int i = Table("Type")[1][1];//定义变量i
复制代码
  a; h+ v) |# G3 R1 a
此外不推荐使用单个字母来定义一个变量(除非在循环语句中)' E  J7 K! D) O- T$ d
也不推荐给全局表命名为“Type”这个是我们固定给类型标签的取名
3#
 楼主| dongqaqa 发表于 2019-7-2 21:08:06 | 只看该作者
本帖最后由 dongqaqa 于 2019-7-2 21:14 编辑
: c9 K9 y: ?+ E
慧娴亚伦 发表于 2019-7-1 22:380 A; B8 Z! l0 o% t* D! i8 f& M8 n
此外不推荐使用单个字母来定义一个变量(除非在循环语句中)
/ q  o' M5 X) j/ q. ?) l! R也不推荐给全局表命名为“Type”这个是我们 ...
/ E' Y( x) J; y/ [1 v! v% g
多谢老师指点,根据老师的代码,自己又加了一项,可以根据不同箱子的类型来设置等待时长
3 w) }0 X  M6 g/ w7 ?1 H2 m8 H

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-9-4 16:55 , Processed in 0.074530 second(s), 14 queries .

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

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