从两个深的托盘架中挑选前面的物品 [英] Pick front item from a two deep pallet rack

查看:16
本文介绍了从两个深的托盘架中挑选前面的物品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个带有 rackStore 块的单个托盘架中存储两层深的代理.当我使用 rackStore 将物品从机架中取出时,它会先尝试从后面取走代理,但我收到以下错误消息,说无法取走它,因为它前面有其他代理.

I'm am storing agents two deep in a single pallet rack with a rackStore block. When I take items out of the rack with rackStore it tries the take the agents at the back first and I get the error below saying it couldn't be picked as there are other agents in front of it.

有谁知道我可以从前面选择吗?

Anyone know how I can pick from the front instead?

推荐答案

这是 AnyLogic 软件中的一个大失败,他们必须紧急解决这个问题.因为当涉及到深仓时,你必须手动控制一切.

This is big fail in the AnyLogic Software and it is something they have to fix urgently. Since when it comes to deep positions, you have to control everything manually.

我会给你一个例子,它绝对不是解决你的特定问题的最佳方式,这只是让你了解如何将其扩展到更多东西的一步.因为尽管这应该是一个非常简单的问题,但事实并非如此.这仅适用于 2 层深、1 层高度和独特行的 2 个机架.

I will give you an example that is definitely not optimal on how to solve your particular question and it will be just a step for you to understand how to extend it to something more than this. Because even though this should be a very easy question, it is not. This will work only 2 racks with 2 levels deep, 1 level of height, and a unique row.

所以这是您需要的结构:

So this is the structure you would need:

由于我不知道您的产品在货架上停留多长时间,我会假设一些事情,即随着事件的发生,我将每 5 秒决定是否从货架上获取产品(这是绝对任意).

Since I have no idea how long your products stay on the rack, I will assume something, which is that with the event, I will make the decision on wether getting or not a product from the rack every 5 seconds (this is absolutely arbitrary).

您将需要一个自定义代理来存储深度位置.我给代理 Box 打电话,我会有一堆箱子.不是在图片中,我也将代理添加到自定义填充框.框代理将有 2 个变量:深度和位置,它们将存储代理在机架中的位置和深度(如果您需要,还需要水平和行)有一个更复杂的机架)

You will need a custom agent to store the deep position. I call the agent Box and I will have a population of boxes. Not in the picture that I also add agents to the custom population boxes.The box agent will have 2 variables: deep and position which will store the position and deep level of the agent in the rack (you will need also level and row if you have a more complex rack)

现在对于每 5 秒循环运行一次的事件,我有以下操作:(如果有箱子在等待,如果有可用资源,如果没有叉车将产品移动到托盘货架,它就会激活) 我必须这样做,因为在箱子已经放在托盘架上之前,我不知道叉车要把箱子放在哪里.然后我使用 findFirst 函数检查一个盒子是否在另一个盒子后面,如果一切正常,就会发送一个盒子以供挑选.

Now on the event, which runs cyclically every 5 seconds, I have the following action: (it activates if there is a box waiting, if there is a resource available and if there is no forklift moving a product to the pallet rack) I have to do this because I cannot know where the forklift is going to put the box until the box is already in the pallet rack. Then I check if a box is not behind another with the findFirst function and if everything ok, a box is sent to be picked.

if(wait.size()>0 && resourcePool.idle()>0 && rackStore.size()==0){
    Box bx=findFirst(wait,b->b.deep==0);

    if(bx!=null)
        wait.free(bx);
}

在 rackStore 出口上,我需要存储仓位,因此在退出时"操作中,此代码将有所帮助(您检查同一位置是否还有另一个框,如果有,则更新deep 变量.然后你存储新代理的位置和深度的值)

On the rackStore exit I need to store the positions so in the "on exit" action, this code will help (you check if there is another box in the same position, and if there is, you update the value of the deep variable. Then you store the value of the position and deep of the new agent)

Box box=findFirst(wait,b->b.position==position);
if(box!=null){
    box.deep++;
}
agent.deep=0;
agent.position=position;

最后在机架上选择退出操作,一旦产品被拣选并交付,您更新它后面的盒子的深度值(如果有)

Finally on the rackPick on exit action, once the product is picked and delivered, you update the deep value of the box that was behind it (if any)

Box bx2=findFirst(wait,b->b.position==agent.position);
if(bx2!=null){
    bx2.deep--;
}

我知道这一切看起来有点疯狂,但是在使用深层次时,您必须自己创建所有逻辑......

I know all this looks a bit crazy, but you have to create all the logic yourself when it comes to using deep levels...

这篇关于从两个深的托盘架中挑选前面的物品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆