在Flexsim3.0实用教程(清华版)附带光盘的第九个模型中,发生器/ 临时实体流 / 使用运输工具: 手动创建任务序列. 自己做模型时,完全输入以下命令,编译通不过.经试验是把原来的createemptytasksequence(centerobject(current,1),0,0);
修改为:
fsnode *newts = createemptytasksequence(Dispatcher6,0,0);
之后编译发生问题的.这代码可是原附光盘中的代码啊,怎么就通不过了呢?
哪位高手做过任务序列的,还请指教一下!
原模型中的代码如下:
fsnode *newts = createemptytasksequence(Dispatcher6,0,0);
inserttask(newts,TASKTYPE_TRAVEL,current,NULL);
inserttask(newts,TASKTYPE_FRLOAD,item,current,1);
inserttask(newts,TASKTYPE_TRAVEL,Processor2,NULL);
inserttask(newts,TASKTYPE_FRUNLOAD,item,Processor2,1);
inserttask(newts,TASKTYPE_UTILIZE,item,Processor2,STATE_UTILIZE);
inserttask(newts,TASKTYPE_FRLOAD,item,Processor2,1);
inserttask(newts,TASKTYPE_TRAVEL,Processor3,NULL);
inserttask(newts,TASKTYPE_FRUNLOAD,item,Processor3,1);
inserttask(newts,TASKTYPE_UTILIZE,item,Processor3,STATE_UTILIZE);
inserttask(newts,TASKTYPE_FRLOAD,item,Processor3,1);
inserttask(newts,TASKTYPE_TRAVEL,Processor4,NULL);
inserttask(newts,TASKTYPE_FRUNLOAD,item,Processor4,1);
inserttask(newts,TASKTYPE_UTILIZE,item,Processor4,STATE_UTILIZE);
inserttask(newts,TASKTYPE_FRLOAD,item,Processor4,1);
inserttask(newts,TASKTYPE_TRAVEL,Sink5,NULL);
inserttask(newts,TASKTYPE_FRUNLOAD,item,Sink5,1);
dispatchtasksequence(newts);
return 0; |