question

night avatar image
0 Likes"
night asked night commented

Random object from a single source

I would like to have a single source and it will output either item 1, item 2 or item 3 such that when it flows to a separator, the process timing will differ according to item 1, 2 or 3.

How can I do that? I am aware that my separator can generate randomised process timing but I would like it so that when I am doing a Stats collection, it will show up as the number of items that have been processed. ie, item 1 outputted 3, item 2 outputted 4, item 3 outputted 5.

FlexSim 23.1.0
sourceseperator
· 1
5 |100000

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

Julie Weller avatar image Julie Weller commented ·

Hi @night, was one of Joerg Vogel's or Sri_vikas K's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered night commented

Hi @night, @Sri_vikas K has said everything. But summarized here my answer:

scripting-in-triggers.jpg

switch_flexscript.fsm


· 1
5 |100000

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

night avatar image night commented ·

Thank you, this does seem to be what I am searching for. I'll take a further look at it again.

0 Likes 0 ·
Sri_vikas K avatar image
0 Likes"
Sri_vikas K answered Joerg Vogel commented

Hi @night

I have constructed your using ports, I have given three ports from source to processor and again three ports from processor to queue. Again, on queue entry I have given a trigger that writes to a global table. according to the Label Type value. Please refer to the model attached below.

Processor with different process times and writing to global table model..fsm


· 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.

night avatar image night Sri_vikas K commented ·

The one with the dashboard seems to be close to what I am looking for, but from what im seeing in this model, the source creates item 1,2,3 in the same sequence. is it possible to have it randomised? and how can I change the item name?

0 Likes 0 ·
Sri_vikas K avatar image Sri_vikas K night commented ·

You can use the value in the label box to randomize the label created.1690869230575.png

I did not get what you mean by changing item name?

0 Likes 0 ·
1690869230575.png (12.3 KiB)
Show more comments

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.