Show the maximum capacity of the rack in Dashboard

Show the maximum capacity of the rack in Dashboard

GerardoRodea
Not applicable
476 Views
19 Replies
Message 1 of 20

Show the maximum capacity of the rack in Dashboard

GerardoRodea
Not applicable

[ FlexSim 23.1.3 ]

Hello!

I am trying to show the maximum capacity of the racks in the dashboard, how is that possible? This is to know the overall usage of my racks.

1688385146740.png

0 Likes
Accepted solutions (1)
477 Views
19 Replies
Replies (19)
Message 2 of 20

Paula_LG
Enthusiast
Enthusiast
Accepted solution

Hi,

I have created an example model using a statistics collector that calculates the percentage of empty and occupied slots based on the total number of slots of the rack. With that data collected, you can choose any base chart you want to illustrate the results. I hope it helps!

23.1 Statistics Warehouse Usage.fsm

0 Likes
Message 3 of 20

GerardoRodea
Not applicable

Thanks a lot for you kind support. Is there a possibility to do it without coding?

When I copy pasted the code to my model, It is just showing the values of my initial stock I created using a list but showing how it changes along the time. How to fix this?

0 Likes
Message 4 of 20

Paula_LG
Enthusiast
Enthusiast

You need to make sure that the event that updates the statistics collector is "On Slot Entry" of your rack, and that the Row Value is current.

1688537161814.png

If it still doesn't work as desired, you can attach your model here and I'll look it up for you!

0 Likes
Message 5 of 20

GerardoRodea
Not applicable
thanks Paula for the follow up. I was running with different values for the source and even when the rack is NOT full in the 3D model, the statistics collector is showing 100% full. Could you please verify?


I am also wondering if its possible to do it without coding.

0 Likes
Message 6 of 20

Paula_LG
Enthusiast
Enthusiast
There's no predefined graphs to show the value that you're looking for.

In order to identify why it isn't working properly, I'll need your model or at least a simplified copy of it. Could you attach the file on a comment here?

0 Likes
Message 7 of 20

GerardoRodea
Not applicable

Hello Paula,

If you see, in the handover stations and quarantine for example, the value of used should be really low but it is showing overall the same values for all the racks.

Thanks

Example.fsm

0 Likes
Message 8 of 20

moehlmann_fe
Enthusiast
Enthusiast

Paula's statistics collector only measures the content at the slot level. As soon as an item enters the slot, the slot is 'full' regardless of how much space the item actually takes up.

If all items have the same size, you can manually calculate the maximum capacity of a rack and write that number to a label. This label is then used by the statistics collector to calculate the fill level.

Alternatively, you go by volume, where you compare the total volume of items in the rack with the total available volume.

Both approaches are demonstrated in the attached model.

231-statistics-warehouse-usage-fm.fsm

Message 9 of 20

GerardoRodea
Not applicable

Thanks a lot for both approaches. In Paula's approach in the new file: 231 statistics warehouse usage, If I am understanding properly, once it's full, it should show 100%, but only when it's full shows only 50%.

For the volume part is do understand the logic. In my model, I would like to understand the same metric but by type of box used in the rack (I have 9 different type) all using the same size so it is fine using the slots approach.Example.fsm

0 Likes
Message 10 of 20

GerardoRodea
Not applicable
I've replied as a new answer, sorry :)
0 Likes
Message 11 of 20

Paula_LG
Enthusiast
Enthusiast

The reason why the statistics collector is showing nearly the same values for all the racks is because the code on the example model calculates the % considering all the slots in the storage system. To calculate this number having multiple racks, you need to add labels to the query, so that it only considers the slots you want.

I attach a new model with two racks to clarify what I mean.

23.1 Statistics Warehouse Usage.fsm

0 Likes
Message 12 of 20

GerardoRodea
Not applicable

Hello Paula, thanks for the reply.

It is not showing the real capacity of the racks, as you can see in the screenshot, once I full the rack, the table is showing 100% but in the 3d model is not 100% full.

not-showing-properly.png

Thanks a lot!

0 Likes
Message 13 of 20

Paula_LG
Enthusiast
Enthusiast
As @Felix Möhlmann commented, the code I used detects the slot as full the moment an item enters, regardless of its capacity. If you want to calculate it considering that multiple items can be stored in one slot, I recommend you take a look at the example model he attached.


0 Likes
Message 14 of 20

GerardoRodea
Not applicable

Thanks Paula. In Felix's solution is having a similar issue: once I run the model, it not showing 100% of used capacity, rather only showing 50% of the capacity used. I already changed the dimensions of the rack as possibly it is increasing the slot but not being able to use, with the same results. No matter which changes I do, it is always showing 50%.felix.PNG

0 Likes
Message 15 of 20

Paula_LG
Enthusiast
Enthusiast

This is the result I get from running Felix's model without changing anything.

1688564988916.png

0 Likes
Message 16 of 20

GerardoRodea
Not applicable
You are totally right! Thanks!! I'll investigate how to build it for my model.
0 Likes
Message 17 of 20

GerardoRodea
Not applicable

@Felix Möhlmann When I try to copy the values into my model, it is not showing any value, is there anything I should take care to make it work?


values.PNG

0 Likes
Message 18 of 20

moehlmann_fe
Enthusiast
Enthusiast
Did you add the MaxCapacity label to the rack(s)?
0 Likes
Message 19 of 20

GerardoRodea
Not applicable

I was missing that. Thanks! Could you then share to me the hint on how to calculate the max capacity? I see it's just an input number, but how was it calculated?

1688633870549.png

0 Likes
Message 20 of 20

moehlmann_fe
Enthusiast
Enthusiast

For the example model I just counted the capacity per slot and multiplied it with the number of slots in the rack.

If you have many differing slot sizes you can run the code below (for example in the srcipt console) to get the capacity of the given rack for the given item size.

Object rack = Model.find("Rack1");
double itemX = 0.61; double itemY = 0.61; double itemZ = 0.3; int capacity = 0; Storage.Object stoObjRack = rack; for(int b = 1; b <= stoObjRack.bays.length; b++) {     Storage.Bay bay = stoObjRack.bays;     for(int l = 1; l <= bay.levels.length; l++)     {         Storage.Level level = bay.levels;         for(int s = 1; s <= level.slots.length; s++)         {             Storage.Slot slot = level.slots;             capacity += Math.floor(slot.size.x/itemX)*Math.floor(slot.size.y/itemY)*Math.floor(slot.size.z/itemZ);         }     } } return capacity;
0 Likes