question

Maryam H2 avatar image
0 Likes"
Maryam H2 asked Jason Lightfoot edited

Capacity of the Storage System

Hi there,

Is there anyway to know the capacity of a storage syste? (The storage system has different rack type and different SKUs that have different dimensions). I want to estimate somehow how many items from each type of SKU I can fit in a rack and in a the whole storage.


A sample model is attached.


storage-model-fm-2_autosave.fsm

FlexSim 23.1.0
rackstorage systemmaximum capacity
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

To find the physical capacity for all slots or to a account for any allocation rules you may have in place? The former is possible - the latter could range from tricky to impossible - depending how complicated is your item-slot allocation logic.

0 Likes 0 ·
Maryam H2 avatar image Maryam H2 Jason Lightfoot ♦♦ commented ·

@Jason Lightfoot Yes, to find the physical capacity for all slots, meaning for each rack or each Zone (w multiple racks in it) how many SKU items of each type I can fit given the dimension for each each SKU type is different.



0 Likes 0 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Here's a script to run which will write the capacities to the table "RackSKUcapacities" with something like this:

1689179077301.png

..which shows the number of that SKU that would exclusively fit in (without any other SKUs being mixed in the rack - so Rack1 above would fit 1529 boxes OR 190 cylinders).

In the code below you need to edit the flowItem names withing the array for the objects you want to appear in the table.


resetmodel();
var storageObjects=Storage.system.storageObjects;
Array flowItemNames=["Box","Cylinder","Tote"];  // Add/remove names to this array


Array skus=[];
while (flowItemNames.length){
    treenode t=Model.find("Tools/FlowItemBin/"+flowItemNames.shift()+"/1");
    if (t)
        skus.push(t);
}
Table result=Table("RackSKUcapacities");
result.setSize(storageObjects.length,skus.length);
Object item;
treenode temp=Model.find("Tools").subnodes.assert("temp");
for (int r=1;r<=storageObjects.length;r++){
    Object rack=storageObjects[r];
    string name=rack.name;
    result.setRowHeader(r,name);
    Array allItems;
    for (int n=1;n<=skus.length;n++){
                  
        int capacity=0;
        Object refsku=skus[n];
        result.setColHeader(n,refsku.name);
        item=createcopy(refsku,temp,0,0,1,0);
        allItems.push(item);
        Storage.Slot slot=Storage.system.findSlot("WHERE slot.storageObject=$1 AND slot.hasSpace($2)",0,rack,item);
        while (slot){
                  
            Storage.Item(item).assignedSlot=slot;
            capacity++;
            item=createcopy(refsku,temp,0,0,1,0);
            allItems.push(item);
            slot=Storage.system.findSlot("WHERE slot.storageObject=$1 AND slot.hasSpace($2)",0,rack,item);
        }
        allItems.pop().destroy(); // last was not allocated
        while (allItems.length)
            Storage.Item(allItems.pop()).assignedSlot=0;
        result[r][n]=capacity;
        clearcontents(temp);
    }
}
temp.destroy();



1689178724347.png (3.8 KiB)
1689179077301.png (6.4 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Maryam H2 avatar image Maryam H2 commented ·

@Jason Lightfoot

Got it, this is helpful.

Could you explain when you say I need to set up the array of pointers to the sku objects what do you really mean step by step?

Can you send the model which you create this so I can see how you've done that?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Maryam H2 commented ·

I've updated the code so now you only have to edit the list of flow item names in the array on line three, and ensure you have a global table called 'RackSKUcapacities' in the model.

In the attached model there is also a user command defined where you can pass in the array of flowitem names like this:

generateRackCapacities(["Tote","Box"])

GenerateRackCapacities.fsm


If you've designated labels in your storage system on which to match labels of the item, you could add that to the findSlot query to understand the impact of that constraint. You'd read the label value from the refsku and pass it to the query as $3.

1 Like 1 ·
Maryam H2 avatar image Maryam H2 Jason Lightfoot ♦♦ commented ·
Got it, very helpful!

Thanks

0 Likes 0 ·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Maryam H2 commented

In most cases, it is impossible to know the capacity of the storage system because the capacity depends on the slots AND on the items. There are innumerable sets of items that could fill the storage system exactly:

  • 0 big things and 1000 small things
  • 1 big thing and 995 small things
  • 2 big things and 990 small things
  • etc., etc.

There may be extremely simple cases where you might be able to estimate the total capacity. Here are a few simplifying assumptions:

  • All slots are the same size
  • All items are the same size
  • There is only one limit on the number of items per slot, and that is the physical size of the slot.

If you meet all three of those assumptions, then you can multiply the number of slots by the number of items per slot to get capacity.

If you don't meet even one of those assumptions, it gets much more difficult.

  • If all slots are not the same size, you need to use a for-loop to sum up the total capacity based on slot size (still assuming all items are the same size and that size is the only limit on capacity).
  • If all items are not the same size, then you're out of luck. The total capacity depends on the items in the system.
    • You could get around this by assigning certain types to certain slots, and not allowing that to change. For example, you could assign 100 slots to small items and 400 slots to big items. Then you can estimate the capacity. If that works, then great. However, consider that the total capacity could be wildly different if you chose a different mix of slot assignments. Perhaps allocating more slots for certain types and less for others is a better fit for your system.
  • FlexSim lets you add items to slots without worrying about physical space, if that's not important to your model. If that's the case, your storage system could have infinite capacity.
  • If you are limiting by space, you might have additional limits as well, such as total weight. In that case, once again your capacity depends on what you have in the storage system.

So, your estimate depends on how many assumptions you are willing to make. If you can make enough assumptions so that the capacity only depends on the slots and not on the items, then you can estimate capacity.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Maryam H2 avatar image Maryam H2 commented ·
@Jordan Johnson Not all SKU types are same size even though I assume slots have the same size. I have not yet run what Jason has sent but that seems helpful and close to what I need.
0 Likes 0 ·