question

Mia L avatar image
0 Likes"
Mia L asked tannerp answered

Change 3D Shape

I am using 2 queues attached to a combiner and one of them changes 3D shape on entry. I noticed in the trigger tab that the getshapeindex command runs slow if called frequently. How can I change the 3D shape in a global variable instead?

FlexSim 19.2.4
queuecombinerflexsim 19.2.4global variables3d shapes
· 4
5 |100000

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

tannerp avatar image tannerp commented ·

The 3D shape change is going to run at the same speed whether you call it in the queue trigger or Global Variable or anywhere. Perhaps you could post a model that illustrates the problem you're having so we can suggest a solution?

0 Likes 0 ·
Mia L avatar image Mia L tannerp commented ·
0 Likes 0 ·
tannerp avatar image tannerp Mia L commented ·

@Mia L,

So sorry, but the link didn't work. Would you mind trying it again? If that doesn't work, I can have you email it to me.

0 Likes 0 ·
Show more comments

1 Answer

tannerp avatar image
0 Likes"
tannerp answered

@Mia L,

Sorry, I didn't understand your initial question. The getshapeindex() function is called in the On Entry trigger (line 10). All it's suggesting is that you use a Global Variable (i.e. hard code) for the number so you don't have to call that function. In a model this size, you're probably okay not to worry about it, but if you had thousands and thousands of items, you might notice it slowing the model down.

I updated your model by adding a Global Variable called "ShapeIndex" with a value of 2 (cylinder is in second position in FlowItem Bin) that eliminates the need to call the aforementioned function. You can test it by changing the ShapeIndex Global Variable to 3 or another number. Hope this helps.

cylinder-queue_1.fsm


global-variable.png (18.3 KiB)
cylinder-queue-1.fsm (155.2 KiB)
5 |100000

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