question

Roi Sánchez avatar image
0 Likes"
Roi Sánchez asked Jordan Johnson commented

Change Slot Stacking Order during simulation

Hello,

We are dealing with a model in which we made the Slot Stacking Order variable during the simulation. The thing is the model is apparently running ok if we do it step by step but when we execute a normal simulation pressing the Run button, it seems to happen different things and we think it is because of changing the Slot Stacking Order during the simulation run.

Does anybody know what is happening? Am I missing something?

Thanks!

22.0 Storage System Sample_2.fsm

FlexSim 22.0.1
storage system
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

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Jordan Johnson commented

The issue is that you need to call updatelocations(token.item) after you change the item's size. When you step, updatelocations() basically gets called for the whole model each step. When you run, it is called either less often or not at all.

· 5
5 |100000

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

Roi Sánchez avatar image Roi Sánchez commented ·
Thank you Jordan!
0 Likes 0 ·
Begoña Espiñeira avatar image Begoña Espiñeira commented ·

I found this answer very interesting. I have sometimes had similar situations doing a step by step instead of running a normal simulation and we usually try to solve it with a breathe. Is there any other commands called step by step that we should know about? @Jordan Johnson

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Begoña Espiñeira commented ·

I haven't run into anything else like that myself (besides breathe activities). I don't know a lot about updatelocations(); I just had a similar bug in a project once, and calling updatelocations() was the way to fix it. For breathe activities, I can usually explain why you needed one, but I'm not as familiar with updatelocations(). This bit of the user manual may be helpful:
https://docs.flexsim.com/en/22.0/BestPractices/ModelRepeatability/ModelRepeatability.html#item

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
Then this is a bug in the activity template code to change the size of an item.
0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Jason Lightfoot ♦ commented ·
I actually don't think it is a bug, that the activity doesn't call this every time. The updatelocations() call, like a breathe activity, may or may not be required, and it has a definite performance hit.


That being said, I'm definitely not the expert on updatelocations(). Email dev (include a link to this question), and we'll talk about it as a team.

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.