AnswerHub Upload Issue
Our AnswerHub community currently has a bug that prevents you from attaching your model or other files to your questions. AnswerHub is aware of this issue and they are working on a fix. Until we receive their patch, you can upload your models and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.

question

Tyler Morrison avatar image
0 Likes"
Tyler Morrison asked Tyler Morrison answered

Send to port by percentage when there aren't matching item types

send-to-port-by-percentage-when-there-are-not-matc.fsm

Hello,

I'd like to send items from a processor to one of three queues by matching item types, but whenever there is an item ready to be released from the processer that doesn't have any matching item types in the downstream queues I need to send it to one of the queues by percentage rather than by the first available queue. The best way I can think to do this is to edit the code of the matching item types flow option. I started looking at the code behind the matching item types flow option but since I haven't done much actual code writing in Flexsim I'm struggling to follow the code. Can someone please help me edit the code to follow the logic I want when there are no matching item types? My model is attached.

Thanks.

FlexSim 19.1.0
flexscriptflowoutput port
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

·
Tyler Morrison avatar image
0 Likes"
Tyler Morrison answered

After looking at the code again and watching items move through the code line by line I was able to solve my issue. I copied the code from the by percentage flexscript over the bottom portion of code in the matching items type flexscript so that if there are no matching item types it goes to a queue by percentage rather than by first available.

5 |100000

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

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.