question

Luis Gustavo Freitas avatar image
0 Likes"
Luis Gustavo Freitas asked Felix Möhlmann commented

Bug on Storage.system.getSlot() command

I need to simulate a ruge initial storage at time 0.01 with over 20k pallets that must follow some conditions, first this conditions was checked by query using findSlot(), but this way the model freeze and take more then 10 minutes to run.

Now i'm using lists to define the adress and check the conditions, but i'm having trouble with the Storage.system.getSlot(), a thing that must be a bug cause i'm passing the adress get by .querySlots() and the getSlot() is returning null (no path).

//QuerySlots get all slots Here
Array arr_slots = Storage.system.querySlots("");

//Loop for all slots
for (int n=1;n<=arr_slots.length;n++){
//Define the slot
Storage.Slot ssl_thisslot = arr_slots[n];
//Supose to use this variable, but not even direct works
string str_address = ssl_thisslot.address;

//This Line is not working
Storage.Slot ssl_Slot = Storage.system.getSlot(ssl_thisslot.address);

I'm attaching the model down below, this model was made on 21.2.3, but i've already tryied on 22.0 too.

StorageSystemGetSlot.fsm


Thanks.

FlexSim 21.2.3
storage systemstorage slotaddress scheme
5 |100000

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

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

The address scheme you are using is set to have a fixed length of 1 for the zone id, yet on the rack objects, the id is written as 0X.

1645043219885.png

1645043237343.png

Due to the address scheme setting, only the 0 is read. You can see this in the value of your str_address variable. A slot with the address Z0-... doesn't exist though, so the command returns null.

When you change the zone id to have a length of 2 (or variable length) or delete the extra "0" in the rack's address settings, the command will work correctly.


1645043219885.png (8.7 KiB)
1645043237343.png (8.9 KiB)
· 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.

Luis Gustavo Freitas avatar image Luis Gustavo Freitas commented ·
Thank you @Felix Möhlmann, it was exactly that detail making me crazy cause wasn't able to find it.

With this logic I was able to reduce the run time of the storage from 10 min to 1 min!

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Luis Gustavo Freitas commented ·
That's great to hear! Always happy to help.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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