Bug on Storage.system.getSlot() command

Bug on Storage.system.getSlot() command

luis_gustavo_fsds
Not applicable
438 Views
3 Replies
Message 1 of 4

Bug on Storage.system.getSlot() command

luis_gustavo_fsds
Not applicable

[ FlexSim 21.2.3 ]

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;
//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.

0 Likes
Accepted solutions (1)
439 Views
3 Replies
Replies (3)
Message 2 of 4

moehlmann_fe
Collaborator
Collaborator
Accepted solution

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.

Message 3 of 4

luis_gustavo_fsds
Not applicable
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
Message 4 of 4

moehlmann_fe
Collaborator
Collaborator
That's great to hear! Always happy to help.
0 Likes