Pick front item from a two deep pallet rack

拟墨画扇 提交于 2019-12-11 17:13:11

问题


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?


回答1:


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.

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:

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).

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)

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);
}

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...



来源:https://stackoverflow.com/questions/50176959/pick-front-item-from-a-two-deep-pallet-rack

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!