GO 任务序列全指挥(二) 任务序列传统编制模式在Flexsim软件中先创建一个任务安排表,确定执行人、重要性、紧急程度和由单个或多个单任务组成的任务序列。 Inthetraditionalprogrammingmodeoftasksequence,ataskscheduleisfirstcreatedinFlexsimsoftwaretodeterminetheexecutor,importance,urgencyandtasksequencecomposedofsingleormultiplesingletasks。 其中执行人是指Dispatcher,任务的第一责任人,第一责任人可能不是具体执行者但是必须经过他分配相关工作; TheexecutorreferstotheDispatcher,thefirstresponsiblepersonofthetask。T 任务重要性Priority,任务执行的优先顺序,一个任务执行器可能会接到多个任务的安排任务序列,如何选择完成顺序就会由优先级来确定,若任务优先级相同时,便按照先进先出的规则完成相关序列,其中需要注意的是,只有任务序列会有优先级,任务是没有优先级的,任务只会按照自己编写的顺序执行; TaskimportancePriority,thepriorityorderoftaskexecution。Ataskexecutormayreceivemultipletaskschedulingtasks。Howtochoosetheorderofcompletionwillbedeterminedbythepriority。Ifthetaskpriorityisthesame,itwillbebasedonthefirstpriority。Theruleslistedoutcompletetherelatedsequence。Itshouldbenotedthatonlythetasksequencehaspriority,andthetaskhasnopriority。T 紧急程度Preempt,任务的抢占能力,对比重要性,重要性在执行的过程中是无法中断的,只能等待其任务序列执行完成,但是紧急程度可以抢占当前序列的优先级,紧急程度更高可以中断当前执行序列,转而执行紧急程度更高的任务序列。 UrgencyPreempt,taskpreemptionability,contrastimportance,importancecannotbeinterruptedintheexecutionprocess,canonlywaitforitstasksequenceexecutiontocomplete,buttheurgencycanpreemptthepriorityofthecurrentsequence,andtheurgencycanbehigher。Interruptthecurrentexecutionsequenceandexecutethetasksequencewithhigherurgency。 任务安排完成后,还需发布任务,发布传达过程称为Dispatch发布。其中有一个比较值得注意的事情是计划的编制时间和计划的执行时间是不一样的,编制计划的时候不一定能非常准确的预知执行过程中会遇到的困难,因此在Flexsim软件中需要我们提前进行预见,确保编制任务的时候是否会被执行。 Afterthetaskarrangementiscompleted,thetaskneedstobereleased。ThereleaseandcommunicationprocessiscalledDispatchrelease。Oneofthemorenoteworthythingsisthatthepreparationtimeoftheplanisnotthesameastheexecutiontimeoftheplan。Whenpreparingtheplan,itmaynotbepossibletopredictthedifficultiesencounteredduringtheimplementationprocessveryaccurately。Therefore,weneedusintheFlexsimsoftware。Foreseeinadvancetoensurewhetherthetaskwillbeexecutedwhenthetaskisprepared。 了解到任务序列传统编制模式之后,就让我们以一个小案例来了解一下吧,就是一个简单的运输任务,将临时实体从暂存区1送至处理器,等待处理器进行处理之后送至暂存区2。 Afterunderstandingthetraditionalcompilationmodeoftasksequence,letustakeasmallcasetounderstandit,whichisasimpletransportationtask,sendingatemporaryentityfromtemporarystoragearea1totheprocessor,waitingfortheprocessortoprocessitandthensendingittothetemporaryDepositarea2。 进行连线之后,在暂存区1临时实体流的使用操作员选项中编写相关代码,其相关解释及注明我已放入代码中可放大观看。 Aftertheconnectionismade,writetherelevantcodeintheuseoperatoroptionofthetemporaryentitystreamintemporarystoragearea1,andtherelevantexplanationandnotethatIhaveputitinthecodecanbezoomedinandwatched。 运行结果如下,在处理器等待当前处理临时实体,并送至暂存区2之后再进行下一个临时实体的搬运: Theresultsoftheoperationareasfollows。Aftertheprocessorwaitsforthecurrentflowitemtobeprocessedandsendsittothetemporarystoragearea2,thenextflowitemismoved: 最后来总结一下完整任务序列的编制过程,第一步创建一个空的任务序列,具体设置如下: Finally,tosummarizethecompilationprocessofthecompletetasksequence,thefirststepistocreateanemptytasksequence。Thespecificsettingsareasfollows: createemptytasksequence(objdispatcher,numpriority,numpreempting) 第二步:往任务序列中插入具体的任务,根据任务的不同选用不同的参数,具体设置如下: Step2:Insertspecifictasksintothetasksequence,andchoosedifferentparametersaccordingtodifferenttasks。Thespecificsettingsareasfollows: inserttask(objtasksequece,numtype〔,objinvolved1,objinvolved2,numvar1,numvar2,numvar3,numvar4〕) 第三步:将创建好的任务序列分派出去,具体设置如下: Step3:Assignthecreatedtasksequence,thespecificsettingsareasfollows: dispatchtasksequence(objtasksequence) 希望能对你们的学习有一定的帮助。 Ihopeitwillbehelpfultoyourstudy。 参考资料:腾讯课堂《从小白到大神》 英文翻译:Google翻译 本文由LearningYard新学苑原创,若有侵权请联系删除。