[i=s] 本帖最后由 dongqaqa 于 2019-7-1 22:06 编辑 [/i]
各位大神请帮忙指点下,见下图,操作员在queue6拿起货物后去桌子那边等待T时间后去queue8卸载,T根据产品的类型设置,我在queue6临时实体流--使用运输工具里写了自定义代码
treenode dispatcher = centerobject(current,2);
treenode ts = createemptytasksequence(dispatcher,priority,preempt);
treenode mid = centerobject(current,3);
[color=red]Table delayT = reftable("Type");
int i = delayT[1][1];[/color]
inserttask(ts,TASKTYPE_TRAVEL,current,NULL);
inserttask(ts,TASKTYPE_LOAD,item,current,port);
inserttask(ts,TASKTYPE_TRAVEL,mid);
inserttask(ts,TASKTYPE_SENDMESSAGE,current,NULL,1);
[color=red]inserttask(ts,TASKTYPE_DELAY,NULL,NULL,i,STATE_BUSY);[/color]
inserttask(ts,TASKTYPE_SENDMESSAGE,current,NULL,2);
inserttask(ts,TASKTYPE_TRAVEL,destination,NULL);
inserttask(ts,TASKTYPE_UNLOAD,item,destination);
inserttask(ts,TASKTYPE_TRAVEL,current);
dispatchtasksequence(ts);
// return a 0 so this object will know that you made your own tasksequence and it doesn't need
//to make the standard tasksequence automatically
return 0;
|