0

I am trying to simulate a distribution center in AnyLogic. I have a question regarding retrieving of products from a storage rack cell.

I store Handling Units (agents) in the storage racks. A Handling Unit consists of multiple items and I want to retrieve these items one-by-one until the number of items in the Handling Unit is reached. I am able to retrieve the entire Handling Unit from the storage rack, but is it also possible to retrieve items from this Handling Unit without retrieving the actual Handling Unit from the storage rack? I think something like the split block can help, but then I get an error message that the storage rack does not contain the agent (as the copy is different from the original in some way?). It would be great if someone could help me with this.

Thanks a lot in advance.

  • Have you tried using the "Split" element after RackStore? It helps you split single agents into multiple ones. However, I am not sure how AnyLogic handles rack positions if you split them inside a rack position, have a try :-) – Benjamin Jan 13 '20 at 11:02
  • Hi Benjamin, I did try that and I get the following error message: root.RackPick: The storage root.StorageSystem does not contain the agent. The split works fine but it does not place the copy's in the storage rack and therefore I cannot pick these as the rackPick block cannot find them. How do I accomplish that the copy's are placed in the same storage cell as the original? Maybe it is not even possible to store multiple agents in the same cell but I am not sure of that. Thanks in advance. Kind regards, Kevin – Kevin America Jan 13 '20 at 11:29
  • Ha, please do check https://stackoverflow.com/help/how-to-ask . You should always mention what you already tried (to save us some hassle ;-) ). – Benjamin Jan 13 '20 at 12:19
  • 1
    I did add it to the initial question before your comment ;) I think something like the split block can help, but then I get an error message that the storage rack does not contain the agent (as the copy is different from the original in some way?) I think you missed it when reading but that's not a problem. Thank you for all your effort. I will give your solutions a try and come back to the problem when it works! – Kevin America Jan 13 '20 at 12:26

1 Answers1

0

You can only have 1 agent in 1 rack position.

Several options options:

  1. split them before RackStore and transport them together with some resource. They will not be stored in 1 position, though.
  2. Add a parameter numTaken that reflects the number of subagents (say 5 initially). Everytime your resource is asked to take an individual product, you reduce that number by 1. Instead of picking the parent agent, you create a separate new agent near the Rack position and let the resource transport that away (using a "fake" RackPick that is simply a "MoveTo" block for the resource. Only when the parent agent's numTaken is down to 1 will the resource take the actual agent.

Both have advantages and disadvantages, depends on your system to decide which one is better.

Benjamin
  • 10,603
  • 3
  • 16
  • 28
  • Hi, I want to go for option 2 and I understand what you mean but I am one small problem away from the solution. You mention that I need to "create a separate agent near the rack position". I tried to use a split-block and set the X, Y, Z coordinates of the copy to the original agent, but that leads me to the error message that the agent is not in the network. Logically, because the X, Y, Z coordinates are not located on a path on which the resources can move. Any suggestions for this? (not sure if I need to open a new question again but I think it is part of the solution of this question). – Kevin America Jan 13 '20 at 13:32
  • You need to manually add your new agent to the existing network, see https://help.anylogic.com/index.jsp?topic=%2Fcom.anylogic.help%2Fhtml%2Fmarkup%2FAgent_API_Network.html&resultof=%22%73%65%74%6e%65%74%77%6f%72%6b%22%20 – Benjamin Jan 13 '20 at 17:57