货架内放置代码
货架内放置代码
实际应用中,经常需要将多个货物放在货架的同一个货格里面,FlexSim自身有一个货格内部堆放的逻辑(即依次向后排),此逻辑可能不适用于所有场景,因此需要我们自定义设置item在货架内的位置,那么今天就为大家简单的介绍一下,将货物在货架上呈2乘2的方式排列,并在移动的时候不会改变其他货物的排列位置。
In practical applications, it is often necessary to put multiple goods in the same compartment on the shelf. FlexSim itself has a logic for stacking inside the compartment (that is, to row backwards in sequence). This logic may not be suitable for all scenarios, so we need us Customize the position of the item in the shelf, so today I will give you a brief introduction, arrange the goods on the shelf in a 2-by-2 manner, and will not change the arrangement position of other goods when moving.
首先我们简单的建立这个模型如下,货架可以设置的简单的一点为5层10列,由叉车搬运货物实体。
First of all, we simply set up this model as follows, the simple point that the shelf can be set up is 5 layers and 10 rows, and the cargo entity is moved by a forklift.
然后对货架进行简单的设置,选择放置到随机可用层,随机可用列,并设置其货格容量为4,满足2乘2的建模要求
Then simply set the shelf, choose to place it on the random available layer, randomly available column, and set its cargo compartment capacity to 4, which meets the 2×2 modeling requirements
那么这个时候我们运行模型的话,便会出现不停向后累加的结果,并没有满足每个货格放置四个,可能会不停的向后积累,远远超于四个,这是因为我们的货架容量设的相对较高,而随机放置到可用列当超过满足后,便会系统随机放置到随机列随机层中去,便会出现这样的情况。
So when we run the model at this time, the result of continuous backward accumulation will appear. It does not meet the requirement of placing four in each compartment. It may continue to accumulate backwards, far more than four. This is because we The shelf capacity of is set to be relatively high, and when it is randomly placed in the available column, when it exceeds the satisfaction, the system will be randomly placed in the random column and random layer. This will happen.
当我们将容量恰好设置到不超过最大需求量时,便会出现如下情况
When we set the capacity exactly to not exceed the maximum demand, the following situation will occur
因此为了满足2乘2的摆放方式,就必须从实体坐标位置出发,寻找突破点,当我们改变实体位置的时候,便会发现实体的坐标位置也会跟着变化,旋转角度等都会随之变化,而且实体属性中也会有坐标位置,并且两个位置存在一定的差别,这是因为两个采用的坐标系不相同,为了更加方便的进行,我们可以将其改成相同的坐标系,将坐标改为空间坐标。
Therefore, in order to satisfy the 2x2 placement method, we must start from the physical coordinate position and find the breakthrough point. When we change the physical position, we will find that the physical coordinate position will also change, and the rotation angle will change accordingly. , And there will be coordinate positions in the entity properties, and there is a certain difference between the two positions. This is because the two coordinate systems used are not the same. For more convenience, we can change it to the same coordinate system. The coordinates are changed to spatial coordinates.
现在我们知道实体坐标值之后,就需要将其调整为2乘2 的模式,也就是到达货格的奇数尽量靠左一点,偶数靠右一点,后两个的Y坐标靠后一点,并保持一致。那么我们就需要在货架的进入触发中进行代码编写。
Now that we know the coordinates of the entity, we need to adjust it to a 2-by-2 mode, which means that the odd numbers of the goods compartment should be left as far as possible, the even numbers should be a little bit to the right, and the Y coordinates of the last two should be a little bit behind and keep the same. . Then we need to write code in the triggering of the shelf entry.
进行如下代码编写其中
Write the following code
获得的结果如下
The results obtained are as follows
那么我们也会发现,货物最后还是会乱跑,打乱所编写的格式,所以接下来我们便要设置货物移动后不改变其他货物实体的位置
Then we will also find that the goods will still run around in the end, disrupting the written format, so next we have to set the position of other goods entities not to change after the goods are moved.
在离开触发中编写如下代码
Write the following code in the leave trigger
如上便完成了此次建模任务。赶快去尝试一下吧
The modeling task was completed as above. Hurry up and try it.
参考资料:腾讯课堂
英文翻译:Google翻译
本文由LearningYard学苑原创,部分来源于网络,若有侵权,请联系删除。
3。0版本的善为影业,网生领域的新力量作者林真心上线一周,冒牌大保镖内容热度值最高突破7057,同时登顶爱奇艺电影热播榜动作榜华语榜。互联网时代由于信息承载通路的无限空间,可选择项越来越多,大众注意力更难聚集。在长视频
向往的生活后又一高分综艺,黄磊赔本也要做我们做了一个最特别的节目,跟赚不赚钱没有关系,跟有没有流量也没有关系。黄磊在最后一期戏剧新生活里说道。去年年底,他作为发起人,邀请刘晓晔修睿赵晓苏吴彼刘晓邑丁一滕刘添祺和吴昊宸八位
辛巴被封杀却涨粉一千万,回归后狂收60个徒弟作者叶小彤这是我这几个月的成果!喜欢在直播中将人气和销售额冲到整数的辛巴,不知是否有意为之,在账号被封停的60天里,也将旗下的主播同时扩充到了60位。3月31日晚,辛巴携60位主播
北京文化三大蹊跷事5亿贷款走向,收购东方山水,欠债公告近来,我们从北京文化对深交所关注函回复的公告中发现一件奇怪的事情,即半年内,公司股东大会上股东层两次否决董事会提案。最近一次发生在今年1月29日,北京文化2021年第一次股东大会上
虚拟偶像公司万像文化获SIG数百万美金融资作者胡侃娱乐资本论矩阵号剁椒娱投获悉,近日,虚拟偶像领域头部企业万像文化已完成数百万美元的A轮融资。本次融资由SIG(海纳亚洲创投基金)领投,并且这是万像文化在10个月内完成的第三
抖音歌曲爆火的真相以借月联动山河令分析作者胡凯就借这月光,再与你对望,不管落魄风光,我都为你守望。一首借月让人回忆起热播剧山河令中的不少名场面,无论是周子舒温客行坐在屋顶对酒赏月还是在街角,周子舒微笑着轻声说老温,喝酒
阿里事件背后不堪的酒桌争议的价值观失落的淘鲜达作者夏雯琪8月7日晚,阿里巴巴女员工在济南被客户领导灌酒后遭遇性骚扰一事传遍全网,事件逐渐发酵,登上微博热搜第一。事件发生在11天前,7月27日晚,阿里女员工次日报警后,也曾向多名
耐克品牌翻车,代言人王一博要为此买单吗?从昨日起,HM抵制的抵制新疆棉的事件引起了轩然大波,引发了国人强烈的愤怒。央视评论其只会换来中国消费者自卫,中国事务容不得他国说三道四。淘宝天猫与其他电商均已下架了了关于HM店铺及
鸿星尔克喊话王一博,肖战代言李宁,国产品牌在崛起国外品牌抵制新疆棉花事件引来不少网友关注,说明网民的名族意识在提高。这其中也包括很多明星。不少明星明确表态支持新疆棉花,为此像黄轩王一博不惜和HM以及耐克解除合作关系以表明自己的态
宅斗剧没有斗,赘婿流无未来?作者王雅莉您就饶了十一吧,大太太。元娘是嫡,十一娘是庶。嫡庶有别,长幼有序,这是规矩。因弄坏元娘簪子,大雨瓢泼中,年幼的十一娘被大太太体罚。这是电视剧锦心似玉第一集第一幕的场景。和
起底人脸识别产业链,315晚会只曝光了人脸识别滥用的冰山一角娱乐资本论20210316今年,被滥用的人脸识别首次登上了央视315晚会。20多家装有人脸识别系统的商户,都没有明确告知消费者和征得同意,全是偷偷获取。这些商户有的是汽车4S店,有