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.

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.

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.