Anylogic - forklifts being stuck when loading storage - anylogic

I am using forklifts (free-space navigation type) to load pallets into storage. The storage has 1 rack, 5 bays, and 4 cells deep in each bay. It is of the stand-alone type. At some stage two forklifts will get stuck as shown in the image below.
I don't believe this is coding issue but more to do with the Anylogic collision behaviour. I have tried varying the 'Min distance to obstacle' value from 0m to 3m. I have also tried setting the size of the forklift as well as leaving that unchecked.
Does anyone have any tips on stopping this from happening? Please let me know if more information is required.
Thanks
Forklift Fleet settings:

There is a conflict-resolution setup that you can use to solve those (inevitable) gridlocks. Use the "TransporterControl" element and play with it:

Related

Trasporters are jammed at a specific location in AnyLogic

I hope you are having a great day.
Recently, I tried to build an AnyLogic model with free-space transporters, but I encountered an unexpected situation as shown below.
I thought that there is no logical reason why all the transporters are jammed in a specific position. Is there any solution or possible reason for this situation? I have attached my model for your information.
Thank you for reading this question.
The problem with the traffic jam appears to be due to the fact that there are two few attractors available for the transporters to place the items and then they get stuck waiting for an attractor to become available...
When running your model as-is I get a jam in the stage one area
And in the logic blocks, I can see that the transports are stuck in the "Move By Transporter" block.
If I assume the attractors are set to 4 for a reason I would suggest the following logic - similar to what is described here
You create a list of all the attractors available. See the neat trick in AnyLogic where if you select a bunch of objects and then right-click on them you can automatically create a collection.
You can call it something like attractorsAvailabeStage1
And create a new map to store the WIP agents that will be occupying the attractors
And have a function that will provide the available attractors.
Change the move by transporter option to move to an attractor
And also return the attractor as available once it gets moved from its location
Now you only need to prevent mew agents from entering the area if there is no more attractors left or agents on their way to the attractors
I tested it and it works great for stage 1 you need to do it for all the stages.
On second thought....
seeing that you do have resource pools and service blocks. You can achieve the same logic I described by having resources first size the locations, then go to the transport block, and then be delayed
You first seize the space in the stage, then you move to the space, then you delay it.... then you wait, then seize the space in stage 2, then move there, then release stage 1.
I would go for the latter option

Considering differences in the same materials - Stations

I am trying to simulate a manufacturing assembly process, where material items are processed following an unique line. In the quality control stations, when a failure is detected, the object is sent to the repair area (by a truckpallet) and, when it is repaired, the same resource takes it and puts it at the start of the line. Until this point, I already programmed it.
The problem is the following: when it is a repaired object, is has to follow the same conveyor but with no stops in the stations. The object must enter a station and leave it, with no delays (as the works related with the stations have already been made).
I thought the best would be to consider the difference (repaired vs. not repaired) in the Agent, but then I can't work with it in the Main agent... I have also tried alternative solutions, for example defining variables in each station 1 and consider that in the stations delays and in the following station:
triangular( 109.1*delay_bec, delaytime_bec*delay_bec, 307.6*delay_bec)
Actions - in finished process:
if(delay_bec==0){
delay_headers=0;
delay_bec=1;}
But nothing worked... Any help?
I thought the best would be to consider the difference (repaired vs. not repaired) in the Agent, but then I can't work with it in the Main agent...
This is actually the correct approach. You need to create a custom agent type, give in a boolean variable isRepaired (or similar) and then in the delay you can dynamically adjust the duration using that characteristic:
agent.isRepaired ? 0. : 100
This will delay normal agents by 100 time units and repaired agents not at all.
Obviously, you must make sure that the agents flowing through the flow blocks are of your custom agent type (see the help how to do that)

how do i fix this error about pallet rack network?

I am creating network with different pallet rack and paths and the model gives me this error :"Pallet rack root.palletRack_360: couldn't find the path for the cell #0".Why?
thanks for the help.
here the model:https://1drv.ms/u/s!AhfvS-jv8ukShIRtDNG-DUolG-Z6Ow?e=SBUOph
Likely, you have accidentally created more than 1 network. However, agents can only navigate within 1 network. See how many networks you have by checking the "Projects" view under Main->Presentation->level
Below, I accidentally created 2 networks:
Combine items from different networks by ensuring that every path is connected properly
If there's a Path point inside the aisle (which turns green when in network) of the rack, then you may get this error. Try keeping just the continuous path without any points in the aisle.

Forklifts stop moving and freeze in place

I am facing an interesting problem with this warehouse model of mine. I have forklifts that move shipments around a network- the warehouse, and the model seems to be running fine until st some point forklifts start getting stuck at random location in the network for no reason. The longer I run the model the more forklifts are stuck. The are like completely frozen in place. At first I was defining the number of forklifts- resource pool capacity, using a schedule and I thought that might be the problem, so I went a head and changed it to constant capacity, and the problem still arises as you can see in this image.
As far the resource pool, the seize, and release blocks concerned; I kept the default settings and didn't change anything.
Here's a screenshot of the resource pool properties. I defined forklift as an agent and inside that agent is nothing but the image of a forklift and at the "use in flowchart as" box I set it to resource unit. I don't quite understand the 100 at the end of shift priority box, but I left it at the default value.
Here's a screenshot of one of seize blocks but all the block are similar
Similarly, this is screenshot of one of release blocks where the forklifts return to their home location after each task. Here I tried all the options from return to home every time to release from a given pool and choose the forklift pool or just releases the correspondent seize block, and that all didn't resolve the issue
Again, the model runs fine and only after 10% of the running time period this starts to happen. Any help would be appreciated.

Pick front item from a two deep pallet rack

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