《任务序列全指挥》 什么是任务序列,在平时的操作中我们随处可见,简单的临时实体的搬运都会伴随着任务序列的进行,比如操作员到哪去搬运临时实体,送往拿去,拿哪一件临时实体,都会由任务序列来指示。 Whatisatasksequence?Wecanseeiteverywhereinnormaloperations。Thehandlingofasimpletemporaryentitywillbeaccompaniedbythetasksequence。Forexample,wheredoestheoperatormovethetemporaryentity,sendittoit,andwhichonetotake,Willbeindicatedbythetasksequence。 让我们来看看内部的逻辑,查看操作员的浏览树,可以找到任务操作,点击出来可以看到操作员进行的各种操作,行走、装载、中断、行走、卸载,同时active表示正在执行。通过勾选使用运输工具,就会得到这五种任务序列。 Letstakealookattheinternallogic,checktheoperatorsbrowsetree,youcanfindthetaskoperation,clickittoseethevariousoperationsperformedbytheoperator,walking,loading,interrupting,walking,unloading,andactivemeansthatitisexecuting。Bycheckingtheuseoftransportationtools,youwillgetthesefivetasksequences。 任务执行器基于任务序列执行运动改变状态;只能指引任务执行器,执行的特殊节点保存在属性节点中;只可通过命令控制,不可手动修改。 Titcanonlyguidethetaskexecutor,itcanonlybecontrolledbycommandsandcannotbemanuallymodified。 Flexsim共有两种方式创建自定义任务,第一种就是代码编制分为单个执行任务和完整任务序列执行,第二种便是PF编制。 TherearetwowaystocreatecustomtasksinFlexsim。Thefirstisthatthecodeispidedintosingleexecutiontasksandcompletetasksequenceexecution,andthesecondisPFprogramming。 接下来我们通过一个案例来为大家介绍一下任务序列。任务执行器从初始停车点按照固定路线完成单个货物装载。 Next,wewillintroducethetasksequencetoyouthroughacase。Thetaskexecutorcompletestheloadingofasinglecargoaccordingtoafixedroutefromtheinitialstoppoint。 首先利用节点知识,进行A连接,让任务执行器,进行对应操作。我们会看见任务执行器会在最原始的位置进行等待,而不是对应的取货区的最近的节点进行等待,些许的不划算,因此我们可以去掉初始序列。 First,usenodeknowledgetomakeAconnectionandletthetaskexecutorperformcorrespondingoperations。Wewillseethatthetaskexecutorwillwaitinthemostoriginalposition,insteadofwaitinginthenearestnodeofthecorrespondingpickuparea,whichisnotcosteffective,sowecanremovetheinitialsequence。 我们可以在任务执行器的重置触发中编写如下代码,让任务执行器先运动到离取货区最近的节点进行等待下一个执行任务。 Wecanwritethefollowingcodeintheresettriggerofthetaskexecutortomakethetaskexecutormovetothenodeclosesttothepickupareatowaitforthenextexecutiontask。 接下来我们尝试不通过勾选使用运输工具,手动让其完成单个装载。这时候可以断开暂存区1和暂存区2之间的A连接,而是改用S连接。然后在暂存区1的进入触发中进行如下代码编写。 Next,wetrynottochecktheuseoftransportationtools,andmanuallyletthemcompleteasingleload。Atthistime,youcandisconnecttheAconnectionbetweenthetemporarystoragearea1andthetemporarystoragearea2,butusetheSconnectioninstead。Thenwritethefollowingcodeintheentrytriggeroftemporarystoragearea1。 运行结果如下: Theresultsoftheoperationareasfollows: 希望以上的内容能对你有一定的用处! Hopetheabovecontentcanbeofsomeusetoyou! 参考资料:腾讯课堂《从小白到大神》 英文翻译:Google翻译 本文由LearningYard学苑原创,若有侵权请联系删除。