0
votes

I am currently attempting to model a warehouse in AnyLogic. I have been using the Rack system with 5 pallet racks. I need the model to fill the pallet racks one at a time, i.e. currently when i initialise the model at 50% utilisation, all of the pallet racks are filled to 50% and i would like 2 and a half pallet racks to be filled up. Conversely, i would like the RackPick block to pick products from a single pallet rack until it is totally empty before it moves onto the next full pallet rack within the racking system. How can i achieve this? I am new to Anylogic.

1
Welcome to StackOverflow. Please take some time to read the help pages, especially the sections named What topics can I ask about here? and What types of questions should I avoid asking?. Also please take the tour and read about how to ask good questions. - Rumit Patel

1 Answers

0
votes

I will show you how to do it with storing... You will have to do something similar with the picking.

You will need the following things:

  1. Put the palletRacks in the order of priority in your rackSystem
  2. Your agent will have a parameter called palletRack of type PalletRack with default value main.getPalletRack()
  3. You need to create that getPalletRack function in main.

This function will use the following code:

for(PalletRack p : rackSystem.palletRacks){ //loops through the palletRacks of the rack system
    if(p.hasSpace()) //checks if it has space
        return p; // if it has space, return the palletRack
}
return null;

if you are familiar with this, you can also just have this in the function:

return findFirst(rackSystem.palletRacks,p->p.hasSpace());

Both do the same thing... but the second is not known by a new AnyLogic user

Finally:
In your rackStore, you will do the following: rackStore