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.
0
votes
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:
- Put the palletRacks in the order of priority in your rackSystem
- Your agent will have a parameter called palletRack of type PalletRack with default value main.getPalletRack()
- 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
