单巷通道 今天的建模要求便是满足以下三点 Today’smodelingrequirementsaretomeetthefollowingthreepoints 第一、发生器产生三种不同类型和颜色的产品,下游的三个货架分别接收单一类型的实体; First,thegeneratorproducesthreedifferenttypesandcolorsofproducts,andthethreedownstreamshelvesrespectivelyreceiveasingletypeofentity; 第二、叉车的最大容量是五,且每次只装载相同类型的实体; Second,themaximumcapacityoftheforkliftisfive,andeachtimeitonlyloadsthesametypeofentity; 第三、叉车允许行进的路径,在巷道通行的过程中不允许掉头。 Third,thepathallowedbytheforkliftisnotallowedtomakeaUturnwhiletravelingintheroadway。 首先我们建立相关模型如下: First,weestablishtherelevantmodelasfollows: 本次建模需要使用节点,关于节点便不做过多的介绍,就是使运输工具按照指定路线行驶的工具。 Thismodelingrequirestheuseofnodes。Iwillnotintroducetoomuchaboutthenodes,whicharetoolstomaketransportationvehiclesfollowthespecifiedroute。 建立模型让发生器产生三种实体,并用颜色区分,利用指定端口的方式,使其分别送入对于的货架,这些操作之前涉及过很多次了,就不再赘述。 Establishamodelforthegeneratortogeneratethreekindsofentities,distinguishthembycolor,andusedesignatedportstosendthemtotherightshelf。Theseoperationshavebeeninvolvedmanytimesbefore,soIwon’trepeatthem。 然后满足建模要求第二点,将叉车容量改为5,若只进行这样的操作便会同时包含三种不同的类型,因此需要在叉车中进行下一步操作,在传递给的选项中,可以选择相同目的地,达到第二个要求 Thenmeetthesecondpointofthemodelingrequirementsandchangetheforkliftcapacityto5。Ifonlythisoperationisperformed,threedifferenttypeswillbeincludedatthesametime。Therefore,thenextstepintheforkliftisrequired。Intheoptionspassedto,youcanChoosethesamedestinationandmeetthesecondrequirement 那么最后便是实现第三点要求,可以通过自动和手动指定两种方式,先为大家介绍第一种自动,自动需要用到D连接,将货架两旁的节点使用D连接,如下: Thenthelastpointistoachievethethirdrequirement,whichcanbespecifiedautomaticallyandmanually。First,Iwillintroducethefirstautomaticmethod。AutomaticallyrequiresDconnection,andthenodesonbothsidesoftheshelfareconnectedbyD,asfollows: D连接呈橙色,重置运行后,会出现当货架利用完一半后,叉车便会恢复原来的行进路线,这是因为系统进行规划后选择的路线,会行走系统认为更加省时省力的路线。 TheDconnectionisorange。Aftertheresetoperation,theforkliftwillresumeitsoriginaltravelroutewhentheshelfishalfused。Thisisbecausetherouteselectedbythesystemafterplanningwilltraveltheroutethatthesystemconsiderstobemoretimesavingandlaborsaving。 因此还需要从节点入手进行升级,我们可以将节点设置成单向,阻止其一边通道即可,设置之后的效果图如下 Therefore,weneedtoupgradefromthenode。Wecansetthenodetobeonewayandblockonesideofthechannel。Theeffectdiagramaftersettingisasfollows 重置运行后的结果如下 Theresultaftertheresetoperationisasfollows 这样即使装载过半后,也不会更换途径,实现了整个建模。 Inthisway,evenafterloadingmorethanhalf,thepathwillnotbechanged,andtheentiremodelingisrealized。 接下来便是手动指定,我们将会用到reassignnetnode重新链接指令,取消D连接,恢复A连接,将货架与左边对应的节点进行S连接,可能会看不到所谓的线连接,但是其实是已经连接好的,因为这不是属于一种常规的连接方式 Thenextstepistospecifymanually。WewillusethereassignnetnoderelinkinstructiontocanceltheDconnection,restoretheAconnection,andconnecttheshelftothecorrespondingnodeontheleftwithS。Thesocalledlineconnectionmaynotbeseen,butitisalreadyGoodconnection,becausethisisnotaregularconnectionmethod 然后在叉车的卸载触发中,进行编码,那么运行结果我们会发现,它会一个一个的卸载,卸载一个后又重新回到右边节点,继续卸载,非常的耗时。 Thencodeintheunloadingtriggeroftheforklift,thenwewillfindthatitwillunloadonebyone,unloadonebyone,andthenreturntotherightnodetocontinueunloading,whichisverytimeconsuming。 因此我们需要修改代码,使其在卸载到最后一个实体时再进行重新分配 Therefore,weneedtomodifythecodesothatitwillbereallocatedwhenitisunloadedtothelastentity 运行结果如下 Theresultsareasfollows 这样我们便完成了整个模型,实现了所需要求,希望对你的学习有一定的帮助。 Inthisway,wehavecompletedtheentiremodelandachievedtherequiredrequirements,andhopethatitwillbehelpfultoyourstudy。 参考资料:腾讯课堂《从小白到大神,玩转FlexSim仿真软件》 英文翻译:Google翻译 本文由LearningYard学苑原创,若有侵权请联系删除!